/* Popova Šapka Ski Map -- public-facing styles.
   All classes are prefixed `pssm-` so they don't collide with the active
   theme's own CSS (unlike the standalone demo site, this runs inside an
   arbitrary theme). */

.pssm-hero-layout {
  display: flex;
  align-items: stretch;
  flex-wrap: wrap;
  gap: 0;
  margin: 0 0 32px;
}

.pssm-hero {
  position: relative;
  flex: 0 0 80%;
  min-width: 280px;
  aspect-ratio: 1180 / 499;
  overflow: hidden;
  background: #0b2942;
}

.pssm-hero-media {
  position: absolute;
  inset: 0;
}

.pssm-hero-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.pssm-hero-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(11, 41, 66, 0.35) 0%,
    rgba(11, 41, 66, 0.02) 20%,
    rgba(11, 41, 66, 0.02) 70%,
    rgba(11, 41, 66, 0.5) 100%
  );
  pointer-events: none;
}

.pssm-hero-hotspots {
  position: absolute;
  inset: 0;
}

.pssm-hero-footbar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 12px 20px;
  z-index: 5;
}

.pssm-hero-hint {
  font-family: monospace;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
  border-left: 3px solid #ff6b35;
  padding-left: 10px;
}

/* Hotspots */
.pssm-hotspot {
  position: absolute;
  transform: translate(-50%, -50%);
  z-index: 3;
  text-decoration: none;
}

.pssm-hotspot:hover,
.pssm-hotspot:focus-visible {
  z-index: 20;
}

.pssm-hotspot-dot {
  position: relative;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 3px solid #fff;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(11, 41, 66, 0.5);
  font-family: monospace;
  font-weight: 700;
  font-size: 13px;
  z-index: 2;
}

.pssm-hotspot[data-status="closed"] .pssm-hotspot-dot {
  opacity: 0.55;
}

.pssm-hotspot-label {
  display: none;
  position: absolute;
  left: 100%;
  top: 50%;
  transform: translateY(-50%);
  margin-left: 8px;
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 5px 8px;
  box-shadow: 0 3px 12px rgba(11, 41, 66, 0.35);
  max-width: 170px;
  line-height: 1.2;
  pointer-events: none;
}

.pssm-hotspot:hover .pssm-hotspot-label,
.pssm-hotspot:focus-visible .pssm-hotspot-label {
  display: block;
}

.pssm-hotspot--label-left .pssm-hotspot-label {
  left: auto;
  right: 100%;
  margin-left: 0;
  margin-right: 8px;
}

.pssm-hotspot-label-name {
  display: block;
  font-weight: 700;
  font-size: 11.5px;
  color: #0b2942;
}

.pssm-hotspot-label-meta {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 2px;
}

.pssm-hotspot-label-diff {
  font-family: monospace;
  font-size: 8.5px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.pssm-status-pill {
  font-family: monospace;
  font-size: 8.5px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 1px 5px;
  border-radius: 2px;
  font-weight: 700;
}

.pssm-status-pill--open {
  color: #1f8a44;
  background: rgba(31, 138, 68, 0.12);
}

.pssm-status-pill--closed {
  color: #c0392b;
  background: rgba(192, 57, 43, 0.12);
}

/* Legend -- stretches to match the map's rendered height (see
   align-items: stretch above) and its rows distribute evenly across
   that height (flex column + space-evenly) instead of scrolling when
   there isn't room for all of them at their natural size. */
.pssm-legend-section {
  flex: 0 0 20%;
  min-width: 200px;
  padding: 6px 8px !important;
  background: #f7f9fb;
  border: 1px solid #e3e7eb;
  border-left: none;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Themes routinely style headings/lists/links inside their content area
   (larger heading font-size + margin, list bullets, underlined links) --
   those rules are often more specific than a class selector expects, so
   the box-model properties here are hardened with !important. This isn't
   a style choice, it's the only reliable way a plugin's layout survives
   being dropped into an arbitrary theme. */
.pssm-legend-section h2 {
  font-family: monospace;
  font-size: 10.5px !important;
  font-weight: 400 !important;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #5c7a8c;
  margin: 0 0 4px !important;
  padding: 0 !important;
  line-height: 1.3 !important;
  flex: none;
}

.pssm-legend-list {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
  overflow: hidden;
  min-height: 0;
}

.pssm-legend-list li {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
  border-bottom: 1px solid #e3e7eb;
}

.pssm-legend-list li:last-child {
  border-bottom: none;
}

.pssm-legend-list a {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 2px 0 !important;
  margin: 0 !important;
  text-decoration: none !important;
  color: inherit;
}

.pssm-legend-list a:hover .pssm-legend-name {
  color: #d9531f;
  text-decoration: underline;
}

.pssm-legend-num {
  font-family: monospace;
  font-weight: 700;
  color: #ff6b35;
  font-size: 11.5px;
  min-width: 17px;
}

.pssm-legend-name {
  font-weight: 600;
  font-size: 12.5px;
  flex: 1;
}

.pssm-legend-diff {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex: none;
}

@media (max-width: 720px) {
  .pssm-hero-layout {
    flex-direction: column;
  }
  .pssm-hero {
    flex: none;
    width: 100%;
  }
  .pssm-legend-section {
    flex: none;
    width: 100%;
    height: auto;
    overflow: visible;
    border-left: 1px solid #e3e7eb;
    border-top: none;
    padding: 16px 18px;
  }
  .pssm-legend-section h2 {
    font-size: 12px;
    margin-bottom: 12px;
    padding-bottom: 8px;
  }
  .pssm-legend-list {
    flex: none;
    display: block;
    overflow: visible;
  }
  .pssm-legend-list a {
    padding: 10px 2px;
  }
  .pssm-legend-num {
    font-size: 12px;
  }
  .pssm-legend-name {
    font-size: 13.5px;
  }
}

/* Single piste page additions */
.pssm-eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: monospace;
  margin: 0 0 10px;
}

.pssm-eyebrow-num {
  color: #ff6b35;
  font-weight: 700;
  font-size: 15px;
}

.pssm-eyebrow-diff {
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #fff;
  padding: 3px 10px;
  border-radius: 3px;
  font-weight: 700;
}

.pssm-status-banner {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: monospace;
  font-size: 13px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: 4px;
  margin: 0 0 20px;
}

.pssm-status-banner--open {
  color: #1f8a44;
  background: rgba(31, 138, 68, 0.12);
}

.pssm-status-banner--closed {
  color: #c0392b;
  background: rgba(192, 57, 43, 0.12);
}
