/* ═══════════════════════════════════════════════════════════════════
   Consultation Page — Immersive Full-Screen Layout
   Mirrors the visual style of consulation.html (Aura Clinic reference)
   ═══════════════════════════════════════════════════════════════════ */

/* ── Reset for immersive body ─────────────────────────────────────── */
.sc-immersive-body {
  margin: 0;
  padding: 0;
  overflow: hidden;
  background: #fbf9f5;
}

/* ── Root page: fixed viewport fill ──────────────────────────────── */
.sc-consultation-page {
  position: fixed;
  inset: 0;
  overflow: hidden;
  background: #fbf9f5;
}

/* ── Loading / Error ─────────────────────────────────────────────── */
.sc-loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
}

.sc-error-state {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
  padding: 2rem;
  text-align: center;
}

/* ── Soft dot-grid background texture ────────────────────────────── */
.sc-soft-texture {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(#d0c5af 0.7px, transparent 0.7px);
  background-size: 32px 32px;
  opacity: 0.35;
  pointer-events: none;
  z-index: 0;
}

/* ── Main canvas: full-screen container ──────────────────────────── */
.sc-consultation-canvas {
  position: absolute;
  inset: 0;
}

.sc-consultation-page--background-paused .sc-consultation-canvas,
.sc-consultation-page--background-paused .sc-consultation-canvas * {
  animation-play-state: paused !important;
  transition: none !important;
}

.sc-consultation-page--background-paused .sc-body-map-tooltip {
  opacity: 0 !important;
}

/* ── Image centre: fills viewport, centres the image element ─────── */
.sc-canvas-center {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
  pointer-events: none; /* let SVG polygons receive events */
}

/* ── Image wrapper: sized to the image so SVG aligns exactly ─────── */
.sc-image-wrapper {
  position: relative;
  display: inline-block;
  line-height: 0;
  pointer-events: auto;
}

/* ── Body image with CSS fade transition ─────────────────────────── */
.sc-body-image {
  max-height: 84vh;
  max-width: 100%;
  object-fit: contain;
  mix-blend-mode: multiply;
  display: block;
}

.sc-body-image.sc-fade-hidden {
  opacity: 0;
  transform: scale(1.02) translateY(12px);
  pointer-events: none;
  transition: none; /* instant hide */
}

.sc-body-image.sc-fade-visible {
  opacity: 1;
  transform: scale(1) translateY(0);
  pointer-events: auto;
  transition:
    opacity var(--sc-consultation-image-fade-ms, 510ms) cubic-bezier(0.4, 0, 0.2, 1),
    transform var(--sc-consultation-image-fade-ms, 510ms) cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── SVG overlay: spans the wrapper (= image size) ──────────────── */
.sc-svg-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: auto;
  overflow: visible;
}

/* ── Body-map area groups ─────────────────────────────────────────── */
.sc-body-map-area {
  cursor: pointer;
  outline: none;
}

/* ── Hotspot polygon fills ────────────────────────────────────────── */
.sc-hotspot {
  cursor: pointer;
  pointer-events: all;
  transition:
    fill var(--sc-consultation-hotspot-transition-ms, 350ms) ease,
    stroke var(--sc-consultation-hotspot-transition-ms, 350ms) ease,
    opacity var(--sc-consultation-hotspot-transition-ms, 350ms) ease;
}

.sc-hotspot-tech-grid {
  fill: url("#sc-hotspot-tech-grid-pattern");
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--sc-consultation-grid-transition-ms, 350ms) ease;
  shape-rendering: crispEdges;
}

.sc-hotspot-tech-grid__line {
  stroke: rgba(100, 255, 218, 0.46);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.sc-hotspot--nav {
  fill: rgba(100, 255, 218, 0.02);
  stroke: rgba(100, 255, 218, var(--sc-polygon-nav-stroke-alpha, 0.22));
  stroke-width: 0.4;
}

.sc-body-map-area:hover .sc-hotspot--nav,
.sc-body-map-area:focus-visible .sc-hotspot--nav {
  fill: rgba(100, 255, 218, 0.04);
  stroke: rgba(100, 255, 218, var(--sc-polygon-nav-hover-stroke-alpha, 0.72));
}

.sc-hotspot--detail {
  fill: rgba(100, 255, 218, 0.025);
  stroke: rgba(100, 255, 218, var(--sc-polygon-detail-stroke-alpha, 0.32));
  stroke-width: 0.4;
  stroke-dasharray: 2 1;
}

.sc-body-map-area:hover .sc-hotspot--detail,
.sc-body-map-area:focus-visible .sc-hotspot--detail {
  fill: rgba(100, 255, 218, 0.05);
  stroke: rgba(100, 255, 218, var(--sc-polygon-detail-hover-stroke-alpha, 0.86));
}

.sc-body-map-area:hover .sc-hotspot-tech-grid,
.sc-body-map-area:focus-visible .sc-hotspot-tech-grid {
  opacity: 0.86;
}

/* ── Body-map hint text ───────────────────────────────────────────── */
.sc-body-map-hint {
  position: absolute;
  bottom: -1.6rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.7rem;
  color: rgba(115, 92, 0, 0.4);
  pointer-events: none;
  white-space: nowrap;
  letter-spacing: 0.04em;
}

/* ── Card-grid (no-picture / no-polygon mode) ────────────────────── */
.sc-stage-grid {
  position: absolute;
  inset: 0;
  padding: 4rem 3rem 6rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-content: center;
  justify-content: center;
  overflow-y: auto;
  z-index: 10;
}

.sc-card-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(255, 255, 255, 0.62);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(208, 197, 175, 0.35);
  border-radius: 0.75rem;
  padding: 0;
  cursor: pointer;
  width: 155px;
  overflow: hidden;
  text-align: center;
  transition:
    border-color var(--sc-consultation-control-transition-ms, 250ms) ease,
    box-shadow var(--sc-consultation-control-transition-ms, 250ms) ease,
    transform var(--sc-consultation-control-transition-ms, 250ms) ease;
}

.sc-card-item:hover {
  border-color: rgba(115, 92, 0, 0.42);
  box-shadow: 0 6px 22px rgba(115, 92, 0, 0.11);
  transform: translateY(-3px);
}

.sc-card-image {
  width: 100%;
  height: 115px;
  overflow: hidden;
  background: rgba(248, 245, 239, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
}

.sc-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  mix-blend-mode: multiply;
}