/* ======================================
       Speaker Bio Modals (Div-Based)
    ====================================== */

/* Full-screen Overlay */
.speaker-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.3s,
    visibility 0.3s;
  padding: 20px;
}

/* Modal Box */
.speaker-modal {
  position: relative;
  background: #1e1e1e;
  width: 100%;
  max-width: 800px;
  max-height: 85dvh;
  border-radius: 12px;
  border: 1px solid var(--border);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  color: #ebe9e7;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(20px);
  transition: transform 0.3s;

  /* CRITICAL for iOS: Forces light scrollbars and UI on this dark element */
  color-scheme: dark;
}

/* Active State */
.speaker-modal-overlay.is-active {
  opacity: 1;
  visibility: visible;
}

.speaker-modal-overlay.is-active .speaker-modal {
  transform: translateY(0);
}

/* Close Button */
.speaker-modal__close {
  position: absolute;
  top: 15px;
  right: 20px;
  background: transparent !important;
  border: none !important;
  font-size: 32px;
  line-height: 1;
  cursor: pointer;
  color: #c6af8f;
  outline: none !important;
  box-shadow: none !important;
  -webkit-appearance: none !important;
  appearance: none !important;
  -webkit-tap-highlight-color: transparent !important;
  z-index: 110;
}

.speaker-modal__close:hover {
  color: #17a1c0;
}

/* Modal Header */
.speaker-modal__header {
  padding: 40px 40px 25px;
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: 30px;
  align-items: center;
  flex-shrink: 0;
}

.speaker-modal__photo {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #99a1a2;
  flex-shrink: 0;
}

.speaker-modal__name {
  margin: 0;
  color: #c6af8f;
  font-size: 1.8rem;
  font-weight: 400;
}

.speaker-modal__title {
  margin: 5px 0 0;
  color: #ebe9e7;
  font-size: 1rem;
  opacity: 0.8;
}

/* Modal Body */
.speaker-modal__body {
  padding: 25px 40px 40px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  font-size: 1.1rem;
  line-height: 1.7;

  /* Modern Standard Scrollbar Styling (Supported in modern iOS Safari) */
  scrollbar-width: thin;
  scrollbar-color: #c6af8f #2a2b30;
}

/* Custom Scrollbar (Desktop Webkit browsers) */
.speaker-modal__body::-webkit-scrollbar {
  width: 8px;
}
.speaker-modal__body::-webkit-scrollbar-track {
  background: #2a2b30;
  border-radius: 10px;
}
.speaker-modal__body::-webkit-scrollbar-thumb {
  background: #c6af8f;
  border-radius: 10px;
  border: 2px solid #2a2b30;
}

/* Mobile Adjustments */
@media (max-width: 767px) {
  .speaker-modal__header {
    flex-direction: column;
    text-align: center;
    padding: 30px 20px 20px;
    gap: 15px;
  }
  .speaker-modal__photo {
    width: 100px;
    height: 100px;
  }
  .speaker-modal__body {
    padding: 20px;
  }
  .speaker-modal__name {
    font-size: 1.4rem;
  }
  .speaker-modal__close {
    top: 10px;
    right: 10px;
  }
}

/* Body Scroll Lock */
body.modal-open {
  overflow: hidden;
}

/* ======================================
      Fluent Forms & Other Styles
    ====================================== */

#fluentform_1 > * {
  font-size: var(--text-m);
}

#fluentform_1 .iti--allow-dropdown .iti__country-container {
  display: none;
}

#fluentform_1 .iti--allow-dropdown input.iti__tel-input,
.iti--allow-dropdown input.iti__tel-input[type="tel"] {
  padding-left: 15px !important;
}

.privacy_wrapper h3 {
  margin-bottom: 1.2rem;
  color: var(--text-secondary);
}

.privacy_wrapper {
  max-height: 254px;
  overflow: auto;
  padding: 15px;
  border: 1px solid #ddd;
}

input[type="checkbox"] {
  appearance: none;
  width: 20px;
  height: 20px;
  border: 2px solid #555;
  position: relative;
  display: inline-block;
  cursor: pointer;
}

input[type="checkbox"]::after {
  content: "";
  position: absolute;
  display: none;
  left: 6px;
  top: 2px;
  width: 5px;
  height: 10px;
  border: solid white;
  border-width: 0 3px 3px 0;
  transform: rotate(45deg);
}

input[type="checkbox"]:checked {
  background-color: #007bff;
  border-color: #007bff;
}

input[type="checkbox"]:checked::after {
  display: block;
}

@media (max-width: 480px) {
  .headline.registration_headline {
    font-size: var(--text-m);
  }
}

.headline.registration_headline {
  margin-block-end: var(--space-s);
}

.headline_emphasis {
  color: var(--emphasis);
  text-transform: uppercase;
  font-weight: 300;
  text-align: center;
  font-size: clamp(1rem, 1.182vw + 0.764rem, 1.65rem);
  padding-bottom: var(--space-s);
  border-bottom: 1px solid var(--border);
}

.live-info-content {
  margin-top: var(--space-l);
}

.live-info-content > p {
  text-align: center;
  font-weight: 300;
}

.live-info-content > p:first-child {
  color: var(--text-secondary);
}

#fluentform_1_success.ff-message-success {
  border: none;
  text-align: center;
  font-size: var(--text-m);
}

.fluent_success_msg {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
}

.fluent_success_msg p {
  margin-bottom: initial;
}

.fluent_success_msg p:first-of-type {
  color: var(--accent);
  font-size: 1.2rem;
}

.fluent_success_msg p:last-of-type {
  color: var(--text-secondary);
  text-wrap: balance;
}
