/**
 * Hora Inno - [hora_inno_speakers]: the Speakers landing section, its grid, Load More and the speaker drawer.
 * Card and session rules mirror custom-events.css (Speakers ~L1809, Agenda ~L1475), which loads only on event pages.
 */

/* ===== Section: a landing section; .hora-inno-landing (landing.css) isolates it from theme typography ===== */

.hora-inno-landing-speakers__stack {
  display: flex;
  flex-direction: column;
  gap: 54px;
}

/* The landing reset stops at h3 and ul */
.hora-inno-speakers :where(h4, h5, ol) {
  margin: 0;
  padding: 0;
  color: inherit;
  font-family: inherit;
  letter-spacing: inherit;
  text-transform: none;
}

/* Components set their own display (.hora-inno-btn is inline-flex), which beats the UA [hidden] rule */
.hora-inno-speakers [hidden] {
  display: none !important;
}

.hora-inno-speakers__grid,
.hora-inno-speakers__days,
.hora-inno-speakers__sessions {
  list-style: none;
}

/* components.css buttons are 42.8px tall; the touch target minimum is 44px */
.hora-inno-speakers .hora-inno-btn {
  min-height: 44px;
}

/* ===== Grid: the event page speaker card, as a button ===== */

.hora-inno-speakers__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 180px), 1fr));
  gap: 18px;
}

.hora-inno-speakers__card {
  display: flex;
  flex-direction: column;
  gap: 18px;
  width: 100%;
  height: 100%;
  min-width: 0;
  padding: 9px 9px 18px;
  border: 1px solid var(--hora-inno-color-border);
  border-radius: 18px;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color var(--hora-inno-dur-base) var(--hora-inno-ease-merge);
}

.hora-inno-speakers__card:hover {
  border-color: var(--hora-inno-color-text);
}

.hora-inno-speakers__photo {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  border-radius: 9px;
  background: var(--hora-inno-color-inset);
  object-fit: cover;
  object-position: top center;
}

/* No photo: the initials on the inset tile, in the light mono numerals of the date tabs */
.hora-inno-speakers__photo--initials {
  display: grid;
  place-items: center;
  font-family: var(--hora-inno-font-mono);
  font-size: 44px;
  font-weight: 200;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--hora-inno-color-text-muted);
}

.hora-inno-speakers__details {
  display: flex;
  flex-direction: column;
  gap: 4.5px;
  padding: 0 9px;
}

.hora-inno-speakers__name {
  font-size: 17px;
  font-weight: 500;
  line-height: 1.25;
  text-wrap: balance;
  overflow-wrap: anywhere;
}

.hora-inno-speakers__position {
  font-family: var(--hora-inno-font-mono);
  font-size: 12px;
  line-height: 1.45;
  color: var(--hora-inno-color-text-muted);
}

.hora-inno-speakers__more {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  margin-top: 36px;
}

.hora-inno-speakers__status {
  font-family: var(--hora-inno-font-mono);
  font-size: 14px;
  line-height: 1.45;
  color: var(--hora-inno-color-text-muted);
}

/* ===== Drawer: a native modal <dialog> docked right; the top layer escapes Oxygen's overflow and stacking ===== */

html:has(.hora-inno-speakers__drawer[open]) {
  overflow: hidden;
}

.hora-inno-speakers__drawer {
  inset: 0 0 0 auto;
  width: min(576px, 100%);
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--hora-inno-color-border);
  border-right: 0;
  border-radius: 18px 0 0 18px;
  background: var(--hora-inno-color-bg);
  color: inherit;
}

.hora-inno-speakers__drawer::backdrop {
  background: var(--hora-inno-overlay);
}

.hora-inno-speakers__drawer[open] {
  animation: hora-inno-speakers-slide var(--hora-inno-dur-base) var(--hora-inno-ease-merge);
}

.hora-inno-speakers__drawer[open]::backdrop {
  animation: hora-inno-speakers-fade var(--hora-inno-dur-base) var(--hora-inno-ease-merge);
}

@keyframes hora-inno-speakers-slide {
  from { transform: translateX(100%); }
}

@keyframes hora-inno-speakers-fade {
  from { opacity: 0; }
}

/* The panel fills the dialog and scrolls, so only a press on the backdrop targets the <dialog> itself */
.hora-inno-speakers__panel {
  display: flex;
  flex-direction: column;
  gap: 27px;
  height: 100%;
  padding: 0 36px 54px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.hora-inno-speakers__bar {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  justify-content: flex-end;
  padding: 18px 0 9px;
  background: var(--hora-inno-color-bg);
}

.hora-inno-speakers__close {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--hora-inno-color-border);
  border-radius: 9px;
  background: transparent;
  color: var(--hora-inno-color-text-muted);
  font-family: var(--hora-inno-font-mono);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  transition: color var(--hora-inno-dur-fast), border-color var(--hora-inno-dur-fast);
}

.hora-inno-speakers__close:hover {
  border-color: var(--hora-inno-color-text);
  color: var(--hora-inno-color-text);
}

.hora-inno-speakers__profile {
  display: grid;
  grid-template-columns: 144px minmax(0, 1fr);
  align-items: end;
  gap: 18px;
}

.hora-inno-speakers__profile-name {
  font-size: clamp(24px, 2.4vw, 30px);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.01em;
  text-wrap: balance;
  overflow-wrap: anywhere;
}

.hora-inno-speakers__profile-position {
  margin-top: 9px;
  font-family: var(--hora-inno-font-mono);
  font-size: 14px;
  line-height: 1.45;
  color: var(--hora-inno-color-text-muted);
}

.hora-inno-speakers__social {
  align-self: flex-start;
}

.hora-inno-speakers__bio {
  max-width: 70ch;
  font-size: 16px;
  line-height: 1.6;
  color: var(--hora-inno-color-text-body);
}

.hora-inno-speakers__bio > * + * {
  margin-top: 18px;
}

.hora-inno-speakers :is(.hora-inno-speakers__bio, .hora-inno-speakers__session-text) a {
  color: var(--hora-inno-tone-blue-bright);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.hora-inno-speakers :is(.hora-inno-speakers__bio, .hora-inno-speakers__session-text) ul {
  padding-left: 18px;
}

/* ===== Sessions: the event page agenda ledger, one block per day ===== */

.hora-inno-speakers__agenda {
  display: flex;
  flex-direction: column;
  gap: 27px;
}

.hora-inno-speakers__agenda-title {
  font-family: var(--hora-inno-font-mono);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: 0.02em;
  color: var(--hora-inno-color-text-subtle);
}

/* Dates outside the InnoDays week stay neutral: off event pages the base :root turns the primary yellow */
.hora-inno-speakers__days {
  --day-accent: var(--hora-inno-color-text-muted);
  --day-liquid-bg: var(--hora-inno-color-surface-overlay);
  --day-liquid-fg: var(--hora-inno-color-text);
  --agenda-time: 126px;
  display: flex;
  flex-direction: column;
  gap: 36px;
}

/* Declared per day, where .hora-inno-day--{tone} sets --day-accent; on the list it would resolve with the neutral default */
.hora-inno-speakers__day {
  --agenda-hour: color-mix(in srgb, var(--day-accent) 80%, var(--hora-inno-color-text));
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.hora-inno-speakers__date {
  display: flex;
  align-items: center;
  gap: 18px;
}

.hora-inno-speakers__date .hora-inno-date-tab {
  flex-shrink: 0;
  width: 63px;
}

.hora-inno-speakers__date .hora-inno-date-tab__num {
  font-size: 36px;
}

/* Intl writes Romanian weekdays in lower case */
.hora-inno-speakers__weekday {
  font-family: var(--hora-inno-font-mono);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.35;
  color: var(--agenda-hour);
  text-transform: capitalize;
}

.hora-inno-speakers__session {
  display: grid;
  grid-template-columns: var(--agenda-time) minmax(0, 1fr);
  gap: 27px;
  padding: 27px 0;
  border-top: 1px solid var(--hora-inno-color-border);
}

.hora-inno-speakers__time {
  font-family: var(--hora-inno-font-mono);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.35;
  color: var(--agenda-hour);
  white-space: nowrap;
}

.hora-inno-speakers__session-body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 9px;
}

/* The event as a mono kicker above the title (the DS dialog header pattern): one day can hold sessions of two events */
.hora-inno-speakers__session-event {
  font-family: var(--hora-inno-font-mono);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: 0.02em;
  color: var(--hora-inno-color-text-subtle);
}

.hora-inno-speakers__session-title {
  font-size: 18px;
  font-weight: 500;
  line-height: 1.35;
  text-wrap: pretty;
}

.hora-inno-speakers__session-text {
  max-width: 70ch;
  font-size: 15px;
  line-height: 1.55;
  color: var(--hora-inno-color-text-muted);
}

.hora-inno-speakers__event {
  margin-top: 9px;
}

@media screen and (max-width: 768px) {
  .hora-inno-speakers__drawer {
    width: 100%;
    border: 0;
    border-radius: 0;
  }
}

@media screen and (max-width: 480px) {
  .hora-inno-speakers__grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  }

  .hora-inno-speakers__panel {
    padding: 0 18px 36px;
  }

  .hora-inno-speakers__profile {
    grid-template-columns: 108px minmax(0, 1fr);
  }

  /* Time stacks above the session, as on the event page at its narrow width */
  .hora-inno-speakers__session {
    grid-template-columns: minmax(0, 1fr);
    gap: 4.5px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hora-inno-speakers__card,
  .hora-inno-speakers__close {
    transition: none;
  }

  .hora-inno-speakers__drawer[open],
  .hora-inno-speakers__drawer[open]::backdrop {
    animation: none;
  }
}
