.mbt,
.mbt * {
    box-sizing: border-box;
}

.mbt {
    width: 100%;
    max-width: 760px;
    margin: 24px auto;
    padding: clamp(16px, 4vw, 28px);
    color: #172033;
    background: #fff;
    border: 1px solid #dce2ea;
    border-radius: 16px;
    box-shadow: 0 8px 28px rgb(15 23 42 / 6%);
    font-family: inherit;
    line-height: 1.6;
}

.mbt [hidden] {
    display: none !important;
}

.mbt h2 {
    margin: 0 0 16px;
    color: #172033;
    font-size: clamp(24px, 5vw, 30px);
    line-height: 1.25;
}

.mbt label {
    display: block;
    margin: 16px 0 6px;
    font-weight: 700;
}

.mbt input[type="text"],
.mbt select,
.mbt textarea {
    display: block;
    width: 100%;
    max-width: 100%;
    min-height: 44px;
    margin: 0;
    padding: 11px 12px;
    color: #172033;
    background: #fff;
    border: 1px solid #bdc8d8;
    border-radius: 8px;
    font: inherit;
    font-size: 16px;
}

.mbt textarea {
    min-height: 120px;
    margin-bottom: 12px;
    background: #f8fafc;
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    resize: vertical;
}

.mbt-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 16px 0;
}

.mbt button {
    appearance: none;
    min-height: 44px;
    margin: 0;
    padding: 10px 16px;
    color: #fff;
    background: #175cd3;
    border: 1px solid #175cd3;
    border-radius: 8px;
    font: inherit;
    font-weight: 600;
    line-height: 1.4;
    text-transform: none;
    cursor: pointer;
}

.mbt button:hover:not(:disabled) {
    color: #fff;
    background: #124aa8;
    border-color: #124aa8;
}

.mbt button.mbt-secondary {
    color: #172033;
    background: #f3f5f8;
    border-color: #cbd3df;
}

.mbt button.mbt-secondary:hover:not(:disabled) {
    color: #172033;
    background: #e7ecf3;
    border-color: #aab7c8;
}

.mbt button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.mbt :is(button, input, select, textarea):focus-visible {
    outline: 3px solid #175cd3;
    outline-offset: 3px;
}

.mbt-help,
.mbt-privacy {
    color: #536174;
    font-size: 13px;
}

.mbt-help {
    margin: 10px 0;
}

.mbt-status {
    margin: 18px 0;
    padding: 12px 14px;
    color: #17446f;
    background: #edf5ff;
    border-radius: 8px;
    overflow-wrap: anywhere;
}

.mbt-status.mbt-error {
    color: #991b1b;
    background: #fff0f0;
}

.mbt-preview {
    max-width: 100%;
    margin-top: 20px;
    padding: 8px;
    overflow: auto;
    background: #fff;
    border: 1px solid #dce2ea;
    border-radius: 10px;
}

/* Breite Barcodes nicht unleserlich zusammendrücken. */
.mbt-preview svg {
    display: block;
    max-width: none !important;
    margin: 0 auto;
}

.mbt-value {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.mbt-camera {
    margin: 18px 0;
}

.mbt-camera video {
    display: block;
    width: 100%;
    max-height: 480px;
    background: #111;
    border-radius: 10px;
    object-fit: contain;
}

.mbt-privacy {
    margin: 20px 0 0;
    padding-top: 16px;
    border-top: 1px solid #e5eaf0;
}

@media (max-width: 480px) {
    .mbt-actions {
        flex-direction: column;
    }

    .mbt-actions button {
        width: 100%;
    }
}