/* Sellityet Komponenten-Bibliothek */

/* Modal */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    max-width: 560px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: 18px;
    font-weight: 600;
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-secondary);
    line-height: 1;
}

/* Status badges */
.badge {
    display: inline-flex;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.badge-success { background: rgba(0, 178, 148, 0.15); color: var(--accent); }
.badge-warning { background: rgba(255, 185, 0, 0.15); color: #FFB900; }
.badge-danger { background: rgba(209, 52, 56, 0.15); color: #D13438; }
.badge-info { background: rgba(0, 120, 212, 0.15); color: var(--primary); }

/* Table */
.table-wrap {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.data-table th,
.data-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.data-table th {
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.data-table tr:hover td {
    background: var(--surface-alt);
}

/* Alert */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius-md);
    font-size: 14px;
    margin-bottom: 16px;
}

.alert-info { background: rgba(0, 120, 212, 0.1); border: 1px solid var(--primary); color: var(--primary); }
.alert-error { background: rgba(209, 52, 56, 0.1); border: 1px solid #D13438; color: #D13438; }

/* OTP — 6 Ziffern nebeneinander */
.otp-input-group {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin: 8px 0 16px;
}

.otp-digit {
    width: 44px;
    height: 52px;
    text-align: center;
    font-size: 22px;
    font-weight: 600;
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface-elevated);
    color: var(--text-primary);
    padding: 0;
}

.otp-digit:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(0, 120, 212, 0.2);
}

.otp-digit-error {
    border-color: #D13438;
    animation: otp-shake 0.35s ease;
}

@keyframes otp-shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-4px); }
    75% { transform: translateX(4px); }
}

@media (max-width: 400px) {
    .otp-digit {
        width: 38px;
        height: 46px;
        font-size: 20px;
    }
    .otp-input-group { gap: 6px; }
}

/* Grid */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }

@media (max-width: 768px) {
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* Dark Mode — globale Formularfelder (Plattform-Seiten) */
input:not([type='checkbox']):not([type='radio']):not([type='color']):not([type='file']),
textarea,
select {
    background: var(--surface-elevated);
    color: var(--text-primary);
    border-color: var(--border);
}

input:disabled,
textarea:disabled,
select:disabled {
    background: var(--surface-alt);
    color: var(--text-muted);
}
