/************************* Fonts ************************************/
@import url('https://use.typekit.net/hxl1vpp.css"');

@font-face {
    font-family: 'Great day';
    font-style: normal;
    src: url('../fonts/Great/Great_Day.ttf') format('truetype');
}

@font-face {
    font-family: 'Great day bold';
    font-style: normal;
    src: url('../fonts/Great/Great_Day_bold.ttf') format('truetype');
}

@font-face {
    font-family: 'Helvetica';
    font-style: normal;
    src: url('../fonts/Helvetica/HelveticaNeueLTCom-Bd.ttf') format('truetype');
}

@font-face {
    font-family: 'Helvetica roman';
    font-style: normal;
    font-weight: 500;
    src: url('../fonts/Helvetica/HelveticaNeueLTCom-Roman.ttf') format('truetype');
}

@font-face {
    font-family: 'Helvetica bold';
    font-style: normal;
    src: url('../fonts/Helvetica/HelveticaNeueLTCom-BdEx.ttf') format('truetype');
}

@font-face {
    font-family: 'rt_dyans_basicregular';
    src: url('../fonts/Dyans/rtdyansbasic-webfont.woff2') format('woff2'),
         url('../fonts/Dyans/rtdyansbasic-webfont.woff') format('woff');
    font-weight: normal;
    font-style: normal;
}

.font-great-day {
    font-family: 'Great day';
}

.font-great-day-bold {
    font-family: 'Great day bold';
}

.font-helvetica {
    font-family: 'Helvetica';
}

.font-helvetica-roman {
    font-family: 'Helvetica roman';
}

.font-helvetica-bold {
    font-family: 'Helvetica bold';
}



/************************* General Style ************************************/

html, body {
    background-color: #0B612D;
    color: #0B612D;
    font-family: "acumin-variable", sans-serif;
    font-size: 18px;
    height: 100%;
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
}


/**************************** Intro  ************************************/

.intro{
    background-image: url('../images/validate/background.png');
    background-repeat: no-repeat;
    background-position: top center;
    border-bottom-left-radius: 40px;
    border-bottom-right-radius: 40px;
    padding: 5%;
    width: 100%;
}

.intro .title{
    text-align:center;
}

.intro img{
    max-width: 80%;
    margin: 10px 0;
}

.intro .main-content{
    display: flex;
    flex-direction:column;
    gap:10px;

}

.intro .main-content .validation-form h2{
    font-size: 18px;
    font-weight: 600;
}

.intro .main-content .validation-form input{
    height: 45px;
    background-color: #FFF;
    border: none;
    border-radius: 50px;
    margin: 10px 0;
    padding: 10px 20px;
    width: 100%;
}

.intro .main-content .validation-form button{
    height: 45px;
    background-color: #0B612D;
    border: none;
    border-radius: 50px;
    color: #FDFADA;
    padding: 5px 20px;
    text-align: center;
    width: 100%;
}

/* Estilos para el campo CCP */
#ccp-field {
    margin: 15px 0;
}

#ccp-field input {
    height: 45px;
    background-color: #FFF;
    border: 2px solid #FFDB00;
    border-radius: 50px;
    margin: 10px 0;
    padding: 10px 20px;
    width: 100%;
}

#ccp-field small {
    color: #FDFADA;
    font-size: 12px;
    margin-left: 20px;
}

/* Campo de código deshabilitado cuando se requiere CCP desde URL */
#code-input:disabled {
    background-color: #e9ecef;
    opacity: 0.8;
    cursor: not-allowed;
}

#code-input:disabled::placeholder {
    color: #6c757d;
}


.intro .main-content .loading {
    display: none;
    text-align: center;
    animation: pulse 2s infinite;
}

/* Asegurar que la animación funcione en todos los dispositivos */
.intro .main-content .loading img {
    animation: pulse 2s infinite;
}

/* Desktop loading (comportamiento original) */
@media (min-width: 769px) {
    .intro .main-content .loading {
        background: rgba(255, 255, 255, 0.6);
        border-radius: 20px;
        margin-top: 90px;
        padding: 20px;
    }
}

/* Loading fullscreen para móvil */
@media (max-width: 768px) {
    .intro .main-content .loading {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        width: 100vw !important;
        height: 100vh !important;
        background-color: rgba(255, 255, 255, 0.95) !important;
        z-index: 9999 !important;
        display: none !important;
        justify-content: center !important;
        align-items: center !important;
        flex-direction: column !important;
        margin: 0 !important;
        padding: 0 !important;
        text-align: center !important;
    }
    
    .intro .main-content .loading.show {
        display: flex !important;
    }
    
    .intro .main-content .loading img {
        max-width: 70% !important;
        height: auto !important;
        margin: 15px 0 !important;
        display: block !important;
    }
    
    /* Asegurar que no haya otros elementos interfiriendo */
    .intro .main-content .loading * {
        position: relative !important;
        z-index: 1 !important;
    }
}

@keyframes pulse {
    0% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
    100% {
        opacity: 1;
    }
}

.loading img {
    animation: fadeInOut 1.5s ease-in-out infinite alternate;
}

@keyframes fadeInOut {
    0% {
        opacity: 0.7;
    }
    100% {
        opacity: 1;
    }
}

.validation-result {
    background-color: #0B612D;
    padding: 50px 0;
    text-align: center;
}

/* Estilo del título */
.validation-result h3 {
    color: #FDFADA;
    font-family: 'rt_dyans_basicregular';
    font-weight: 700;
    font-size: 22px;
    letter-spacing: 1px;
    margin-bottom: 20px;
}

/* Caja con borde */
.validation-box {
    display: inline-block;
    border: 1px solid #FDFADA;
    border-radius: 10px;
    padding: 10px;
    position: relative;
}

/* Texto dentro de la caja */
.validation-box h4 {
    color: #FFDB00;
    font-family: "acumin-variable", sans-serif;
    font-size: 26px;
    font-weight: 900;
    margin: 0;
    line-height: 1.4;
}

/* Líneas laterales cortadas */
.validation-box::before,
.validation-box::after {
    content: "";
    position: absolute;
    top: -1px;
    width: 50px;
    height: 1px;
    background: #0B612D; /* mismo color que el fondo */
}

.validation-box::before {
    left: -50px;
}

.validation-box::after {
    right: -50px;
}

/* Estilos para los detalles de validación */
.validation-info {
    background-color: rgba(253, 250, 218, 0.1);
    border-radius: 8px;
    padding: 15px;
    font-size: 14px;
    color: #FDFADA;
    text-align: left;
}

.validation-info p {
    margin-bottom: 8px;
    line-height: 1.4;
}

.validation-info strong {
    color: #FFDB00;
}

.validation-info h6 {
    color: #FFDB00;
    margin-top: 15px;
    margin-bottom: 10px;
    font-weight: bold;
}

.validation-info img {
    border-radius: 4px;
    margin: 10px 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.validation-info .btn {
    background-color: #FFDB00;
    color: #0B612D;
    border: none;
    font-weight: bold;
    padding: 8px 20px;
    border-radius: 25px;
    transition: all 0.3s ease;
}

.validation-info .btn:hover {
    background-color: #FDFADA;
    transform: translateY(-1px);
}

/* Estilos para errores en validation-result */
.validation-error {
    background-color: rgba(220, 53, 69, 0.1);
    border-radius: 8px;
    padding: 15px;
    text-align: left;
}

.validation-error .alert {
    background-color: #dc3545;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 15px;
    font-size: 14px;
    font-weight: 500;
}

.validation-error .alert i {
    margin-right: 8px;
}

.validation-error .btn {
    background-color: #FFDB00;
    color: #0B612D;
    border: none;
    font-weight: bold;
    padding: 8px 20px;
    border-radius: 25px;
    transition: all 0.3s ease;
}

.validation-error .btn:hover {
    background-color: #FDFADA;
    transform: translateY(-1px);
}

/* Estilos para iframe de URL_FORM */
.iframe-container {
    background-color: rgba(253, 250, 218, 0.1);
    border-radius: 8px;
    padding: 15px;
    margin: 15px 0;
}

.iframe-container h6 {
    color: #FFDB00;
    margin-bottom: 10px;
    font-weight: bold;
}

.iframe-container iframe {
    border: 1px solid #FDFADA;
    border-radius: 4px;
    min-height: 400px;
}

/* Iframe responsive para móvil */
@media (max-width: 768px) {
    .iframe-container {
        margin: 20px -10px; /* Extender casi hasta los bordes */
        padding: 20px 10px;
        border-radius: 12px; /* Bordes suaves */
        background-color: rgba(253, 250, 218, 0.2);
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    }
    
    .iframe-container iframe {
        width: 100% !important;
        min-height: 500px !important; /* Más altura en móvil */
        border-radius: 8px;
        border: 2px solid #FDFADA;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    }
    
    .iframe-container h6 {
        font-size: 1.1rem;
        text-align: center;
        margin-bottom: 15px;
        color: #FFDB00;
        text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    }
    
    /* Iframe específico responsive */
    .responsive-iframe {
        width: 100% !important;
        min-height: 500px !important;
        max-height: 70vh !important; /* No más del 70% del viewport */
        border-radius: 8px !important;
        border: 2px solid #FDFADA !important;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1) !important;
    }
}

/* Estilos para product_url */
.product-url-section {
    text-align: center;
    margin: 15px 0;
}

.product-url-section .btn-primary {
    background-color: #0B612D;
    border-color: #0B612D;
    color: #FDFADA;
    font-weight: bold;
    padding: 10px 20px;
    border-radius: 25px;
    transition: all 0.3s ease;
}

.product-url-section .btn-primary:hover {
    background-color: #094d24;
    border-color: #094d24;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(11, 97, 45, 0.3);
}

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

/* Animación de resaltado para la caja de validación */
.validation-highlight {
    animation: highlightPulse 2s ease-in-out;
    transform-origin: center;
}

@keyframes highlightPulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 219, 0, 0.7);
    }
    25% {
        transform: scale(1.02);
        box-shadow: 0 0 0 10px rgba(255, 219, 0, 0.3);
    }
    50% {
        transform: scale(1.02);
        box-shadow: 0 0 0 15px rgba(255, 219, 0, 0.1);
    }
    75% {
        transform: scale(1.01);
        box-shadow: 0 0 0 10px rgba(255, 219, 0, 0.2);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 219, 0, 0);
    }
}

/* Smooth scroll behavior */
html {
    scroll-behavior: smooth;
}

/**************************** Footer  ************************************/

footer {
    background: #FFF;
    color: #8D8D8D;
    font-size: 12px;
    text-align: center;
}

footer .footer-img-mobile{
    display: none;
}

footer h3 {
    font-size: 20px;
}

footer .credits{
    background: #FDFADA;
    padding: 20px 0;
}



@media (max-width: 1199.98px) {

}

@media (max-width: 991.98px) {
}

@media (max-width: 767.98px) {
    .intro{
        background-image: url('../images/validate/background_mobile.jpg');
        background-position-y: 15%;
        background-position-x: 90%;
        height: 100vh;
    }

    .intro .title{
        display: flex;
        flex-direction: row;
        justify-content: center;
        align-items: center;
        gap: 20px;
        margin-bottom: 215px;
    }

    .intro .title img{
        max-width: 50%;
    }

    .intro .main-content{
        padding: 20px;
        background: rgba(255, 255, 255, 0.6);
        border-radius: 20px;
        margin-top: 90px;
    }

    .intro .main-content .validation-form h2{
        font-size: 14px;
        font-weight: 700;
    }

    .validation-result{
        width: calc(100% - 40px);
        margin: 0 auto;
    }

    footer .footer-img-desktop{
        display: none;
    }

    footer .footer-img-mobile{
        display: block;
    }

    footer .credits{
        padding: 10px 20px;
    }
}

@media (max-width: 575.98px) {

}

/* CAPTCHA Bubble Styles */
#bubble-captcha {
    margin-top: 20px;
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px solid #dee2e6;
    border-radius: 12px;
    text-align: center;
    animation: fadeInUp 0.4s ease-out;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

#bubble-captcha h4 {
    color: #495057;
    font-family: 'Helvetica', sans-serif;
    font-size: 1.1rem;
    margin-bottom: 15px;
    font-weight: 600;
}

.bubble-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
    margin: 20px 0;
    justify-content: center;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.bubble-option {
    position: relative;
    cursor: pointer;
    border: 3px solid #dee2e6;
    border-radius: 12px;
    padding: 10px;
    background: white;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.bubble-option:hover {
    border-color: #007bff;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,123,255,0.2);
}

.bubble-option.selected {
    border-color: #28a745;
    background: rgba(40, 167, 69, 0.05);
    box-shadow: 0 4px 16px rgba(40, 167, 69, 0.3);
}

.bubble-option img {
    width: 100%;
    height: 80px;
    object-fit: contain;
    border-radius: 6px;
    display: block;
}

.bubble-option .bubble-label {
    margin-top: 8px;
    font-size: 0.85rem;
    color: #6c757d;
    font-weight: 500;
}

.bubble-option.selected .bubble-label {
    color: #28a745;
    font-weight: 600;
}

.bubble-submit-container {
    margin-top: 20px;
}

.bubble-submit-btn {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
    opacity: 0.6;
    transform: scale(0.95);
}

.bubble-submit-btn:enabled {
    opacity: 1;
    transform: scale(1);
}

.bubble-submit-btn:enabled:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 6px 16px rgba(40, 167, 69, 0.4);
}

.bubble-submit-btn:disabled {
    cursor: not-allowed;
}

/* Responsive styles for bubble captcha */
@media (max-width: 767.98px) {
    .bubble-grid {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        gap: 10px;
        max-width: 300px;
    }
    
    .bubble-option img {
        height: 60px;
    }
    
    #bubble-captcha {
        padding: 15px;
    }
}

/* Aviso de cookies - popup inferior izquierda (validator) */
.validator-cookies-popup {
    position: fixed;
    left: 20px;
    bottom: 20px;
    visibility: hidden; /* el script lo hace visible si no ha aceptado */
    max-width: 380px;
    z-index: 9999;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
    border-radius: 12px;
    overflow: hidden;
    transition: opacity 0.3s ease, transform 0.3s ease;
}
.validator-cookies-popup.validator-cookies-accepted {
    opacity: 0;
    transform: translateY(10px);
}
.validator-cookies-popup-inner {
    background: rgba(0, 0, 0, 0.92);
    color: #fff;
    padding: 20px 22px;
    border: 1px solid rgba(255, 219, 0, 0.35);
    border-radius: 12px;
}
.validator-cookies-popup .validator-cookies-msg {
    font-size: 14px;
    line-height: 1.5;
    margin: 0 0 16px 0;
    color: #e8e8e8;
}
.validator-cookies-popup .validator-cookies-msg a {
    color: #FFDB00;
    text-decoration: underline;
}
.validator-cookies-popup .validator-cookies-msg a:hover {
    color: #fff;
}
.validator-cookies-popup .validator-cookies-btn {
    display: block;
    width: 100%;
    padding: 12px 20px;
    background: #FFDB00;
    color: #0B612D;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    font-size: 15px;
    cursor: pointer;
    transition: background 0.2s, transform 0.05s;
}
.validator-cookies-popup .validator-cookies-btn:hover {
    background: #ffe033;
}
.validator-cookies-popup .validator-cookies-btn:active {
    transform: scale(0.98);
}
@media (max-width: 480px) {
    .validator-cookies-popup {
        left: 12px;
        right: 12px;
        bottom: 12px;
        max-width: none;
    }
    .validator-cookies-popup .validator-cookies-msg {
        font-size: 13px;
    }
}