/**
 * Estils del Compte Enrere NAT
 * @author Edittio (https://edittio.com) - Frontend
 * Tots els estils del plugin estan continguts aquí
 */

/* Enllaç del compte enrere */
.compte-enrere-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

/* Contenidor principal */
.compte-enrere-container {
    display: flex;
        
    flex-direction: row;
    justify-content: center;    
    align-items: center;
        justify-content: center;
    padding: 0px;
    gap:10px;
    margin-bottom: 10px;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    background: linear-gradient(to right, #0066cc, #003366);
    color: #ffffff;
    
    width: 100%;
    box-sizing: border-box;
    transition: all 0.6s ease;
        position: absolute;
    top: 100%;
    padding-top:5px;
    padding-bottom:5px;
    z-index: -1;
    opacity:1;

} 

strong {
    font-family: Geogrotesque-SemiBold;
}

/* Text sobre el compte enrere */
.compte-enrere-text {
    font-size: 12px;

    margin-bottom: 0px;
    text-align: right;
    line-height: 1.1;
    max-width: 100%;
}

.compte-enrere-text strong {
    font-size: 16px;
}

.compte-enrere-text:empty {
    display: none;
}

/* Paràgrafs dins del text */
.compte-enrere-text p {
    margin: 0 0 8px 0;
    line-height: 1.6;
}

.compte-enrere-text p:last-child {
    margin-bottom: 0;
}

/* Salts de línia */
.compte-enrere-text br {
    display: block;
    content: "";
    margin: 4px 0;
}

/* Format de text */
.compte-enrere-text strong {
 font-family: Geogrotesque-SemiBold;
}

.compte-enrere-text em {
    font-style: italic;
}

.compte-enrere-text u {
    text-decoration: underline;
}

/* Títols */
.compte-enrere-text h1 {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 10px 0;
    line-height: 1.2;
}

.compte-enrere-text h2 {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 8px 0;
    line-height: 1.3;
}

.compte-enrere-text h3 {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 6px 0;
    line-height: 1.3;
}

.compte-enrere-text h4 {
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 6px 0;
    line-height: 1.4;
}

.compte-enrere-text h5 {
    font-size: 14px;
    font-weight: 700;
    margin: 0 0 4px 0;
    line-height: 1.4;
}

.compte-enrere-text h6 {
    font-size: 13px;
    font-weight: 700;
    margin: 0 0 4px 0;
    line-height: 1.4;
}

.compte-enrere-text ul,
.compte-enrere-text ol {
    margin: 8px 0;
    padding-left: 20px;
}

.compte-enrere-text li {
    margin-bottom: 4px;
}

.compte-enrere-text a {
    color: inherit;
    text-decoration: underline;
}

/* Contenidor del timer */
.compte-enrere-timer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0px;
    flex-wrap: wrap;
}

/* Unitat del timer (dies, hores, etc.) */
.timer-unit {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 50px;
 
}

/* Valor numèric */
.timer-value {
    font-size: 28px;
    font-weight: 700;
    line-height: 1;
    display: block;
    margin-bottom: 0px;
   
}

/* Etiqueta (dies, hores, etc.) */
.timer-label {
    font-size: 10px;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.9;

}

/* Separador entre unitats */
.timer-separator {
    font-size: 28px;
    font-weight: 700;
    line-height: 1;
    padding: 0 0px;
    opacity: 0.8;
}

/* Animació quan canvia el valor */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.timer-value.pulse {
    animation: pulse 0.3s ease;
}

/* Estat quan el compte enrere ha finalitzat */
.compte-enrere-container.finalitzat {
    opacity: 0.7;
}

.compte-enrere-container.finalitzat .compte-enrere-text {
    font-size: 18px;
}

/* Responsive - Tablets */
@media screen and (max-width: 768px) {
    .compte-enrere-container {
        padding: 12px 15px;
        
    }
    
    .compte-enrere-text {
        font-size: 14px;
        margin-bottom: 0px;
        line-height: 1.5;
        text-align:center;
    }

    .compte-enrere-text p {
        margin: 0 0 6px 0;
    }
    
    .timer-unit {
        min-width: 50px;
    }
    
    .timer-value {
        font-size: 26px;
    }
    
    .timer-label {
        font-size: 10px;
    }
    
    .timer-separator {
        font-size: 22px;
        padding: 0 3px;
    }
}

/* Responsive - Mòbils */
@media screen and (max-width: 480px) {
    .compte-enrere-container {
        padding: 5px;
        flex-direction: column;
        gap:0;
    }
    
    .compte-enrere-text {
        font-size: 13px;
        margin-bottom: 5pxpx;
        line-height: 1.1;
    }

    .compte-enrere-text p {
        margin: 0 0 5px 0;
    }

    .compte-enrere-text br {
        margin: 3px 0;
    }
    
    .compte-enrere-timer {
        gap: 5px;
    }
    
    .timer-unit {
        min-width: 40px;
        padding: 3px;
    }
    
    .timer-value {
        font-size: 22px;
        margin-bottom: 3px;
    }
    
    .timer-label {
        font-size: 9px;
        letter-spacing: 0.5px;
    }
    
    .timer-separator {
        font-size: 18px;
        padding: 0 2px;
    }
}

/* Integració amb el header del tema Ciències */
.superior .compte-enrere-container {
    margin: 0 0 0px 0;
    border-radius: 0;
}

/* Mode fosc (opcional) */
@media (prefers-color-scheme: dark) {
    .compte-enrere-container {
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    }
}

/* Accessibilitat */
.compte-enrere-container:focus-within {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .compte-enrere-container {
        display: none;
        pointer-events: none;
    }
}

.ascrolldown .compte-enrere-container {
        opacity:0;
         pointer-events: none;
    }


