/* =========================================================
   uNITE SLEEP INSTITUTE — NEXTPATIENT SCHEDULING
   ---------------------------------------------------------
   Dark theme, built on the site palette in ../styles.css.
   Everything is namespaced under .np- so it cannot leak
   into the rest of the site. When a layout is approved,
   lift its block into styles.css and delete the rest.
   ========================================================= */


/* =========================================================
   1. SHARED — used by all three options
   ========================================================= */

/* Compact page header. Replaces the tall wave hero so the
   widget can sit above the fold, per NextPatient's guidance. */
.np-pagehero {
  position: relative;
  padding: 7.5rem 1rem 0;
  background: linear-gradient(180deg, #0b0518 0%, var(--dark-tertiary) 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.np-pagehero .np-container {
  padding-bottom: 2rem;
}

/* The review bar already clears the fixed header on the
   example pages, so the hero does not need to as well. */
.np-reviewbar + .np-pagehero {
  padding-top: 2.5rem;
}

.np-section {
  padding: 2.5rem 1rem 4.5rem;
}

.np-container {
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
}

.np-head {
  text-align: center;
  max-width: 46rem;
  margin: 0 auto;
}

.np-eyebrow {
  color: var(--teal);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.np-head h1 {
  margin: 0 0 0.9rem;
  font-size: 2.75rem;
  line-height: 1.15;
  font-weight: 700;
  color: var(--white);
}

.np-intro {
  margin: 0;
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--gray-300);
}

/* --- Location icon ------------------------------------- */
.np-icon {
  width: 3rem;
  height: 3rem;
  flex: 0 0 3rem;
  border-radius: 50%;
  background: rgba(78, 205, 196, 0.12);
  border: 1px solid rgba(78, 205, 196, 0.28);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  line-height: 1;
}

/* --- Buttons ------------------------------------------- */
.np-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: var(--teal);
  color: var(--dark-bg);
  border: none;
  padding: 0.75rem 1.75rem;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  border-radius: 0.375rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.np-btn:hover {
  background: var(--teal-hover);
  color: var(--white);
}

.np-btn-ghost {
  background: transparent;
  color: var(--purple);
  border: 1px solid var(--purple);
  font-weight: 600;
}

.np-btn-ghost:hover {
  background: var(--purple);
  color: var(--black);
}

/* --- Widget surface ------------------------------------
   The NextPatient widget renders its own light UI, so it
   gets a light panel inside the dark card. This keeps the
   scheduler legible without fighting the vendor's markup. */
.np-widget {
  width: 100%;
  background: var(--white);
  color: #1d2d3d;
  border-radius: 0.625rem;
  padding: 1.25rem;
  min-height: 8rem;
}

.np-widget > div {
  width: 100%;
}

/* Direct link to NextPatient's hosted page, in case the
   embedded script is blocked or fails to load. */
.np-fallback {
  margin: 0.85rem 0 0;
  font-size: 0.8125rem;
  color: var(--gray-400);
  text-align: center;
}

.np-fallback a {
  color: var(--teal);
  border-bottom: 1px solid rgba(78, 205, 196, 0.4);
}

.np-fallback a:hover {
  color: var(--purple);
}

/* --- Help note ----------------------------------------- */
.np-note {
  margin: 2.75rem auto 0;
  max-width: 46rem;
  background: rgba(192, 131, 186, 0.08);
  border: 1px solid rgba(192, 131, 186, 0.25);
  border-radius: 0.75rem;
  padding: 1.25rem 1.5rem;
  text-align: center;
}

.np-note p {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--gray-300);
}

.np-note strong {
  color: var(--white);
}

.np-note a {
  color: var(--teal);
  font-weight: 700;
}


/* =========================================================
   2. OPTION 1 — all three widgets stacked, always visible
   ========================================================= */

.np-o1-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.75rem;
  margin-top: 2.5rem;
}

.np-o1-card {
  background: var(--dark-card);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0.875rem;
  padding: 1.75rem 2rem 2rem;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
  transition: border-color 0.25s ease, transform 0.25s ease;
}

.np-o1-card:hover {
  border-color: rgba(78, 205, 196, 0.35);
  transform: translateY(-2px);
}

.np-o1-head {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.np-o1-head h2 {
  margin: 0 0 0.2rem;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--white);
}

.np-o1-head p {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--gray-400);
}


/* =========================================================
   3. OPTION 2 — accordion, one location open at a time
   ========================================================= */

.np-o2-list {
  margin-top: 2.5rem;
  display: grid;
  gap: 1rem;
}

.np-o2-item {
  background: var(--dark-card);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0.875rem;
  overflow: hidden;
  transition: border-color 0.25s ease;
}

.np-o2-item.is-open {
  border-color: rgba(78, 205, 196, 0.4);
}

.np-o2-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: transparent;
  border: none;
  padding: 1.35rem 1.75rem;
  font-family: inherit;
  color: var(--white);
  cursor: pointer;
  text-align: left;
  transition: background 0.25s ease;
}

.np-o2-toggle:hover {
  background: rgba(255, 255, 255, 0.03);
}

.np-o2-label {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.np-o2-name {
  display: block;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--white);
}

.np-o2-desc {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.875rem;
  color: var(--gray-400);
}

.np-o2-arrow {
  flex: 0 0 auto;
  width: 0.65rem;
  height: 0.65rem;
  border-right: 2px solid var(--teal);
  border-bottom: 2px solid var(--teal);
  transform: rotate(45deg);
  transition: transform 0.25s ease;
}

.np-o2-item.is-open .np-o2-arrow {
  transform: rotate(-135deg);
}

.np-o2-panel {
  display: none;
  padding: 0 1.75rem 1.75rem;
}

.np-o2-item.is-open .np-o2-panel {
  display: block;
}


/* =========================================================
   4. OPTION 3 — BestMind-style cards, click to reveal
   ========================================================= */

.np-o3-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 2.5rem;
}

.np-o3-card {
  background: var(--dark-card);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0.875rem;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  text-align: center;
  transition: border-color 0.25s ease, transform 0.25s ease;
}

.np-o3-card:hover {
  border-color: rgba(78, 205, 196, 0.35);
  transform: translateY(-3px);
}

.np-o3-card.is-active {
  border-color: var(--teal);
}

.np-o3-visual {
  height: 7.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(192, 131, 186, 0.22), rgba(78, 205, 196, 0.18));
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 2.25rem;
}

.np-o3-body {
  padding: 1.5rem 1.5rem 1.75rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.np-o3-body h2 {
  margin: 0 0 0.5rem;
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--white);
}

.np-o3-body p {
  margin: 0 0 1.5rem;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--gray-400);
  flex: 1;
}

/* Revealed scheduler drawer, full width below the grid */
.np-o3-drawer {
  display: none;
  grid-column: 1 / -1;
  background: var(--dark-card);
  border: 1px solid var(--teal);
  border-radius: 0.875rem;
  padding: 1.75rem 2rem 2rem;
}

.np-o3-drawer.is-open {
  display: block;
}

.np-o3-drawer-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.np-o3-drawer-head h3 {
  margin: 0 0 0.25rem;
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--white);
}

.np-o3-drawer-head p {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--gray-400);
}

.np-o3-close {
  flex: 0 0 auto;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--gray-300);
  border-radius: 0.375rem;
  padding: 0.4rem 0.9rem;
  font-family: inherit;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.25s ease;
}

.np-o3-close:hover {
  border-color: var(--purple);
  color: var(--purple);
}

/* Each drawer holds one widget; all three are in the DOM at
   load so the vendor scripts initialize while visible-width
   is known, then are hidden. Prevents mis-measured layout. */
.np-o3-panel {
  display: none;
}

.np-o3-panel.is-active {
  display: block;
}


/* =========================================================
   5. REVIEW BAR — example pages only, remove before launch
   ========================================================= */

.np-reviewbar {
  position: relative;
  z-index: 900;
  /* Clears the fixed .header (2.5rem logo + 1.5rem padding + border) */
  margin-top: 4.5rem;
  background: rgba(192, 131, 186, 0.12);
  border-bottom: 1px solid rgba(192, 131, 186, 0.3);
  padding: 0.75rem 1rem;
  text-align: center;
  font-size: 0.875rem;
  color: var(--gray-300);
}

.np-reviewbar a {
  display: inline-block;
  margin: 0 0.2rem;
  padding: 0.3rem 0.85rem;
  border-radius: 0.3rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: var(--gray-200);
}

.np-reviewbar a:hover {
  border-color: var(--teal);
  color: var(--teal);
}

.np-reviewbar a.is-current {
  background: var(--teal);
  border-color: var(--teal);
  color: var(--dark-bg);
  font-weight: 700;
}


/* =========================================================
   6. RESPONSIVE
   ========================================================= */

@media (max-width: 900px) {
  .np-o3-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .np-pagehero {
    padding-top: 6rem;
  }

  .np-reviewbar + .np-pagehero {
    padding-top: 1.75rem;
  }

  .np-head h1 {
    font-size: 2rem;
  }

  .np-intro {
    font-size: 1rem;
  }

  .np-section {
    padding: 2rem 1rem 3rem;
  }

  .np-o1-card,
  .np-o3-drawer {
    padding: 1.25rem 1.1rem 1.5rem;
  }

  .np-o2-toggle,
  .np-o2-panel {
    padding-left: 1.1rem;
    padding-right: 1.1rem;
  }

  .np-widget {
    padding: 0.85rem;
  }

  .np-btn {
    width: 100%;
  }
}
