/**
 * Countdown - Base Styles
 * Estilos compartilhados por todas as variantes
 */

.sslp-countdown {
    position: relative;
    padding: 3rem 0;
    overflow: hidden;
}

.sslp-countdown__wrapper {
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
}

.sslp-countdown__badge {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 1rem;
}

.sslp-countdown__title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 700;
    margin: 0 0 0.5rem;
    line-height: 1.2;
}

.sslp-countdown__subtitle {
    font-size: 1.125rem;
    margin: 0 0 2rem;
    opacity: 0.9;
}

.sslp-countdown__timer {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.sslp-countdown__block {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 80px;
    padding: 1.25rem 1rem;
    border-radius: 12px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.sslp-countdown__block:hover {
    transform: translateY(-2px);
}

.sslp-countdown__value {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.sslp-countdown__label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 0.5rem;
    opacity: 0.8;
}

.sslp-countdown__separator {
    font-size: 2rem;
    font-weight: 700;
    opacity: 0.5;
    align-self: flex-start;
    padding-top: 1rem;
}

.sslp-countdown__text {
    font-size: 1.25rem;
    margin: 0 0 1.5rem;
    font-weight: 500;
}

.sslp-countdown__discount {
    display: inline-block;
    font-size: 1.5rem;
    font-weight: 800;
    padding: 0.5rem 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.sslp-countdown__cta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2.5rem;
    font-size: 1.125rem;
    font-weight: 700;
    text-decoration: none;
    border-radius: 50px;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}

.sslp-countdown__cta:hover {
    transform: translateY(-2px);
}

.sslp-countdown__cta svg,
.sslp-countdown__cta i {
    font-size: 1.25rem;
}

.sslp-countdown__urgency {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
    font-size: 0.875rem;
    font-weight: 600;
}

.sslp-countdown__urgency::before {
    content: '⚡';
}

/* Animação do pulse */
@keyframes sslp-countdown-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.sslp-countdown--pulsing .sslp-countdown__block {
    animation: sslp-countdown-pulse 1s ease-in-out infinite;
}

/* Quando acabar o tempo */
.sslp-countdown--expired .sslp-countdown__timer {
    opacity: 0.5;
}

.sslp-countdown--expired .sslp-countdown__cta {
    pointer-events: none;
    opacity: 0.6;
}

/* ================================
   COUNTDOWN STICKY (barra no topo)
   ================================ */

.sslp-countdown-sticky {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    padding: 0.5rem 1rem;
    transform: translateY(-100%);
    transition: transform 0.3s ease;
}

.sslp-countdown-sticky.is-visible {
    transform: translateY(0);
}

.sslp-countdown-sticky .sslp-countdown-sticky__wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    max-width: 1200px;
    margin: 0 auto;
    flex-wrap: wrap;
}

.sslp-countdown-sticky .sslp-countdown-sticky__text {
    font-size: 0.875rem;
    font-weight: 600;
    margin: 0;
    white-space: nowrap;
}

.sslp-countdown-sticky .sslp-countdown-sticky__timer {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.sslp-countdown-sticky .sslp-countdown-sticky__block {
    display: flex;
    align-items: center;
    gap: 0.125rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 700;
}

.sslp-countdown-sticky .sslp-countdown-sticky__value {
    font-variant-numeric: tabular-nums;
}

.sslp-countdown-sticky .sslp-countdown-sticky__label {
    font-size: 0.625rem;
    text-transform: uppercase;
    opacity: 0.8;
}

.sslp-countdown-sticky .sslp-countdown-sticky__separator {
    font-weight: 700;
    opacity: 0.5;
}

.sslp-countdown-sticky .sslp-countdown-sticky__cta {
    padding: 0.375rem 1rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-decoration: none;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.sslp-countdown-sticky .sslp-countdown-sticky__close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem;
    opacity: 0.7;
    transition: opacity 0.2s;
    line-height: 1;
}

.sslp-countdown-sticky .sslp-countdown-sticky__close:hover {
    opacity: 1;
}

/* Ajuste do body quando sticky está visível */
body.has-countdown-sticky {
    padding-top: 44px;
}

@media (max-width: 768px) {
    .sslp-countdown-sticky .sslp-countdown-sticky__wrapper {
        gap: 0.5rem;
        flex-wrap: nowrap;
    }

    .sslp-countdown-sticky .sslp-countdown-sticky__text {
        display: none;
    }

    /* Esconder dias no mobile */
    .sslp-countdown-sticky .sslp-countdown-sticky__block:first-child,
    .sslp-countdown-sticky .sslp-countdown-sticky__timer > .sslp-countdown-sticky__separator:first-of-type {
        display: none;
    }

    .sslp-countdown-sticky .sslp-countdown-sticky__block {
        padding: 0.2rem 0.4rem;
        font-size: 0.8rem;
    }

    .sslp-countdown-sticky .sslp-countdown-sticky__cta {
        padding: 0.3rem 0.75rem;
        font-size: 0.7rem;
    }

    body.has-countdown-sticky {
        padding-top: 40px;
    }
}
