/* Style frontendu wtyczki SweetMap */
.sweetmap-viewer {
  position: relative;
  width: 100%;
  margin: 20px 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: #333;
}

.sweetmap-map-wrapper {
  position: relative;
  width: 100%;
  display: inline-block;
  background-color: #f3f4f6;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.sweetmap-bg-image {
  width: 100%;
  height: auto;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
}

.sweetmap-svg-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.sweetmap-polygon {
  cursor: pointer;
  transition: fill 0.2s ease, stroke 0.2s ease;
}

/* Tooltip / Chmurka podpowiedzi */
.sweetmap-tooltip {
  display: none;
  position: absolute;
  pointer-events: none;
  background-color: rgba(18, 19, 24, 0.95);
  border: 1px solid #2f3344;
  color: #f3f4f6;
  padding: 8px 12px;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: 6px;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
  z-index: 99999;
  transform: translate(-50%, -100%);
  margin-top: -10px;
}

/* Nawigacja okruszkowa (Breadcrumbs) */
.sweetmap-breadcrumbs-container {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  font-size: 0.9rem;
}

.sweetmap-breadcrumb {
  cursor: pointer;
  color: #7c3aed;
  font-weight: 600;
  transition: color 0.15s ease;
}

.sweetmap-breadcrumb:hover {
  color: #8b5cf6;
  text-decoration: underline;
}

.sweetmap-breadcrumb::after {
  content: "/";
  margin-left: 8px;
  color: #9ca3af;
  pointer-events: none;
  display: inline-block;
}

.sweetmap-breadcrumb:last-child {
  color: #4b5563;
  cursor: default;
  pointer-events: none;
}

.sweetmap-breadcrumb:last-child::after {
  display: none;
}

/* Modal Popup */
.sweetmap-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.sweetmap-modal-overlay.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.sweetmap-modal-content {
  background-color: #fff;
  border-radius: 12px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  max-width: 600px;
  width: 100%;
  position: relative;
  transform: scale(0.9);
  transition: transform 0.25s ease;
  overflow: hidden;
}

.sweetmap-modal-overlay.active .sweetmap-modal-content {
  transform: scale(1);
}

.sweetmap-modal-close {
  position: absolute;
  top: 15px;
  right: 15px;
  background: none;
  border: none;
  font-size: 1.5rem;
  font-weight: 700;
  cursor: pointer;
  color: #9ca3af;
  transition: color 0.15s ease;
  line-height: 1;
  padding: 5px;
}

.sweetmap-modal-close:hover {
  color: #374151;
}

.sweetmap-modal-body-content {
  padding: 30px;
  max-height: 80vh;
  overflow-y: auto;
}

/* Przycisk Pełnego Ekranu */
.sweetmap-fullscreen-btn {
  position: absolute;
  top: 15px;
  right: 15px;
  width: 36px;
  height: 36px;
  border-radius: 6px;
  background-color: rgba(18, 19, 24, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s ease, transform 0.2s ease;
  z-index: 100;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
  padding: 0;
}

.sweetmap-fullscreen-btn:hover {
  background-color: rgba(18, 19, 24, 0.95);
  transform: scale(1.05);
}

.sweetmap-fullscreen-btn svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  display: block;
}

/* Ikony enter/exit w zależności od stanu */
.sweetmap-fullscreen-btn svg .sm-fs-icon-exit {
  display: none;
}

.sweetmap-viewer.sweetmap-is-fullscreen .sweetmap-fullscreen-btn svg .sm-fs-icon-enter {
  display: none;
}

.sweetmap-viewer.sweetmap-is-fullscreen .sweetmap-fullscreen-btn svg .sm-fs-icon-exit {
  display: block;
}

/* Stan pełnoekranowy (Overlay) */
.sweetmap-viewer.sweetmap-is-fullscreen {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  max-width: 100vw !important;
  z-index: 9999999 !important;
  background-color: rgba(17, 24, 39, 0.98) !important;
  margin: 0 !important;
  padding: 30px !important;
  box-sizing: border-box !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
}

.sweetmap-viewer.sweetmap-is-fullscreen .sweetmap-breadcrumbs-container {
  width: 100% !important;
  max-width: 1200px !important;
  color: #fff !important;
  margin-bottom: 20px !important;
}

.sweetmap-viewer.sweetmap-is-fullscreen .sweetmap-breadcrumb {
  color: #a78bfa !important;
}

.sweetmap-viewer.sweetmap-is-fullscreen .sweetmap-breadcrumb:hover {
  color: #c084fc !important;
}

.sweetmap-viewer.sweetmap-is-fullscreen .sweetmap-breadcrumb::after {
  color: #4b5563 !important;
}

.sweetmap-viewer.sweetmap-is-fullscreen .sweetmap-breadcrumb:last-child {
  color: #9ca3af !important;
}

.sweetmap-viewer.sweetmap-is-fullscreen .sweetmap-map-wrapper {
  max-width: 100% !important;
  max-height: calc(100vh - 120px) !important;
  width: auto !important;
  height: auto !important;
  display: flex !important;
  position: relative !important;
  align-items: center !important;
  justify-content: center !important;
  background-color: transparent !important;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5) !important;
}

.sweetmap-viewer.sweetmap-is-fullscreen .sweetmap-bg-image {
  max-width: 100% !important;
  max-height: calc(100vh - 120px) !important;
  width: auto !important;
  height: auto !important;
  object-fit: contain !important;
}
