/* Free UK Standard shipping promo panel (cart + checkout). Fill animation replays whenever
   WooCommerce swaps the panel in (cart/checkout AJAX refresh), so no JS is needed. */
.cr-promo-panel {
    --cr-promo-accent: #006cff;
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 0 0 20px;
    padding: 14px 18px;
    border: 1px solid #bdbdbd;
    background: #fff;
    color: #222;
}

.cr-promo-basket {
    flex: 0 0 auto;
    color: var(--cr-promo-accent);
    transform-origin: 50% 90%;
    animation: cr-promo-bounce 2.4s ease-in-out infinite;
}

.cr-promo-panel[data-qualified="1"] .cr-promo-basket {
    animation: cr-promo-wiggle 1.2s ease-in-out 3;
}

.cr-promo-panel__body {
    flex: 1 1 auto;
    min-width: 0;
}

.cr-promo-panel__headline {
    margin: 0 0 8px;
    font-weight: 700;
}

.cr-promo-panel__sub {
    margin: 6px 0 0;
    font-size: 13px;
    color: #555;
}

.cr-promo-bar {
    height: 12px;
    border-radius: 6px;
    background: #e6e6e6;
    overflow: hidden;
}

.cr-promo-bar__fill {
    height: 100%;
    width: var(--pct, 0%);
    border-radius: 6px;
    background: repeating-linear-gradient(-45deg, var(--cr-promo-accent) 0 10px, #0057d1 10px 20px);
    background-size: 28px 28px;
    animation: cr-promo-grow 1s ease-out, cr-promo-stripes 1.2s linear infinite;
}

@keyframes cr-promo-grow {
    from { width: 0; }
}

@keyframes cr-promo-stripes {
    to { background-position: 28px 0; }
}

@keyframes cr-promo-bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}

@keyframes cr-promo-wiggle {
    0%, 100% { transform: rotate(0); }
    25% { transform: rotate(-12deg); }
    75% { transform: rotate(12deg); }
}

/* Restrictions tooltip: hover on desktop, focus (tap) on touch. */
.cr-promo-restrictions {
    position: relative;
    display: inline-block;
}

.cr-promo-restrictions__trigger {
    all: unset;
    cursor: help;
    text-decoration: underline dotted;
    color: var(--cr-promo-accent);
}

.cr-promo-restrictions__tip {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    left: 0;
    bottom: calc(100% + 6px);
    width: max-content;
    max-width: 240px;
    padding: 8px 10px;
    border-radius: 6px;
    background: #222;
    color: #fff;
    font-size: 12px;
    line-height: 1.4;
    z-index: 10;
    transition: opacity 0.15s;
}

.cr-promo-restrictions:hover .cr-promo-restrictions__tip,
.cr-promo-restrictions__trigger:focus + .cr-promo-restrictions__tip {
    visibility: visible;
    opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
    .cr-promo-basket,
    .cr-promo-bar__fill {
        animation: none;
    }
}

@media (max-width: 480px) {
    .cr-promo-panel {
        gap: 10px;
        padding: 12px;
    }

    .cr-promo-basket {
        width: 34px;
        height: 34px;
    }
}
