/* EMR solution page helpers + demo modal (page layout uses course-page.css) */
@import url("https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,500;9..144,650&family=Urbanist:wght@500;600;700;800&display=swap");

:root {
  --emr-ink: #122033;
  --emr-muted: #5b6b7c;
  --emr-blue-deep: #1f6fc0;
  --emr-sans: "Urbanist", system-ui, sans-serif;
  --emr-display: "Fraunces", Georgia, serif;
}

.course-page .course-rail__points {
  margin: 0.85rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.35rem;
}

.course-page .course-rail__points li {
  position: relative;
  padding-left: 0.95rem;
  font-size: 0.92rem;
  line-height: 1.45;
  color: var(--course-muted, #5b6b7c);
}

.course-page .course-rail__points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--course-brand, #328CE7);
}

.course-page .course-rail__more {
  margin-top: 0.85rem;
}

.course-page .course-rail__more > summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.86rem;
  font-weight: 700;
  color: #1f6fc0;
  user-select: none;
}

.course-page .course-rail__more > summary::-webkit-details-marker {
  display: none;
}

.course-page .course-rail__more > summary::after {
  content: "";
  width: 0.4rem;
  height: 0.4rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.2s ease;
}

.course-page .course-rail__more[open] > summary::after {
  transform: rotate(225deg);
  translate: 0 0.15rem;
}

.course-page .course-rail__more .course-rail__points {
  margin-top: 0.7rem;
}

/* Compact 2-column rails on desktop */
@media (min-width: 992px) {
  .course-page .course-rail--modules,
  .course-page .course-rail--compact {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem 1.15rem;
  }

  .course-page .course-rail--modules::before,
  .course-page .course-rail--compact::before {
    display: none;
  }

  .course-page .course-rail--modules .course-rail__item,
  .course-page .course-rail--compact .course-rail__item {
    grid-template-columns: auto 1fr;
    gap: 0.85rem;
  }

  .course-page .course-rail--modules .course-rail__n,
  .course-page .course-rail--compact .course-rail__n {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    font-size: 0.9rem;
  }

  .course-page .course-rail--modules .course-rail__card,
  .course-page .course-rail--compact .course-rail__card {
    padding: 1.1rem 1.15rem 1.15rem;
  }

  .course-page .course-rail--modules .ui-card-desc {
    margin-bottom: 0;
  }
}

@media (max-width: 575.98px) {
  .course-page .course-rail--modules .course-rail__item,
  .course-page .course-rail--compact .course-rail__item {
    grid-template-columns: 1fr;
    gap: 0.65rem;
  }

  .course-page .course-rail--modules .course-rail__n,
  .course-page .course-rail--compact .course-rail__n {
    width: 42px;
    height: 42px;
  }
}

/* Center all card-section headings + captions (max 2 title lines) */
.course-page .course-section__head {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.course-page .course-section__head .course-title,
.course-page .course-section__head .course-sub {
  margin-left: auto;
  margin-right: auto;
}

.course-page .course-section__head .course-title {
  max-width: 100% !important;
  overflow-wrap: break-word;
}

.course-page .course-section__head .course-label {
  justify-content: center;
}

/* Section heads: wider measure, stay inside container gutters */
.course-page .course-section__head {
  max-width: min(100%, 58rem);
  width: 100%;
  box-sizing: border-box;
}

.course-page .course-section__head .course-sub {
  max-width: none;
}

/* Prefer one line in markup, but wrap before overflowing the page edge */
.course-page .emr-title-line {
  display: inline;
  white-space: normal;
}

.course-page .course-finale h2,
.course-page .course-local__copy .course-title {
  max-width: 100%;
  overflow-wrap: break-word;
  white-space: normal;
}

/* Related solutions chips (Hotel Hub finale style) */
.course-page .solution-related {
  margin-top: 1.85rem;
  padding-top: 1.65rem;
  border-top: 1px solid rgba(50, 140, 231, 0.14);
  text-align: center;
}

.course-page .solution-related__label {
  margin: 0 auto 1.05rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  font-family: var(--heading-font);
  font-size: clamp(1.05rem, 2vw, 1.2rem);
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.2;
  color: var(--course-ink, #07111f);
}

.course-page .solution-related__label::before,
.course-page .solution-related__label::after {
  content: "";
  width: 1.35rem;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(50, 140, 231, 0.15), #328ce7);
}

.course-page .solution-related__label::after {
  background: linear-gradient(90deg, #328ce7, rgba(50, 140, 231, 0.15));
}

.course-page .solution-related__list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.65rem;
}

.course-page .solution-related__list .btn {
  margin: 0;
  white-space: nowrap;
}

@media (max-width: 575.98px) {
  .course-page .solution-related__list .btn {
    white-space: normal;
    width: 100%;
    justify-content: center;
  }
}

/* Hotel direct-booking engine section */
.course-page .hotel-booking-engine {
  position: relative;
  overflow: hidden;
}

.course-page .hotel-booking-engine::before {
  content: "";
  position: absolute;
  inset: 8% auto auto -8%;
  width: 18rem;
  height: 18rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(20, 184, 166, 0.16), transparent 70%);
  pointer-events: none;
}

.course-page .hotel-booking-engine::after {
  content: "";
  position: absolute;
  inset: auto -6% 4% auto;
  width: 16rem;
  height: 16rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(50, 140, 231, 0.14), transparent 70%);
  pointer-events: none;
}

.course-page .hotel-booking-engine > .container {
  position: relative;
  z-index: 1;
}

.course-page .hotel-booking-engine__showcase {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(1.25rem, 3vw, 2rem);
  align-items: stretch;
  margin: 0 0 1.5rem;
}

.course-page .hotel-booking-engine__media {
  position: relative;
  margin: 0;
}

.course-page .hotel-booking-engine__media figure {
  margin: 0;
  overflow: hidden;
  border-radius: 28px;
  aspect-ratio: 16 / 10;
  border: 1px solid rgba(50, 140, 231, 0.18);
  box-shadow: 0 28px 60px rgba(7, 17, 31, 0.14);
  background: #0a1c33;
}

.course-page .hotel-booking-engine__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.course-page .hotel-booking-engine__badge {
  position: absolute;
  left: 1rem;
  bottom: 1rem;
  max-width: min(100% - 2rem, 16rem);
  padding: 0.85rem 1rem;
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(8, 40, 82, 0.88), rgba(12, 74, 110, 0.82));
  border: 1px solid rgba(148, 220, 255, 0.35);
  color: #fff;
  backdrop-filter: blur(10px);
  box-shadow: 0 16px 36px rgba(3, 16, 28, 0.28);
}

.course-page .hotel-booking-engine__badge-kicker {
  display: block;
  margin-bottom: 0.2rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #9ee7ff;
}

.course-page .hotel-booking-engine__badge strong {
  display: block;
  font-size: 0.98rem;
  font-weight: 800;
  line-height: 1.25;
}

.course-page .hotel-booking-engine__copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1.1rem;
  padding: clamp(1.25rem, 3vw, 1.75rem);
  border-radius: 28px;
  background:
    linear-gradient(155deg, rgba(50, 140, 231, 0.14), rgba(20, 184, 166, 0.1) 45%, rgba(99, 102, 241, 0.12)),
    #fff;
  border: 1px solid rgba(50, 140, 231, 0.16);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.06);
}

.course-page .hotel-booking-engine__lead {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--course-ink, #122033);
  font-weight: 600;
}

.course-page .hotel-booking-engine__pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.course-page .hotel-booking-engine__pills span {
  display: inline-flex;
  align-items: center;
  padding: 0.42rem 0.8rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 750;
  color: #0b3d6e;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(50, 140, 231, 0.22);
  box-shadow: 0 8px 18px rgba(50, 140, 231, 0.08);
}

.course-page .hotel-booking-engine__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.course-page .hotel-booking-engine__card {
  margin: 0;
  padding: 1.2rem 1.15rem 1.25rem;
  border-radius: 22px;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.05);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.course-page .hotel-booking-engine__card:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.09);
}

.course-page .hotel-booking-engine__card--wide {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  column-gap: 1rem;
  align-items: start;
  background:
    linear-gradient(120deg, rgba(50, 140, 231, 0.08), rgba(20, 184, 166, 0.08)),
    #fff;
  border-color: rgba(50, 140, 231, 0.18);
}

.course-page .hotel-booking-engine__card--wide .hotel-booking-engine__icon {
  grid-row: 1 / span 2;
}

.course-page .hotel-booking-engine__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  margin-bottom: 0.85rem;
  border-radius: 14px;
  color: #fff;
  font-size: 1.05rem;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.12);
}

.course-page .hotel-booking-engine__card[data-tone="teal"] .hotel-booking-engine__icon {
  background: linear-gradient(145deg, #14b8a6, #0f766e);
}
.course-page .hotel-booking-engine__card[data-tone="blue"] .hotel-booking-engine__icon {
  background: linear-gradient(145deg, #3b82f6, #1d4ed8);
}
.course-page .hotel-booking-engine__card[data-tone="violet"] .hotel-booking-engine__icon {
  background: linear-gradient(145deg, #8b5cf6, #6d28d9);
}
.course-page .hotel-booking-engine__card[data-tone="coral"] .hotel-booking-engine__icon {
  background: linear-gradient(145deg, #f97316, #ea580c);
}
.course-page .hotel-booking-engine__card[data-tone="mint"] .hotel-booking-engine__icon {
  background: linear-gradient(145deg, #34d399, #059669);
}
.course-page .hotel-booking-engine__card[data-tone="amber"] .hotel-booking-engine__icon {
  background: linear-gradient(145deg, #f59e0b, #d97706);
}
.course-page .hotel-booking-engine__card[data-tone="sky"] .hotel-booking-engine__icon {
  background: linear-gradient(145deg, #38bdf8, #0284c7);
}

.course-page .hotel-booking-engine__card h3 {
  margin: 0 0 0.4rem;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.015em;
  color: var(--course-ink, #122033);
}

.course-page .hotel-booking-engine__card p {
  margin: 0;
  font-size: 0.94rem;
  line-height: 1.55;
  color: var(--course-muted, #5b6b7c);
}

@media (max-width: 991.98px) {
  .course-page .hotel-booking-engine__showcase {
    grid-template-columns: 1fr;
  }

  .course-page .hotel-booking-engine__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 575.98px) {
  .course-page .hotel-booking-engine__grid {
    grid-template-columns: 1fr;
  }

  .course-page .hotel-booking-engine__card--wide {
    grid-template-columns: 1fr;
  }

  .course-page .hotel-booking-engine__card--wide .hotel-booking-engine__icon {
    grid-row: auto;
  }
}

.course-page .emr-overview__stage {
  position: relative;
  margin: 0 0 1.5rem;
}

.course-page .emr-overview__media {
  position: relative;
  z-index: 1;
  margin: 0;
  overflow: hidden;
  border-radius: 28px;
  aspect-ratio: 16 / 9;
  background: #0a1c33;
  border: 1px solid rgba(50, 140, 231, 0.18);
  box-shadow: 0 28px 60px rgba(7, 17, 31, 0.14);
}

.course-page .emr-overview__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.course-page .emr-overview__glow {
  position: absolute;
  inset: auto -4% -18% 35%;
  height: 55%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(50, 140, 231, 0.28), transparent 68%);
  pointer-events: none;
  z-index: 0;
}

.course-page .emr-overview__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.course-page .emr-overview__card {
  margin: 0;
  padding: 1.25rem 1.2rem 1.3rem;
  border-radius: 22px;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.course-page .emr-overview__card:hover {
  transform: translateY(-3px);
  border-color: rgba(50, 140, 231, 0.28);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
}

.course-page .emr-overview__icon {
  width: 46px;
  height: 46px;
  margin-bottom: 0.95rem;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: #1f6fc0;
  background: linear-gradient(145deg, rgba(50, 140, 231, 0.16), rgba(20, 184, 166, 0.12));
  border: 1px solid rgba(50, 140, 231, 0.18);
  font-size: 1.05rem;
}

.course-page .emr-overview__card h3 {
  margin: 0 0 0.55rem;
  font-size: 1.08rem;
  font-weight: 800;
  line-height: 1.3;
  color: #122033;
}

.course-page .emr-overview__card p {
  margin: 0;
  font-size: 0.96rem;
  line-height: 1.6;
  color: #5b6b7c;
}

.course-page .emr-overview__closer {
  margin: 0;
  padding: 1.15rem 1.35rem;
  border-radius: 18px;
  text-align: center;
  font-size: clamp(1.05rem, 2vw, 1.2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #fff;
  background:
    radial-gradient(ellipse 60% 90% at 10% 0%, rgba(50, 140, 231, 0.35), transparent 55%),
    linear-gradient(135deg, #07111f, #0d2744 55%, #145a9c);
  border: 1px solid rgba(126, 182, 245, 0.22);
  box-shadow: 0 18px 40px rgba(7, 17, 31, 0.12);
}

@media (max-width: 991.98px) {
  .course-page .emr-overview__grid {
    grid-template-columns: 1fr;
  }

  .course-page .emr-overview__media {
    aspect-ratio: 4 / 3;
  }
}

/* EMR hero: keep breadcrumb photo, tint with soft blue overlay */
.course-page .course-hero--emr {
  --emr-hero-blue: #328ce7;
  isolation: isolate;
  background-color: #04111f;
  border-bottom: 1px solid rgba(126, 182, 245, 0.18);
}

.course-page .course-hero--emr .course-hero__glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    linear-gradient(180deg, rgba(8, 40, 82, 0.28) 0%, rgba(12, 58, 112, 0.18) 45%, rgba(6, 28, 58, 0.42) 100%),
    radial-gradient(ellipse 75% 60% at 12% 20%, rgba(50, 140, 231, 0.34), transparent 60%),
    radial-gradient(ellipse 55% 50% at 88% 18%, rgba(50, 140, 231, 0.22), transparent 58%),
    radial-gradient(ellipse 60% 45% at 50% 100%, rgba(50, 140, 231, 0.26), transparent 55%);
}

.course-page .course-hero--emr > .container {
  position: relative;
  z-index: 1;
}

.course-page .course-hero--emr .breadcrumb-list {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.15rem 0.35rem;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(50, 140, 231, 0.22), rgba(20, 184, 166, 0.16));
  border: 1px solid rgba(126, 182, 245, 0.35);
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 28px rgba(3, 16, 28, 0.25);
}

.course-page .course-hero--emr .breadcrumb-list-item {
  color: rgba(210, 232, 255, 0.88);
}

.course-page .course-hero--emr .breadcrumb-list-item.active {
  color: #fff;
  font-weight: 700;
}

.course-page .course-hero--emr .course-hero__grid {
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 1.1fr);
}

.course-page .course-hero--emr h1 {
  max-width: 100%;
  color: #fff;
  font-size: clamp(1.85rem, 3.1vw, 2.85rem);
  line-height: 1.12;
  overflow-wrap: anywhere;
}

.course-page .course-hero--emr h1 .emr-title-line {
  display: inline;
  white-space: normal;
  background: linear-gradient(115deg, #ffffff 18%, #c7ecff 55%, #99f6e4 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.course-page .course-hero--emr .course-hero__lead {
  color: rgba(226, 240, 255, 0.86);
}

.course-page .course-hero--emr .course-hero__actions .btn--base-light {
  box-shadow: 0 12px 30px rgba(50, 140, 231, 0.38);
}

.course-page .course-hero--emr .course-hero__actions .btn--white {
  border-color: rgba(148, 220, 255, 0.45);
  background: rgba(255, 255, 255, 0.94);
  color: #0b3d6e;
}

.course-page .course-hero__visual {
  position: sticky;
  top: 5.5rem;
  margin: 0;
}

.course-page .course-hero__visual-stage {
  position: relative;
  padding: 0.85rem;
  border-radius: 28px;
  background:
    linear-gradient(155deg, rgba(50, 140, 231, 0.35), rgba(20, 184, 166, 0.22) 45%, rgba(34, 211, 238, 0.28));
  box-shadow:
    0 28px 60px rgba(3, 16, 28, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.course-page .course-hero__orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(18px);
  pointer-events: none;
  z-index: 0;
  animation: emrOrbFloat 7s ease-in-out infinite;
}

.course-page .course-hero__orb--teal {
  width: 7.5rem;
  height: 7.5rem;
  top: -1.2rem;
  right: -1rem;
  background: rgba(20, 184, 166, 0.55);
}

.course-page .course-hero__orb--blue {
  width: 8.5rem;
  height: 8.5rem;
  left: -1.4rem;
  bottom: 18%;
  background: rgba(50, 140, 231, 0.5);
  animation-delay: -2.2s;
}

.course-page .course-hero__orb--mint {
  width: 5.5rem;
  height: 5.5rem;
  right: 12%;
  bottom: -1rem;
  background: rgba(94, 234, 212, 0.45);
  animation-delay: -4s;
}

.course-page .course-hero__art--solo {
  position: relative;
  z-index: 1;
  margin: 0;
  width: 100%;
  aspect-ratio: 3 / 2;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.28);
  box-shadow: 0 18px 40px rgba(3, 16, 28, 0.35);
  background: #0a1c33;
}

.course-page .course-hero__art--solo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

@keyframes emrOrbFloat {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  50% {
    transform: translate3d(0, -10px, 0) scale(1.06);
  }
}

@media (max-width: 991.98px) {
  .course-page .course-hero--emr .course-hero__grid {
    grid-template-columns: 1fr;
  }

  .course-page .course-hero__visual {
    position: static;
    width: 100%;
    max-width: none;
  }

  .course-page .course-hero__visual-stage {
    width: 100%;
    padding: 0.65rem;
    border-radius: 22px;
  }

  .course-page .course-hero__art--solo {
    width: 100%;
    aspect-ratio: 3 / 2;
    border-radius: 16px;
  }

  .course-page .course-hero--emr .course-hero__actions {
    width: 100%;
  }

  .course-page .course-hero--emr .course-hero__actions .btn {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 575.98px) {
  .course-page .course-hero__art--solo {
    aspect-ratio: 4 / 3;
  }
}

@media (prefers-reduced-motion: reduce) {
  .course-page .course-hero__orb {
    animation: none;
  }
}

.course-page .course-cards-grid.course-stack {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.course-page .course-cards-grid.course-stack::before {
  display: none;
}

@media (max-width: 991.98px) {
  .course-page .course-cards-grid.course-stack {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 575.98px) {
  .course-page .course-cards-grid.course-stack {
    grid-template-columns: 1fr;
  }
}

html.emr-demo-modal-open,
html.emr-demo-modal-open body,
body.emr-demo-modal-open {
  overflow: hidden !important;
  overscroll-behavior: none;
  height: 100%;
}

/* Floating bottom nav / WhatsApp sit above Bootstrap modals (z-index ~999999).
   Hide them while the demo form is open so the submit CTA stays reachable. */
html.emr-demo-modal-open .nav-menu,
body.emr-demo-modal-open .nav-menu,
html.emr-demo-modal-open .cb-wa,
body.emr-demo-modal-open .cb-wa {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

.emr-demo-modal {
  --bs-modal-width: min(720px, calc(100vw - 1.25rem));
  --bs-modal-margin: 0.75rem;
  padding-right: 0 !important;
  z-index: 1000001 !important;
}

body.emr-demo-modal-open .modal-backdrop {
  z-index: 1000000 !important;
}

.emr-demo-modal .modal-dialog {
  margin: var(--bs-modal-margin) auto;
  max-width: var(--bs-modal-width);
  width: calc(100% - (var(--bs-modal-margin) * 2));
  height: calc(100% - (var(--bs-modal-margin) * 2));
  max-height: calc(100dvh - (var(--bs-modal-margin) * 2));
}

.emr-demo-modal .modal-dialog-scrollable {
  display: flex;
  align-items: center;
}

.emr-demo-modal .modal-dialog-scrollable .modal-content {
  max-height: min(100%, calc(100dvh - (var(--bs-modal-margin) * 2)));
  width: 100%;
}

.emr-demo-modal__content {
  position: relative;
  border: 0;
  border-radius: 18px;
  max-height: min(100%, calc(100dvh - (var(--bs-modal-margin) * 2)));
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(520px 180px at 0% 0%, rgba(50, 140, 231, 0.14), transparent 60%),
    radial-gradient(420px 160px at 100% 0%, rgba(15, 118, 110, 0.08), transparent 55%),
    #fff;
  box-shadow: 0 24px 60px rgba(15, 32, 51, 0.18);
}

.emr-demo-modal__content::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, #1f6fc0, #328ce7 45%, #0f766e);
}

.emr-demo-modal__header {
  flex: 0 0 auto;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.45rem 1.45rem 1.1rem;
  border-bottom: 1px solid rgba(18, 32, 51, 0.08);
  background: transparent;
}

.emr-demo-modal__intro {
  min-width: 0;
  flex: 1;
}

.emr-demo-modal__eyebrow {
  margin: 0 0 0.45rem;
  font-family: var(--emr-sans);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--emr-blue-deep);
}

.emr-demo-modal__title {
  margin: 0 0 0.45rem;
  font-family: var(--emr-display);
  font-size: clamp(1.4rem, 2.6vw, 1.85rem);
  font-weight: 650;
  color: var(--emr-ink);
  line-height: 1.15;
  padding-right: 0.5rem;
}

.emr-demo-modal__lede {
  max-width: 46ch;
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--emr-muted);
}

.emr-demo-modal__close {
  margin: 0.15rem 0 0;
  opacity: 0.55;
}

.emr-demo-modal__close:hover {
  opacity: 1;
}

.emr-demo-modal__body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 1.15rem 1.45rem 1.5rem;
  touch-action: pan-y;
  scrollbar-gutter: stable;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.2), #fff 18%);
}

.emr-form {
  position: relative;
}

.emr-form-section {
  margin-bottom: 1.45rem;
  padding-bottom: 1.35rem;
  border-bottom: 1px solid rgba(18, 32, 51, 0.08);
}

.emr-form-section:last-of-type {
  border-bottom: 0;
  margin-bottom: 0.5rem;
  padding-bottom: 0;
}

.emr-form-section__label {
  margin: 0 0 0.85rem;
  font-family: var(--emr-sans);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #64748b;
}

.emr-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.95rem 1rem;
}

.emr-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  min-width: 0;
}

.emr-field--narrow {
  max-width: 100%;
}

.emr-field label {
  margin: 0;
  font-family: var(--emr-sans);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--emr-ink);
}

.emr-req {
  color: #d97706;
  font-weight: 800;
}

.emr-form .form--control,
.emr-demo-modal .emr-form .form--control,
.emr-demo-modal .emr-form select.form--control,
.emr-demo-modal .emr-form textarea.form--control {
  width: 100%;
  max-width: 100%;
  min-height: 50px;
  margin: 0;
  padding: 0.7rem 0.95rem;
  border: 1px solid rgba(18, 32, 51, 0.1);
  border-radius: 12px;
  background: #f4f8fc;
  color: var(--emr-ink);
  font-size: 0.98rem;
  line-height: 1.4;
  box-shadow: none;
  transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.emr-form .form--control::placeholder {
  color: #94a3b8;
}

.emr-form .form--control:hover {
  border-color: rgba(50, 140, 231, 0.35);
}

.emr-form .form--control:focus {
  outline: none;
  border-color: rgba(50, 140, 231, 0.65);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(50, 140, 231, 0.12);
}

.emr-form textarea.form--control {
  min-height: 120px;
  resize: vertical;
}

.emr-select {
  position: relative;
}

.emr-select::after {
  content: "";
  position: absolute;
  right: 1rem;
  top: 50%;
  width: 0.45rem;
  height: 0.45rem;
  border-right: 2px solid #64748b;
  border-bottom: 2px solid #64748b;
  transform: translateY(-65%) rotate(45deg);
  pointer-events: none;
}

.emr-select .form--control {
  appearance: none;
  padding-right: 2.4rem;
}

.emr-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  max-width: 100%;
}

.emr-chip {
  display: inline-flex;
  align-items: center;
  gap: 0;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  user-select: none;
}

.emr-chip input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.emr-chip span {
  display: inline-flex;
  align-items: center;
  min-height: 2.2rem;
  padding: 0.35rem 0.85rem;
  border: 1px solid rgba(18, 32, 51, 0.1);
  border-radius: 999px;
  background: #fff;
  color: #334155;
  font-size: 0.86rem;
  font-weight: 600;
  line-height: 1.2;
  transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.emr-chip:hover span {
  border-color: rgba(50, 140, 231, 0.4);
}

.emr-chip:has(input:checked) span,
.emr-chip input:checked + span {
  border-color: transparent;
  background: linear-gradient(135deg, #1f6fc0, #328ce7);
  color: #fff;
}

.emr-form-footer {
  margin-top: 0.35rem;
  padding: 1.15rem;
  border-radius: 16px;
  background: linear-gradient(180deg, #f3f8fd, #eef5fb);
  border: 1px solid rgba(50, 140, 231, 0.12);
}

.emr-consent {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
  margin: 0 0 1rem;
  font-size: 0.9rem;
  color: var(--emr-muted);
  line-height: 1.5;
}

.emr-consent input {
  width: 1.05rem;
  height: 1.05rem;
  margin-top: 0.15rem;
  accent-color: #328ce7;
  flex: 0 0 auto;
}

.emr-consent a {
  color: var(--emr-blue-deep);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.emr-form-submit {
  width: 100%;
  justify-content: center;
  min-height: 52px;
}

.emr-form-error {
  margin: 0 0 1rem;
  padding: 0.9rem 1rem;
  border-radius: 12px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
  font-size: 0.92rem;
}

.emr-form-error[hidden] {
  display: none !important;
}

.emr-form-success {
  padding: 1.5rem;
  border-radius: 16px;
  background: linear-gradient(180deg, #ecfdf5, #f0fdf4);
  border: 1px solid #a7f3d0;
  color: #065f46;
  line-height: 1.65;
  font-size: 1.02rem;
}

.emr-form-honeypot {
  position: absolute !important;
  left: -9999px !important;
  height: 0 !important;
  overflow: hidden !important;
}

@media (max-width: 767.98px) {
  .emr-demo-modal {
    --bs-modal-margin: 0.5rem;
  }

  .emr-demo-modal .modal-dialog-scrollable {
    align-items: flex-start;
  }

  .emr-demo-modal__content {
    border-radius: 14px;
  }

  .emr-demo-modal__header,
  .emr-demo-modal__body {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .emr-form-grid {
    grid-template-columns: 1fr;
  }

  .emr-form-footer {
    padding: 1rem;
  }
}
