/**
 * THINSCEN Anti-Captcha Modal Wellness Cálido
 * Archivo: assets/css/thinscen-anticaptcha-modal-wellness.css
 * Sistema 100% accesible, cálido, sin interferencia visual
 * WCAG AAA - Tipografía grande para baja visión
 * Fecha de creación: 16/10/2025 (D/M/A)
 */

/* ================================================
   MODAL OVERLAY - FONDO CÁLIDO WELLNESS
   ================================================ */

.thinscen-captcha-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(98, 81, 211, 0.15);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 999999;
    
    display: none;
    align-items: center;
    justify-content: center;
    
    opacity: 0;
    transition: opacity 0.4s ease-out;
}

.thinscen-captcha-modal-overlay.tac-visible {
    display: flex;
    opacity: 1;
}

/* ================================================
   MODAL CONTAINER - CÁLIDO Y ACOGEDOR
   ================================================ */

.thinscen-captcha-modal-container {
    background: linear-gradient(
        135deg,
        #fef9f3 0%,
        #f9f4ef 50%,
        #f5efe8 100%
    );
    
    border: 3px solid #d4af37;
    border-radius: 24px;
    
    padding: 45px 40px;
    max-width: 520px;
    width: 92%;
    max-height: 85vh;
    overflow-y: auto;
    
    box-shadow: 
        0 20px 60px rgba(98, 81, 211, 0.25),
        0 8px 20px rgba(212, 175, 55, 0.15);
    
    position: relative;
    
    animation: tacModalSlideIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ================================================
   TIPOGRAFÍA ACCESIBLE - WCAG AAA
   ================================================ */

.tac-modal-title {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 26px;
    font-weight: 600;
    color: #2c1810;
    text-align: center;
    margin: 0 0 12px 0;
    line-height: 1.4;
    letter-spacing: 0.3px;
    padding-right: 40px;
}

.tac-modal-instructions {
    font-size: 18px;
    color: #4a3426;
    text-align: center;
    margin-bottom: 28px;
    line-height: 1.6;
    font-weight: 400;
}

/* ================================================
   MODAL BODY - ÁREA CONTENIDO
   ================================================ */

.tac-modal-body {
    margin: 0;
    padding: 20px 0;
}

.tac-modal-body .tac-header {
    display: none;
}

/* ================================================
   CHALLENGE ÁREA - ESPACIADO GENEROSO
   ================================================ */

.tac-challenge-area {
    margin: 20px 0;
    padding: 0;
}

.tac-challenge-question {
    font-size: 22px;
    font-weight: 600;
    color: #1a0f08;
    text-align: center;
    margin-bottom: 20px;
    padding: 18px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 12px;
    border: 2px solid rgba(212, 175, 55, 0.3);
    letter-spacing: 1px;
    line-height: 1.4;
}

.tac-answer-input {
    width: 100%;
    padding: 16px 20px;
    font-size: 20px;
    font-weight: 500;
    color: #2c1810;
    background: #ffffff;
    border: 3px solid #d4af37;
    border-radius: 12px;
    text-align: center;
    box-sizing: border-box;
    
    transition: all 0.3s ease;
}

.tac-answer-input:focus {
    outline: none;
    border-color: #6251d3;
    box-shadow: 0 0 0 4px rgba(98, 81, 211, 0.15);
    transform: scale(1.02);
}

.tac-answer-input::placeholder {
    color: #8b7355;
    font-weight: 400;
}


/* ================================================
   BOTÓN VERIFICAR - CÁLIDO Y ACOGEDOR
   ================================================ */

.tac-btn-verify {
    width: 100%;
    padding: 18px 24px;
    font-size: 19px;
    font-weight: 600;
    color: #ffffff;
    background: linear-gradient(135deg, #d4af37 0%, #c9a02e 100%);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    margin-top: 24px;
    
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
}

.tac-btn-verify:hover {
    background: linear-gradient(135deg, #e0bd4a 0%, #d4af37 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(212, 175, 55, 0.4);
}

.tac-btn-verify:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(212, 175, 55, 0.3);
}

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

/* ================================================
   BOTÓN CERRAR - DISCRETO PERO ACCESIBLE
   ================================================ */

.tac-modal-close {
    position: absolute;
    top: 20px;
    right: 24px;
    background: rgba(44, 24, 16, 0.1);
    border: 2px solid rgba(44, 24, 16, 0.2);
    border-radius: 50%;
    width: 44px;
    height: 44px;
    
    font-size: 28px;
    font-weight: 400;
    color: #4a3426;
    line-height: 1;
    
    cursor: pointer;
    transition: all 0.3s ease;
    
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.tac-modal-close:hover {
    background: rgba(212, 175, 55, 0.2);
    border-color: #d4af37;
    color: #2c1810;
    transform: rotate(90deg) scale(1.1);
}

/* ================================================
   MENSAJES - FEEDBACK CLARO
   ================================================ */

.tac-message {
    margin-top: 20px;
    padding: 14px 18px;
    border-radius: 10px;
    font-size: 17px;
    font-weight: 500;
    text-align: center;
    line-height: 1.5;
    display: none;
}

.tac-message.tac-success {
    background: rgba(76, 175, 80, 0.15);
    color: #2e7d32;
    border: 2px solid #4caf50;
    display: block;
}

.tac-message.tac-error {
    background: rgba(244, 67, 54, 0.15);
    color: #c62828;
    border: 2px solid #f44336;
    display: block;
}

.tac-message.tac-loading {
    background: rgba(212, 175, 55, 0.15);
    color: #8b6914;
    border: 2px solid #d4af37;
    display: block;
}

/* ================================================
   LOADING SPINNER - WELLNESS STYLE
   ================================================ */

.tac-loading-spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 3px solid rgba(212, 175, 55, 0.2);
    border-top-color: #d4af37;
    border-radius: 50%;
    animation: tacSpinnerRotate 0.8s linear infinite;
    margin-right: 10px;
    vertical-align: middle;
}

/* ================================================
   ANIMACIONES SMOOTH
   ================================================ */

@keyframes tacModalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-40px) scale(0.92);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes tacModalFadeOut {
    from {
        opacity: 1;
        transform: scale(1);
    }
    to {
        opacity: 0;
        transform: scale(0.95);
    }
}

@keyframes tacSpinnerRotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ================================================
   RESPONSIVE - MOBILE OPTIMIZADO
   ================================================ */

@media (max-width: 600px) {
    .thinscen-captcha-modal-container {
        padding: 35px 28px;
        width: 94%;
        border-radius: 20px;
    }
    
    .tac-modal-title {
        font-size: 23px;
        padding-right: 35px;
    }
    
    .tac-modal-instructions {
        font-size: 17px;
    }
    
    .tac-challenge-question {
        font-size: 20px;
        padding: 15px;
    }
    
    .tac-answer-input {
        font-size: 19px;
        padding: 15px 18px;
    }
    
    .tac-btn-verify {
        font-size: 18px;
        padding: 16px 20px;
    }
    
    .tac-modal-close {
        width: 40px;
        height: 40px;
        font-size: 26px;
        top: 18px;
        right: 20px;
    }
}

/* ================================================
   ACCESIBILIDAD - ALTO CONTRASTE
   ================================================ */

@media (prefers-contrast: high) {
    .thinscen-captcha-modal-container {
        background: #faf5f0;
        border-color: #8b6914;
        border-width: 4px;
    }
    
    .tac-modal-title,
    .tac-challenge-question {
        color: #000000;
    }
    
    .tac-answer-input {
        border-width: 4px;
        border-color: #000000;
    }
    
    .tac-btn-verify {
        background: #8b6914;
        border: 3px solid #000000;
    }
}

/* ================================================
   MODO REDUCCIÓN MOVIMIENTO
   ================================================ */

@media (prefers-reduced-motion: reduce) {
    .thinscen-captcha-modal-overlay,
    .thinscen-captcha-modal-container,
    .tac-btn-verify,
    .tac-modal-close,
    .tac-answer-input,
    .tac-loading-spinner {
        animation: none;
        transition: none;
    }
}

/* ================================================
   OCULTAR CAPTCHA EMBEBIDO
   ================================================ */

/* OCULTAR CAPTCHA EMBEBIDO - SOLO EN FORMULARIOS */
.thinscen-anticaptcha-container {
    display: none !important;  /* ← Solo oculta en forms */
}

/* Permitir que el captcha clonado en el modal sea visible */
.tac-modal-body .thinscen-anticaptcha-container {
    display: block !important;  /* ← Visible en modal */
}

/* ================================================
   SCROLL SUAVE MODAL
   ================================================ */

.thinscen-captcha-modal-container::-webkit-scrollbar {
    width: 8px;
}

.thinscen-captcha-modal-container::-webkit-scrollbar-track {
    background: rgba(212, 175, 55, 0.1);
    border-radius: 10px;
}

.thinscen-captcha-modal-container::-webkit-scrollbar-thumb {
    background: rgba(212, 175, 55, 0.4);
    border-radius: 10px;
}

.thinscen-captcha-modal-container::-webkit-scrollbar-thumb:hover {
    background: rgba(212, 175, 55, 0.6);
}

.thinscen-security-badge {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 999999;  /* Muy alto, por encima de todo */
    
    width: 120px;
    height: 40px;
    
    background: url('/assets/img/security/thinscen-security-badge.png') no-repeat;
    background-size: contain;
    
    cursor: pointer;
    transition: all 0.3s ease;
    
    /* Sombra sutil wellness */
    box-shadow: 0 2px 10px rgba(98, 81, 211, 0.15);
    border-radius: 6px;
}

.thinscen-security-badge:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 4px 15px rgba(98, 81, 211, 0.25);
}

/* Responsive - más pequeño en móviles */
@media (max-width: 768px) {
    .thinscen-security-badge {
        width: 80px;
        height: 26px;
        bottom: 15px;
        left: 15px;
        background-image: url('/assets/img/security/thinscen-security-badge-small.png');
    }
}