/**
 * EZ Deadline Timer - Public Styles
 * Responsive countdown timer with Deadline Funnel-like design
 */

/* ===== Timer Container ===== */
.ez-timer {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px 30px;
    border-radius: var(--ez-timer-radius, 8px);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    box-sizing: border-box;
}

.ez-timer *,
.ez-timer *::before,
.ez-timer *::after {
    box-sizing: border-box;
}

/* ===== Text Above Timer ===== */
.ez-timer__text {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 15px;
    text-align: center;
    opacity: 0.9;
}

/* ===== Countdown Layout ===== */
.ez-timer__countdown {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* ===== Unit Container ===== */
.ez-timer__unit {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 60px;
}

/* ===== Digits Container ===== */
.ez-timer__digits {
    display: flex;
    gap: 4px;
}

/* ===== Individual Digit Boxes ===== */
.ez-timer__digit {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 55px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: calc(var(--ez-timer-radius, 8px) / 2);
    font-size: 32px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    transition: transform 0.15s ease-out, opacity 0.15s ease-out;
}

/* Flip animation class */
.ez-timer__digit--flip {
    transform: scale(0.8);
    opacity: 0.5;
}

/* ===== Labels ===== */
.ez-timer__label {
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 8px;
    opacity: 0.8;
}

/* ===== Separator ===== */
.ez-timer__separator {
    font-size: 28px;
    font-weight: 700;
    opacity: 0.6;
    margin-bottom: 20px;
    animation: ez-timer-pulse 1s ease-in-out infinite;
}

@keyframes ez-timer-pulse {

    0%,
    100% {
        opacity: 0.6;
    }

    50% {
        opacity: 0.2;
    }
}

/* ===== Sticky Bar Styles ===== */
.ez-timer-sticky {
    position: fixed;
    left: 0;
    right: 0;
    z-index: 999999;
    display: flex;
    justify-content: center;
    padding: 0 20px;
    pointer-events: none;
}

.ez-timer-sticky--top {
    top: 20px;
}

.ez-timer-sticky--bottom {
    bottom: 20px;
}

/* Sticky bar horizontal layout */
.ez-timer-sticky .ez-timer {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    border-radius: 12px;
    padding: 15px 30px;
    gap: 30px;
    max-width: 800px;
    width: 100%;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.4);
    pointer-events: auto;
}

.ez-timer-sticky .ez-timer__text {
    font-size: 15px;
    font-weight: 500;
    margin: 0;
    flex-shrink: 1;
    opacity: 1;
}

.ez-timer-sticky .ez-timer__countdown {
    gap: 10px;
    flex-shrink: 0;
}

.ez-timer-sticky .ez-timer__unit {
    min-width: auto;
}

.ez-timer-sticky .ez-timer__digits {
    gap: 3px;
}

.ez-timer-sticky .ez-timer__digit {
    width: 32px;
    height: 44px;
    font-size: 24px;
    background: rgba(30, 30, 30, 0.9);
    border-radius: 6px;
}

.ez-timer-sticky .ez-timer__label {
    font-size: 8px;
    margin-top: 5px;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.6;
}

.ez-timer-sticky .ez-timer__separator {
    font-size: 20px;
    margin-bottom: 16px;
    opacity: 0.4;
    animation: none;
}

/* ===== Responsive Styles ===== */

/* Tablets */
@media (max-width: 768px) {
    .ez-timer {
        padding: 15px 20px;
    }

    .ez-timer__digit {
        width: 35px;
        height: 48px;
        font-size: 26px;
    }

    .ez-timer__label {
        font-size: 10px;
    }

    .ez-timer__separator {
        font-size: 24px;
    }

    .ez-timer__text {
        font-size: 14px;
    }

    .ez-timer__unit {
        min-width: 50px;
    }
}

/* Mobile */
@media (max-width: 480px) {
    .ez-timer {
        padding: 12px 15px;
    }

    .ez-timer__countdown {
        gap: 4px;
    }

    .ez-timer__digit {
        width: 28px;
        height: 40px;
        font-size: 20px;
        gap: 2px;
    }

    .ez-timer__digits {
        gap: 2px;
    }

    .ez-timer__label {
        font-size: 9px;
        margin-top: 5px;
    }

    .ez-timer__separator {
        font-size: 18px;
        margin-bottom: 14px;
    }

    .ez-timer__text {
        font-size: 13px;
        margin-bottom: 10px;
    }

    .ez-timer__unit {
        min-width: 40px;
    }

    /* Sticky mobile adjustments */
    .ez-timer-sticky .ez-timer {
        flex-direction: column;
        padding: 12px 15px;
        gap: 10px;
    }

    .ez-timer-sticky .ez-timer__text {
        font-size: 13px;
        text-align: center;
    }

    .ez-timer-sticky .ez-timer__countdown {
        gap: 8px;
    }

    .ez-timer-sticky .ez-timer__digit {
        width: 28px;
        height: 38px;
        font-size: 20px;
    }

    .ez-timer-sticky .ez-timer__separator {
        font-size: 18px;
        margin-bottom: 14px;
    }

    .ez-timer-sticky .ez-timer__label {
        font-size: 8px;
    }
}

/* Extra small mobile */
@media (max-width: 360px) {
    .ez-timer__countdown {
        gap: 3px;
    }

    .ez-timer__digit {
        width: 24px;
        height: 36px;
        font-size: 18px;
    }

    .ez-timer__separator {
        font-size: 16px;
    }

    .ez-timer__label {
        font-size: 8px;
    }
}

/* ===== Expired State ===== */
.ez-timer--expired {
    opacity: 0.7;
}

.ez-timer--expired .ez-timer__separator {
    animation: none;
    opacity: 0.3;
}

/* ===== Loading State ===== */
.ez-timer--loading {
    opacity: 0.5;
}