/* Seite: Event-Detail (event_detail_page.dart).
   Kopfbild randlos im Format 1,08, Abschnitte ohne Kacheln, Ticket-Knopf schwebt unten. */

/* ---------- Schwebende Glasknöpfe oben ---------- */
.evd-topbar {
  --evd-top: max(10px, env(safe-area-inset-top));
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: var(--evd-top) 12px 0;
  pointer-events: none;
}
.page--event.has-hero .evd-topbar { margin-bottom: calc(-44px - var(--evd-top)); }
.evd-topbar .glass-btn,
.evd-more { pointer-events: auto; }
.evd-topbar__spacer { flex: 1 1 auto; }
.evd-more { position: relative; }
.menu.evd-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  left: auto;
  bottom: auto;
  min-width: 220px;
  pointer-events: auto;
}

/* ---------- Kopfbild ---------- */
.evd-hero {
  position: relative;
  width: 100%;
  aspect-ratio: 1.08;
  overflow: hidden;
  background: var(--placeholder);
  isolation: isolate;
}
.evd-hero__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity .3s ease;
}
.evd-hero__img.is-loaded { opacity: 1; }
.evd-hero__img.is-broken { display: none; }
.evd-hero__ph {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}
.evd-hero__ph .icon { width: 44px; height: 44px; }
.evd-hero__shade {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(0, 0, 0, .32) 0%, rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, .78) 100%);
}
:root[data-theme="light"] .evd-hero__shade {
  background: linear-gradient(180deg, rgba(0, 0, 0, .32) 0%, rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, .58) 100%);
}
.evd-hero__text {
  position: absolute;
  left: var(--gutter);
  right: var(--gutter);
  bottom: 18px;
  min-width: 0;
}
.evd-hero__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}
.evd-hero__chips:empty { display: none; }
.evd-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border-radius: var(--r-pill);
  font-size: 11.5px;
  font-weight: 900;
  letter-spacing: .2px;
  line-height: 1.1;
  color: #fff;
  background: rgba(0, 0, 0, .42);
  border: 1px solid rgba(255, 255, 255, .14);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  white-space: nowrap;
}
.evd-chip .icon { width: 14px; height: 14px; }
.evd-hero__title {
  font-size: clamp(28px, 8.6vw, 34px);
  font-weight: 900;
  line-height: 1.02;
  letter-spacing: -1.05px;
  color: #fff;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---------- Inhalt: Seitenrand 16, Abschnitte 26 ---------- */
.evd-content { padding-bottom: 96px; }
.evd-section .section__head { margin-bottom: 14px; }

/* Hosted by */
.evd-host {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.evd-host__logo {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  flex: none;
  border-radius: 14px;
  background: var(--placeholder);
  font-size: 22px;
  font-weight: 900;
  line-height: 1;
}
.evd-host__logo .icon { width: 24px; height: 24px; }
.evd-host__text { min-width: 0; }
.evd-host__name {
  font-size: 15.5px;
  font-weight: 900;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.evd-host__sub {
  margin-top: 3px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-2);
}

/* Music */
.evd-music { margin-top: 16px; }
.evd-label {
  font-size: 12px;
  font-weight: 900;
  color: var(--text-2);
}
.evd-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}
.evd-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  padding: 7px 11px;
  border-radius: var(--r-pill);
  font-size: 12.5px;
  font-weight: 800;
  line-height: 1.2;
  color: var(--text);
  border: 1px solid transparent;
  background:
    linear-gradient(var(--bg), var(--bg)) padding-box,
    var(--accent-tint-border) border-box;
}
.evd-tag > span {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.evd-tag .icon { width: 13px; height: 13px; }

/* Beschreibung */
.evd-desc {
  margin-top: 16px;
  font-size: 15.5px;
  font-weight: 500;
  line-height: 1.55;
  overflow-wrap: anywhere;
}
.evd-desc--empty { color: var(--text-2); }

/* Zeilen mit Symbol: Zeit, Preis, Alter */
.evd-rows {
  display: grid;
  gap: 16px;
  margin-top: 16px;
}
.evd-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.evd-row__icon {
  display: grid;
  place-items: center;
  width: 24px;
  flex: none;
}
.evd-row__icon .icon { width: 21px; height: 21px; }
.evd-row__text { min-width: 0; }
.evd-row__main {
  font-size: 15px;
  font-weight: 800;
  line-height: 1.3;
}
.evd-row__sub {
  margin-top: 2px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-2);
}

/* Guestlist: graue Kreise statt Gäste */
.evd-guests {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.evd-faces {
  display: flex;
  align-items: center;
  flex: 0 1 auto;
  min-width: 0;
  overflow: hidden;
}
.evd-faces .evd-face {
  width: 44px;
  height: 44px;
  flex: none;
  border: 2px solid var(--bg);
  background: linear-gradient(var(--skeleton), var(--skeleton)), var(--bg);
}
.evd-faces .evd-face + .evd-face { margin-left: -10px; }
.evd-guests .btn { flex: none; }

/* Location */
.evd-address {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text-2);
  overflow-wrap: anywhere;
}
.evd-address .icon {
  width: 18px;
  height: 18px;
  margin: 0 3px;
}
.evd-route { margin-top: 14px; gap: 8px; }
.evd-route .evd-route__icon { width: 16px; height: 16px; }

/* ---------- Ticket-Knopf: Mobil über der unteren Leiste ---------- */
.evd-ticketbar {
  position: fixed;
  left: var(--gutter);
  right: var(--gutter);
  bottom: calc(var(--tabbar-space) - 4px);
  z-index: 30;
  max-width: calc(var(--col) - 32px);
  margin: 0 auto;
}
.evd-ticket {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 12px 12px 14px;
  border-radius: 22px;
  background: var(--accent-gradient);
  color: #fff;
  text-align: left;
  transition: transform .12s ease;
}
.evd-ticket:active { transform: scale(.985); }
.evd-ticket__icon,
.evd-ticket__go {
  display: grid;
  place-items: center;
  flex: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, .12);
}
.evd-ticket__icon { width: 42px; height: 42px; }
.evd-ticket__icon .icon { width: 21px; height: 21px; }
.evd-ticket__go { width: 34px; height: 34px; }
.evd-ticket__go .icon { width: 19px; height: 19px; }
.evd-ticket__text {
  display: grid;
  gap: 2px;
  flex: 1 1 auto;
  min-width: 0;
}
.evd-ticket__label,
.evd-ticket__sub {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.evd-ticket__label {
  font-size: 16px;
  font-weight: 900;
  line-height: 1.2;
}
.evd-ticket__sub {
  font-size: 12.2px;
  font-weight: 700;
  line-height: 1.2;
  color: rgba(255, 255, 255, .75);
}

/* ---------- Nicht gefunden / Fehler ---------- */
.evd-missing { padding-top: 8px; }
.evd-missing__actions {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.evd-missing__link {
  margin-top: 14px;
  padding: 6px 4px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-2);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.evd-missing__link:hover { color: var(--text); }

/* ---------- Laden ---------- */
.evd-hero-sk {
  display: block;
  width: 100%;
  aspect-ratio: 1.08;
  border-radius: 0;
}
.evd-sk-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}
.evd-sk-lines {
  display: grid;
  gap: 8px;
  flex: 1 1 auto;
}

/* ---------- Tablet und Desktop: Spalte, Knopf klebt unten in der Spalte ---------- */
@media (min-width: 768px) {
  .page--event { padding-top: 24px; }
  .evd-hero,
  .evd-hero-sk { border-radius: var(--r-media); }
  .evd-content { padding-bottom: 0; }
  .evd-ticketbar {
    position: sticky;
    left: auto;
    right: auto;
    bottom: 20px;
    z-index: 5;
    max-width: none;
    margin: var(--section-gap) var(--gutter) 0;
  }
}

/* =====================================================================
   Angemeldet (event.js → renderSignedIn) und gemeinsame Bausteine
   (Gäste-Reihe, Guestlist-Fenster, Melden, Karten-App) für Entdecken,
   Club und Tickets.
   ===================================================================== */

.evd-topbar__actions {
  display: flex;
  align-items: center;
  gap: 6px;
}
.evd-chip--muted {
  background: rgba(0, 0, 0, .34);
  color: rgba(255, 255, 255, .86);
}

/* Veranstalter-Zeile als Link (Club oder Ersteller) */
.evd-host--link { color: inherit; }
.evd-host__logo { overflow: hidden; }
.evd-host__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.evd-host .evd-host__text {
  display: block;
  flex: 1 1 auto;
}
.evd-host__name,
.evd-host__sub { display: block; }
.evd-host__go {
  display: grid;
  place-items: center;
  flex: none;
  color: var(--text-3);
}
@media (hover: hover) and (pointer: fine) {
  .evd-host--link:hover .evd-host__name { text-decoration: underline; text-underline-offset: 3px; }
}

.evd-tag--muted {
  color: var(--text-2);
  background: none;
  border: 1px solid var(--line);
}

/* Schlichte Aktions-Zeile (Muttizettel, Route) wie _secondaryAction */
.evd-action {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  margin-top: 12px;
  padding: 6px 0;
  text-align: left;
  color: var(--text);
}
.evd-action__text {
  display: grid;
  gap: 3px;
  flex: 1 1 auto;
  min-width: 0;
}
.evd-action__title {
  font-size: 14px;
  font-weight: 900;
}
.evd-action__sub {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-2);
}
.evd-action .evd-action__go { color: var(--text-2); }

/* Guestlist */
.evd-guestbtn {
  display: grid;
  justify-items: start;
  gap: 12px;
  width: 100%;
  text-align: left;
}
.evd-guestlink {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13.5px;
  font-weight: 800;
}
.evd-guestnote {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-2);
}
.evd-guestretry { margin-top: 10px; }

/* ---------- Gäste-Reihe (AttendeesPreview): nebeneinander, wird es eng, rücken sie zusammen ---------- */
.guest-row {
  display: flex;
  align-items: center;
  /* feste Breite: die Abstände unten rechnen in % dieser Breite */
  width: 100%;
  min-width: 0;
}
.guest-row > * { flex: none; }
.guest-row > * + * { margin-left: clamp(-16px, calc((100% - 312px) / 5), 12px); }
.guest-row--detail > * + * { margin-left: clamp(-20px, calc((100% - 360px) / 5), 8px); }
.guest-row .avatar { box-shadow: 0 0 0 2px var(--bg); }
.guest-plus {
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--surface-soft);
  border: 1.2px solid var(--border);
  color: var(--text-2);
  font-size: 16px;
  font-weight: 600;
  line-height: 1;
}
.guest-plus--accent {
  border: 0;
  font-weight: 900;
}

/* Guestlist-Fenster: drei Spalten */
.guest-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px 18px;
  padding: 18px 18px 22px;
}
.guest-grid__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: var(--text);
}
.guest-grid__avatar { position: relative; }
.guest-grid__me {
  position: absolute;
  left: 50%;
  bottom: -4px;
  transform: translateX(-50%);
  padding: 3px 8px;
  border-radius: var(--r-pill);
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: 11.5px;
  font-weight: 800;
  color: var(--text-2);
}
.guest-grid__name {
  max-width: 100%;
  font-size: 12.5px;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------- Melden (report_sheet.dart) ---------- */
.report-sheet {
  display: grid;
  gap: 10px;
  padding: 8px 16px 16px;
}
.report-sheet__list { display: grid; }
.report-sheet__reason {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 6px 4px;
  text-align: left;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}
.report-sheet__details { display: grid; gap: 4px; }
.report-sheet__details.is-hidden { display: none; }
.report-sheet__text { min-height: 92px; }
.report-sheet__count {
  justify-self: end;
  font-size: 12px;
  color: var(--text-3);
}
.report-sheet__note { margin-top: 2px; }

/* Karten-App wählen */
.route-list { padding: 6px 0 10px; }

/* ---------- Schwebender Knopf: leise (Hinweis, Erledigtes) und gesperrt ---------- */
.evd-ticket--quiet,
.evd-ticket--blocked {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  color: var(--text);
}
.evd-ticket--blocked {
  color: var(--text-2);
  cursor: default;
}
.evd-ticket--blocked:active { transform: none; }
.evd-ticket--quiet .evd-ticket__icon,
.evd-ticket--quiet .evd-ticket__go,
.evd-ticket--blocked .evd-ticket__icon { background: var(--quiet-fill); }
.evd-ticket--quiet .evd-ticket__sub,
.evd-ticket--blocked .evd-ticket__sub { color: var(--text-2); }
.evd-ticket--quiet .evd-ticket__icon .icon { fill: url(#cv-accent); }
