/* =====================================================
   MFA DIALOG - Modal de autenticacion MFA
   ===================================================== */

/* --- Dialog Container --- */
.mfa-dialog .e-dlg-header-content {
    background: linear-gradient(135deg, #003d82 0%, #0059b8 100%) !important;
    color: white !important;
    padding: 0 !important;
    border-radius: 12px 12px 0 0 !important;
}

.mfa-dialog .e-dlg-content {
    padding: 0 !important;
    max-height: 60vh !important;
    overflow-y: auto !important;
}

.mfa-dialog .e-footer-content {
    padding: 16px 30px !important;
    background: #f8f9fa !important;
    border-top: 1px solid #e9ecef !important;
}

/* --- Header --- */
.mfa-dialog-header {
    padding: 24px 30px;
    text-align: center;
}

.mfa-header-icon {
    width: 56px;
    height: 56px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

.mfa-dialog-header h2 {
    margin: 0 0 10px 0;
    font-size: 22px;
    font-weight: 600;
    color: white;
}

.mfa-subtitle {
    margin: 0;
    opacity: 0.9;
    font-size: 14px;
    color: white;
}

/* --- Body --- */
.mfa-dialog-body {
    padding: 30px;
}

/* --- QR Section --- */
.mfa-qr-section {
    text-align: center;
    margin-bottom: 24px;
}

.mfa-qr-container {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 20px;
    display: inline-block;
    margin-bottom: 15px;
}

.mfa-qr-image {
    display: block;
    width: 200px;
    height: 200px;
}

.mfa-qr-placeholder {
    width: 200px;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mfa-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e9ecef;
    border-top-color: #003d82;
    border-radius: 50%;
    animation: mfa-spin 1s linear infinite;
}

@keyframes mfa-spin {
    to { transform: rotate(360deg); }
}

.mfa-qr-label {
    color: #6c757d;
    font-size: 14px;
    margin: 0;
}

/* --- Secret Section --- */
.mfa-secret-section {
    margin-bottom: 24px;
}

.mfa-secret-label {
    display: block;
    font-weight: 600;
    color: #495057;
    margin-bottom: 10px;
    font-size: 14px;
}

.mfa-secret-container {
    display: flex;
    gap: 10px;
    align-items: center;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 12px 15px;
}

.mfa-secret-key {
    flex: 1;
    font-family: 'Courier New', monospace;
    font-size: 15px;
    font-weight: 600;
    color: #003d82;
    letter-spacing: 2px;
    word-break: break-all;
}

.mfa-copy-button {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #003d82;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s ease;
}

.mfa-copy-button:hover {
    background: #0059b8;
    transform: translateY(-1px);
}

.mfa-copy-button:active {
    transform: translateY(0) scale(0.98);
}

.mfa-copy-button.mfa-copied {
    background: #4CAF50;
    animation: mfa-pulse 0.3s ease;
}

@keyframes mfa-pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* --- Instructions --- */
.mfa-instructions-section {
    background: #f8f9fa;
    border-left: 4px solid #4CAF50;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.mfa-instructions-section h3 {
    margin: 0 0 15px 0;
    color: #495057;
    font-size: 15px;
    font-weight: 600;
}

.mfa-instructions-list {
    margin: 0;
    padding-left: 20px;
    color: #495057;
}

.mfa-instructions-list li {
    margin-bottom: 12px;
    line-height: 1.6;
    font-size: 14px;
}

.mfa-instructions-list li:last-child {
    margin-bottom: 0;
}

.mfa-instructions-list strong {
    color: #212529;
    display: block;
    margin-bottom: 4px;
}

.mfa-instructions-list span {
    color: #6c757d;
    font-size: 13px;
}

/* --- App Links --- */
.mfa-app-links {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.mfa-app-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.mfa-app-link.mfa-android {
    background: #34A853;
    color: white;
}

.mfa-app-link.mfa-android:hover {
    background: #2d9448;
    transform: translateY(-1px);
}

.mfa-app-link.mfa-ios {
    background: #000000;
    color: white;
}

.mfa-app-link.mfa-ios:hover {
    background: #333333;
    transform: translateY(-1px);
}

/* --- Warning Message --- */
.mfa-warning-message {
    display: flex;
    gap: 12px;
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 8px;
    padding: 15px;
    color: #856404;
    font-size: 13px;
    line-height: 1.5;
}

.mfa-warning-message svg {
    flex-shrink: 0;
    margin-top: 2px;
}

/* --- Footer --- */
.mfa-dialog-footer {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.mfa-dialog-footer .e-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
}

.mfa-btn-secondary.e-btn {
    background: white !important;
    color: #495057 !important;
    border: 2px solid #dee2e6 !important;
}

.mfa-btn-secondary.e-btn:hover {
    background: #f8f9fa !important;
    border-color: #adb5bd !important;
}

.mfa-btn-primary.e-btn {
    background: #4CAF50 !important;
    color: white !important;
    border: none !important;
}

.mfa-btn-primary.e-btn:hover {
    background: #45a049 !important;
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3) !important;
}

/* --- Scrollbar --- */
.mfa-dialog .e-dlg-content::-webkit-scrollbar {
    width: 8px;
}

.mfa-dialog .e-dlg-content::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.mfa-dialog .e-dlg-content::-webkit-scrollbar-thumb {
    background: #003d82;
    border-radius: 4px;
}

.mfa-dialog .e-dlg-content::-webkit-scrollbar-thumb:hover {
    background: #0059b8;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .mfa-qr-image,
    .mfa-qr-placeholder {
        width: 180px;
        height: 180px;
    }

    .mfa-app-links {
        flex-direction: column;
    }

    .mfa-dialog-footer {
        flex-direction: column;
    }

    .mfa-dialog-footer .e-btn {
        width: 100%;
        justify-content: center;
    }
}
