
/* =========================================================
   MSA CONFERENCE 2027
   PREMIUM SPEAKER MODAL
========================================================= */

/* Backdrop */

.modal-backdrop.show {
  opacity: 0.75;
  background-color: #0d1420;
}

body.modal-open #header-placeholder,
body.modal-open main,
body.modal-open #footer-placeholder {
  filter: blur(3px);
}

#header-placeholder,
main,
#footer-placeholder {
  transition: filter 0.35s ease;
}

/* Modal sizing */

.msa-speaker-modal {
  --bs-modal-width: 1080px;
}

.msa-speaker-modal .modal-dialog {
  max-width: min(1080px, calc(100vw - 48px));
}

.msa-speaker-modal .modal-content {
  position: relative;
  overflow: hidden;
  border: none;
  border-radius: 14px;
  background: #ffffff;

  box-shadow:
    0 25px 70px rgba(0, 0, 0, 0.25),
    0 50px 120px rgba(0, 0, 0, 0.2);
}

/* Modal entrance */

.msa-speaker-modal.fade .modal-dialog {
  transform: translateY(45px) scale(0.92);
  opacity: 0;

  transition:
    transform 0.55s cubic-bezier(0.16, 1, 0.3, 1),
    opacity 0.45s ease;
}

.msa-speaker-modal.show .modal-dialog {
  transform: translateY(0) scale(1);
  opacity: 1;
}

/* Close button */

.speaker-modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 10;

  display: grid;
  place-items: center;

  width: 43px;
  height: 43px;

  padding: 0;
  border: 1px solid #e9eaf0;
  border-radius: 50%;

  background: #ffffff;
  color: #171c24;

  font-size: 29px;
  line-height: 1;
  cursor: pointer;

  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);

  transition:
    background 0.25s ease,
    color 0.25s ease,
    transform 0.3s ease;
}

.speaker-modal-close:hover {
  background: #a50021;
  color: #ffffff;
  transform: rotate(90deg);
}

.speaker-modal-close:focus-visible {
  outline: 3px solid #a50021;
  outline-offset: 3px;
}

/* Layout */

.speaker-modal-layout {
  display: grid;
  grid-template-columns: 41% 59%;
  min-height: 620px;
  max-height: min(790px, calc(100dvh - 70px));
}

/* Photograph */

.speaker-modal-visual {
  position: relative;
  min-height: 100%;
  overflow: hidden;
  background: #dfe2e7;
}

.speaker-modal-visual img {
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
  object-fit: cover;
  object-position: center top;

  animation: speaker-photo-reveal 0.85s ease-out both;
}

@keyframes speaker-photo-reveal {
  from {
    opacity: 0.5;
    transform: scale(1.08);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

.speaker-modal-photo-gradient {
  position: absolute;
  inset: 0;
  pointer-events: none;

  background: linear-gradient(
    to top,
    rgba(10, 15, 24, 0.65),
    transparent 42%
  );
}

.speaker-modal-country {
  position: absolute;
  left: 30px;
  bottom: 30px;

  padding: 11px 16px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 6px;

  color: #ffffff;
  font-size: 12px;
  font-weight: 700;

  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* Profile information */

.speaker-modal-content {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #d2d5dc transparent;
}

.speaker-modal-content-inner {
  padding: 62px 58px 38px;
}

.speaker-modal-eyebrow {
  margin: 0 0 22px;
  color: #a50021;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.5px;
}

.speaker-modal-title {
  color: #a50021;
  font-size: 13px;
  font-weight: 700;
  margin: 0 0 8px;
}

.speaker-modal-content h2 {
  color: #171c24;
  font-size: clamp(33px, 3.4vw, 48px);
  line-height: 1.13;
  font-weight: 800;
  letter-spacing: -1.8px;
  margin: 0 0 18px;
}

.speaker-modal-institution {
  color: #626c7b;
  font-size: 15px;
  line-height: 1.75;
}

.speaker-modal-divider {
  height: 1px;
  background: #e9ebf0;
  margin: 34px 0;
}

/* Topic and biography */

.speaker-modal-topic {
  margin-bottom: 30px;
}

.speaker-modal-topic > span,
.speaker-modal-biography > span {
  display: block;
  margin-bottom: 13px;

  color: #a50021;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.1px;
  text-transform: uppercase;
}

.speaker-modal-topic h3 {
  color: #171c24;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: -0.4px;
  margin: 0;
}

.speaker-modal-biography p {
  color: #596374;
  font-size: 14px;
  line-height: 1.95;
  white-space: pre-line;
  margin: 0;
}

/* Footer */

.speaker-modal-footer {
  display: flex;
  flex-direction: column;
  gap: 6px;

  margin-top: 40px;
  padding-top: 22px;
  border-top: 1px solid #e9ebf0;

  color: #89919e;
  font-size: 11px;
  line-height: 1.5;
}

/* Respect hidden attribute */

.speaker-modal-content [hidden],
.speaker-modal-country[hidden] {
  display: none !important;
}

/* =========================================================
   TABLET
========================================================= */

@media (max-width: 991px) {
  .msa-speaker-modal .modal-dialog {
    max-width: calc(100vw - 32px);
  }

  .speaker-modal-layout {
    grid-template-columns: 40% 60%;
  }

  .speaker-modal-content-inner {
    padding: 55px 32px 30px;
  }
}

/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 767px) {
  .msa-speaker-modal .modal-dialog {
    max-width: calc(100vw - 20px);
    margin: 10px auto;
  }

  .msa-speaker-modal .modal-content {
    border-radius: 12px;
    max-height: calc(100dvh - 20px);
    overflow-y: auto;
  }

  .speaker-modal-layout {
    display: flex;
    flex-direction: column;
    min-height: 0;
    max-height: none;
  }

  .speaker-modal-visual {
    height: 300px;
    min-height: 300px;
  }

  .speaker-modal-content {
    overflow: visible;
  }

  .speaker-modal-content-inner {
    padding: 32px 25px 30px;
  }

  .speaker-modal-content h2 {
    font-size: 34px;
    letter-spacing: -1.1px;
  }

  .speaker-modal-country {
    left: 20px;
    bottom: 20px;
  }

  .speaker-modal-close {
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
  }
}

/* =========================================================
   REDUCED MOTION
========================================================= */

@media (prefers-reduced-motion: reduce) {
  .msa-speaker-modal.fade .modal-dialog,
  .msa-speaker-modal.show .modal-dialog {
    transition: none;
    transform: none;
  }

  .speaker-modal-visual img {
    animation: none;
  }

  .speaker-modal-close {
    transition: none;
  }

  .speaker-modal-close:hover {
    transform: none;
  }

  #header-placeholder,
  main,
  #footer-placeholder {
    transition: none;
  }
}
