/* Admin bar offset helpers */
:root {
    --jbs-admin-offset: 0px;
}

body.admin-bar {
    --jbs-admin-offset: 32px;
}

@media (max-width: 782px) {
    body.admin-bar {
        --jbs-admin-offset: 46px;
    }
}

/* Countdown base styling */
.delivery-countdown-timer {
    font-size: 15px;
    color: inherit;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.delivery-countdown-timer strong {
    font-weight: 600;
}

.cdt-timer-span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    background-color: rgba(17, 24, 39, 0.08);
    font-variant-numeric: tabular-nums;
}

.cdt-hldr {
    margin: 0;
    padding: 0;
    border: none;
    background: transparent;
    color: inherit;
    font-family: inherit;
    font-weight: 600;
}

.cdn_before_adt_cart {
    margin: 15px 0;
}

/* Floating pill */
.jbs-floating-pill {
    position: fixed;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    border-radius: 999px;
    background-color: var(--jbs-pill-bg, #ffffff);
    color: var(--jbs-pill-text, #1f1f1f);
    box-shadow: 0 15px 35px rgba(15, 23, 42, 0.15);
    z-index: 110000;
    width: auto;
    max-width: min(95vw, 520px);
    transform: translate(var(--jbs-pill-tx, 0), var(--jbs-pill-ty, 0));
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.jbs-floating-pill.is-hidden {
    opacity: 0;
    pointer-events: none;
    transform: translate(var(--jbs-pill-tx, 0), calc(var(--jbs-pill-ty, 0) + 10px));
}

.jbs-floating-pill__content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.jbs-floating-pill__close {
    border: none;
    background: transparent;
    color: inherit;
    font-size: 18px;
    line-height: 1;
    padding: 0;
    margin: 0;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s ease;
}

.jbs-floating-pill__close:hover,
.jbs-floating-pill__close:focus {
    opacity: 1;
}

.jbs-floating-pill__timer .cdt-timer-span {
    background-color: rgba(27, 117, 188, 0.12);
    color: var(--jbs-pill-accent, #1b75bc);
    font-weight: 600;
}

.jbs-floating-pill__timer .cdt-hldr {
    font-size: 0.95em;
}

/* Position helpers */
.jbs-floating-pill--top {
    top: calc(24px + var(--jbs-admin-offset));
    --jbs-pill-ty: 0;
}

.jbs-floating-pill--upper {
    top: calc(25% + var(--jbs-admin-offset));
    --jbs-pill-ty: -50%;
}

.jbs-floating-pill--mid {
    top: calc(50% + var(--jbs-admin-offset));
    --jbs-pill-ty: -50%;
}

.jbs-floating-pill--lower {
    top: calc(75% + var(--jbs-admin-offset));
    --jbs-pill-ty: -50%;
}

.jbs-floating-pill--bottom {
    bottom: 24px;
    --jbs-pill-ty: 0;
}

.jbs-floating-pill--left {
    left: 24px;
    --jbs-pill-tx: 0;
}

.jbs-floating-pill--center {
    left: 50%;
    --jbs-pill-tx: -50%;
}

.jbs-floating-pill--right {
    right: 24px;
    --jbs-pill-tx: 0;
}

@media (max-width: 768px) {
    .jbs-floating-pill {
        left: 50% !important;
        right: auto !important;
        --jbs-pill-tx: -50% !important;
        width: calc(100vw - 32px);
        max-width: none;
        padding: 10px 16px;
    }

    .jbs-floating-pill--mobile-top {
        top: calc(16px + var(--jbs-admin-offset));
        bottom: auto;
    }

    .jbs-floating-pill--mobile-upper {
        top: calc(30% + var(--jbs-admin-offset));
        bottom: auto;
    }

    .jbs-floating-pill--mobile-mid {
        top: calc(50% + var(--jbs-admin-offset));
        bottom: auto;
    }

    .jbs-floating-pill--mobile-lower {
        top: calc(70% + var(--jbs-admin-offset));
        bottom: auto;
    }

    .jbs-floating-pill--mobile-bottom {
        bottom: 16px;
        top: auto;
    }
}

#wpca-box {
    z-index: 120000 !important;
}
