/* ============================================================
   oko-na-sztuke — Map Shortcode Styles
   Prefix: .oko-map-
   ============================================================ */

.oko-map-wrap {
  width: 100%;
  font-family: ui-sans-serif, system-ui, -apple-system, sans-serif;
}

/* ── Search / Category bar ──────────────────────────────── */

.oko-map-bar {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
}

.oko-map-search-wrap {
  position: relative;
  flex: 1;
}

.oko-map-search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #b0b0ba;
  pointer-events: none;
}

#oko-map-search.oko-map-search-input {
  width: 100%;
  height: 50px;
  padding: 0 16px 0 46px;
  background: #fff;
  border: 1.5px solid rgba(0, 0, 0, 0.1);
  border-radius: 12px;
  font-size: 14px;
  color: #030213;
  outline: none;
  box-sizing: border-box;
  font-family: inherit;
  transition: border-color 0.15s;
}

.oko-map-search-input:focus {
  border-color: #9810fa;
}

.oko-map-search-input::placeholder {
  color: #b0b0ba;
}

/* ── Technique chips ────────────────────────────────────── */

.oko-map-chips-wrap {
  margin-bottom: 16px;
}

.oko-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.oko-chip-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border: 1.5px solid rgba(0, 0, 0, 0.12);
  border-radius: 0.5rem;
  background: #fff;
  color: #717182;
  font-size: 12.5px;
  font-weight: 400;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  user-select: none;
  transition: border-color 0.12s, background 0.12s, color 0.12s;
}

.oko-chip-btn:hover {
  border-color: rgba(139, 0, 255, 0.35);
  background: #fff;
  color: #030213;
}

.oko-chip-btn:focus{
  background: #fff;
  color: #717182;
  border: 1.5px solid rgba(0, 0, 0, 0.12);
}

.oko-chip-btn.is-active {
  background: #9810fa;
  border-color: #9810fa;
  color: #fff;
  font-weight: 500;
}

.oko-chip-btn.is-active:hover {
  background: #7200d0;
  border-color: #7200d0;
}

.oko-chip-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.07);
  color: #717182;
  font-size: 10px;
  font-weight: 600;
  padding: 0 4px;
  flex-shrink: 0;
}

.oko-chip-btn.is-active .oko-chip-badge {
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
}

/* ── Two-column body ────────────────────────────────────── */

.oko-map-body {
  display: flex;
  gap: 20px;
  align-items: stretch;
}

.oko-map-col-map {
  flex: 0 0 65%;
  min-width: 0;
}

.oko-map-col-panel {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 16px;
  overflow: hidden;
}

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

.oko-map-container {
  width: 100%;
  border-radius: 16px;
  overflow: hidden;
}

/* ── Right panel ────────────────────────────────────────── */

.oko-map-panel-header {
  padding: 18px 20px 14px;
  font-size: 16px;
  font-weight: 700;
  color: #030213;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  flex-shrink: 0;
}

.oko-map-panel-list {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
  padding: 12px;
}

.oko-map-panel-list::-webkit-scrollbar {
  width: 4px;
}

.oko-map-panel-list::-webkit-scrollbar-track {
  background: transparent;
}

.oko-map-panel-list::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.12);
  border-radius: 4px;
}

/* ── List cards ─────────────────────────────────────────── */

.oko-map-list-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 0.75rem;
  background: #fff;
  margin-bottom: 8px;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
  text-decoration: none;
  color: inherit;
}

.oko-map-list-item:last-child {
  margin-bottom: 0;
}

.oko-map-list-item:hover {
  border-color: rgba(139, 0, 255, 0.3);
  box-shadow: 0 2px 8px rgba(139, 0, 255, 0.07);
}

.oko-map-list-item.is-active {
  border: 1.5px solid #9810fa;
  background: rgba(139, 0, 255, 0.06);
}

.oko-map-list-thumb {
  width: 80px;
  height: 80px;
  border-radius: 0.5rem;
  overflow: hidden;
  flex-shrink: 0;
  background: #f0f0f8;
  display: flex;
  align-items: center;
  justify-content: center;
}

.oko-map-list-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.oko-map-list-thumb-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #c8c8d8;
}

.oko-map-list-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  justify-content: center;
}

.oko-map-list-name {
  font-size: 14px;
  margin-bottom: 0px !important;
  font-weight: 600;
  color: #030213;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding-bottom: 0px;
}

.oko-map-list-author {
  font-size: 12.5px;
  margin-bottom: 0px !important;
  color: #717182;
  margin: 0;
  padding-bottom: 0px;
}

.oko-map-list-location {
  display: flex;
  align-items: center;
  padding-bottom: 0px;
  margin-bottom: 0px !important;
  gap: 4px;
  font-size: 12.5px;
  color: #9810fa;
  margin: 4px 0 0;
}

.oko-map-list-location svg {
  flex-shrink: 0;
}

.oko-map-list-empty {
  padding: 32px 16px;
  text-align: center;
  font-size: 13px;
  color: #717182;
}

/* ── Custom purple pin ──────────────────────────────────── */

.oko-map-pin-wrap {
  display: block;
  line-height: 0;
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.22));
}

.oko-map-pin-active {
  filter: drop-shadow(0 2px 10px rgba(102, 0, 204, 0.55));
}

/* ── Custom cluster icon ────────────────────────────────── */

.oko-map-cluster {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(139, 0, 255, 0.13);
  border: 2px solid rgba(139, 0, 255, 0.28);
  font-size: 13px;
  font-weight: 700;
  color: #9810fa;
  font-family: ui-sans-serif, system-ui, sans-serif;
  transition: background 0.15s;
}

.oko-map-cluster:hover {
  background: rgba(139, 0, 255, 0.2);
}

/* ── Leaflet popup overrides ────────────────────────────── */

.leaflet-popup-content-wrapper {
  padding: 0 !important;
  border-radius: 0.75rem !important;
  overflow: hidden !important;
  border: 1px solid rgba(0, 0, 0, 0.09) !important;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.14) !important;
}

.leaflet-popup-content {
  margin: 0 !important;
  width: 260px !important;
}

.leaflet-popup-tip-container {
  display: none !important;
}

/* ── Popup inner styles ─────────────────────────────────── */

.oko-map-popup {
  width: 260px;
  overflow: hidden;
}

.oko-map-popup img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  display: block;
}

.oko-map-popup-body {
  padding: 12px 14px;
}

.oko-map-popup-name {
  font-size: 13px;
  font-weight: 600;
  color: #030213;
  margin: 0 0 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.oko-map-popup-meta {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.oko-map-popup-meta span {
  font-size: 11.5px;
  color: #717182;
}

.oko-map-popup-sep {
  font-size: 11.5px;
  color: #c0c0cc;
}

.oko-map-popup-tech {
  font-size: 11px;
  font-weight: 500;
  padding: 1px 7px;
  border-radius: 999px;
  background: rgba(139, 0, 255, 0.1);
  color: #9810fa;
}

.oko-map-popup-actions {
  display: flex;
  gap: 6px;
}

.oko-map-popup-btn {
  flex: 1;
  padding: 7px 0;
  background: #9810fa;
  color: #fff;
  border: none;
  border-radius: 0.5rem;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  font-family: ui-sans-serif, system-ui, sans-serif;
  text-align: center;
  text-decoration: none;
  display: block;
}

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

@media (max-width: 900px) {
  .oko-map-body {
    flex-direction: column;
  }

  .oko-map-col-map {
    flex: none;
  }

  .oko-map-col-panel {
    max-height: 400px;
  }
}

@media (max-width: 600px) {
  .oko-chip-row {
    gap: 4px;
  }

  .oko-chip-btn {
    font-size: 12px;
    padding: 4px 8px;
  }
}
