/* Estilos para el formulario de login - Valoras | Inspirado en Flycam */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600&display=swap');

body {
    font-family: 'Poppins', sans-serif;
    background-color: #fce4ec;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Layout flex solo para páginas de autenticación */
body.auth-layout {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    padding: 20px;
}

.login-container {
    background-color: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(224, 224, 224, 0.4);
    width: 100%;
    max-width: 380px;
    border: 1px solid #ee6f92;
    backdrop-filter: blur(10px);
}

.login-container h2 {
    text-align: center;
    color: #882A57;
    margin-bottom: 30px;
    font-weight: 500;
    font-size: 24px;
    letter-spacing: 0.5px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #882A57;
    font-weight: 500;
    font-size: 14px;
    letter-spacing: 0.3px;
}

.form-group input {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #ee6f92;
    border-radius: 12px;
    font-size: 16px;
    font-family: 'Poppins', sans-serif;
    box-sizing: border-box;
    transition: all 0.3s ease;
    background-color: #fafafa;
}

.form-group input:focus {
    outline: none;
    border-color: #882A57;
    box-shadow: 0 0 15px rgba(238, 111, 146, 0.2);
    background-color: white;
    transform: translateY(-1px);
}

.btn-submit {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #882A57 0%, #ee6f92 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 0.5px;
    margin-top: 10px;
    box-shadow: 0 4px 15px rgba(136, 42, 87, 0.3);
}

.btn-submit:hover {
    background: linear-gradient(135deg, #6b1e42 0%, #d45087 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(136, 42, 87, 0.4);
}

.btn-submit:active {
    transform: translateY(0px);
}

/* Estilos para el botón de reenvío de código */
.btn-resend {
    background-color: #882A57;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    margin: 0 auto;
    display: inline-block;
}

.btn-resend:hover:not(:disabled) {
    background-color: #6d1f43;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(136, 42, 87, 0.3);
}

.btn-resend:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background-color: #cccccc;
}

.resend-section {
    text-align: center;
    margin-top: 20px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.countdown-text {
    color: #666;
    font-size: 13px;
    margin-left: 10px;
    font-weight: 500;
}

.resend-message {
    margin-top: 10px;
    font-size: 13px;
    padding: 5px 10px;
    border-radius: 4px;
}

.resend-message .success {
    color: #28a745;
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
}

.resend-message .error {
    color: #dc3545;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
}

.logo {
    display: block;
    margin: 0 auto 0px auto;
    max-width: 180px;
}

/* Estilos para el select del código de país */
select {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #ee6f92;
    border-radius: 12px;
    font-size: 16px;
    font-family: 'Poppins', sans-serif;
    box-sizing: border-box;
    transition: all 0.3s ease;
    background-color: #fafafa;
    cursor: pointer;
}

select:focus {
    outline: none;
    border-color: #882A57;
    box-shadow: 0 0 15px rgba(238, 111, 146, 0.2);
    background-color: white;
    transform: translateY(-1px);
}

/* Botón primario reutilizable - Compatible con continue-btn existente */
.btn-primary {
    background: linear-gradient(135deg, #ee6f92 0%, #8b5a83 100%);
    color: white;
    border: none;
    padding: 15px 40px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-block;
    margin: 30px auto 0;
    min-width: 200px;
    text-decoration: none;
    text-align: center;
    font-family: 'Poppins', sans-serif;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
    background: linear-gradient(135deg, #d45087 0%, #6b1e42 100%);
}

.btn-primary:active {
    transform: translateY(0px);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-primary i {
    margin-right: 8px;
}

/* ==================================
   ESTILOS PARA VERIFICACIÓN DE DOCUMENTO
   ================================== */

/* Control del salto visual al expandir details */
details[open], 
.ocr-text-toggle, 
.results-container,
#idScanResult {
    scroll-margin-top: 90px;
    overflow-anchor: none;
}

details {
    transition: all 0.3s ease;
}

/* Scroll interno del texto OCR extraído */
.ocr-text-content {
    max-height: 420px;
    overflow-y: auto;
    background: #ffffff;
    border-radius: 10px;
    padding: 12px;
    box-shadow: inset 0 0 4px rgba(0,0,0,0.1);
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* Scrollbar personalizada para el texto OCR */
.ocr-text-content::-webkit-scrollbar {
    width: 8px;
}

.ocr-text-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.ocr-text-content::-webkit-scrollbar-thumb {
    background: #882A57;
    border-radius: 10px;
}

.ocr-text-content::-webkit-scrollbar-thumb:hover {
    background: #6b1e42;
}

/* Botón de análisis centrado y responsivo */
.analyze-button,
#analyzeIdButton {
    display: block;
    margin: 20px auto;
    max-width: 320px;
    width: 100%;
    text-align: center;
    box-sizing: border-box;
}

/* Ajustes responsive para móvil */
@media (max-width: 768px) {
    details[open], 
    .ocr-text-toggle, 
    #idScanResult {
        scroll-margin-top: 70px;
    }
    
    .ocr-text-content {
        max-height: 300px;
        font-size: 13px;
    }
    
    .analyze-button,
    #analyzeIdButton {
        max-width: 100%;
        padding: 12px 20px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    details[open], 
    .ocr-text-toggle,
    #idScanResult {
        scroll-margin-top: 60px;
    }
    
    .ocr-text-content {
        max-height: 250px;
        font-size: 12px;
        padding: 10px;
    }
}