/* ============================================================
   Spoedtandarts Region Page
   Scoped to .spoed-region — no impact on other pages
   Platform design system: navy/teal palette
   ============================================================ */

/* ── Page background on #main-wrapper ────────────── */
.path-spoedtandarts-region #main-wrapper {
  background: #f7fafb !important;
}

/* Hide the Drupal page title — hero has its own h1 */
.path-spoedtandarts-region .page-title,
.path-spoedtandarts-region #block-page-title,
.path-spoedtandarts-region .block-page-title-block,
.path-spoedtandarts-region h1.page-title {
  display: none !important;
}

/* ── Reveal page once this stylesheet has loaded (prevents FOUC) ── */
.spoed-region {
  opacity: 1 !important;
  transition: opacity 0.2s ease;
}

.spoed-region {
  --sr-navy: #0e2a47;
  --sr-teal: #00a9c1;
  --sr-teal-dark: #008ba1;
  --sr-teal-soft: #e6f7fa;
  --sr-ice: #f4f9fb;
  --sr-sky: #eaf4f9;
  --sr-ink: #22303e;
  --sr-muted: #5d6b7a;
  --sr-line: #e3ecf1;
  --sr-red: #e5484d;
  --sr-white: #ffffff;
  --sr-font: 'Poppins', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --sr-radius: 16px;
  --sr-radius-sm: 12px;
  --sr-shadow: 0 2px 10px rgba(14, 42, 71, 0.06);
  --sr-shadow-hover: 0 6px 24px rgba(14, 42, 71, 0.08);
  --sr-transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);

  font-family: var(--sr-font);
  color: var(--sr-ink);
  line-height: 1.6;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px 2rem;
}

/* ── Breadcrumb (matches city-page / practice-page) ── */

.spoed-region ul.breadcrumb {
  background: none !important;
  padding: 14px 0 16px !important;
  margin: 0 !important;
  list-style: none;
  display: flex !important;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0;
  height: auto !important;
  font-size: inherit !important;
  line-height: inherit !important;
}

.spoed-region ul.breadcrumb li {
  font-family: 'Poppins', sans-serif;
  font-size: 0.82rem;
  color: #5d6b7a;
  border-left: none !important;
  position: relative;
}

.spoed-region ul.breadcrumb li::before,
.spoed-region ul.breadcrumb li::after {
  content: none !important;
  border: none !important;
  display: none !important;
}

.spoed-region ul.breadcrumb li:not(:first-child):not(.first)::before {
  content: "\203A" !important;
  display: inline !important;
  position: static !important;
  margin: 0 6px;
  color: #b0bfc9;
  font-size: 0.9rem;
  border: none !important;
}

.spoed-region ul.breadcrumb li a {
  display: inline !important;
  max-width: none !important;
  text-overflow: clip !important;
  overflow: visible !important;
  white-space: normal !important;
  color: #008ba1 !important;
  text-decoration: none !important;
  font-weight: 500;
  font-size: 0.82rem !important;
  line-height: 1.5 !important;
  padding: 0 !important;
  background: none !important;
  border: none !important;
  border-radius: 0 !important;
}

.spoed-region ul.breadcrumb li a:hover {
  text-decoration: underline !important;
}

.spoed-region ul.breadcrumb li.active a,
.spoed-region ul.breadcrumb li:last-child a {
  color: #fff !important;
  font-weight: 600;
  background: #008ba1 !important;
  border-radius: 4px !important;
  padding: 3px 10px !important;
}

/* ── Hero ─────────────────────────────────────────── */

.spoed-region__hero {
  background: linear-gradient(135deg, #1dbdd4 0%, #15afc6 40%, #0ea3ba 100%);
  border-radius: 0;
  padding: 2.25rem 2.5rem 2rem;
  margin: 0 0 2rem;
  color: rgba(255, 255, 255, 0.88);
  width: 100vw;
  margin-left: calc(-50vw + 50%);
  position: relative;
  overflow: hidden;
  text-align: center;
}

.spoed-region__hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='1' opacity='0.04'%3E%3Cpath d='M12 2C8 2 5 5 5 9c0 3 1 5 2 8 1 3 2 5 3 5s2-2 2-5c0 3 1 5 2 5s2-2 3-5c1-3 2-5 2-8 0-4-3-7-7-7z'/%3E%3C/svg%3E");
  background-size: 60px 60px;
  pointer-events: none;
}

.spoed-region__hero-content {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
}

.spoed-region__hero-badge {
  display: inline-flex;
  align-items: center;
  background: var(--sr-red);
  color: var(--sr-white);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 3px 12px;
  border-radius: 50px;
  margin-bottom: 1rem;
}

.spoed-region__hero h1 {
  font-size: 1.7rem;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 0.5rem;
  line-height: 1.25;
}

.spoed-region__hero-badge {
  background: rgba(255, 255, 255, 0.2);
}

.spoed-region__hero-description {
  font-size: 0.925rem;
  color: rgba(255, 255, 255, 0.88);
  line-height: 1.65;
  margin: 0 auto 1.5rem;
  max-width: 640px;
}

.spoed-region__hero-ctas {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
}

.spoed-region__cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--sr-font);
  font-size: 0.95rem;
  font-weight: 600;
  padding: 12px 28px;
  border-radius: 50px;
  text-decoration: none;
  transition: transform var(--sr-transition), box-shadow var(--sr-transition);
  border: 2px solid transparent;
}

.spoed-region__cta svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
}

.spoed-region__cta--primary {
  background: var(--sr-teal);
  color: var(--sr-white) !important;
  box-shadow: 0 4px 16px rgba(0, 169, 193, 0.3);
}

.spoed-region__cta--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 169, 193, 0.4);
  background: var(--sr-teal-dark);
  color: var(--sr-white) !important;
  text-decoration: none;
}

.spoed-region__cta--secondary {
  background: rgba(255, 255, 255, 0.18);
  color: var(--sr-white) !important;
  border: 2px solid var(--sr-white);
}

.spoed-region__cta--secondary:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.25);
  border-color: var(--sr-white);
  color: var(--sr-white) !important;
  text-decoration: none;
}

/* ── Sections ─────────────────────────────────────── */

.spoed-region__section {
  margin-bottom: 2.5rem;
}

.spoed-region__section-title {
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--sr-navy);
  margin: 0 0 1.5rem;
  text-align: center;
}

/* ── Map ──────────────────────────────────────────── */

.spoed-region__map-container {
  position: relative;
  background: var(--sr-white);
  border: 1px solid var(--sr-line);
  border-radius: var(--sr-radius);
  overflow: hidden;
  box-shadow: var(--sr-shadow);
}

#spoed-region-map-canvas {
  width: 100%;
  height: 500px;
}

.spoed-region__map-loading {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--sr-ice);
  gap: 12px;
  z-index: 1;
}

.spoed-region__map-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--sr-line);
  border-top-color: var(--sr-teal);
  border-radius: 50%;
  animation: sr-spin 0.8s linear infinite;
}

@keyframes sr-spin {
  to { transform: rotate(360deg); }
}

.spoed-region__map-loading-text {
  font-size: 0.875rem;
  color: var(--sr-muted);
}

/* ── Emergency Tips Cards ─────────────────────────── */

.spoed-region__tips {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.spoed-region__tip-card {
  display: flex;
  gap: 16px;
  padding: 20px 24px;
  background: var(--sr-white);
  border: 1px solid var(--sr-line);
  border-radius: var(--sr-radius);
  box-shadow: var(--sr-shadow);
  transition: box-shadow var(--sr-transition);
}

.spoed-region__tip-card:hover {
  box-shadow: var(--sr-shadow-hover);
}

.spoed-region__tip-number {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  background: var(--sr-teal);
  color: var(--sr-white);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  margin-top: 2px;
}

.spoed-region__tip-content h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--sr-navy);
  margin: 0 0 0.4rem;
}

.spoed-region__tip-body {
  font-size: 0.9rem;
  color: var(--sr-muted);
  line-height: 1.65;
}

.spoed-region__tip-body p {
  margin: 0 0 0.5rem;
}

.spoed-region__tip-body p:last-child {
  margin-bottom: 0;
}

.spoed-region__tips-footer {
  text-align: center;
  margin-top: 1.5rem;
  margin-left: auto;
  margin-right: auto;
}

.spoed-region__tips-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--sr-teal);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: color var(--sr-transition);
}

.spoed-region__tips-link:hover {
  color: var(--sr-teal-dark);
  text-decoration: underline;
}

.spoed-region__tips-link svg {
  stroke: currentColor;
  fill: none;
}

/* ── Callout Banner ───────────────────────────────── */

.spoed-region__callout {
  background: var(--sr-sky);
  border-left: 4px solid var(--sr-teal);
  border-radius: 0 var(--sr-radius-sm) var(--sr-radius-sm) 0;
  padding: 20px 24px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 2.5rem;
}

.spoed-region__callout-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  background: var(--sr-teal-soft);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.spoed-region__callout-icon svg {
  width: 22px;
  height: 22px;
  stroke: var(--sr-teal);
  fill: none;
  stroke-width: 2;
}

.spoed-region__callout-content h4 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--sr-navy);
  margin: 0 0 0.35rem;
}

.spoed-region__callout-content p {
  font-size: 0.9rem;
  color: var(--sr-muted);
  margin: 0;
  line-height: 1.6;
}

.spoed-region__callout-content a {
  color: var(--sr-teal);
  font-weight: 600;
  text-decoration: none;
}

.spoed-region__callout-content a:hover {
  text-decoration: underline;
}

/* ── Other Regions ────────────────────────────────── */

.spoed-region__other-regions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.spoed-region__other-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  background: var(--sr-white);
  border: 1px solid var(--sr-line);
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--sr-ink);
  text-decoration: none;
  transition: border-color var(--sr-transition), color var(--sr-transition), transform var(--sr-transition), box-shadow var(--sr-transition);
}

.spoed-region__other-link svg {
  stroke: var(--sr-teal);
  fill: none;
}

.spoed-region__other-link:hover {
  border-color: var(--sr-teal);
  color: var(--sr-teal-dark);
  transform: translateY(-2px);
  box-shadow: var(--sr-shadow);
  text-decoration: none;
}

.spoed-region__other-link.is-current {
  background: var(--sr-teal);
  border-color: var(--sr-teal);
  color: var(--sr-white);
}

.spoed-region__other-link.is-current svg {
  stroke: var(--sr-white);
}

/* ── Map Info Card (complete, self-contained) ────── */

.spoed-region .map-info-card {
  padding: 12px;
  min-width: 220px;
  max-width: 300px;
  font-family: var(--sr-font);
}

.spoed-region .map-info-card .title {
  margin-bottom: 4px;
}

.spoed-region .map-info-card .title a {
  font-size: 14px;
  font-weight: 600;
  color: var(--sr-navy) !important;
  text-decoration: none;
  line-height: 1.3;
}

.spoed-region .map-info-card .title a:hover {
  color: var(--sr-teal) !important;
}

.spoed-region .map-info-card .address {
  font-size: 12px;
  color: #666;
  line-height: 1.4;
  margin-bottom: 6px;
}

.spoed-region .map-info-card .phone {
  margin-bottom: 8px;
}

.spoed-region .map-info-card .phone a {
  font-size: 13px;
  color: var(--sr-teal) !important;
  text-decoration: none;
}

.spoed-region .map-info-card .phone--call-tracking a {
  display: inline-flex;
  align-items: center;
}

.spoed-region .map-info-card .well {
  background: #f8f9fa;
  border: none;
  border-radius: 8px;
  padding: 8px 10px;
  margin: 8px 0;
  min-height: unset !important;
}

.spoed-region .map-info-card .totals {
  text-align: center;
  font-size: 13px;
  color: #555;
}

.spoed-region .map-info-card .totals .user span {
  font-weight: 600;
  color: var(--sr-teal) !important;
  font-size: 14px;
}

.spoed-region .map-info-card .go_to_practice {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: 8px 14px;
  margin-top: 8px;
  background: var(--sr-teal) !important;
  color: #fff !important;
  text-align: center;
  text-decoration: none;
  font-family: var(--sr-font);
  font-size: 13px;
  font-weight: 500;
  border-radius: 6px;
  transition: background 0.15s ease;
}

.spoed-region .map-info-card .go_to_practice:hover {
  background: var(--sr-teal-dark) !important;
  color: #fff !important;
  text-decoration: none;
}

.spoed-region .map-info-card--basic .go_to_practice {
  background: #8a929a !important;
}

.spoed-region .map-info-card--basic .go_to_practice:hover {
  background: #5d6470 !important;
}

.spoed-region .map-info-card .map-info-loading {
  padding: 6px 0;
  font-size: 12px;
  color: #888;
  font-style: italic;
}

.spoed-region .gm-style-iw-c {
  border-radius: 10px !important;
  padding: 0 !important;
}

.spoed-region .gm-style-iw-d {
  overflow: auto !important;
  max-height: none !important;
  padding: 0 !important;
}

.spoed-region .gm-style-iw {
  padding: 0 !important;
}

/* ── Practice List Cards ─────────────────────────── */

.spoed-region__practice-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.spoed-region__practice-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding: 20px 24px;
  background: var(--sr-white);
  border: 1px solid var(--sr-line);
  border-radius: var(--sr-radius);
  box-shadow: var(--sr-shadow);
}

.spoed-region__practice-info {
  flex: 1;
  min-width: 0;
}

.spoed-region__practice-info h3 {
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 0.25rem;
}

.spoed-region__practice-info h3 a {
  color: var(--sr-navy);
  text-decoration: none;
  transition: color var(--sr-transition);
}

.spoed-region__practice-info h3 a:hover {
  color: var(--sr-teal);
  text-decoration: underline;
}

.spoed-region__practice-address {
  font-size: 0.85rem;
  color: var(--sr-muted);
  margin: 0 0 0.5rem;
  line-height: 1.5;
}

.spoed-region__practice-status {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 50px;
  line-height: 1.4;
}

.spoed-region__practice-status--open {
  background: #e6f9ed;
  color: #1a7a3a;
}

.spoed-region__practice-status--closed {
  background: #f3f4f6;
  color: var(--sr-muted);
}

.spoed-region__practice-actions {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.spoed-region__practice-map-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  background: var(--sr-white);
  color: var(--sr-teal) !important;
  border: 1px solid var(--sr-teal);
  font-family: var(--sr-font);
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: 50px;
  text-decoration: none !important;
  white-space: nowrap;
  cursor: pointer;
}

.spoed-region__practice-map-link:hover {
  background: var(--sr-teal-soft);
  color: var(--sr-teal-dark) !important;
  border-color: var(--sr-teal-dark);
  text-decoration: none !important;
}

.spoed-region__practice-map-link svg {
  stroke: currentColor;
  fill: none;
  flex-shrink: 0;
}

.spoed-region__practice-call {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  background: var(--sr-teal);
  color: var(--sr-white) !important;
  font-family: var(--sr-font);
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: 50px;
  text-decoration: none !important;
  white-space: nowrap;
}

.spoed-region__practice-call:hover {
  background: var(--sr-teal-dark);
  color: var(--sr-white) !important;
}

.spoed-region__practice-call svg {
  stroke: currentColor;
  fill: none;
  flex-shrink: 0;
}

/* ── Non-collaborator practice cards (grey/muted) ── */

.spoed-region__practice-card--basic {
  background: #f0f2f4;
  border-color: #d3d6da;
  box-shadow: none;
}

.spoed-region__practice-card--basic h3 a {
  color: #4a5568;
}

.spoed-region__practice-card--basic h3 a:hover {
  color: #5d6470;
}

.spoed-region__practice-card--basic .spoed-region__practice-address {
  color: #8a929a;
}

.spoed-region__practice-card--basic .spoed-region__practice-status {
  background: #e8eaed;
  color: #8a929a;
}

.spoed-region__practice-card--basic .spoed-region__practice-map-link {
  color: #8a929a !important;
  border-color: #d3d6da;
}

.spoed-region__practice-card--basic .spoed-region__practice-map-link:hover {
  background: #e8eaed;
  color: #5d6470 !important;
  border-color: #8a929a;
}

/* ── Opening hours toggle ────────────────────────── */

.spoed-region__practice-status--toggle {
  cursor: pointer;
  user-select: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.spoed-region__practice-status--toggle svg {
  stroke: currentColor;
  fill: none;
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.spoed-region__practice-status--toggle.is-expanded svg {
  transform: rotate(180deg);
}

.spoed-region__practice-hours {
  flex-basis: 100%;
  display: none;
  background: #e6f7fa;
  border-radius: 14px;
  padding: 18px;
  margin-top: 4px;
}

.spoed-region__practice-hours.is-visible {
  display: block;
}

.spoed-region__practice-hours h4 {
  font-size: 0.88rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #008ba1;
  margin: 0 0 12px;
  display: flex;
  gap: 0.5rem;
  align-items: center;
  font-family: var(--sr-font);
}

.spoed-region__practice-hours h4 svg {
  flex-shrink: 0;
}

.spoed-region__practice-hours ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.spoed-region__practice-hours li {
  display: flex;
  justify-content: space-between;
  font-size: 0.88rem;
  padding: 0.42rem 0;
  border-bottom: 1px dashed #c4e6ec;
  color: var(--sr-muted);
  font-family: var(--sr-font);
}

.spoed-region__practice-hours li:last-child {
  border-bottom: none;
}

.spoed-region__practice-hours li b {
  font-weight: 600;
  color: var(--sr-navy);
}

.spoed-region__practice-hours li.is-today {
  background: #fff;
  border-radius: 8px;
  padding: 0.42rem 0.6rem;
  border-bottom: none;
  box-shadow: 0 2px 10px rgba(14, 42, 71, 0.06);
}

/* ── Responsive ──────────────────────────────────── */

@media (max-width: 768px) {
  .spoed-region {
    padding: 0 16px;
  }

  .spoed-region__hero {
    padding: 2rem 1.5rem;
  }

  .spoed-region__hero h1 {
    font-size: 1.6rem;
  }

  .spoed-region__hero-description {
    font-size: 0.925rem;
  }

  .spoed-region__hero-ctas {
    flex-direction: column;
  }

  .spoed-region__cta {
    width: 100%;
    justify-content: center;
  }

  .spoed-region__section-title {
    font-size: 1.25rem;
  }

  #spoed-region-map-canvas {
    height: 380px;
  }

  .spoed-region__callout {
    flex-direction: column;
    gap: 12px;
  }

  .spoed-region__tip-card {
    padding: 16px 18px;
  }

  .spoed-region__other-regions {
    gap: 8px;
  }

  .spoed-region__other-link {
    padding: 8px 14px;
    font-size: 0.85rem;
  }

  .spoed-region__practice-card {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 16px 18px;
  }

  .spoed-region__practice-actions {
    flex-direction: column;
    gap: 8px;
  }

  .spoed-region__practice-map-link,
  .spoed-region__practice-call {
    width: 100%;
    justify-content: center;
  }

  .spoed-region__practice-hours {
    padding: 14px;
    border-radius: 12px;
  }

  .spoed-region__practice-hours li {
    font-size: 0.82rem;
  }

  .spoed-region__practice-hours h4 {
    font-size: 0.82rem;
  }
}

@media (max-width: 576px) {
  .spoed-region__hero {
    padding: 1.75rem 1.25rem;
    border-radius: 0;
  }

  .spoed-region__hero h1 {
    font-size: 1.35rem;
  }

  .spoed-region__cta {
    font-size: 0.9rem;
    padding: 11px 22px;
  }

  #spoed-region-map-canvas {
    height: 320px;
  }

  .spoed-region__tip-card {
    flex-direction: column;
    gap: 10px;
  }
}

/* ── Reduced Motion ──────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  .spoed-region__cta,
  .spoed-region__other-link,
  .spoed-region__tip-card,
  .spoed-region__map-spinner {
    transition: none;
    animation: none;
  }
}
