/**
 * WCC Map — container, controls, legend, tooltips.
 */

.wcc-map-shell {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 320px;
  border-radius: 16px;
  overflow: hidden;
  background: #BCD2DC;
}

.profile-v2__map-shell .wcc-map-shell {
  position: absolute;
  inset: 0;
  border-radius: 0;
  min-height: 100%;
  height: 100%;
}

.wcc-map {
  width: 100%;
  height: 100%;
  min-height: 320px;
  background: #BCD2DC;
}

.profile-v2__map-shell .wcc-map,
.profile-v2__map-shell .wcc-map .leaflet-container {
  width: 100% !important;
  height: 100% !important;
  min-height: 100% !important;
  border-radius: 0;
}

.wcc-map .leaflet-container {
  background: #BCD2DC;
  font-family: 'IBM Plex Sans', 'Helvetica Neue', sans-serif;
  color: #1C2541;
}

.wcc-map .leaflet-container:focus,
.wcc-map .leaflet-container:focus-visible,
.wcc-map .leaflet-overlay-pane svg:focus,
.wcc-map .leaflet-overlay-pane path:focus,
.wcc-map .leaflet-interactive:focus,
.wcc-map .leaflet-interactive:focus-visible {
  outline: none !important;
  box-shadow: none !important;
}

.wcc-map path.leaflet-interactive {
  cursor: pointer;
}

/* Custom controls */
.wcc-map-controls {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 700;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
}

.wcc-map-controls__zoom {
  display: flex;
  flex-direction: column;
  gap: 0;
  background: #FBF8F2;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(28, 37, 65, 0.16);
  overflow: hidden;
}

.wcc-map-controls button {
  appearance: none;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  min-height: 28px;
  width: 28px;
  height: 28px;
  margin: 0;
  padding: 0;
  border: 0;
  background: #FBF8F2;
  color: #1C2541;
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  opacity: 1;
  transition: opacity 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.wcc-map-controls__zoom button + button {
  border-top: 1px solid rgba(28, 37, 65, 0.1);
}

.wcc-map-controls button:hover:not(:disabled),
.wcc-map-controls button:focus-visible:not(:disabled) {
  background: #F3EEE4;
  color: #1C2541;
  outline: none;
}

.wcc-map-controls button:disabled {
  opacity: 0.28;
  color: #5B5348;
  cursor: default;
  pointer-events: none;
}

/* Legend */
.wcc-map-legend {
  position: absolute;
  left: 12px;
  bottom: 12px;
  z-index: 500;
  max-width: calc(100% - 24px);
  padding: 10px 12px;
  background: #FBF8F2;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(28, 37, 65, 0.18);
  color: #1C2541;
  font-size: 12px;
  line-height: 1.35;
}

.wcc-map-legend__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
}

.wcc-map-legend__item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #1C2541;
  white-space: nowrap;
}

.wcc-map-legend__icon {
  display: inline-block;
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  border-radius: 2px;
  box-sizing: border-box;
}

.wcc-map-legend__icon--land {
  background: #ECE3D4;
  border: 1px solid rgba(28, 37, 65, 0.2);
}

.wcc-map-legend__icon--visited {
  background: #DDC8AB;
  border: 1px solid rgba(28, 37, 65, 0.15);
}

.wcc-map-legend__icon--dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #B0532A;
  margin: 0 2px;
}

.wcc-map-legend__hint {
  margin: 6px 0 0;
  color: #5B5348;
  font-size: 11px;
}

/* Country tooltips */
.wcc-map-tooltip.leaflet-tooltip {
  background: #FBF8F2;
  border: 1px solid #1C2541;
  border-radius: 4px;
  color: #1C2541;
  font-size: 12px;
  font-weight: 500;
  padding: 4px 8px;
  box-shadow: 2px 2px 0 rgba(28, 37, 65, 0.15);
}

.wcc-map-tooltip.leaflet-tooltip::before {
  border-top-color: #1C2541;
}

@media (max-width: 575.98px) {
  .wcc-map-legend {
    font-size: 11px;
  }
}
