/* 🔐 Universal Passcode Generator - Mnemonic Recovery Styles */

/* Recovery Step Common Elements */
select, input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 20px;
    transition: border-color 0.3s;
}

select:focus, input:focus {
    outline: none;
    border-color: #2196F3;
}

.btn {
    background: linear-gradient(45deg, #2196F3, #1976D2);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin: 5px;
    display: inline-block;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(33, 150, 243, 0.3);
}

.btn:active {
    transform: translateY(0);
}

.btn-secondary {
    background: linear-gradient(45deg, #607d8b, #546e7a);
}

.btn-warning {
    background: linear-gradient(45deg, #ff9800, #f57c00);
}

.hidden {
    display: none !important;
}

/* Recovery Container */
.recovery-container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    background: white;
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: sticky;
    top: 1px;
    z-index: 100;
}

.recovery-header {
    background: linear-gradient(45deg, #2196F3, #1976D2);
    color: white;
    padding: 30px;
    text-align: center;
    width: 100%;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    border-radius: 15px 15px 0 0;
}

.recovery-header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
}

.recovery-header p {
    font-size: 1.1em;
    opacity: 0.9;
}

.recovery-main-content {
    padding: 30px;
    width: 100%;
    max-width: 1000px;
    align-items: center;
    min-width: 0;
    flex: 1;
}

/* QR Scanner Modal Styles */
.qr-scanner-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.qr-scanner-content {
    background: white;
    border-radius: 15px;
    padding: 20px;
    max-width: 450px;
    width: 90vw;
    max-height: 90vh;
    overflow: auto;
    position: relative;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.qr-close-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
}

.qr-close-btn:hover {
    color: #000;
}

/* Camera Styles */
.camera-container {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 20px 0;
}

.camera-video {
    width: 100%;
    max-width: 400px;
    border-radius: 10px;
    border: 3px solid #2196F3;
}

.camera-canvas {
    display: none;
}

.camera-status {
    margin: 15px 0;
    padding: 10px;
    border-radius: 8px;
    text-align: center;
    font-weight: 600;
}

.camera-status.loading {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.camera-status.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.camera-status.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* QR Preview Overlay */
.qr-preview-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    justify-content: center;
    align-items: center;
    pointer-events: none;
}

.qr-preview-canvas {
    border: 4px solid #ff3b58;
    border-radius: 10px;
    animation: qrPreviewPulse 1s ease;
    max-width: 75%;
    max-height: 75%;
}

@keyframes qrPreviewPulse {
    0% { opacity: 0; transform: scale(0.8); }
    50% { opacity: 1; transform: scale(1); }
    100% { opacity: 1; transform: scale(1); }
}

/* Step Process Map */
.process-map {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    display: flex;
    gap: 10px;
    align-items: center;
}

.step-indicator {
    flex: 1;
    text-align: center;
    padding: 12px;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
}

.step-indicator.active {
    background: #2196F3;
    color: white;
}

.step-indicator.completed {
    background: #4CAF50;
    color: white;
}

.step-indicator.inactive {
    background: #e9ecef;
    color: #6c757d;
    cursor: not-allowed;
}

/* Step Sections */
.step-section {
    margin: 20px 0;
}

.step-section.hidden {
    display: none;
}

/* Validation Report */
.validation-report {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    max-height: 300px;
    overflow-y: auto;
}

.validation-report.success {
    background: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
}

.validation-report.error {
    background: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

.mnemonic-display {
    background: #f3fbf8;
    border: 2px solid #c8e7e9;
    border-radius: 8px;
    padding: 15px;
    margin: 10px 0;
    font-family: 'Consolas', monospace;
    font-size: 0.9em;
    word-break: break-all;
    cursor: pointer;
    user-select: none;
}

.mnemonic-display.hidden-text {
    color: transparent;
    user-select: none;
}

.mnemonic-display.hidden-text::after {
    content: '[Hidden for Security - Click to reveal temporarily]';
    color: #666;
    font-style: italic;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .recovery-container {
        margin: 0;
        border-radius: 10px;
        position: static;
    }

    .recovery-header {
        padding: 20px 15px;
        border-radius: 10px 10px 0 0;
    }

    .recovery-header h1 {
        font-size: 1.8rem;
        margin-bottom: 8px;
    }

    .recovery-header p {
        font-size: 1rem;
    }

    .recovery-main-content {
        padding: 15px;
    }

    .qr-scanner-content {
        max-width: 95vw;
        max-height: 95vh;
        padding: 15px;
    }

    .camera-video {
        max-width: 300px;
    }

    .process-map {
        flex-direction: column;
        gap: 8px;
    }

    .step-indicator {
        width: 100%;
        padding: 10px;
    }

    select, input {
        font-size: 16px;
        padding: 12px;
    }

    .btn {
        padding: 12px 20px;
        font-size: 14px;
        width: 100%;
        margin: 5px 0;
    }
}

@media (max-width: 480px) {
    .recovery-header {
        padding: 15px 10px;
    }

    .recovery-header h1 {
        font-size: 1.5rem;
    }

    .recovery-main-content {
        padding: 10px;
    }

    .qr-scanner-content {
        padding: 10px;
    }

    .camera-video {
        max-width: 250px;
    }

    select, input {
        font-size: 16px;
        padding: 10px;
    }

    .btn {
        padding: 10px 15px;
        font-size: 13px;
    }
}
