/* ==========================================================================
   CELEBRATION BANNER (below the header)
   --cel-c1 / --cel-c2: the celebration's colours (set by the script)
   ========================================================================== */
@property --cel-angle {
    syntax: "<angle>";
    initial-value: 0deg;
    inherits: false;
}

.cel-banner {
    --cel-c1: #b3882f;
    --cel-c2: #c8102e;
    box-sizing: border-box;
    width: 100%;
    max-width: 960px;
    margin: 12px auto 0;
    padding: 0 16px;
}

.cel-banner[hidden] { display: none; }

/* The "special" border: a gradient in the celebration's colours that slowly runs around the edge */
.cel-frame {
    position: relative;
    padding: 2.5px;
    border-radius: 16px;
    background: conic-gradient(from var(--cel-angle), var(--cel-c1), var(--cel-c2), #f2c641, var(--cel-c1));
    box-shadow: 0 4px 18px color-mix(in srgb, var(--cel-c1) 22%, transparent);
    animation: celBorder 6s linear infinite;
}

@keyframes celBorder { to { --cel-angle: 360deg; } }

/* Collapsed */
.cel-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-height: 44px;
    padding: 6px 12px;
    border: none;
    border-radius: 13.5px;
    background:
        linear-gradient(90deg, color-mix(in srgb, var(--cel-c1) 10%, transparent), color-mix(in srgb, var(--cel-c2) 8%, transparent)),
        var(--ink-card-solid, #fff);
    color: var(--ink-dark);
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.cel-bar[hidden] { display: none; }
.cel-bar:focus-visible { outline: 2px solid var(--cel-c1); outline-offset: 3px; }

.cel-bar-art { flex: none; width: 30px; height: 30px; }
.cel-bar-art > svg, .cel-bar-art > img { width: 100%; height: 100%; object-fit: contain; display: block; }

.cel-bar-chip,
.cel-chip {
    flex: none;
    padding: 2px 9px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--cel-c1), var(--cel-c2));
    color: #fff;
    font-size: 0.66rem;
    font-weight: 800;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    white-space: nowrap;
}

.cel-bar-title {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 800;
    font-size: 0.92rem;
}

.cel-bar-more {
    flex: none;
    font-size: 0.74rem;
    font-weight: 800;
    color: var(--cel-c1);
}

.cel-chevron { flex: none; width: 20px; height: 20px; color: var(--ink-muted); }

/* Expanded */
.cel-panel {
    position: relative;
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 6px 18px;
    padding: 16px 52px 16px 18px;
    border-radius: 13.5px;
    background:
        radial-gradient(120% 140% at 0% 0%, color-mix(in srgb, var(--cel-c1) 16%, transparent), transparent 60%),
        radial-gradient(120% 140% at 100% 100%, color-mix(in srgb, var(--cel-c2) 14%, transparent), transparent 60%),
        var(--ink-card-solid, #fff);
    animation: celOpen 0.45s cubic-bezier(0.2, 0.9, 0.25, 1);
}

.cel-panel[hidden] { display: none; }

@keyframes celOpen {
    from { opacity: 0; transform: translateY(-6px) scale(0.98); }
    to { opacity: 1; transform: none; }
}

.cel-art { width: 104px; height: 104px; animation: celBob 3.2s ease-in-out infinite; }
.cel-art > svg, .cel-art > img { width: 100%; height: 100%; object-fit: contain; display: block; }

@keyframes celBob {
    0%, 100% { transform: translateY(0) rotate(-2deg); }
    50% { transform: translateY(-5px) rotate(2deg); }
}

.cel-text { min-width: 0; }
.cel-chip { display: inline-block; margin: 0 0 6px; }

.cel-title {
    margin: 0;
    font-size: clamp(1.15rem, 2.6vw, 1.55rem);
    font-weight: 900;
    line-height: 1.2;
    color: var(--ink-dark);
    background: linear-gradient(90deg, var(--cel-c1), var(--cel-c2));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.cel-message {
    margin: 6px 0 0;
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--ink-muted);
}

.cel-message[hidden] { display: none; }

.cel-dots { display: flex; gap: 6px; margin-top: 10px; }
.cel-dots[hidden] { display: none; }

.cel-dot {
    width: 9px;
    height: 9px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: color-mix(in srgb, var(--ink-muted) 35%, transparent);
    cursor: pointer;
}

.cel-dot.is-on { width: 22px; border-radius: 999px; background: linear-gradient(90deg, var(--cel-c1), var(--cel-c2)); }

.cel-collapse {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border-radius: 50%;
    border: 1px solid var(--ink-border-wash);
    background: var(--ink-card-solid, #fff);
    color: var(--ink-dark);
    cursor: pointer;
}

.cel-collapse svg { width: 18px; height: 18px; }
.cel-collapse:hover { border-color: var(--cel-c1); color: var(--cel-c1); }
.cel-collapse:focus-visible { outline: 2px solid var(--cel-c1); outline-offset: 2px; }

/* Effects layer over the page, never blocks clicks */
.cel-fx {
    position: fixed;
    inset: 0;
    z-index: 999;
    pointer-events: none;
    display: none;
}

.cel-fx.is-on { display: block; }

@media (max-width: 560px) {
    .cel-banner { padding: 0 12px; margin-top: 10px; }
    .cel-panel { grid-template-columns: 1fr; justify-items: center; text-align: center; padding: 16px 16px 14px; }
    .cel-art { width: 84px; height: 84px; }
    .cel-dots { justify-content: center; }
    .cel-bar-chip { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    .cel-frame, .cel-art, .cel-panel { animation: none; }
}
