/* ═══════════════════════════════════════════════════
   HaxNation Events — Utilitarian Cyber-Minimalism
═══════════════════════════════════════════════════ */

/* Harsh Selection Override */
::selection {
    background-color: #5ce1e6;
    color: #0b0b0b;
}
::-moz-selection {
    background-color: #5ce1e6;
    color: #0b0b0b;
}

/* Base resets & utilities */
.hidden { display: none !important; }

/* Generic message modal. It carries both failures and positive confirmations,
   so its accent is driven by data-tone: red is reserved for failure states,
   while success/acknowledgement style messages use the theme green. */
.ev-msg-card { box-shadow: 12px 12px 0 0 #ff2a2a; }
.ev-msg-head { color: #ff2a2a; }
.ev-msg[data-tone="positive"] .ev-msg-card { box-shadow: 12px 12px 0 0 #4ade80; }
.ev-msg[data-tone="positive"] .ev-msg-head { color: #4ade80; }

/* Certificate verify page — never allow horizontal blowout from long IDs/URLs */
#app { overflow-x: clip; }
#app img { max-width: 100%; height: auto; }
#app table { max-width: 100%; }
#app td, #app code { overflow-wrap: anywhere; word-break: break-word; }

/* Print: only the rendered certificate image, never the verification UI */
#cert-print-area { display: none; }
@media print {
    body.print-cert-only #cert-screen-view { display: none !important; }
    body.print-cert-only #cert-print-area { display: block !important; }
    #cert-print-area { display: none; }
}

/* Brutalist Scrollbar */
::-webkit-scrollbar { 
    width: 12px; 
}
::-webkit-scrollbar-track { 
    background: #fafafa; 
    border-left: 2px solid #0b0b0b;
}
::-webkit-scrollbar-thumb { 
    background: #0b0b0b; 
    border-left: 2px solid #0b0b0b;
}
::-webkit-scrollbar-thumb:hover { 
    background: #5ce1e6; 
}

/* Markdown event descriptions (.md-body) */
.md-body { overflow-wrap: anywhere; word-break: break-word; }
.md-body p { margin: 0 0 0.9em; }
.md-body p:last-child { margin-bottom: 0; }
.md-body h1, .md-body h2, .md-body h3 {
    font-weight: 900; text-transform: uppercase; letter-spacing: -0.02em;
    line-height: 1.1; margin: 1.1em 0 0.5em; color: #0b0b0b;
}
.md-body h1 { font-size: 1.6rem; border-bottom: 2px solid #0b0b0b; padding-bottom: 0.25em; }
.md-body h2 { font-size: 1.3rem; }
.md-body h3 { font-size: 1.1rem; }
.md-body ul, .md-body ol { margin: 0 0 1em 1.25em; padding: 0; }
.md-body ul { list-style: disc; }
.md-body ol { list-style: decimal; }
.md-body li { margin: 0.3em 0; }
.md-body a { color: #0b0b0b; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 2px; font-weight: 700; }
.md-body a:hover { background: #5ce1e6; }
.md-body code { font-family: 'JetBrains Mono', monospace; font-size: 0.85em; background: #fafafa; border: 1px solid #0b0b0b; padding: 0.1em 0.35em; }
.md-body pre { background: #0b0b0b; color: #5ce1e6; border: 2px solid #0b0b0b; padding: 1em; overflow-x: auto; margin: 0 0 1em; }
.md-body pre code { background: transparent; border: 0; padding: 0; color: inherit; }
.md-body blockquote { border-left: 4px solid #0b0b0b; padding-left: 0.9em; margin: 0 0 1em; font-style: italic; }
.md-body hr { border: 0; border-top: 2px solid #0b0b0b; margin: 1.25em 0; }
.md-body img { max-width: 100%; height: auto; border: 2px solid #0b0b0b; margin: 0.75em 0; }
.md-body del { opacity: 0.75; }

/* Tables. The wrapper scrolls horizontally on narrow screens: an agenda table
   has a column of long sentences in it, and letting that wrap inside a cell
   makes the row heights unreadable on a phone. */
.md-body .md-table-wrap { overflow-x: auto; margin: 0 0 1.25em; -webkit-overflow-scrolling: touch; }
.md-body table { border-collapse: collapse; width: 100%; min-width: 420px; font-size: 0.9375rem; }
.md-body th, .md-body td {
    border: 2px solid #0b0b0b; padding: 0.5em 0.7em; vertical-align: top;
    text-align: left;
}
.md-body thead th {
    background: #0b0b0b; color: #5ce1e6; font-weight: 800;
    text-transform: uppercase; letter-spacing: 0.03em; font-size: 0.75rem;
    font-family: 'JetBrains Mono', monospace; white-space: nowrap;
}
.md-body tbody tr:nth-child(even) td { background: #fafafa; }
.md-body .md-align-left { text-align: left; }
.md-body .md-align-center { text-align: center; }
.md-body .md-align-right { text-align: right; }
.md-body td .md-align-left, .md-body td .md-align-center, .md-body td .md-align-right { display: block; }
.md-body td a { overflow-wrap: anywhere; }

/* ═══════════════════════════════════════════════════
   Event detail — Luma-style layout
   Left rail: cover + host + actions (desktop only).
   Right column: title / meta / registration / about /
   location, stacked. Collapses to one column on mobile
   and the host block moves to the bottom.
   ═══════════════════════════════════════════════════ */
.ev-layout {
    --rail: 330px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2rem;
}
.ev-rail {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
}
.ev-main {
    flex: 1 1 0%;
    min-width: 0;
    width: 100%;
}

/* The inline "Hosted by" strip is desktop-only — on mobile the host block is
   rendered at the bottom of the content column instead (as Luma does). */
.ev-desk-only { display: none; }

/* Desktop: fixed rail beside the fluid content column */
@media (min-width: 821px) {
    .ev-layout { flex-direction: row; gap: 2rem; }
    .ev-rail {
        flex: 0 0 var(--rail);
        width: var(--rail);
        max-width: none;
        margin: 0;
    }
    .ev-main { width: auto; }
    .ev-desk-only { display: flex; }
}
@media (min-width: 821px) and (max-width: 1000px) { .ev-layout { --rail: 300px; } }
@media (min-width: 651px) and (max-width: 820px) { .ev-layout { --rail: 280px; } }

.ev-mob-only { display: block; }
@media (min-width: 821px) { .ev-mob-only { display: none; } }

/* Cover. No drop shadow: in the rail this sits directly above the Hosted By
   box, and two different shadow offsets made the pair read as two different
   widths. Both boxes keep their border, which is what sets their width. */
.ev-cover {
    border: 2px solid #0b0b0b;
    background: #fff;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    position: relative;
}
.ev-cover img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #fafafa;
    display: block;
}

/* Title — steps down at Luma's breakpoints (450 / 820 / 1000). Long and very
   long titles get their own smaller ramp so they never blow out the column. */
.ev-title {
    font-size: 2rem;
    font-weight: 900;
    line-height: 1;
    letter-spacing: -0.03em;
    text-transform: uppercase;
    overflow-wrap: break-word;
    margin: 0;
}
.ev-title.long { font-size: 1.625rem; }
.ev-title.xl   { font-size: 1.5rem; }
@media (min-width: 451px) {
    .ev-title      { font-size: 2.25rem; }
    .ev-title.long { font-size: 1.75rem; }
    .ev-title.xl   { font-size: 1.625rem; }
}
@media (min-width: 821px) {
    .ev-title      { font-size: 2.5rem; }
    .ev-title.long { font-size: 2rem; }
    .ev-title.xl   { font-size: 1.875rem; }
}
@media (min-width: 1001px) {
    .ev-title      { font-size: 3rem; }
    .ev-title.long { font-size: 2.375rem; }
    .ev-title.xl   { font-size: 2.25rem; }
}

/* Hosted-by strip (desktop). Visibility is owned by .ev-desk-only — do not
   set `display` here or it wins on source order and hides the strip. */
.ev-hosted {
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
}
.host-dot {
    width: 1.125rem;
    height: 1.125rem;
    min-width: 1.125rem;
    border-radius: 999px;
    background: #0b0b0b;
    color: #5ce1e6;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.5rem;
    font-weight: 800;
    flex-shrink: 0;
}

/* Meta rows (date + location) */
.ev-meta {
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
    margin-top: 1.5rem;
}
.ev-meta-row {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    min-width: 0;
}

/* The location row is an <a> that only carries href when there is somewhere to
   send the reader. Without href it is inert and unfocusable, so a TBA or
   online row cannot be clicked into a dead end. The affordance is the whole row
   — underline on hover, tinted icon box, and a trailing arrow — because the
   text alone does not read as a link on a page full of plain text.
   No hover background: the row sits directly on the page background and a
   filled block under it reads as a button rather than a link. */
.ev-meta-row-link {
    text-decoration: none;
    color: inherit;
    border-radius: 2px;
}
.ev-meta-row-link.is-link { cursor: pointer; }
.ev-meta-row-link.is-link:hover .ev-meta-title { text-decoration: underline; text-underline-offset: 2px; }
.ev-meta-row-link.is-link:hover .ev-meta-icon { background: #5ce1e6; }
.ev-meta-row-link.is-link:focus-visible {
    outline: 3px solid #5ce1e6;
    outline-offset: 2px;
}
/* Sits against the end of the venue name rather than at the far edge of the
   row, so it reads as attached to the text it belongs to. The row gap is
   0.875rem; pulling in by half of it leaves a tight but not cramped gap. */
.ev-meta-ext {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    color: #525252;
    margin-left: -0.4375rem;
    opacity: 0;
    transition: opacity 75ms;
}
.ev-meta-row-link.is-link .ev-meta-ext { opacity: 1; }
.ev-meta-row-link.is-link:hover .ev-meta-ext { color: #0b0b0b; }

/* Date "pill" — month strip over day number, like Luma's calendar card */
.ev-cal {
    flex-shrink: 0;
    width: 2.5rem;
    border: 2px solid #0b0b0b;
    background: #fff;
    text-align: center;
    line-height: 1;
    overflow: hidden;
}
.ev-cal-month {
    background: #0b0b0b;
    color: #5ce1e6;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.5rem;
    font-weight: 800;
    text-transform: uppercase;
    padding: 2px 0;
    letter-spacing: 0.02em;
}
.ev-cal-day {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.125rem;
    font-weight: 700;
    padding: 4px 0 5px;
}

.ev-meta-icon {
    flex-shrink: 0;
    width: 2.5rem;
    height: 2.5rem;
    border: 2px solid #0b0b0b;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0b0b0b;
    background: #fff;
}
.ev-meta-title {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    color: #0b0b0b;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.ev-meta-desc {
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    color: #525252;
    margin-top: 1px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
@media (max-width: 450px) {
    .ev-cal, .ev-meta-icon { width: 2.25rem; height: 2.25rem; }
    .ev-meta-icon svg { width: 16px; height: 16px; }
}

/* Cards */
.ev-stack {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 2rem;
}
.ev-card {
    background: #fff;
    border: 2px solid #0b0b0b;
    box-shadow: 4px 4px 0 0 #0b0b0b;
    padding: 1.25rem;
    min-width: 0;
}
.ev-card-title {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #525252;
    background: #fafafa;
    border-bottom: 2px solid #0b0b0b;
    padding: 0.5rem;
    margin: 0 0 1rem;
}
.ev-reg { border-color: #0b0b0b; }

/* Host card */
.ev-host-card .ev-host-row {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    color: inherit;
    text-decoration: none;
    min-width: 0;
}
/* Rail instance only: it stacks under the cover, so it drops its shadow to
   match the cover. The mobile instance is a standalone card in the content
   column and keeps the shared .ev-card shadow with its neighbours. */
.ev-rail .ev-host-card { box-shadow: none; }
.ev-host-name {
    font-weight: 700;
    font-size: 0.9375rem;
    overflow-wrap: anywhere;
}

/* Location card */
.ev-loc-name { font-weight: 700; color: #0b0b0b; }
.ev-loc-addr {
    font-size: 0.875rem;
    color: #525252;
    margin-top: 0.25rem;
    overflow-wrap: anywhere;
}
/* Leaflet mounts into this box. It needs an explicit height — Leaflet only
   reads its container's size at init, and an auto-height container collapses
   to 0px so nothing renders. */
.ev-loc-canvas {
    height: 220px;
    width: 100%;
    margin-top: 0.875rem;
    border: 2px solid #0b0b0b;
    background: #fafafa;
    z-index: 0;
}
.ev-loc-canvas:focus-visible { outline: 3px solid #5ce1e6; outline-offset: 2px; }
.ev-loc-canvas .leaflet-control-attribution { font-size: 9px; background: rgba(255, 255, 255, 0.85); }
.ev-loc-canvas .leaflet-control-attribution a { color: #0b0b0b; }

/* Ghost button (share / map link) */
.ev-btn-ghost {
    display: inline-block;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: #fff;
    color: #0b0b0b;
    border: 2px solid #0b0b0b;
    padding: 0.5rem 1rem;
    box-shadow: 4px 4px 0 0 #0b0b0b;
    cursor: pointer;
    transition: transform 75ms, box-shadow 75ms;
}
.ev-btn-ghost:hover { transform: translate(2px, 2px); box-shadow: 2px 2px 0 0 #0b0b0b; }
.ev-btn-ghost:active { transform: translate(4px, 4px); box-shadow: none; }
.ev-rail-desk {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-width: 0;
}
/* Rail children are stacked with a gap; drop the per-card margin so the
   share button does not get a double gap. */
.ev-rail-desk .ev-host-card { margin-bottom: 0; }
/* `.ev-desk-only` is display:flex so the strip under the title can sit its dot
   beside its text. In the rail it wraps a single card, and as a row flex item
   that card shrinks to its content width — so the Hosted By box came out
   narrower than the cover above it and the share button below it. Block makes
   the card fill the rail like its two neighbours. */
.ev-rail-desk .ev-desk-only { display: block; }
.ev-rail .ev-btn-ghost { margin-top: 0; }