/* ============ EVENT DETAIL (AllIn Japan Event Detail.dc.html) ============ */

.event-detail-hero {
  background: var(--color-hero-bg);
  padding: 26px clamp(20px, 5vw, 40px) 40px;
}

.event-detail-hero-inner {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.event-detail-back {
  font-size: 13px;
  color: var(--gray-65);
}

/* Shared scope pill — detail-page hero + index-list rows. */
.event-scope-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 5px 11px;
  border-radius: 999px;
  /* international default; overridden per modifier */
  background: oklch(0.96 0.025 250);
  color: oklch(0.45 0.11 250);
}

.event-detail-scope-badge {
  align-self: flex-start;
  margin-top: 6px;
}

/* Publication-status pill — only rendered when the event isn't `scheduled`. */
.event-status-badge {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 5px 11px;
  border-radius: 999px;
  background: oklch(0.94 0.04 70);
  color: oklch(0.46 0.13 70);
}

.event-status-badge--cancelled {
  background: oklch(0.94 0.05 27);
  color: var(--color-accent);
}

.event-detail-status-badge {
  align-self: flex-start;
  margin-top: 6px;
}

.event-scope-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.event-scope-badge--local {
  background: oklch(0.95 0.03 27);
  color: var(--color-accent);
}

.event-scope-badge--national {
  background: oklch(0.95 0.04 70);
  color: oklch(0.48 0.12 70);
}

.event-scope-badge--international {
  background: oklch(0.96 0.025 250);
  color: oklch(0.45 0.11 250);
}

.event-detail-hero-inner h1 {
  font-weight: 900;
  font-size: clamp(26px, 4.2vw, 38px);
  line-height: 1.15;
  margin: 6px 0 0;
  color: var(--color-cream-bright);
}

.event-detail-hero-en {
  font-family: var(--font-display);
  font-size: clamp(13px, 1.8vw, 16px);
  letter-spacing: 0.08em;
  color: oklch(0.68 0.17 30);
}

.event-detail-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin-top: 4px;
  font-size: 14px;
  color: oklch(0.78 0.01 90);
}

.event-detail-body {
  max-width: 900px;
  margin: 0 auto;
  width: 100%;
  padding: clamp(28px, 5vw, 40px) clamp(20px, 5vw, 40px) 70px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.event-detail-photo {
  display: block;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  height: clamp(260px, 34vw, 420px);
  border-radius: 12px;
  object-fit: contain;
}

/* Element-qualified so this doesn't clash with .photo-placeholder's own
   background shorthand — the no-photo state reuses this class on a <div>. */
img.event-detail-photo {
  background: var(--color-alt-bg);
}

.event-detail-facts {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  overflow: hidden;
}

.event-detail-facts-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px 20px;
  padding: 15px 20px;
  border-bottom: 1px solid oklch(0.95 0.005 90);
}

.event-detail-facts-row:last-child {
  border-bottom: none;
}

.event-detail-facts-label {
  font-size: 13px;
  color: var(--gray-50);
}

.event-detail-facts-value {
  font-size: 14px;
  font-weight: 700;
  text-align: right;
}

@media (max-width: 640px) {
  .event-detail-facts-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
  }

  .event-detail-facts-value {
    text-align: left;
  }
}

.event-detail-schedule {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.event-detail-section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 12px;
}

.event-detail-section-head h2 {
  font-weight: 900;
  font-size: clamp(18px, 2.4vw, 21px);
  margin: 0;
}

.event-detail-section-eyebrow {
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--gray-50);
}

/* SCHEDULE's Timeline / List switch (AllIn Japan Event Detail.dc.html) — a
   light segmented control, unlike the dark-hero .view-tabs on the
   tournaments index. Driven by the tabs Stimulus controller. */
.schedule-view-tabs {
  margin-left: auto;
  align-self: center;
  display: flex;
  gap: 2px;
  padding: 3px;
  border-radius: 8px;
  background: oklch(0.93 0.008 60);
}

.schedule-view-tab {
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  min-height: 32px;
  padding: 7px 14px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: oklch(0.45 0.01 90);
  cursor: pointer;
}

.schedule-view-tab.is-active {
  background: #fff;
  color: oklch(0.18 0 0);
  box-shadow: 0 1px 2px oklch(0 0 0 / 0.12);
}

.schedule-view-tab:focus-visible {
  outline: 2px solid oklch(0.18 0 0);
  outline-offset: 1px;
}

/* :not([hidden]) — a bare display rule would outrank the UA stylesheet's
   [hidden] { display: none } and the inactive panel would never hide. */
.schedule-panel:not([hidden]) {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* The day × hour timeline (events/_schedule_timeline). */
.schedule-timeline-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 18px;
  font-size: 12px;
  color: oklch(0.4 0.01 90);
}

.schedule-timeline-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.schedule-timeline-swatch {
  width: 28px;
  height: 12px;
  border-radius: 3px;
  background: oklch(0.96 0.02 40);
  border: 1px solid oklch(0.82 0.05 35);
}

.schedule-timeline-swatch.is-open {
  background: linear-gradient(90deg, oklch(0.96 0.02 40), oklch(0.96 0.02 40 / 0));
  border-style: dashed;
  border-right: none;
}

.schedule-timeline-main-tag {
  flex-shrink: 0;
  font-family: 'Inter', sans-serif;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 2px 5px;
  border-radius: 3px;
  background: oklch(0.18 0 0);
  color: #fff;
}

.schedule-timeline {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  overflow-x: auto;
}

.schedule-timeline-grid {
  min-width: 880px;
  display: flex;
  flex-direction: column;
}

.schedule-timeline-head,
.schedule-timeline-day {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
}

.schedule-timeline-head {
  border-bottom: 1px solid oklch(0.9 0.005 90);
}

.schedule-timeline-month {
  position: sticky;
  left: 0;
  z-index: 2;
  background: #fff;
  padding: 10px 12px;
  border-right: 1px solid oklch(0.93 0.005 90);
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--gray-50);
}

.schedule-timeline-hours {
  position: relative;
  height: 34px;
}

.schedule-timeline-hour {
  position: absolute;
  top: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  transform: translateX(-50%);
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 0.02em;
  color: oklch(0.3 0 0);
  white-space: nowrap;
}

.schedule-timeline-hour.is-next-day {
  color: oklch(0.5 0.01 90);
}

.schedule-timeline-day {
  background: #fff;
  border-bottom: 1px solid oklch(0.94 0.005 90);
}

.schedule-timeline-day:last-child {
  border-bottom: none;
}

.schedule-timeline-day.is-weekend {
  background: oklch(0.985 0.006 60);
}

/* Pinned while the timeline scrolls sideways on narrow screens. */
.schedule-timeline-date {
  position: sticky;
  left: 0;
  z-index: 2;
  background: #fff;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-right: 1px solid oklch(0.93 0.005 90);
}

.is-weekend .schedule-timeline-date {
  background: oklch(0.975 0.008 60);
}

.schedule-timeline-date-day {
  font-family: var(--font-display);
  font-size: 22px;
  line-height: 1;
  color: oklch(0.22 0 0);
}

.is-weekend .schedule-timeline-date-day {
  color: oklch(0.45 0.15 27);
}

.schedule-timeline-date-meta {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.schedule-timeline-date-dow {
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--gray-50);
}

.is-weekend .schedule-timeline-date-dow {
  color: oklch(0.5 0.15 27);
}

.schedule-timeline-date-count {
  font-size: 10px;
  color: var(--gray-50);
}

/* One lane = 36px; --lanes / --lane and --timeline-hours (hourly
   gridlines) are set inline from EventScheduleTimeline. */
.schedule-timeline-track {
  position: relative;
  height: calc(var(--lanes) * 36px + 10px);
  background-image: repeating-linear-gradient(90deg,
    oklch(0.93 0.005 90) 0 1px, transparent 1px calc(100% / var(--timeline-hours)));
}

.schedule-timeline-bar {
  position: absolute;
  top: calc(8px + var(--lane) * 36px);
  height: 30px;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 8px;
  border-radius: 5px;
  border: 1px solid oklch(0.82 0.05 35);
  background: oklch(0.96 0.02 40);
  color: oklch(0.22 0 0);
  overflow: hidden;
  white-space: nowrap;
  /* A size container, so a short bar can drop whole parts (below) rather
     than clip them mid-digit — "¥10,000" cut to "¥10" read as a real
     price. The tooltip always carries the full detail. */
  container-type: inline-size;
}

.schedule-timeline-bar.is-main {
  border-color: oklch(0.55 0.19 27);
  background: oklch(0.94 0.04 30);
}

.schedule-timeline-bar.is-open {
  border-style: dashed;
  border-right-style: none;
  background: linear-gradient(90deg, oklch(0.96 0.02 40) 60%, oklch(0.96 0.02 40 / 0));
}

.schedule-timeline-bar:hover {
  color: oklch(0.22 0 0);
  border-color: oklch(0.5 0.19 27);
}

.schedule-timeline-bar:focus-visible {
  outline: 2px solid oklch(0.18 0 0);
  outline-offset: 1px;
}

.schedule-timeline-bar-range {
  flex-shrink: 0;
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: 0.02em;
}

.schedule-timeline-bar-title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 11px;
  font-weight: 700;
}

.schedule-timeline-bar-buyin {
  flex-shrink: 0;
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  color: oklch(0.45 0.01 90);
}

/* Short bars: the title shrinks first (ellipsis), then the buy-in goes,
   then the end time — the start time always stays. */
@container (max-width: 199px) {
  .schedule-timeline-bar-buyin {
    display: none;
  }
}

@container (max-width: 109px) {
  .schedule-timeline-bar-range-end {
    display: none;
  }
}

.schedule-timeline-note {
  margin: 0;
  font-size: 11px;
  color: var(--gray-50);
}

.event-detail-schedule-list {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  overflow: hidden;
}

.event-detail-schedule-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border-bottom: 1px solid oklch(0.95 0.005 90);
  /* Each row links to the tournament detail page — keep the card's text
     colour, drop the underline, add a hover tint (same idea as a.event-row). */
  color: inherit;
  text-decoration: none;
  transition: background-color 0.12s ease;
}

.event-detail-schedule-row:last-child {
  border-bottom: none;
}

a.event-detail-schedule-row:hover {
  background: var(--color-tag-bg);
}

.event-detail-schedule-date {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--color-tag-bg);
  border-radius: 8px;
  padding: 6px 11px;
  min-width: 56px;
  flex-shrink: 0;
}

.event-detail-schedule-day {
  font-family: var(--font-display);
  font-size: 17px;
  line-height: 1;
  color: oklch(0.45 0.15 27);
}

.event-detail-schedule-dow {
  font-size: 9px;
  color: var(--gray-50);
}

.event-detail-schedule-time {
  font-family: var(--font-display);
  font-size: 16px;
  color: var(--color-accent);
  min-width: 56px;
}

.event-detail-schedule-titles {
  flex: 1 1 200px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.event-detail-schedule-title-ja {
  font-weight: 700;
  font-size: 14px;
}

.event-detail-schedule-title-en {
  font-size: 12px;
  color: var(--gray-50);
}

.event-detail-schedule-buyin {
  font-size: 13px;
  font-weight: 700;
}

@media (max-width: 640px) {
  .event-detail-schedule-row {
    padding: 14px;
    gap: 12px;
  }

  .event-detail-schedule-titles {
    flex-basis: 100%;
    min-width: 0;
    align-items: flex-start;
  }
}

.event-detail-notes {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.event-detail-notes-label {
  font-size: 13px;
  color: var(--gray-50);
}

.event-detail-notes-text {
  font-size: 14px;
  line-height: 1.8;
  color: oklch(0.28 0.01 90);
  margin: 0;
}

.event-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.event-detail-actions .btn {
  padding: 13px 26px;
  border-radius: 7px;
  font-size: 14px;
}

/* .btn-outline is defined in the TOURNAMENT DETAIL section (shared). */

