/* Event page (HLTV-style hub) — builds on shadcn.css tokens and .sh-* primitives. */

.ev-page { font-family: var(--sh-font); }

/* Key facts strip */
.ev-facts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    border: 1px solid hsl(var(--border));
    border-radius: calc(var(--radius) + 4px);
    background: hsl(var(--card));
    overflow: hidden;
    margin: 8px 0 20px;
}
.ev-fact {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 12px 16px;
    border-right: 1px solid hsl(var(--border));
    border-bottom: 1px solid hsl(var(--border));
    margin: 0 -1px -1px 0;
    min-width: 0;
}
.ev-fact__label {
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: hsl(var(--muted-foreground));
}
.ev-fact__value { font-size: 15px; font-weight: 600; color: hsl(var(--foreground)); overflow-wrap: anywhere; }
.ev-fact__sub { font-size: 12px; color: hsl(var(--muted-foreground)); }
.ev-fact .ev-status { align-self: flex-start; margin-top: 4px; }

/* Status badge */
.ev-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 22px;
    padding: 0 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    border: 1px solid transparent;
}
.ev-status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.ev-status--open { color: #15803d; background: #dcfce7; }
.ev-status--soon { color: #b45309; background: #fef3c7; }
.ev-status--closed { color: hsl(var(--muted-foreground)); background: hsl(var(--muted)); }
.ev-status--registered { color: #1d4ed8; background: #dbeafe; }
.ev-status--pending { color: #b45309; background: #fff7ed; border-color: #fed7aa; }

/* Tabs */
.ev-tabs {
    display: flex;
    gap: 4px;
    padding: 4px;
    background: hsl(var(--muted));
    border-radius: var(--radius);
    overflow-x: auto;
    scrollbar-width: none;
    margin-bottom: 16px;
}
.ev-tabs::-webkit-scrollbar { display: none; }
.ev-tab {
    flex: 1 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 32px;
    padding: 0 12px;
    border: 0;
    border-radius: calc(var(--radius) - 2px);
    background: transparent;
    color: hsl(var(--muted-foreground));
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    cursor: pointer;
}
.ev-tab:hover { color: hsl(var(--foreground)); }
.ev-tab.is-active { background: hsl(var(--background)); color: hsl(var(--foreground)); box-shadow: var(--sh-shadow); }
.ev-tab:focus-visible { outline: 2px solid hsl(var(--ring)); outline-offset: 2px; }
.ev-tab__count {
    min-width: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: hsl(var(--border));
    font-size: 11px;
    line-height: 18px;
    text-align: center;
}
.ev-panel[hidden] { display: none !important; }

/* Overview blocks */
.ev-block { margin-bottom: 24px; }
.ev-block__title { margin: 0 0 12px; font-size: 18px; font-weight: 600; letter-spacing: -0.01em; }
.ev-highlights { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 8px; }
.ev-highlight {
    display: flex; flex-direction: column; gap: 2px;
    padding: 12px; border: 1px solid hsl(var(--border)); border-radius: var(--radius);
}
.ev-highlight__title { font-weight: 600; }
.ev-schedule { list-style: none; margin: 0; padding: 0; border-left: 2px solid hsl(var(--border)); }
.ev-schedule li { display: flex; gap: 12px; padding: 0 0 14px 14px; position: relative; }
.ev-schedule li::before {
    content: ""; position: absolute; left: -6px; top: 5px; width: 10px; height: 10px;
    border-radius: 50%; background: hsl(var(--primary));
}
.ev-schedule__time { min-width: 56px; font-weight: 600; font-variant-numeric: tabular-nums; }
.ev-schedule__title { font-weight: 600; }
.ev-people { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.ev-person { display: flex; align-items: center; gap: 12px; }
.ev-person__name { font-weight: 600; }
.ev-avatar { border-radius: 50%; object-fit: cover; flex-shrink: 0; background: hsl(var(--muted)); }
.ev-organizer {
    display: flex; flex-direction: column; gap: 2px;
    padding: 12px 16px; border: 1px solid hsl(var(--border)); border-radius: var(--radius);
}

/* Categories */
.ev-cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.ev-cat { padding: 12px 16px; gap: 2px; }
.ev-cat__name { font-weight: 600; }

/* Results */
.ev-results { margin-bottom: 16px; overflow: hidden; }
.ev-results__list { list-style: none; margin: 0; padding: 0; }
.ev-result {
    display: grid;
    grid-template-columns: 32px 36px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    border-top: 1px solid hsl(var(--border));
}
.ev-result:first-child { border-top: 0; }
.ev-place {
    display: inline-flex; align-items: center; justify-content: center;
    width: 28px; height: 28px; border-radius: 50%;
    background: hsl(var(--muted)); font-weight: 700; font-size: 13px;
    font-variant-numeric: tabular-nums;
}
.ev-place--1 { background: #fde68a; color: #78350f; }
.ev-place--2 { background: #e5e7eb; color: #374151; }
.ev-place--3 { background: #fed7aa; color: #7c2d12; }
.ev-result__name { font-weight: 600; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-width: 0; }
.ev-result__name a { color: hsl(var(--foreground)); text-decoration: none; }
.ev-result__name a:hover { text-decoration: underline; }
.ev-result__pts { font-size: 13px; font-weight: 600; color: hsl(var(--muted-foreground)); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Photos fallback grid */
.ev-photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 8px; }
.ev-photo-grid img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--radius); }

/* Participants */
.ev-participants { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 6px 16px; }
.ev-participant { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px solid hsl(var(--border)); min-width: 0; }
.ev-participant__name { flex: 1; min-width: 0; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ev-participant__name a { color: hsl(var(--foreground)); text-decoration: none; }

/* Sidebar registration card */
.ev-side-sticky { position: sticky; top: 84px; z-index: 2; }
.ev-reg-card { box-shadow: 0 4px 16px rgba(0, 0, 0, .06); }
.ev-reg-card__body { padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.ev-reg-card__fee { display: flex; flex-direction: column; }
.ev-reg-card__fee strong { font-size: 28px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.ev-reg-card__list { margin: 0; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.ev-reg-card__list > div { display: flex; justify-content: space-between; gap: 12px; }
.ev-reg-card__list dt { font-weight: 400; color: hsl(var(--muted-foreground)); }
.ev-reg-card__list dd { margin: 0; font-weight: 600; text-align: right; }
.ev-progress { height: 6px; border-radius: 999px; background: hsl(var(--muted)); overflow: hidden; }
.ev-progress span { display: block; height: 100%; background: hsl(var(--primary)); border-radius: inherit; }

/* Registration modal */
.ev-modal .modal-content { border-radius: calc(var(--radius) + 4px); border: 1px solid hsl(var(--border)); font-family: var(--sh-font); }
.ev-modal-fee {
    display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px;
    padding: 12px 14px; margin-bottom: 16px;
    border: 1px solid hsl(var(--border)); border-radius: var(--radius); background: hsl(var(--muted));
}
.ev-modal-fee strong { font-size: 18px; }
.ev-modal-fee small { flex-basis: 100%; color: hsl(var(--muted-foreground)); }

/* Mobile sticky bar */
.ev-mobile-bar, .ev-mobile-bar-spacer { display: none; }
@media (max-width: 991.98px) {
    .ev-side-sticky { position: static; display: none; }
    .ev-mobile-bar {
        position: fixed; left: 0; right: 0; bottom: 0; z-index: 1030;
        display: flex; align-items: center; justify-content: space-between; gap: 12px;
        padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
        background: hsl(var(--background));
        border-top: 1px solid hsl(var(--border));
        box-shadow: 0 -4px 16px rgba(0, 0, 0, .06);
    }
    .ev-mobile-bar__info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
    .ev-mobile-bar__info strong { font-size: 17px; }
    .ev-mobile-bar .sh-btn { flex-shrink: 0; }
    .ev-mobile-bar-spacer { display: block; height: 76px; }
}
