/* ===========================================================================
   Event detail — ported from design/event.html + event-guest.html
   (source of truth طراحی). One dynamic page serves guest / registrant /
   host; visual shell is identical, content is role- and state-aware.
   =========================================================================== */

/* کاور تیره با عکس رویداد */
.ev-cover{
  position:relative; border-radius:var(--r-lg); overflow:hidden;
  margin-bottom:18px; min-height:320px;
  display:flex; align-items:flex-end;
  background:linear-gradient(135deg, var(--ink), #2E3133);
}
.ev-cover .bg{ position:absolute; inset:0; background-size:cover; background-position:center; }
.ev-cover .bg img{ width:100%; height:100%; object-fit:cover; display:block; }
.ev-cover::after{
  content:""; position:absolute; inset:0;
  background:linear-gradient(180deg, rgba(20,22,24,.30) 0%, rgba(20,22,24,.62) 42%, rgba(20,22,24,.96) 100%);
}
/* بدون کاور: ارتفاع ۳۲۰px برای عکس رزرو شده بود. بدون عکس فقط فضای خالی است،
   پس هیرو تا اندازه‌ی محتوای خودش جمع می‌شود. لایه‌ی تیره‌کننده هم کارش
   تضمین کنتراست روی عکس است؛ روی همین گرادیان تیره فقط سیاهش می‌کند. */
.ev-cover.is-blank{ min-height:160px; }
.ev-cover.is-blank::after{ content:none; }
.ev-cover .inner{ position:relative; z-index:1; padding:22px; width:100%; color:#fff; }
.ev-cover .badges{ display:flex; gap:6px; margin-bottom:10px; flex-wrap:wrap; }
.ev-cover .b{
  font-size:10px; font-weight:700; padding:4px 10px;
  border-radius:var(--r-pill); background:rgba(255,255,255,.2);
  color:#fff; text-decoration:none; backdrop-filter:blur(4px);
}
.ev-cover .b.warn{ background:rgba(245,166,35,.92); color:#1A1D1F; }

/* On the cover, the host link and the category/city tags are the two ways out
   of this page, drawn at 24-26px over the photo. Sizes stay, taps reach 44px. */
@media (max-width: 767px) {
  .ev-cover .org, .ev-cover a.b { position:relative; }
  .ev-cover .org::after, .ev-cover a.b::after {
    content:""; position:absolute; top:50%; left:0; transform:translateY(-50%);
    width:100%; height:44px;
  }
}
.ev-cover .b.full{ background:rgba(232,76,122,.92); color:#fff; }
.ev-cover h1{ font-size:24px; font-weight:800; margin:0 0 8px; letter-spacing:-.02em; line-height:1.3; text-shadow:0 2px 14px rgba(0,0,0,.5); }
.ev-cover .org{ font-size:12px; opacity:.92; display:flex; align-items:center; gap:8px; margin-bottom:16px; text-shadow:0 1px 10px rgba(0,0,0,.55); text-decoration:none; color:#fff; }
.ev-cover .org .av{ width:26px; height:26px; border-radius:50%; background:var(--accent); color:#fff; display:grid; place-items:center; font-size:11px; font-weight:800; flex-shrink:0; overflow:hidden; }

.ev-quick{
  background:rgba(0,0,0,.3); backdrop-filter:blur(6px); border-radius:var(--r-md);
  padding:14px; display:grid; grid-template-columns:repeat(4,1fr); gap:14px;
}
@media (max-width:640px){ .ev-quick{ grid-template-columns:repeat(2,1fr); } }
.ev-quick .q{ text-align:center; }
.ev-quick .q .v{ font-size:15px; font-weight:800; }
.ev-quick .q .v.gold{ color:#7FE6B7; }
.ev-quick .q .k{ font-size:10px; opacity:.7; margin-top:2px; }

/* tabs */
.ev-tabs{
  display:flex; gap:0; border-bottom:1px solid var(--line);
  margin-bottom:18px; overflow-x:auto;
}
.ev-tabs::-webkit-scrollbar{ display:none; }
.ev-tab{
  padding:10px 16px; font-size:13px; font-weight:600;
  color:var(--muted); cursor:pointer; white-space:nowrap;
  border-bottom:2px solid transparent; margin-bottom:-1px;
  background:none; border-top:none; border-inline:none; font-family:inherit;
}
.ev-tab.is-on{ color:var(--ink); border-bottom-color:var(--accent); }
.ev-pane{ display:none; }
.ev-pane.is-on{ display:block; }

/* about blocks + facts */
.ev-about-block{ border-top:1px dashed var(--line); padding-top:16px; margin-top:16px; }
.ev-about-block:first-child{ border-top:none; padding-top:0; margin-top:0; }
.ev-about-block .title{ display:flex; align-items:center; gap:8px; font-size:14px; font-weight:800; margin-bottom:10px; }
.ev-about-block .title .ic{ width:30px; height:30px; border-radius:9px; background:var(--accent-soft); color:var(--accent-deep); display:grid; place-items:center; flex-shrink:0; }
.ev-about-block .title .ic svg{ width:15px; height:15px; }
.ev-about-block p{ font-size:13px; line-height:2; color:var(--ink-2); margin:0; white-space:pre-line; }
.ev-about-block p+p{ margin-top:10px; }
.ev-fact{ display:flex; gap:14px; padding:10px 0; font-size:12px; align-items:center; }
.ev-fact+.ev-fact{ border-top:1px dashed var(--line); }
.ev-fact .ic{ width:30px; height:30px; border-radius:9px; background:var(--accent-tint); color:var(--accent-deep); display:grid; place-items:center; flex-shrink:0; }
.ev-fact .ic svg{ width:14px; height:14px; }
.ev-fact .body{ flex:1; min-width:0; }
.ev-fact .k{ font-size:11px; color:var(--muted); margin-bottom:1px; }
.ev-fact .v{ font-weight:700; }

/* host row */
.ev-host-row{ display:flex; align-items:center; gap:12px; background:var(--bg); border-radius:var(--r-md); padding:12px; text-decoration:none; color:inherit; }

/* status note (رویداد منتشرنشده — پیش‌نمایش میزبان) */
.ev-status-note{ border:1px solid var(--line-strong); border-radius:var(--r-md); padding:14px 16px; margin-bottom:16px; background:var(--warn-soft, #FDF3DD); }
.ev-status-note.is-rejected{ background:var(--rose-soft, #FDF1F2); }
.ev-status-note .t{ font-weight:800; font-size:13px; margin-bottom:4px; }
.ev-status-note p{ font-size:12px; line-height:1.9; color:var(--ink-2); margin:0; }

/* سایدبار — پنل میزبان / دسترسی سریع مهمان (هم‌سبکِ tournament-manage) */
.tm-tools{ background:var(--surface); border:1px solid var(--line); border-radius:var(--r-md); padding:14px; }
.tm-tool-row{ display:flex; gap:10px; align-items:center; padding:10px 0; text-decoration:none; color:inherit; }
.tm-tool-row+.tm-tool-row{ border-top:1px solid var(--line); }
.tm-tool-row .ic{ width:32px; height:32px; border-radius:10px; flex-shrink:0; display:grid; place-items:center; }
.tm-tool-row .ic svg{ width:15px; height:15px; }
.tm-tool-row .body{ flex:1; min-width:0; }
.tm-tool-row .body .h{ font-size:13px; font-weight:700; }
.tm-tool-row .body .s{ font-size:11px; color:var(--muted); margin-top:1px; }
.tm-tool-row .arrow{ color:var(--muted); flex-shrink:0; }

/* کد ورود داخل سایدبار */
.ev-code{ background:var(--bg); border:1px dashed var(--line-strong); border-radius:var(--r-md); padding:12px; text-align:center; margin-top:12px; }
.ev-code .k{ font-size:11px; color:var(--muted); margin-bottom:4px; }
.ev-code .v{ font-size:20px; font-weight:800; letter-spacing:4px; }
.ev-code .s{ font-size:10px; color:var(--muted); margin-top:4px; }
.ev-code-qr{ margin:8px auto 0; width:160px; max-width:100%; background:#fff; border:1px solid var(--line); border-radius:8px; padding:8px; }
.ev-code-qr svg{ display:block; width:100%; height:auto; }

/* similar events grid */
.ev-gallery{ display:grid; grid-template-columns:repeat(2,1fr); gap:10px; }
@media (min-width:640px){ .ev-gallery{ grid-template-columns:repeat(4,1fr); } }

/* ───────── محل برگزاری روی نقشه‌ی واقعی ─────────
   کانواس را public/assets/map-neshan.js پر می‌کند. رنگ پین از همین‌جا
   خوانده می‌شود تا دیزاین‌سیستم تنها منبع رنگ بماند. */
.ev-map{
  position:relative; height:260px; overflow:hidden;
  border-radius:var(--r-lg); border:1px solid var(--line);
  background:var(--bg);
  --ev-map-pin:var(--accent);
}
/* استایل lazy مپ‌باکس بعد از این فایل می‌آید و با یک کلاس، position:relative
   آن بر ما غلبه می‌کرد و کانتینر صفر-ارتفاع می‌شد. دو کلاس یعنی برنده‌ایم. */
.ev-map .ev-map-canvas{ position:absolute; inset:0; }
.ev-map-state{
  position:absolute; inset:0; margin:0; z-index:2;
  display:flex; align-items:center; justify-content:center;
  padding:20px; text-align:center; line-height:1.9;
  font-size:12px; color:var(--muted); background:var(--bg);
}
.ev-map-state[hidden]{ display:none; }
.ev-map-card{
  /* بالاتر از نوار attribution نشان می‌نشیند تا رویش نیفتد. */
  position:absolute; inset-inline-end:16px; bottom:34px; z-index:3;
  background:var(--surface); border-radius:12px;
  padding:12px 16px; box-shadow:var(--shadow-md); font-size:12px;
  max-width:calc(100% - 32px);
}
/* بدون نقشه، کارت نشانی وسط بلوک بنشیند نه روی یک کانواس خالی */
.ev-map.is-flat .ev-map-card{
  position:static; box-shadow:none; background:none; padding:0;
  text-align:center; margin-top:8px;
}
.ev-map.is-flat{ height:auto; padding:22px 16px; }
.ev-map.is-flat .ev-map-state{ position:static; padding:0 0 4px; background:none; }

/* Prize escrow badge (§12, 2026-08-09). Guaranteed reads as the accent —
   the same colour the product uses everywhere for "this is settled" —
   while declared is deliberately neutral rather than alarming: it is a
   perfectly normal way to run a tournament, just not one the platform
   is standing behind. */
.ev-prize-badge{
  display:inline-block; font-size:11px; font-weight:800; line-height:1;
  padding:5px 9px; border-radius:var(--r-pill); white-space:nowrap;
  margin-inline-end:6px;
}
.ev-prize-badge.is-guaranteed{ background:var(--accent-soft); color:var(--accent-deep); }
.ev-prize-badge.is-declared{ background:var(--bg); color:var(--muted); border:1px solid var(--line-strong); }
