/* ============================================
   TWO-FACTOR AUTHENTICATION STYLES
   ============================================ */

/* Modal Overlay */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(4px);
}

.modal-content {
    background: var(--bg-card);
    border-radius: 16px;
    max-width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.modal-header h2 {
    margin: 0;
    font-size: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-close {
    background: none;
    border: none;
    font-size: 32px;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.2s;
}

.modal-close:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.modal-body {
    padding: 24px;
}

/* Code Input */
.code-input-large {
    width: 100%;
    padding: 16px;
    font-size: 28px;
    text-align: center;
    font-family: monospace;
    font-weight: 600;
    letter-spacing: 8px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    transition: all 0.2s;
}

.code-input-large:focus {
    border-color: var(--primary);
    background: var(--bg-card);
    outline: none;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

/* 2FA Steps */
.2fa-step {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* QR Code Container */
#2fa-qr-container {
    position: relative;
}

#2fa-qr-code {
    display: block;
    margin: 0 auto;
    max-width: 250px;
}

/* Backup Codes */
#2fa-backup-codes-list {
    animation: fadeInUp 0.5s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Link Button */
.btn-link {
    background: none;
    border: none;
    color: var(--primary);
    font-size: 14px;
    cursor: pointer;
    padding: 8px;
    text-decoration: underline;
    transition: opacity 0.2s;
}

.btn-link:hover {
    opacity: 0.8;
}

/* Danger Button */
.btn-danger {
    background: #ef4444;
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
}

/* 2FA Settings Card */
.settings-2fa-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
}

.settings-2fa-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.settings-2fa-header h3 {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.settings-2fa-status {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
}

.settings-2fa-status.enabled {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.settings-2fa-status.disabled {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.settings-2fa-info {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 16px;
}

.settings-2fa-actions {
    display: flex;
    gap: 12px;
}

/* Security Badge */
.security-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

/* Responsive */
@media (max-width: 640px) {
    .modal-content {
        max-width: 100%;
        border-radius: 16px 16px 0 0;
        max-height: 95vh;
    }

    .modal-header {
        padding: 16px;
    }

    .modal-header h2 {
        font-size: 18px;
    }

    .modal-body {
        padding: 16px;
    }

    .code-input-large {
        font-size: 24px;
        letter-spacing: 6px;
    }

    #2fa-backup-codes-list {
        grid-template-columns: 1fr;
    }

    .settings-2fa-actions {
        flex-direction: column;
    }

    .settings-2fa-actions .btn {
        width: 100%;
    }
}