/* Sale banner + sale modal (SUP-2631). Markup: function_includes/sale-banner.php. */
.baloo-sale-bar[hidden],
.baloo-sale-modal[hidden] { display: none !important; }

/* ---------- Banner (header, links to /akcie/) ---------- */
.baloo-sale-bar {
    display: block;
    position: relative;
    width: 100%;
    overflow: hidden;
    color: #fff !important;
    text-decoration: none !important;
    font-family: 'DM Sans', sans-serif;
    background:
        radial-gradient(ellipse 55% 160% at 50% 135%, rgba(238, 128, 36, .6), transparent 70%),
        linear-gradient(180deg, #24130a 0%, #3a1d0b 55%, #6e330f 100%);
    border-top: 1px solid rgba(240, 140, 50, .55);
    border-bottom: 1px solid rgba(245, 150, 55, .95);
}
.baloo-sale-bar::before,
.baloo-sale-bar::after {
    content: '';
    position: absolute;
    bottom: 0;
    width: 320px;
    height: 80%;
    background: no-repeat bottom / 100% 100% url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 320 40' preserveAspectRatio='none'%3E%3Cpath d='M0 40V30l26-9 18 6 30-17 22 10 24-15 34 19 20-7 28 13 30-8 26 11 22-5 40 12v10z' fill='%23150a04' fill-opacity='.85'/%3E%3Cpath d='M0 40v-6l40-6 30 5 40-10 36 9 30-4 44 7 36-5 64 10z' fill='%230d0602'/%3E%3C/svg%3E");
    pointer-events: none;
}
.baloo-sale-bar::before { left: 0; }
.baloo-sale-bar::after { right: 0; transform: scaleX(-1); }
.baloo-sale-bar:hover .bsb-title,
.baloo-sale-bar:hover .bsb-starts { text-decoration: underline; text-underline-offset: 3px; }

.bsb-inner {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    max-width: 1200px;
    min-height: 54px;
    margin: 0 auto;
    padding: 6px 16px;
}
.bsb-run,
.bsb-pre { display: flex; align-items: center; gap: 14px; }
.baloo-sale-bar[data-mode="running"] .bsb-pre,
.baloo-sale-bar[data-mode="upcoming"] .bsb-run { display: none; }
.bsb-ico { flex: none; width: 28px; height: 28px; color: #f08a2c; }
.bsb-text { display: flex; align-items: center; gap: 24px; }
.bsb-title,
.bsb-starts {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: .3px;
    text-transform: uppercase;
    white-space: nowrap;
    color: #fff;
}
.bsb-starts em { font-style: normal; color: #f5a034; }
.bsb-sep { flex: none; width: 1px; align-self: stretch; min-height: 32px; background: rgba(255, 255, 255, .28); }
.bsb-disc { font-size: 17px; font-weight: 500; text-transform: uppercase; white-space: nowrap; }
.bsb-disc strong { margin-left: 4px; font-size: 25px; font-weight: 700; color: #f5a034; }

.bsb-units { display: flex; gap: 8px; }
.bsb-unit {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 46px;
    padding: 4px 6px;
    border-radius: 6px;
    background: rgba(18, 9, 3, .6);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06);
}
.bsb-num { font-size: 19px; font-weight: 700; line-height: 1.15; font-variant-numeric: tabular-nums; color: #fff; }
.bsb-lbl { font-size: 10px; font-weight: 500; letter-spacing: .5px; color: rgba(255, 255, 255, .85); }

/* Countdown to the sale start: red variant */
.baloo-sale-bar[data-mode="upcoming"] {
    background:
        radial-gradient(ellipse 80% 190% at 50% 145%, rgba(255, 92, 30, .95), transparent 72%),
        linear-gradient(180deg, #2a0906 0%, #5c120a 50%, #b5280f 100%);
    border-bottom-color: rgba(255, 96, 40, .95);
}

@media (max-width: 767px) {
    .bsb-inner { justify-content: space-between; gap: 10px; min-height: 58px; padding: 7px 12px; }
    .bsb-run,
    .bsb-pre { gap: 9px; min-width: 0; }
    .bsb-ico { width: 22px; height: 22px; }
    .bsb-text { flex-direction: column; align-items: flex-start; gap: 0; min-width: 0; }
    .bsb-text .bsb-sep,
    .bsb-pre-title { display: none; }
    .bsb-title,
    .bsb-starts { font-size: 14px; white-space: normal; line-height: 1.25; }
    .bsb-starts { font-size: 16px; }
    .bsb-disc { font-size: 12.5px; }
    .bsb-disc strong { font-size: 19px; }
    .bsb-units { gap: 4px; }
    .bsb-unit { min-width: 34px; padding: 3px 3px; border-radius: 5px; }
    .bsb-num { font-size: 15px; }
    .bsb-lbl { font-size: 9px; letter-spacing: .2px; }
    .baloo-sale-bar::before,
    .baloo-sale-bar::after { width: 160px; height: 45%; }
}
@media (max-width: 359px) {
    .bsb-unit { min-width: 30px; }
    .bsb-sep-units { display: none; }
}

/* ---------- Modal ---------- */
html.bsm-open { overflow: hidden; }
.baloo-sale-modal {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    font-family: 'DM Sans', sans-serif;
}
.bsm-backdrop { position: absolute; inset: 0; background: rgba(10, 6, 2, .66); backdrop-filter: blur(3px); }
.bsm-card {
    position: relative;
    width: min(920px, 100%);
    max-height: calc(100vh - 32px);
    max-height: calc(100dvh - 32px);
    overflow: auto;
    border: 1px solid rgba(240, 140, 50, .55);
    border-radius: 20px;
    color: #fff;
    box-shadow: 0 30px 80px rgba(0, 0, 0, .6), 0 0 40px rgba(240, 120, 30, .15);
    background:
        linear-gradient(90deg, rgba(24, 12, 5, .97) 0%, rgba(24, 12, 5, .9) 40%, rgba(24, 12, 5, .3) 66%, rgba(24, 12, 5, 0) 82%),
        #24130a url('/wp-content/uploads/2026/07/rd-hero-savana.jpg') 70% center / cover no-repeat;
}
.bsm-body { display: flex; flex-direction: column; align-items: flex-start; gap: 18px; max-width: 540px; padding: 38px 48px 42px; }
.bsm-logo { width: 120px; height: auto; }
.bsm-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 18px;
    border: 1.5px solid #f08a2c;
    border-radius: 999px;
    background: rgba(30, 14, 4, .5);
    box-shadow: 0 0 18px rgba(240, 138, 44, .45), inset 0 0 12px rgba(240, 138, 44, .2);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: .6px;
}
.bsm-badge svg { width: 20px; height: 20px; color: #f08a2c; }
.baloo-sale-modal .bsm-title {
    margin: 0 !important;
    font-family: 'Playfair Display', serif !important;
    font-size: clamp(34px, 5vw, 56px) !important;
    font-weight: 600 !important;
    line-height: 1.04 !important;
    text-transform: uppercase;
    color: #fff !important;
}
.bsm-lead { margin: 0; font-size: 19px; line-height: 1.45; color: #fff; }
.bsm-lead strong { font-size: 1.45em; font-weight: 700; color: #f5a034; }
.bsm-ends { display: flex; align-items: center; gap: 16px; width: 100%; font-size: 14px; font-weight: 500; letter-spacing: 3px; }
.bsm-ends::before,
.bsm-ends::after { content: ''; flex: 1; height: 1px; background: rgba(255, 255, 255, .55); }
.bsm-card .bsb-units { gap: 12px; }
.bsm-card .bsb-unit {
    min-width: 78px;
    padding: 10px 8px;
    border-radius: 12px;
    background: rgba(40, 18, 6, .55);
    box-shadow: inset 0 0 0 1px rgba(240, 138, 44, .7), 0 0 14px rgba(240, 138, 44, .2);
}
.bsm-card .bsb-num { font-size: 28px; }
.bsm-card .bsb-lbl { font-size: 13px; }
.baloo-sale-modal .bsm-cta {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    padding: 16px 34px;
    border-radius: 999px;
    background: linear-gradient(180deg, #f79a2e, #e0661a);
    box-shadow: 0 10px 24px rgba(224, 102, 26, .35);
    font-size: 18px;
    font-weight: 600;
    color: #fff !important;
    text-decoration: none !important;
}
.baloo-sale-modal .bsm-cta:hover { filter: brightness(1.08); }
.baloo-sale-modal .bsm-close {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 2;
    width: 42px;
    height: 42px;
    padding: 7px;
    border: 0 !important;
    border-radius: 50%;
    background: transparent !important;
    box-shadow: none !important;
    color: #fff !important;
    cursor: pointer;
}
.baloo-sale-modal .bsm-close:hover { background: rgba(255, 255, 255, .12) !important; }
.baloo-sale-modal .bsm-close svg { display: block; width: 100%; height: 100%; }

@media (max-width: 767px) {
    .baloo-sale-modal { padding: 12px; }
    .bsm-card {
        background:
            linear-gradient(180deg, rgba(24, 12, 5, .9) 0%, rgba(24, 12, 5, .55) 48%, rgba(24, 12, 5, .9) 100%),
            #24130a url('/wp-content/uploads/2026/07/rd-hero-savana-768x577.jpg') center / cover no-repeat;
    }
    .bsm-body { gap: 14px; max-width: none; padding: 26px 20px 24px; }
    .bsm-logo { width: 104px; }
    .bsm-badge { padding: 7px 14px; font-size: 13px; }
    .baloo-sale-modal .bsm-title { font-size: 38px !important; }
    .bsm-lead { font-size: 17px; }
    .bsm-ends { font-size: 13px; letter-spacing: 2px; }
    .bsm-card .bsb-units { justify-content: space-between; width: 100%; gap: 8px; }
    .bsm-card .bsb-unit { flex: 1; min-width: 0; padding: 9px 4px; }
    .bsm-card .bsb-num { font-size: 25px; }
    .bsm-card .bsb-lbl { font-size: 12px; }
    .baloo-sale-modal .bsm-cta { justify-content: center; width: 100%; padding: 15px 18px; font-size: 17px; }
}
