/* ======================================================
   EVENT UI — RESPONSIVE MAY 2026
   Desktop: compact banner (top-center) + slim leaderboard (top-right)
   Mobile:  floating pill (bottom-left) + full bottom sheet
   ====================================================== */

/* ---- Shared tag chips ---- */
.event-tag {
    font-size: 0.65rem;
    padding: 3px 9px;
    border-radius: 20px;
    font-weight: 600;
    white-space: nowrap;
    border: 1px solid transparent;
}
.event-tag--gold   { background: rgba(255,200,0,0.12);  border-color: rgba(255,200,0,0.35);  color: #f9e45b; }
.event-tag--purple { background: rgba(200,100,255,0.12); border-color: rgba(200,100,255,0.35); color: #c86dff; }
.event-tag--blue   { background: rgba(100,200,255,0.12); border-color: rgba(100,200,255,0.35); color: #87ceeb; }

/* ============================================================
   DESKTOP: Event Banner (top-center, fixed)
   ============================================================ */
.event-banner-desktop {
    position: fixed;
    top: 54px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 850;
    width: min(480px, 90vw);
    transition: all 0.4s cubic-bezier(0.4,0,0.2,1);
    /* Hidden on mobile — mobile gets the bottom sheet pill */
    display: block;
}

.event-banner-inner {
    background: linear-gradient(135deg, rgba(110,0,190,0.93), rgba(55,0,130,0.96));
    border: 1.5px solid rgba(200,100,255,0.45);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(140,0,255,0.28);
    backdrop-filter: blur(12px);
}

/* Pill (collapsed) */
.event-banner-pill {
    display: none;
    cursor: pointer;
    padding: 5px 14px;
    align-items: center;
    gap: 8px;
    justify-content: center;
}
.event-banner-pill-dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: #c86dff;
    animation: pillDotPulse 1.8s ease-in-out infinite;
    flex-shrink: 0;
}
@keyframes pillDotPulse {
    0%,100% { opacity: 1; transform: scale(1); }
    50%      { opacity: 0.6; transform: scale(1.3); }
}
.event-banner-pill-text {
    font-size: 0.7rem;
    color: rgba(220,150,255,0.92);
    font-weight: 600;
}

/* Expanded body */
.event-banner-body {
    /* visible by default */
}
.event-banner-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 13px 7px;
}
.event-banner-icon {
    font-size: 1.3rem;
    filter: drop-shadow(0 0 8px rgba(255,200,0,0.8));
    animation: float 2.5s ease-in-out infinite;
    flex-shrink: 0;
}
.event-banner-content { flex: 1; min-width: 0; }
.event-banner-title {
    font-size: 0.8rem;
    font-weight: 800;
    color: #f9e45b;
    letter-spacing: 0.4px;
    text-shadow: 0 1px 5px rgba(0,0,0,0.5);
}
.event-banner-desc {
    font-size: 0.68rem;
    color: rgba(230,190,255,0.95);
    margin-top: 3px;
    line-height: 1.5;
}
.event-banner-close {
    background: none;
    border: none;
    color: rgba(255,255,255,0.45);
    font-size: 1rem;
    cursor: pointer;
    padding: 2px 5px;
    border-radius: 6px;
    flex-shrink: 0;
    transition: color 0.2s;
}
.event-banner-close:hover { color: rgba(255,255,255,0.8); }

.event-banner-tags {
    display: flex;
    gap: 5px;
    padding: 0 13px 9px;
    flex-wrap: wrap;
    align-items: center;
}
.event-tag-btn {
    margin-left: auto;
    background: linear-gradient(135deg, rgba(200,100,255,0.28), rgba(120,0,200,0.28));
    border: 1px solid rgba(200,100,255,0.45);
    color: #e0b0ff;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s, transform 0.15s;
}
.event-tag-btn:hover {
    background: linear-gradient(135deg, rgba(200,100,255,0.45), rgba(120,0,200,0.45));
    transform: scale(1.04);
}

/* ============================================================
   DESKTOP: Leaderboard (top-right, fixed, collapsible)
   ============================================================ */
.event-lb-desktop {
    position: fixed;
    top: 60px;
    right: 14px;
    z-index: 840;
    width: 240px;
    transition: all 0.3s;
    pointer-events: auto;
    /* Hidden on mobile */
    display: block;
}

.event-lb-card {
    background: linear-gradient(135deg, rgba(38,10,58,0.96), rgba(18,5,28,0.98));
    border: 1.5px solid rgba(200,100,255,0.35);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 6px 28px rgba(0,0,0,0.38);
    backdrop-filter: blur(8px);
}

.event-lb-header {
    padding: 9px 11px;
    background: linear-gradient(90deg, rgba(200,100,255,0.18), transparent);
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    user-select: none;
}
.event-lb-title {
    font-size: 0.7rem;
    font-weight: 700;
    color: #e0b0ff;
    letter-spacing: 0.2px;
}
.event-lb-toggle {
    background: none;
    border: none;
    color: rgba(255,255,255,0.55);
    font-size: 0.85rem;
    cursor: pointer;
    padding: 0 2px;
    line-height: 1;
}

.event-lb-body { display: block; }
.event-lb-desc {
    padding: 7px 11px;
    font-size: 0.62rem;
    color: rgba(255,255,255,0.58);
    line-height: 1.4;
    background: rgba(0,0,0,0.18);
}
.event-lb-list {
    max-height: 220px;
    overflow-y: auto;
    padding: 5px;
    scrollbar-width: thin;
    scrollbar-color: rgba(200,100,255,0.3) transparent;
}

/* ============================================================
   MOBILE: Floating Pill (bottom-left)
   Only shown on mobile — hidden on desktop
   ============================================================ */
.mobile-event-pill {
    display: none; /* shown only via media query */
    position: fixed;
    bottom: 86px;   /* above the floating action buttons */
    left: 16px;
    z-index: 900;
    background: linear-gradient(135deg, rgba(110,0,190,0.92), rgba(60,0,140,0.95));
    border: 1.5px solid rgba(200,100,255,0.5);
    border-radius: 30px;
    padding: 8px 14px;
    align-items: center;
    gap: 6px;
    color: rgba(220,180,255,0.95);
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 18px rgba(140,0,255,0.35);
    backdrop-filter: blur(10px);
    user-select: none;
    transition: transform 0.2s, box-shadow 0.2s;
    animation: pillFloat 2.8s ease-in-out infinite;
}
.mobile-event-pill:active { transform: scale(0.95); }
@keyframes pillFloat {
    0%,100% { transform: translateY(0); box-shadow: 0 4px 18px rgba(140,0,255,0.35); }
    50%      { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(140,0,255,0.5); }
}

.mobile-event-pill-dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: #c86dff;
    animation: pillDotPulse 1.8s ease-in-out infinite;
    flex-shrink: 0;
}
.mobile-event-pill-arrow {
    font-size: 0.65rem;
    opacity: 0.7;
    transition: transform 0.25s;
}

/* ============================================================
   MOBILE: Bottom Sheet Overlay
   ============================================================ */
.mobile-event-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0);
    z-index: 910;
    transition: background 0.3s;
    pointer-events: none;
}
.mobile-event-overlay--visible {
    display: block;
    background: rgba(0,0,0,0.45);
    pointer-events: auto;
}

/* ============================================================
   MOBILE: Bottom Sheet Panel
   ============================================================ */
.mobile-event-sheet {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 920;
    background: linear-gradient(160deg, rgba(40,10,62,0.98), rgba(15,5,25,0.99));
    border-top: 1.5px solid rgba(200,100,255,0.4);
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -8px 40px rgba(0,0,0,0.5);
    transform: translateY(100%);
    transition: transform 0.38s cubic-bezier(0.4,0,0.2,1);
    max-height: 75vh;
    overflow: hidden;
    backdrop-filter: blur(14px);
    padding-bottom: env(safe-area-inset-bottom, 0px);
}
.mobile-event-sheet--open {
    display: block;
    transform: translateY(0);
}

.mobile-event-sheet-handle {
    width: 40px; height: 4px;
    border-radius: 2px;
    background: rgba(200,100,255,0.4);
    margin: 10px auto 0;
}

/* Tabs */
.mobile-event-tabs {
    display: flex;
    gap: 6px;
    padding: 10px 16px 0;
    border-bottom: 1px solid rgba(255,255,255,0.07);
    margin-bottom: 0;
}
.mobile-event-tab {
    flex: 1;
    padding: 8px 0;
    background: none;
    border: none;
    border-bottom: 2.5px solid transparent;
    color: rgba(255,255,255,0.5);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s;
    font-family: inherit;
}
.mobile-event-tab--active {
    color: #e0b0ff;
    border-bottom-color: #c86dff;
}

/* Panels */
.mobile-event-panel {
    padding: 14px 16px;
    overflow-y: auto;
    max-height: calc(75vh - 90px);
    scrollbar-width: thin;
    scrollbar-color: rgba(200,100,255,0.3) transparent;
}

/* Event panel content */
.met-event-hero {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    padding: 12px;
    background: rgba(200,100,255,0.08);
    border: 1px solid rgba(200,100,255,0.2);
    border-radius: 12px;
}
.met-event-hero-icon {
    font-size: 2.2rem;
    filter: drop-shadow(0 0 10px rgba(255,200,0,0.7));
    animation: float 2.5s ease-in-out infinite;
    flex-shrink: 0;
}
.met-event-hero-title {
    font-size: 1rem;
    font-weight: 800;
    color: #f9e45b;
    letter-spacing: 0.3px;
    text-shadow: 0 1px 6px rgba(0,0,0,0.6);
}
.met-event-hero-sub {
    font-size: 0.75rem;
    color: #c86dff;
    font-weight: 600;
    margin-top: 2px;
}
.met-event-body {
    font-size: 0.8rem;
    color: rgba(230,195,255,0.92);
    line-height: 1.65;
    margin: 0 0 12px;
}
.met-event-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 14px;
}
.met-event-cta {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, rgba(200,100,255,0.3), rgba(120,0,200,0.4));
    border: 1px solid rgba(200,100,255,0.5);
    border-radius: 12px;
    color: #e0b0ff;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s, background 0.2s;
    font-family: inherit;
}
.met-event-cta:active { transform: scale(0.97); }

/* Leaderboard panel content */
.met-lb-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    padding: 10px 12px;
    background: rgba(200,100,255,0.08);
    border: 1px solid rgba(200,100,255,0.2);
    border-radius: 12px;
}
.met-lb-title {
    font-size: 0.8rem;
    font-weight: 800;
    color: #e0b0ff;
    letter-spacing: 0.2px;
}
.met-lb-sub {
    font-size: 0.68rem;
    color: #f9e45b;
    font-weight: 600;
    margin-top: 2px;
}
.met-lb-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

/* ============================================================
   RESPONSIVE BREAKPOINTS
   ============================================================ */

/* Desktop (≥768px): show desktop elements, hide mobile pill */
@media (min-width: 768px) {
    .mobile-event-pill    { display: none !important; }
    .mobile-event-overlay { display: none !important; }
    .mobile-event-sheet   { display: none !important; }
    .event-banner-desktop { display: block; }
    .event-lb-desktop     { display: block; }
}

/* Mobile (≤767px): hide desktop elements, show pill */
@media (max-width: 767px) {
    .event-banner-desktop  { display: none !important; }
    .event-lb-desktop      { display: none !important; }
    .mobile-event-pill     { display: flex !important; }
    /* sheet toggled via JS class */
    .mobile-event-sheet--open { display: block !important; }
}
