/* ============================================================
   SALA Interactive Map — Component Styles (sala-imap.css)
   ============================================================ */

/* ── Container ───────────────────────────────────────────── */
.smap-wrap {
  position: relative;
  width: 100%;
  height: 72vh;
  min-height: 480px;
  background: #1a1410;
  overflow: hidden;
}

.smap-wrap.is-fullscreen { height: 100vh !important; }

/* ── Viewport (pan/zoom scrollable area) ────────────────── */
.smap-viewport {
  width: 100%; height: 100%;
  overflow: hidden !important;
  cursor: grab;
  user-select: none;
  -webkit-user-drag: none;
}
.smap-viewport:active { cursor: grabbing; }

/* ── Map canvas (zoom wrapper) ──────────────────────────── */
.smap-canvas {
  position: relative;
  display: block;
  width: 100%;
  min-width: 1200px;
  transform-origin: top left;
}

/* ── Background images ──────────────────────────────────── */
.smap-bg-img {
  width: 100%; height: auto; display: block;
  pointer-events: none;
  user-select: none;
  filter: contrast(1.1) sepia(.08);
}

/* ── SVG + HTML overlay layers ──────────────────────────── */
.smap-svg-layer {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 2;
}

.smap-html-layer {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 3;
}

/* ── Dot pins ───────────────────────────────────────────── */
.smap-dot-pin {
  position: absolute;
  transform: translate(-50%, -50%);
  cursor: pointer;
  pointer-events: auto;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform .3s ease;
}
.smap-dot-pin:hover { transform: translate(-50%, -50%) scale(1.2); z-index: 20; }

.smap-pulse {
  position: absolute;
  width: 100%; height: 100%;
  border-radius: 50%;
  opacity: .65;
  animation: smapPing 2.5s cubic-bezier(0,0,.2,1) infinite;
}
@keyframes smapPing {
  0%   { transform: scale(1);   opacity: .65; }
  75%  { transform: scale(2.2); opacity: 0; }
  100% { transform: scale(2.2); opacity: 0; }
}

.smap-core {
  position: relative;
  width: 58%; height: 58%;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,.9);
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 500;
  box-shadow: 0 2px 6px rgba(0,0,0,.35);
}

.smap-hotspot { pointer-events: none; }

/* ── Shape group ────────────────────────────────────────── */
.smap-shape-group { transition: all .3s ease; }
.smap-shape-group:hover polygon,
.smap-shape-group:hover polyline { filter: brightness(1.45); cursor: pointer; }

/* ── Animations ─────────────────────────────────────────── */
.sanim-flow {
  stroke-dasharray: 5 5 !important;
  animation: smapFlow 3s linear infinite !important;
}
.sanim-flow-hover {
  stroke-dasharray: 5 5 !important;
}
.smap-shape-group:hover .sanim-flow-hover {
  animation: smapFlow 3s linear infinite !important;
}
@keyframes smapFlow {
  from { stroke-dashoffset: 10; }
  to   { stroke-dashoffset: 0;  }
}

.sanim-pulse {
  animation: smapPolyPulse 2.5s infinite alternate ease-in-out !important;
}
.sanim-pulse-hover { transition: fill-opacity .3s; }
.smap-shape-group:hover .sanim-pulse-hover {
  animation: smapPolyPulse 1s infinite alternate ease-in-out !important;
}
@keyframes smapPolyPulse {
  0%   { fill-opacity: .2; }
  100% { fill-opacity: .65; }
}

/* ── Label / Logo / Card overlays ───────────────────────── */
.smap-label {
  position: absolute;
  pointer-events: none;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.smap-label-wrap,
.smap-logo-wrap,
.smap-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: auto;
  cursor: pointer;
  transition: transform .25s ease;
}
.smap-label-wrap:hover,
.smap-logo-wrap:hover,
.smap-card:hover { transform: scale(1.08); }

.smap-label-text {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .04em;
  white-space: nowrap;
  text-shadow: 0 0 4px #fff, 0 0 8px #fff, 0 0 12px #fff;
}

.smap-logo-wrap img {
  height: 36px; width: auto;
  margin-bottom: 4px;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,.4));
  pointer-events: none;
}
.smap-logo-wrap span {
  font-size: 10px;
  font-weight: 700;
  background: rgba(255,255,255,.75);
  padding: 2px 8px;
  border-radius: 100px;
  white-space: nowrap;
  backdrop-filter: blur(4px);
  color: #3D312A;
}

.smap-card {
  background: rgba(255,255,255,.92);
  border-radius: 6px;
  padding: 6px;
  width: 120px;
  box-shadow: 0 4px 20px rgba(0,0,0,.25);
}
.smap-card img {
  width: 100%; height: 72px;
  object-fit: cover; border-radius: 4px;
  pointer-events: none;
}
.smap-card span {
  font-size: 10px; font-weight: 700;
  color: #3D312A; text-align: center;
  margin-top: 4px; line-height: 1.3;
  pointer-events: none;
}

.smap-tag {
  font-size: 9px; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: #fff;
  padding: 2px 7px; margin-bottom: 4px;
  border-radius: 2px;
  pointer-events: none;
}

/* ── Controls (top corners) ─────────────────────────────── */
.smap-controls {
  position: absolute;
  top: 16px; right: 16px;
  z-index: 40;
  display: flex; flex-direction: column; gap: 8px;
}
.smap-ctrl-btn {
  width: 40px; height: 40px;
  background: rgba(61,49,42,.88);
  backdrop-filter: blur(8px);
  border: none; border-radius: 50%;
  color: #EADCC2;
  font-size: 18px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s, color .2s;
  box-shadow: 0 2px 8px rgba(0,0,0,.3);
}
.smap-ctrl-btn:hover { background: #BC8E49; color: #fff; }

/* ── Sidebar ─────────────────────────────────────────────── */
.smap-sidebar {
  position: absolute;
  top: 0; left: 0;
  height: 100%; width: 300px;
  max-width: 88vw;
  background: rgba(234,220,194,.97);
  backdrop-filter: blur(16px);
  border-right: 1px solid rgba(61,49,42,.08);
  box-shadow: 8px 0 32px rgba(0,0,0,.2);
  transform: translateX(-100%);
  transition: transform .4s cubic-bezier(.4,0,.2,1);
  z-index: 50;
  display: flex; flex-direction: column;
}
.smap-sidebar.is-open { transform: translateX(0); }

.smap-sidebar-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(61,49,42,.1);
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.05rem; font-weight: 600;
  color: #3D312A;
}
.smap-sidebar-close {
  background: none; border: none; cursor: pointer;
  font-size: 1.4rem; color: #3D312A; opacity: .5;
  line-height: 1; padding: 0;
}
.smap-sidebar-close:hover { opacity: 1; color: #C82254; }

.smap-filters {
  display: flex; flex-wrap: wrap; gap: 6px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(61,49,42,.08);
  background: rgba(61,49,42,.03);
}
.smap-filter {
  padding: 4px 12px; border-radius: 100px;
  font-size: 10px; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase;
  cursor: pointer;
  background: transparent;
  border: 1px solid rgba(61,49,42,.25);
  color: rgba(61,49,42,.65);
  transition: all .2s;
}
.smap-filter.active,
.smap-filter:hover {
  background: #3D312A;
  color: #EADCC2;
  border-color: #3D312A;
}

.smap-list {
  flex: 1; overflow-y: auto; padding: 12px;
}

.smap-sb-group { margin-bottom: 10px; }
.smap-sb-cat {
  font-size: 10px; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: #BC8E49;
  padding: 8px 12px 4px;
}
.smap-sb-cat span { opacity: .6; font-weight: 400; }
.smap-sb-item {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 12px; border-radius: 6px; cursor: pointer;
  transition: background .15s;
}
.smap-sb-item:hover { background: rgba(61,49,42,.07); }
.smap-sb-dot {
  width: 10px; height: 10px; border-radius: 50%;
  flex-shrink: 0; margin-top: 4px;
}
.smap-sb-item strong {
  font-size: .82rem; color: #3D312A; display: block;
  font-family: 'Cormorant Garamond', Georgia, serif;
}
.smap-sb-item span {
  font-size: .65rem; color: rgba(61,49,42,.5);
  letter-spacing: .05em; text-transform: uppercase;
}

.smap-empty {
  font-size: .82rem; color: rgba(61,49,42,.4);
  font-style: italic; text-align: center;
  padding: 24px 0;
}

/* ── Breadcrumb ─────────────────────────────────────────── */
.smap-breadcrumb {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-size: 11px; letter-spacing: .16em; text-transform: uppercase;
  color: #EADCC2;
}
.smap-bc-btn {
  background: none; border: none; cursor: pointer;
  color: rgba(234,220,194,.65); font: inherit;
  transition: color .2s;
}
.smap-bc-btn:hover { color: #BC8E49; }
.smap-bc-sep { opacity: .35; }
.smap-bc-cur { color: #BC8E49; font-weight: 700; }

/* ── Tooltip ─────────────────────────────────────────────── */
.smap-tooltip {
  position: fixed; z-index: 9999;
  background: rgba(61,49,42,.95);
  color: #EADCC2;
  font-size: 11px; letter-spacing: .12em;
  padding: 6px 12px; border-radius: 4px;
  pointer-events: none;
  opacity: 0; transition: opacity .2s;
  backdrop-filter: blur(4px);
  box-shadow: 0 2px 12px rgba(0,0,0,.35);
  white-space: nowrap;
}

/* ── Detail Modal ────────────────────────────────────────── */
.smap-modal {
  display: none;
  position: fixed; inset: 0; z-index: 100;
  align-items: center; justify-content: center;
  background: rgba(0,0,0,.78);
  backdrop-filter: blur(8px);
  opacity: 0; transition: opacity .35s;
}
.smap-modal.is-open    { display: flex; }
.smap-modal.is-visible { opacity: 1; }
.smap-modal.is-visible .smap-modal-inner { transform: scale(1); }

.smap-modal-inner {
  background: #EADCC2;
  width: 90%; max-width: 480px;
  overflow: hidden;
  transform: scale(.93);
  transition: transform .35s cubic-bezier(.2,.8,.2,1);
  box-shadow: 0 32px 80px rgba(0,0,0,.4);
}

.smap-modal-img {
  position: relative; height: 240px;
}
.smap-modal-img img {
  width: 100%; height: 100%; object-fit: cover;
  filter: contrast(1.08);
}
.smap-modal-close {
  position: absolute; top: 12px; right: 12px;
  background: rgba(61,49,42,.55); color: #fff;
  border: none; width: 32px; height: 32px;
  font-size: 1.2rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s;
}
.smap-modal-close:hover { background: #C82254; }

.smap-modal-tag {
  position: absolute; top: 14px; left: 14px;
  font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .12em;
  color: #fff; padding: 3px 10px;
}

.smap-modal-body {
  padding: 28px 32px 32px;
}
.smap-modal-header {
  display: flex; align-items: flex-start; gap: 16px;
  margin-bottom: 14px;
}
.smap-modal-logo {
  height: 40px; width: auto; flex-shrink: 0;
}
.smap-modal-header small {
  font-size: 10px; letter-spacing: .18em;
  text-transform: uppercase; color: #BC8E49;
  font-weight: 700; display: block; margin-bottom: 4px;
}
.smap-modal-header h3 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.8rem; font-weight: 400;
  color: #3D312A; line-height: 1.1; margin: 0;
}
.smap-modal-body > p {
  font-size: .88rem; line-height: 1.75;
  color: rgba(61,49,42,.75);
  margin-bottom: 18px;
}
.smap-modal-cta {
  display: inline-block;
  font-size: 11px; font-weight: 700;
  letter-spacing: .16em; text-transform: uppercase;
  color: #C82254;
  border-bottom: 1px solid #C82254;
  padding-bottom: 2px;
  text-decoration: none;
  transition: color .2s, border-color .2s;
}
.smap-modal-cta:hover { color: #3D312A; border-color: #3D312A; }
.smap-modal-cta--dim { color: rgba(61,49,42,.35); border-color: rgba(61,49,42,.2); }

/* ── Rail (full-page map sidebar) ───────────────────────── */
.smap-rail {
  position: absolute; top: 0; left: 0;
  height: 100%; width: 72px;
  background: #BC8E49;
  z-index: 30;
  display: flex; flex-direction: column;
  align-items: center;
  padding: 16px 0; gap: 4px;
  overflow-y: auto;
}
.smap-rail-btn {
  width: 100%; padding: 12px 4px;
  background: transparent; border: none; cursor: pointer;
  display: flex; flex-direction: column;
  align-items: center; gap: 4px;
  font-size: 10px; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase;
  color: rgba(61,49,42,.75);
  transition: background .2s, color .2s;
  border-radius: 4px;
}
.smap-rail-btn span { font-size: 18px; }
.smap-rail-btn small { line-height: 1.2; text-align: center; }
.smap-rail-btn:hover,
.smap-rail-btn.active {
  background: rgba(255,255,255,.2);
  color: #3D312A;
}

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 768px) {
  .smap-wrap { height: 55vw; min-height: 300px; }
  .smap-sidebar { width: 100%; max-width: 100%; top: auto; bottom: 0; height: 60vh;
    transform: translateY(100%); border-right: none; border-top: 1px solid rgba(61,49,42,.1); }
  .smap-sidebar.is-open { transform: translateY(0); }
  .smap-label-text { font-size: 9px; }
  .smap-card { width: 90px; }
  .smap-card img { height: 52px; }
}
