/* Rika — карта в стилі Google Maps (див. js/rika-map-style.js) */

.leaflet-container.rika-gmap {
  font-family: Roboto, Arial, sans-serif;
  background: #e8eaed;
}

/* Більше місця для карти у вікні вибору */
.onboarding-map-modal__map,
.dash-map-modal__map {
  height: min(24rem, 52vh);
  min-height: 14rem;
}

/* Червоний пін */
.rika-gpin {
  background: none;
  border: 0;
}

.rika-gpin svg {
  display: block;
  width: 27px;
  height: 43px;
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.35));
  transition: transform 0.15s ease;
  transform-origin: 50% 100%;
}

.leaflet-dragging .rika-gpin svg,
.rika-gpin:active svg {
  transform: translateY(-6px) scale(1.05);
}

/* Кнопки масштабу */
.rika-gmap .leaflet-bar {
  border: none;
  border-radius: 2px;
  box-shadow: rgba(0, 0, 0, 0.3) 0 1px 4px -1px;
  overflow: hidden;
}

.rika-gmap .leaflet-bar a,
.rika-gmap .leaflet-bar a:hover {
  width: 40px;
  height: 40px;
  line-height: 38px;
  font-family: Roboto, Arial, sans-serif;
  font-size: 24px;
  font-weight: 300;
  color: #666;
  background: #fff;
  border-bottom: 1px solid #e6e6e6;
}

.rika-gmap .leaflet-bar a:hover {
  color: #333;
}

.rika-gmap .leaflet-bar a:last-child {
  border-bottom: none;
}

.rika-gmap .leaflet-bar a.leaflet-disabled {
  color: #c4c4c4;
}

/* «Моє місцезнаходження» */
.rika-gmap-locate {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  color: #666;
  background: #fff;
  border: none;
  border-radius: 2px;
  box-shadow: rgba(0, 0, 0, 0.3) 0 1px 4px -1px;
  cursor: pointer;
}

.rika-gmap-locate svg {
  width: 20px;
  height: 20px;
}

.rika-gmap-locate:hover {
  color: #333;
}

.rika-gmap-locate.is-active {
  color: #1a73e8;
}

.rika-gmap-locate.is-error {
  color: #d93025;
}

.rika-gmap-locate.is-loading svg {
  color: #1a73e8;
  animation: rika-gmap-pulse 0.9s ease-in-out infinite;
}

@keyframes rika-gmap-pulse {
  50% {
    opacity: 0.35;
  }
}

/* Атрибуція — дрібно, як у Google */
.rika-gmap .leaflet-control-attribution {
  font-family: Roboto, Arial, sans-serif;
  font-size: 10px;
  color: #444;
  background: rgba(255, 255, 255, 0.7);
}

.rika-gmap .leaflet-control-attribution a {
  color: #444;
}

/* Темна тема: не затемнюємо контроли разом із плитками */
[data-theme="dark"] .leaflet-container.rika-gmap {
  filter: none;
}

[data-theme="dark"] .rika-gmap .leaflet-tile-pane {
  filter: brightness(0.88) contrast(1.05) saturate(0.85);
}

@media (prefers-reduced-motion: reduce) {
  .rika-gpin svg,
  .rika-gmap-locate.is-loading svg {
    transition: none;
    animation: none;
  }
}
