/* Discount popup (single event pages) */

.ebm-dp {
    --ebm-dp-hot: #ff4d4f;
    --ebm-dp-orange: #ff7a18;
    --ebm-dp-pink: #e1306c;
    --ebm-dp-purple: #6d28d9;
    --ebm-dp-ink: #111827;
    --ebm-dp-muted: #6b7280;
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    font-family: inherit;
    line-height: 1.45;
    -webkit-font-smoothing: antialiased;
}

.ebm-dp[hidden] {
    display: none;
}

.ebm-dp *,
.ebm-dp *::before,
.ebm-dp *::after {
    box-sizing: border-box;
}

html.ebm-dp-open,
html.ebm-dp-open body {
    overflow: hidden;
}

.ebm-dp-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(17, 12, 34, 0.62);
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
    opacity: 0;
    transition: opacity 0.35s ease;
}

.ebm-dp-dialog {
    position: relative;
    width: 100%;
    max-width: 440px;
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: #d8b4fe transparent;
    background: #fff;
    border-radius: 22px;
    box-shadow: 0 30px 80px -20px rgba(76, 29, 149, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.08);
    opacity: 0;
    transform: translateY(24px) scale(0.92);
    transition: opacity 0.35s ease, transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    outline: none;
}

.ebm-dp.is-open .ebm-dp-backdrop {
    opacity: 1;
}

.ebm-dp.is-open .ebm-dp-dialog {
    opacity: 1;
    transform: none;
}

.ebm-dp-close {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 3;
    width: 34px;
    height: 34px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.28);
    color: #fff;
    font-size: 22px;
    line-height: 34px;
    text-align: center;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.ebm-dp-close:hover,
.ebm-dp-close:focus-visible {
    background: rgba(0, 0, 0, 0.5);
    transform: rotate(90deg);
}

/* Header */

.ebm-dp-hero {
    position: relative;
    overflow: hidden;
    padding: 22px 24px 24px;
    color: #fff;
    text-align: center;
    background:
        linear-gradient(135deg, rgba(109, 40, 217, 0.92) 0%, rgba(225, 48, 108, 0.9) 55%, rgba(255, 122, 24, 0.92) 100%),
        var(--ebm-dp-image, none) center / cover no-repeat,
        #6d28d9;
    border-radius: 22px 22px 0 0;
}

.ebm-dp-hero::after {
    content: "";
    position: absolute;
    left: -10%;
    right: -10%;
    bottom: -28px;
    height: 56px;
    background: #fff;
    border-radius: 50%;
}

.ebm-dp-ribbon {
    position: relative;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.35);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    animation: ebm-dp-pulse-soft 2.2s ease-in-out infinite;
}

.ebm-dp-save {
    position: relative;
    z-index: 2;
    margin: 10px 0 2px;
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1;
}

.ebm-dp-save-prefix {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    opacity: 0.92;
}

.ebm-dp-save-value {
    margin-top: 2px;
    font-size: 52px;
    font-weight: 900;
    letter-spacing: -0.02em;
    text-shadow: 0 6px 24px rgba(0, 0, 0, 0.25);
    background: linear-gradient(180deg, #fff 30%, #ffe8a3 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: ebm-dp-pop 0.7s 0.25s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.ebm-dp .ebm-dp-title {
    position: relative;
    z-index: 2;
    margin: 6px 0 4px;
    padding: 0;
    color: #fff;
    font-size: 21px;
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: -0.01em;
    text-transform: none;
}

.ebm-dp-event {
    position: relative;
    z-index: 2;
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    opacity: 0.95;
}

.ebm-dp-event-date {
    margin-left: 6px;
    font-weight: 500;
    opacity: 0.9;
    white-space: nowrap;
}

/* Confetti */

.ebm-dp-confetti {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}

.ebm-dp-confetti i {
    position: absolute;
    top: -12px;
    width: 8px;
    height: 12px;
    border-radius: 2px;
    opacity: 0;
    animation: ebm-dp-fall 3.6s linear infinite;
}

.ebm-dp-confetti i:nth-child(1)  { left: 6%;  background: #ffe066; animation-delay: 0s; }
.ebm-dp-confetti i:nth-child(2)  { left: 14%; background: #fff;    animation-delay: 1.2s; width: 6px; }
.ebm-dp-confetti i:nth-child(3)  { left: 23%; background: #7cf0c4; animation-delay: 0.6s; }
.ebm-dp-confetti i:nth-child(4)  { left: 31%; background: #ffd1dc; animation-delay: 2.1s; height: 8px; }
.ebm-dp-confetti i:nth-child(5)  { left: 42%; background: #ffe066; animation-delay: 1.6s; }
.ebm-dp-confetti i:nth-child(6)  { left: 51%; background: #fff;    animation-delay: 0.3s; width: 5px; }
.ebm-dp-confetti i:nth-child(7)  { left: 60%; background: #7cf0c4; animation-delay: 2.6s; }
.ebm-dp-confetti i:nth-child(8)  { left: 68%; background: #ffd1dc; animation-delay: 0.9s; }
.ebm-dp-confetti i:nth-child(9)  { left: 77%; background: #ffe066; animation-delay: 1.9s; height: 9px; }
.ebm-dp-confetti i:nth-child(10) { left: 85%; background: #fff;    animation-delay: 0.45s; }
.ebm-dp-confetti i:nth-child(11) { left: 92%; background: #7cf0c4; animation-delay: 2.3s; width: 6px; }
.ebm-dp-confetti i:nth-child(12) { left: 47%; background: #ffd1dc; animation-delay: 3s; }

/* Body */

.ebm-dp-body {
    padding: 6px 22px 4px;
    color: var(--ebm-dp-ink);
    text-align: center;
}

.ebm-dp-message {
    margin: 0 0 12px;
    color: #374151;
    font-size: 14px;
}

.ebm-dp .ebm-dp-offers {
    display: grid;
    gap: 8px;
    margin: 0 0 6px;
    padding: 0;
    list-style: none;
    text-align: left;
}

.ebm-dp-offer {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin: 0;
    padding: 10px 12px;
    border-radius: 14px;
    background: #faf5ff;
    border: 1px solid #ede9fe;
    opacity: 0;
    transform: translateY(8px);
}

.ebm-dp.is-open .ebm-dp-offer {
    animation: ebm-dp-rise 0.45s ease forwards;
}

.ebm-dp.is-open .ebm-dp-offer:nth-child(2) { animation-delay: 0.1s; }
.ebm-dp.is-open .ebm-dp-offer:nth-child(3) { animation-delay: 0.2s; }

.ebm-dp-offer--early   { background: #fff7ed; border-color: #fed7aa; }
.ebm-dp-offer--first-n { background: #fff1f2; border-color: #fecdd3; }
.ebm-dp-offer--group   { background: #ecfdf5; border-color: #a7f3d0; }

.ebm-dp-offer-icon {
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    background: #fff;
    box-shadow: 0 4px 12px -4px rgba(0, 0, 0, 0.15);
}

.ebm-dp-offer-text {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ebm-dp-offer-title {
    font-size: 15px;
    font-weight: 800;
    color: var(--ebm-dp-ink);
}

.ebm-dp-offer-body {
    font-size: 14px;
    color: #374151;
}

.ebm-dp-offer-body ul {
    margin: 2px 0 0;
    padding-left: 18px;
}

.ebm-dp-offer-meta {
    font-size: 12px;
    color: var(--ebm-dp-muted);
}

.ebm-dp-offer-meta--hot {
    color: #be123c;
    font-weight: 700;
}

.ebm-dp-progress {
    display: block;
    height: 8px;
    margin: 6px 0 2px;
    border-radius: 999px;
    background: #ffe4e6;
    overflow: hidden;
}

.ebm-dp-progress-bar {
    display: block;
    height: 100%;
    width: 0;
    border-radius: inherit;
    background: linear-gradient(90deg, #fb7185, #e11d48);
    transition: width 1.2s 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.ebm-dp.is-open .ebm-dp-progress-bar {
    width: var(--ebm-dp-pct, 50%);
}

/* Sticky action area: countdown + CTA always visible */

.ebm-dp-actions {
    position: sticky;
    bottom: 0;
    z-index: 2;
    padding: 12px 22px 16px;
    background: #fff;
    text-align: center;
    border-radius: 0 0 22px 22px;
    box-shadow: 0 -14px 18px -12px rgba(17, 24, 39, 0.18);
}

/* Countdown */

.ebm-dp-countdown {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px 12px;
    margin: 0 0 12px;
}

.ebm-dp-countdown-label {
    font-size: 12px;
    font-weight: 800;
    color: #b45309;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.ebm-dp-countdown-units {
    display: flex;
    gap: 6px;
}

.ebm-dp-unit {
    min-width: 48px;
    padding: 5px 4px 4px;
    border-radius: 10px;
    background: linear-gradient(180deg, #1f2937, #111827);
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: inset 0 -2px 0 rgba(255, 255, 255, 0.06), 0 6px 14px -6px rgba(17, 24, 39, 0.6);
}

.ebm-dp-unit b {
    font-size: 18px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    line-height: 1.1;
}

.ebm-dp-unit small {
    font-size: 9px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0.7;
}

/* Call to action */

.ebm-dp .ebm-dp-cta {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 15px 20px;
    border-radius: 14px;
    background: linear-gradient(90deg, var(--ebm-dp-orange), var(--ebm-dp-pink));
    color: #fff;
    font-size: 18px;
    font-weight: 800;
    letter-spacing: 0.01em;
    text-decoration: none;
    box-shadow: 0 14px 30px -10px rgba(225, 48, 108, 0.65);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    animation: ebm-dp-pulse 2s 1s ease-in-out infinite;
}

.ebm-dp .ebm-dp-cta::before {
    content: "";
    position: absolute;
    top: 0;
    left: -60%;
    width: 40%;
    height: 100%;
    background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.45), transparent);
    transform: skewX(-20deg);
    animation: ebm-dp-shine 2.8s 1.2s ease-in-out infinite;
}

.ebm-dp .ebm-dp-cta:hover,
.ebm-dp .ebm-dp-cta:focus-visible {
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 18px 36px -10px rgba(225, 48, 108, 0.8);
}

.ebm-dp .ebm-dp-cta:focus-visible {
    outline: 3px solid #fbbf24;
    outline-offset: 3px;
}

.ebm-dp-cta-arrow {
    transition: transform 0.2s ease;
}

.ebm-dp .ebm-dp-cta:hover .ebm-dp-cta-arrow {
    transform: translateX(4px);
}

.ebm-dp .ebm-dp-later {
    display: inline-block;
    margin: 8px 0 0;
    padding: 2px 8px;
    border: 0;
    background: none;
    color: var(--ebm-dp-muted);
    font-size: 13px;
    font-weight: 500;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
    box-shadow: none;
}

.ebm-dp .ebm-dp-later:hover {
    color: var(--ebm-dp-ink);
    background: none;
}

.ebm-dp-trust {
    margin: 4px 0 0;
    font-size: 11px;
    color: #9ca3af;
}

/* Animations */

@keyframes ebm-dp-fall {
    0%   { opacity: 0; transform: translateY(0) rotate(0deg); }
    10%  { opacity: 1; }
    100% { opacity: 0; transform: translateY(260px) rotate(540deg); }
}

@keyframes ebm-dp-pop {
    0%   { opacity: 0; transform: scale(0.4); }
    100% { opacity: 1; transform: scale(1); }
}

@keyframes ebm-dp-rise {
    to { opacity: 1; transform: none; }
}

@keyframes ebm-dp-pulse {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(1.03); }
}

@keyframes ebm-dp-pulse-soft {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.35); }
    50%      { box-shadow: 0 0 0 8px rgba(255, 255, 255, 0); }
}

@keyframes ebm-dp-shine {
    0%   { left: -60%; }
    60%  { left: 130%; }
    100% { left: 130%; }
}

/* Mobile: bottom sheet */

@media (max-width: 560px) {
    .ebm-dp {
        align-items: flex-end;
        padding: 0;
    }

    .ebm-dp-dialog {
        max-width: none;
        max-height: 92vh;
        border-radius: 22px 22px 0 0;
        transform: translateY(100%);
        transition: opacity 0.3s ease, transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
    }

    .ebm-dp-save-value {
        font-size: 44px;
    }

    .ebm-dp-actions {
        border-radius: 0;
        padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px));
    }

    .ebm-dp .ebm-dp-title {
        font-size: 20px;
    }

    .ebm-dp-unit {
        min-width: 52px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ebm-dp *,
    .ebm-dp *::before {
        animation: none !important;
        transition: none !important;
    }

    .ebm-dp-confetti {
        display: none;
    }

    .ebm-dp-offer {
        opacity: 1;
        transform: none;
    }

    .ebm-dp-progress-bar {
        width: var(--ebm-dp-pct, 50%);
    }
}
