/* Speaker cards stay visually unchanged; this adds keyboard focus and modal-only presentation. */
.customer-participant[role="button"],
.speakers-keynote[role="button"],
.speaker-session-card[role="button"] {
  cursor: pointer;
  touch-action: manipulation;
}

.customer-participant[role="button"]:focus-visible,
.speakers-keynote[role="button"]:focus-visible,
.speaker-session-card[role="button"]:focus-visible {
  outline: 2px solid var(--brand-gold-readable, #8b5a10);
  outline-offset: .35rem;
}

.profile-modal .modal-dialog {
  max-width: 58rem;
}

.profile-modal.no-photo .modal-dialog {
  max-width: 50rem;
}

.profile-modal .modal-dialog-scrollable {
  max-height: calc(100dvh - 2rem);
}

body.speaker-profile-open .profile-modal {
  z-index: 1090;
}

body.speaker-profile-open .modal-backdrop {
  z-index: 1080;
}

body.speaker-profile-open {
  overflow: hidden;
}

.speaker-profile-backdrop {
  position: fixed;
  z-index: 1080;
  inset: 0;
  background: #000;
  opacity: .5;
}

.speaker-profile-backdrop.show {
  opacity: .5;
}

.profile-modal.speaker-profile-fallback {
  position: fixed;
  z-index: 1090;
  inset: 0;
  display: block;
  overflow-x: hidden;
  overflow-y: auto;
  outline: 0;
}

.profile-modal .modal-content {
  overflow: hidden;
  color: var(--brand-ink, #352d2b);
  background: var(--brand-ivory, #faf5ef);
  border: 1px solid rgba(255, 255, 255, .82);
  border-radius: var(--radius-institutional-lg, 1.25rem);
  box-shadow: var(--shadow-soft, 0 1.25rem 3.5rem rgba(24, 8, 9, .24));
}

.profile-modal .modal-header {
  align-items: flex-start;
  padding: 1.25rem 1.5rem .9rem;
  border-bottom: 1px solid rgba(59, 0, 6, .12);
}

.profile-modal .modal-title {
  max-width: 48rem;
  margin: 0;
  color: var(--brand-wine-2, #3b0006);
  font-size: clamp(1.75rem, 2.7vw, 2.125rem);
  font-weight: 500;
  line-height: 1.16;
  text-wrap: balance;
}

.profile-modal .modal-body {
  padding: clamp(1rem, 3vw, 1.75rem);
}

.speaker-profile-layout {
  display: grid;
  grid-template-columns: minmax(12rem, 16rem) minmax(0, 1fr);
  align-items: start;
  gap: clamp(1.25rem, 3vw, 2rem);
}

.profile-modal.no-photo .speaker-profile-layout {
  grid-template-columns: minmax(0, 1fr);
}

.speaker-profile-photo-wrap {
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #2a0004;
}

.speaker-profile-photo-wrap[hidden] {
  display: none;
}

.speaker-profile-photo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 18%;
}

.speaker-profile-copy {
  min-width: 0;
  max-width: 68ch;
}

.speaker-profile-title,
.speaker-profile-organisation {
  margin: 0;
  color: var(--brand-wine-2, #3b0006);
  font-weight: 600;
  line-height: 1.5;
}

.speaker-profile-title {
  font-size: 1.05rem;
}

.speaker-profile-organisation {
  margin-block-start: .3rem;
  color: var(--brand-muted, #5b514d);
  font-size: .95rem;
  font-weight: 500;
}

.speaker-profile-event {
  margin: 1.15rem 0 0;
  color: var(--brand-gold-readable, #8b5a10);
  font-size: .9rem;
  font-weight: 600;
  line-height: 1.6;
}

.speaker-profile-event[hidden],
.speaker-profile-title[hidden],
.speaker-profile-organisation[hidden],
.speaker-profile-biography[hidden] {
  display: none;
}

.speaker-profile-biography {
  max-width: 68ch;
  margin-block-start: 1.25rem;
  padding-block-start: .9rem;
  border-block-start: 1px solid rgba(59, 0, 6, .14);
}

.speaker-profile-bio-label {
  margin: 0 0 .65rem;
  color: var(--brand-gold-readable, #8b5a10);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .1em;
  line-height: 1.4;
}

.speaker-profile-bio {
  margin: 0;
  color: var(--brand-ink, #352d2b);
  font-size: 1.0625rem;
  line-height: 1.72;
}

.speaker-profile-bio p {
  margin: 0 0 1rem;
}

.speaker-profile-bio p:last-child {
  margin-block-end: 0;
}

[dir="rtl"] .profile-modal .modal-header {
  text-align: start;
}

[dir="rtl"] .speaker-profile-bio {
  line-height: 1.95;
}

[dir="rtl"] .speaker-profile-bio-label {
  font-size: .85rem;
  letter-spacing: 0;
}

@media (max-width: 575.98px) {
  .profile-modal .modal-dialog {
    margin: .5rem;
    max-height: calc(100dvh - 1rem);
  }

  .profile-modal .modal-header {
    padding: 1rem 1rem .75rem;
  }

  .profile-modal .modal-body {
    padding: 1.25rem;
  }

  .profile-modal .modal-title {
    font-size: clamp(1.5rem, 6vw, 1.75rem);
    line-height: 1.2;
  }

  .speaker-profile-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
  }

  .speaker-profile-photo-wrap {
    width: min(100%, 12rem);
    justify-self: start;
  }

  [dir="rtl"] .speaker-profile-photo-wrap {
    justify-self: end;
  }

  .speaker-profile-biography {
    margin-block-start: 1.1rem;
    padding-block-start: .8rem;
  }

  .speaker-profile-bio-label {
    margin-block-end: .55rem;
  }

  .speaker-profile-bio {
    font-size: 1rem;
    line-height: 1.7;
  }

  .speaker-profile-bio p {
    margin-block-end: .9rem;
  }

  [dir="rtl"] .speaker-profile-bio {
    line-height: 1.9;
  }
}
