/* RaxBoard / SpecialDays — public banner styles */

.rb-sd { position: relative; z-index: 40; }

/* ── Entrance / leave animation ──
   Entrance animates TRANSFORM ONLY (a subtle slide) and never touches opacity,
   so the banner is ALWAYS visible — even if the animation is paused (e.g. a
   background tab pauses CSS animations) the worst case is an un-slid but fully
   visible banner. This avoids the "invisible until focus" trap of an opacity
   fade-in. The leave (fade-out) is user-initiated, so the tab is focused. */
.rb-sd { transition: transform .28s cubic-bezier(.16,1,.3,1), opacity .28s ease; }
.rb-sd--enter { animation: rb-sd-enter .32s cubic-bezier(.16,1,.3,1) both; }
.rb-sd-float.rb-sd--enter { animation-name: rb-sd-enter-float; }
.rb-sd--leave { transform: translateY(-12px); opacity: 0; }
.rb-sd-float.rb-sd--leave { transform: translateY(16px); opacity: 0; }
@keyframes rb-sd-enter { from { transform: translateY(-8px); } to { transform: none; } }
@keyframes rb-sd-enter-float { from { transform: translateY(10px); } to { transform: none; } }
@media (prefers-reduced-motion: reduce) {
    .rb-sd { transition: none; }
    .rb-sd--enter { animation: none; }
    .rb-sd--leave { transform: none; opacity: 1; }
}

/* ── Shared message / text ──────────────────────── */
.rb-sd-message { display: flex; align-items: center; gap: 14px; flex: 1 1 auto; min-width: 0; }
.rb-sd-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rb-sd-icon { font-size: 1.15rem; opacity: .95; flex: 0 0 auto; }
.rb-sd-actions { display: flex; align-items: center; gap: 14px; flex: 0 0 auto; }

/* ── Bar (thin strip) ───────────────────────────── */
.rb-sd-bar {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 24px; gap: 20px;
    background: linear-gradient(135deg, var(--rb-sd-from), var(--rb-sd-to));
    color: var(--rb-sd-text);
    font-weight: 600;
    box-shadow: 0 1px 0 rgba(0,0,0,.1);
    position: relative; overflow: hidden;
}
.rb-sd-bar .rb-sd-title { font-size: 1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rb-sd-bar .rb-sd-divider { opacity: .7; margin: 0 2px; }
.rb-sd-bar .rb-sd-desc { font-weight: 400; opacity: .9; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ── Hero ───────────────────────────────────────── */
.rb-sd-hero {
    padding: 36px 28px;
    background: linear-gradient(135deg, var(--rb-sd-from), var(--rb-sd-to));
    color: var(--rb-sd-text);
    display: flex; align-items: center; justify-content: space-between; gap: 24px;
    position: relative; overflow: hidden;
}
.rb-sd-hero .rb-sd-icon { font-size: 2rem; }
.rb-sd-hero .rb-sd-title { font-size: 1.8rem; font-weight: 800; line-height: 1.15; }
.rb-sd-hero .rb-sd-desc { font-size: 1rem; opacity: .92; max-width: 60ch; }

/* ── Card ───────────────────────────────────────── */
.rb-sd-card {
    margin: 16px auto;
    max-width: 1200px;
    border-radius: 14px;
    padding: 22px 26px;
    background: linear-gradient(135deg, var(--rb-sd-from), var(--rb-sd-to));
    color: var(--rb-sd-text);
    box-shadow: 0 10px 30px -10px rgba(0,0,0,.35);
    display: flex; align-items: center; justify-content: space-between; gap: 24px;
    position: relative; overflow: hidden;
}
.rb-sd-card .rb-sd-icon { font-size: 1.6rem; }
.rb-sd-card .rb-sd-title { font-size: 1.25rem; font-weight: 700; }
.rb-sd-card .rb-sd-desc { opacity: .92; font-size: .95rem; }

/* ── Floating ───────────────────────────────────── */
.rb-sd-float {
    position: fixed; right: 20px; bottom: 20px;
    max-width: 360px; padding: 18px 20px; border-radius: 14px;
    background: linear-gradient(135deg, var(--rb-sd-from), var(--rb-sd-to));
    color: var(--rb-sd-text);
    box-shadow: 0 18px 50px -20px rgba(0,0,0,.55);
    display: flex; align-items: flex-start; justify-content: space-between; gap: 14px;
    z-index: 9999;
}
.rb-sd-float .rb-sd-title { font-weight: 700; }
.rb-sd-float .rb-sd-desc { opacity: .9; font-size: .9rem; }

/* ── Decoration ─────────────────────────────────── */
.rb-sd-decoration {
    position: absolute; left: -10px; top: 50%; transform: translateY(-50%);
    height: 130%; opacity: .85; pointer-events: none;
}

/* ── Countdown ──────────────────────────────────── */
.rb-sd-countdown { display: flex; gap: 8px; }
.rb-sd-countdown__cell {
    background: rgba(0,0,0,.25);
    border-radius: 6px;
    padding: 6px 10px;
    min-width: 54px;
    text-align: center;
    line-height: 1.1;
}
.rb-sd-countdown__num { font-size: 1.1rem; font-weight: 700; color: var(--rb-sd-accent); font-variant-numeric: tabular-nums; }
.rb-sd-countdown__label { font-size: .55rem; text-transform: uppercase; opacity: .85; letter-spacing: .03em; }

/* ── Close button ───────────────────────────────── */
.rb-sd-close {
    background: rgba(0,0,0,.25);
    color: inherit; border: 0;
    width: 30px; height: 30px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    cursor: pointer; transition: background .15s; flex: 0 0 auto;
}
.rb-sd-close:hover { background: rgba(0,0,0,.45); }
.rb-sd-close:focus-visible { outline: 2px solid var(--rb-sd-accent); outline-offset: 2px; }

/* ── Clickable wrapper ──────────────────────────── */
a.rb-sd-link { color: inherit; text-decoration: none; display: block; }

/* ── CTA button ─────────────────────────────────── */
.rb-sd-cta {
    display: inline-flex; align-items: center; gap: .4rem;
    padding: 8px 16px; border-radius: 9999px;
    font-weight: 700; font-size: .9rem; text-decoration: none;
    white-space: nowrap; cursor: pointer; flex: 0 0 auto;
    transition: transform .12s ease, filter .12s ease, background .12s ease;
}
.rb-sd-cta:hover { transform: translateY(-1px); filter: brightness(1.05); }
.rb-sd-cta--solid   { background: var(--rb-sd-accent); color: #111827; }
.rb-sd-cta--outline { background: transparent; color: var(--rb-sd-text); border: 2px solid currentColor; }
.rb-sd-cta--text    { background: transparent; color: var(--rb-sd-accent); text-decoration: underline; padding: 8px 6px; }

/* rich body links */
.rb-sd-desc a { color: inherit; text-decoration: underline; }

/* ── Effect canvas (confetti / snow) ────────────── */
.rb-sd-fx { position: fixed; inset: 0; pointer-events: none; z-index: 9998; }

/* ── String lights ──────────────────────────────── */
.rb-sd-lights {
    position: fixed; top: 0; left: 0; right: 0; height: 14px;
    display: flex; justify-content: space-around; align-items: flex-start;
    pointer-events: none; z-index: 9997;
}
.rb-sd-bulb {
    width: 8px; height: 8px; border-radius: 50%;
    background: #fbbf24; box-shadow: 0 0 8px 2px rgba(251,191,36,.7);
    animation: rb-sd-blink 1.6s ease-in-out infinite;
}
.rb-sd-bulb:nth-child(3n)   { background: #f472b6; box-shadow: 0 0 8px 2px rgba(244,114,182,.7); }
.rb-sd-bulb:nth-child(3n+1) { background: #22d3ee; box-shadow: 0 0 8px 2px rgba(34,211,238,.7); }
.rb-sd-lights--static .rb-sd-bulb { animation: none; }
@keyframes rb-sd-blink { 0%,100% { opacity: 1; } 50% { opacity: .35; } }

@media (max-width: 640px) {
    .rb-sd-bar { flex-direction: column; align-items: flex-start; padding: 12px 14px; gap: 10px; }
    .rb-sd-bar .rb-sd-message { white-space: normal; }
    .rb-sd-bar .rb-sd-divider, .rb-sd-bar .rb-sd-desc { display: none; }
    .rb-sd-hero { flex-direction: column; align-items: flex-start; padding: 22px 18px; }
    .rb-sd-hero .rb-sd-title { font-size: 1.4rem; }
    .rb-sd-hero .rb-sd-icon { font-size: 1.6rem; }
    .rb-sd-card { flex-direction: column; align-items: flex-start; }
    .rb-sd-actions { flex-wrap: wrap; }
    .rb-sd-countdown__cell { min-width: 44px; padding: 4px 7px; }
    .rb-sd-float { left: 12px; right: 12px; bottom: 12px; max-width: none; }
}
