.skwphmap {
  --skwphmap-base: #1f5fa8;
  --skwphmap-hover: #e6002d;
  width: 100%;
  margin: 1rem auto 2rem;
  font-family: inherit;
}

.skwphmap-instruction {
  margin: 0 0 1.25rem;
  font-size: 1.05rem;
  line-height: 1.5;
}

.skwphmap-stage {
  position: relative;
  width: 100%;
  max-width: 880px;
  margin: 0 auto;
}

.skwphmap-svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.skwphmap-region {
  outline: none;
  cursor: pointer;
}

.skwphmap-region-shape {
  fill: var(--skwphmap-base);
  stroke: #ffffff;
  stroke-width: 1.35;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
  transition: fill 160ms ease, filter 160ms ease;
}

.skwphmap-region:hover .skwphmap-region-shape,
.skwphmap-region:focus .skwphmap-region-shape,
.skwphmap-region.is-active .skwphmap-region-shape {
  fill: var(--skwphmap-hover);
  filter: brightness(1.02);
}

.skwphmap-region:focus .skwphmap-region-shape {
  stroke: #111827;
  stroke-width: 2.25;
}

.skwphmap-region-label {
  fill: #ffffff;
  stroke: rgba(0, 0, 0, 0.64);
  stroke-width: 1.8px;
  paint-order: stroke fill;
  font-size: 10.5px;
  font-weight: 700;
  font-family: Arial, Helvetica, sans-serif;
  pointer-events: none;
  user-select: none;
}

.skwphmap-region-label--medium {
  font-size: 9.2px;
}

.skwphmap-region-label--long {
  font-size: 8.1px;
}

.skwphmap-tooltip {
  position: absolute;
  z-index: 20;
  min-width: 250px;
  max-width: min(370px, calc(100% - 20px));
  padding: 12px 14px;
  border: 1px solid rgba(17, 24, 39, 0.24);
  border-radius: 10px;
  background: rgba(248, 250, 252, 0.98);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.2);
  color: #111827;
  font-size: 13px;
  line-height: 1.42;
}

.skwphmap-tooltip[hidden],
.skwphmap-modal[hidden],
.skwphmap-point-tooltip[hidden] {
  display: none !important;
}

.skwphmap-tooltip-title {
  margin: 0 0 9px;
  font-size: 17px;
  line-height: 1.2;
  font-weight: 700;
}

.skwphmap-tooltip-hint {
  display: block;
  width: 100%;
  margin: 11px 0 0;
  padding: 9px 0 0;
  border: 0;
  border-top: 1px solid rgba(15, 23, 42, 0.13);
  border-radius: 0;
  background: transparent;
  color: #475569;
  font: inherit;
  font-weight: 600;
  line-height: inherit;
  text-align: left;
  cursor: pointer;
}

.skwphmap-tooltip-hint:hover,
.skwphmap-tooltip-hint:focus-visible {
  color: var(--skwphmap-hover);
  text-decoration: underline;
}

.skwphmap-rep-group + .skwphmap-rep-group {
  margin-top: 11px;
  padding-top: 10px;
  border-top: 1px solid rgba(15, 23, 42, 0.13);
}

.skwphmap-rep-group-title {
  margin-bottom: 7px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #475569;
}

.skwphmap-rep {
  margin-top: 8px;
}

.skwphmap-rep:first-child {
  margin-top: 0;
}

.skwphmap-rep-name {
  display: block;
  margin-bottom: 2px;
  font-weight: 700;
}

.skwphmap-rep-contact {
  display: block;
  color: inherit;
  text-decoration: none;
  word-break: break-word;
}

.skwphmap-rep-contact:hover,
.skwphmap-rep-contact:focus {
  text-decoration: underline;
}

.skwphmap-no-reps {
  margin: 0;
  color: #475569;
}

.skwphmap-empty-message {
  display: none;
}

.skwphmap-attribution {
  display: block;
  max-width: 880px;
  margin: 7px auto 0;
  color: #94a3b8;
  font-size: 9px;
  line-height: 1.2;
  text-align: right;
}

.skwphmap-modal-open body {
  overflow: hidden;
}

.skwphmap-modal {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.skwphmap-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.72);
}

.skwphmap-modal-dialog {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: min(1180px, 96vw);
  max-height: 92vh;
  overflow: hidden;
  border: 1px solid rgba(15, 23, 42, 0.18);
  border-radius: 14px;
  background: #ffffff;
  color: #111827;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}

.skwphmap-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border-bottom: 1px solid #e2e8f0;
}

.skwphmap-modal-title {
  margin: 0;
  font-size: 1.45rem;
  line-height: 1.2;
  font-weight: 700;
}

.skwphmap-modal-subtitle {
  margin-top: 4px;
  color: #64748b;
  font-size: 0.9rem;
}

.skwphmap-modal-close {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid #cbd5e1;
  border-radius: 50%;
  background: #ffffff;
  color: #0f172a;
  font-size: 28px;
  line-height: 36px;
  cursor: pointer;
}

.skwphmap-modal-close:hover,
.skwphmap-modal-close:focus {
  background: #f1f5f9;
}

.skwphmap-modal-body {
  display: grid;
  grid-template-columns: minmax(220px, 285px) minmax(0, 1fr);
  min-height: 0;
  overflow: auto;
}

.skwphmap-modal-sidebar {
  padding: 18px;
  border-right: 1px solid #e2e8f0;
  background: #f8fafc;
}

.skwphmap-modal-section + .skwphmap-modal-section {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid #e2e8f0;
}

.skwphmap-modal-section h3 {
  margin: 0 0 10px;
  font-size: 0.95rem;
  font-weight: 700;
}

.skwphmap-points-status {
  color: #334155;
  font-size: 0.9rem;
  line-height: 1.45;
}

.skwphmap-modal-help {
  margin: 8px 0 0;
  color: #64748b;
  font-size: 0.82rem;
  line-height: 1.4;
}

.skwphmap-detail-wrap {
  position: relative;
  min-width: 0;
  padding: 16px;
  background: #ffffff;
}

.skwphmap-detail-toolbar {
  position: absolute;
  top: 28px;
  right: 28px;
  z-index: 600;
  display: inline-flex;
  gap: 4px;
  padding: 5px;
  border: 1px solid rgba(15, 23, 42, 0.18);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.12);
}

.skwphmap-detail-toolbar button {
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #ffffff;
  color: #0f172a;
  font-weight: 700;
  cursor: pointer;
}

.skwphmap-detail-toolbar button:hover,
.skwphmap-detail-toolbar button:focus {
  background: #f1f5f9;
}

.skwphmap-detail-stage {
  position: relative;
  width: 100%;
  min-height: 610px;
  overflow: hidden;
  border: 1px solid #dbe2ea;
  border-radius: 12px;
  background: #f1f5f9;
}

.skwphmap-leaflet-map {
  width: 100%;
  height: 610px;
  min-height: 610px;
  border-radius: 11px;
  background: #e7edf3;
  font-family: inherit;
}

.skwphmap-leaflet-fallback {
  position: absolute;
  inset: 0;
  z-index: 700;
  display: grid;
  place-items: center;
  padding: 28px;
  background: #f8fafc;
  color: #475569;
  text-align: center;
}

.skwphmap-leaflet-fallback[hidden] {
  display: none !important;
}

.skwphmap .leaflet-container {
  font-family: inherit;
  color: #111827;
}

.skwphmap .leaflet-control-attribution {
  max-width: calc(100% - 12px);
  font-size: 10px;
}

.skwphmap .leaflet-control-attribution a {
  color: #1d4ed8;
}

.skwphmap-leaflet-div-icon {
  border: 0 !important;
  background: transparent !important;
}

.skwphmap-leaflet-pin {
  position: relative;
  width: 38px;
  height: 38px;
  border: 2px solid #ffffff;
  border-radius: 50% 50% 50% 0;
  background: var(--skwphmap-hover);
  box-shadow: 0 3px 9px rgba(15, 23, 42, 0.4);
  transform: rotate(-45deg);
  transform-origin: 50% 50%;
}

.skwphmap-leaflet-pin-disc {
  position: absolute;
  inset: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 50%;
  background: #ffffff;
  transform: rotate(45deg);
}

.skwphmap-leaflet-pin-disc img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 2px;
  background: #ffffff;
}

.skwphmap-leaflet-pin.is-search-focus {
  box-shadow: 0 0 0 4px rgba(250, 204, 21, 0.78), 0 4px 12px rgba(15, 23, 42, 0.48);
}

.skwphmap .marker-cluster-small div,
.skwphmap .marker-cluster-medium div,
.skwphmap .marker-cluster-large div {
  background: var(--skwphmap-hover);
  color: #ffffff;
  font-weight: 800;
}

.skwphmap .marker-cluster-small,
.skwphmap .marker-cluster-medium,
.skwphmap .marker-cluster-large {
  background: color-mix(in srgb, var(--skwphmap-hover) 34%, transparent);
}

@supports not (background: color-mix(in srgb, red 50%, transparent)) {
  .skwphmap .marker-cluster-small,
  .skwphmap .marker-cluster-medium,
  .skwphmap .marker-cluster-large {
    background: rgba(31, 95, 168, 0.3);
  }
}

.skwphmap .leaflet-popup-content-wrapper {
  border-radius: 10px;
}

.skwphmap .leaflet-popup-content {
  min-width: 220px;
  margin: 13px 16px;
}

.skwphmap-leaflet-popup {
  color: #111827;
  font-size: 13px;
  line-height: 1.42;
}

.skwphmap-leaflet-popup-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.skwphmap-leaflet-popup-logo {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  object-fit: contain;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #ffffff;
}

.skwphmap-leaflet-popup-name {
  font-size: 15px;
  line-height: 1.25;
}

.skwphmap-leaflet-popup-address {
  margin-bottom: 6px;
  font-weight: 600;
}

.skwphmap-leaflet-popup-description {
  margin-bottom: 8px;
  color: #475569;
  white-space: pre-line;
}

.skwphmap-leaflet-popup-hours {
  margin-top: 6px;
  color: #475569;
  font-size: 12px;
  line-height: 1.45;
}

.skwphmap-leaflet-popup-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  margin-top: 8px;
  padding-top: 7px;
  border-top: 1px solid #e2e8f0;
}

.skwphmap-leaflet-popup-note {
  margin-top: 8px;
  color: #64748b;
  font-size: 11px;
  font-style: italic;
}

.skwphmap-point-link {
  color: #1d4ed8;
  text-decoration: none;
  word-break: break-word;
}

.skwphmap-point-link:hover,
.skwphmap-point-link:focus {
  text-decoration: underline;
}

@media (max-width: 900px) {
  .skwphmap-modal {
    padding: 10px;
  }

  .skwphmap-modal-dialog {
    width: 98vw;
    max-height: 96vh;
  }

  .skwphmap-modal-body {
    grid-template-columns: 1fr;
  }

  .skwphmap-modal-sidebar {
    border-right: 0;
    border-bottom: 1px solid #e2e8f0;
  }

  .skwphmap-detail-stage,
  .skwphmap-leaflet-map {
    min-height: 500px;
    height: 500px;
  }
}

@media (max-width: 767px), (hover: none) {
  .skwphmap-stage {
    max-width: 620px;
  }

  .skwphmap-tooltip {
    display: none !important;
  }

  .skwphmap-region-label {
    font-size: 9.3px;
  }

  .skwphmap-region-label--medium {
    font-size: 8.2px;
  }

  .skwphmap-region-label--long {
    font-size: 7.2px;
  }
}

@media (max-width: 560px) {
  .skwphmap-modal-header {
    padding: 14px;
  }

  .skwphmap-modal-title {
    font-size: 1.2rem;
  }

  .skwphmap-modal-sidebar,
  .skwphmap-detail-wrap {
    padding: 12px;
  }

  .skwphmap-detail-toolbar {
    top: 22px;
    right: 22px;
  }

  .skwphmap-detail-stage,
  .skwphmap-leaflet-map {
    min-height: 430px;
    height: 430px;
  }
}

.skwphmap-point-cluster {
  cursor: pointer;
  outline: none;
}

.skwphmap-point-cluster-circle {
  fill: var(--skwphmap-hover);
  stroke: #ffffff;
  stroke-width: 0.8;
  vector-effect: non-scaling-stroke;
  filter: drop-shadow(0 1px 1.5px rgba(15, 23, 42, 0.38));
}

.skwphmap-point-cluster-count {
  fill: #ffffff;
  stroke: rgba(0, 0, 0, 0.35);
  stroke-width: 0.35;
  paint-order: stroke fill;
  font-size: 3.2px;
  font-weight: 800;
  font-family: Arial, Helvetica, sans-serif;
  pointer-events: none;
}

.skwphmap-point-cluster:hover .skwphmap-point-cluster-circle,
.skwphmap-point-cluster:focus .skwphmap-point-cluster-circle {
  filter: brightness(1.08) drop-shadow(0 1px 2px rgba(15, 23, 42, 0.5));
}



/* Front search for saved points */
.skwphmap-search {
  position: relative;
  z-index: 20;
  width: min(760px, 100%);
  margin: 0 auto 22px;
}

.skwphmap-search-label {
  display: block;
  margin: 0 0 7px;
  color: #334155;
  font-size: 0.9rem;
  font-weight: 700;
}

.skwphmap-search-control {
  position: relative;
}

.skwphmap-search-input {
  width: 100%;
  min-height: 48px;
  padding: 11px 46px 11px 15px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #ffffff;
  color: #111827;
  font: inherit;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}

.skwphmap-search-input:focus {
  border-color: var(--skwphmap-base);
  outline: 2px solid rgba(31, 95, 168, 0.2);
  outline-offset: 1px;
}

.skwphmap-search-clear {
  position: absolute;
  top: 50%;
  right: 8px;
  width: 34px;
  height: 34px;
  padding: 0;
  transform: translateY(-50%);
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #64748b;
  font-size: 24px;
  line-height: 34px;
  cursor: pointer;
}

.skwphmap-search-clear:hover,
.skwphmap-search-clear:focus {
  background: #f1f5f9;
  color: #0f172a;
}

.skwphmap-search-status {
  min-height: 20px;
  padding: 4px 2px 0;
  color: #64748b;
  font-size: 0.82rem;
}

.skwphmap-search-results {
  position: absolute;
  top: calc(100% - 18px);
  left: 0;
  right: 0;
  z-index: 30;
  max-height: 390px;
  overflow: auto;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.18);
}

.skwphmap-search-result {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 11px 13px;
  border: 0;
  border-bottom: 1px solid #e2e8f0;
  background: #ffffff;
  color: #111827;
  text-align: left;
  cursor: pointer;
}

.skwphmap-search-result:last-child {
  border-bottom: 0;
}

.skwphmap-search-result:hover,
.skwphmap-search-result:focus,
.skwphmap-search-result.is-active {
  background: #f8fafc;
  outline: none;
}

.skwphmap-search-result-logo {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  object-fit: contain;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #ffffff;
}

.skwphmap-search-result-text {
  display: block;
  min-width: 0;
}

.skwphmap-search-result-name,
.skwphmap-search-result-meta {
  display: block;
}

.skwphmap-search-result-name {
  margin-bottom: 3px;
  font-size: 0.95rem;
  line-height: 1.25;
}

.skwphmap-search-result-meta {
  color: #64748b;
  font-size: 0.8rem;
  line-height: 1.35;
}


@media (max-width: 560px) {
  .skwphmap-search {
    margin-bottom: 16px;
  }

  .skwphmap-search-results {
    max-height: 320px;
  }
}

@media (max-width: 767px), (hover: none) {
  .skwphmap[data-enable-points="0"] .skwphmap-tooltip:not([hidden]) {
    display: block !important;
    position: static;
    width: min(100%, 420px);
    max-width: 100%;
    margin: 12px auto 0;
  }
}

.skwphmap-representative-group-icon { width: 24px; height: 24px; object-fit: contain; border-radius: 50%; background: var(--skwphmap-base); padding: 4px; margin-right: 6px; vertical-align: middle; }
.skwphmap-representative-group-label { display: inline-block; margin-left: 7px; padding: 2px 6px; border: 1px solid currentColor; border-radius: 999px; font-size: 11px; line-height: 1.2; opacity: .78; }
.skwphmap-group-legend { display: flex; flex-direction: column; gap: 7px; margin: 10px 0 4px; }
.skwphmap-group-legend-item { display: flex; align-items: center; gap: 7px; cursor: pointer; padding: 5px 7px; border: 1px solid rgba(0,0,0,.12); border-radius: 7px; }
.skwphmap-group-legend-item img { width: 26px; height: 26px; object-fit: contain; border-radius: 50%; background: var(--skwphmap-base); padding: 4px; }
.skwphmap-group-legend-item input { margin: 0; }
.skwphmap-group-legend-item.is-off { opacity: .48; text-decoration: line-through; }
.skwphmap-group-legend-item:focus-within { outline: 2px solid currentColor; outline-offset: 2px; }
