/*
 * Genpower – "Hizmet Ağı" harita bölümü (Figma: Anasayfa/haritakoyu renk harita)
 * main.css'ten SONRA yüklenmeli.
 */

.sn-harita {
  --gp-red: #e7000b;
  --gp-navy: #020e4a;
  --gp-card: #06102e;
  background: var(--gp-navy);
  /* clip (hidden değil): yakınlaştırma kontrolünün sticky çalışması için */
  overflow: hidden;
  overflow: clip;
}

/* Başlık bloğu haritanın üzerinde kalır */
.sn-harita > .container {
  position: relative;
  z-index: 3;
  pointer-events: none;
}
.sn-harita > .container a,
.sn-harita > .container button {
  pointer-events: auto;
}

.sn-harita .tag-button-white-text {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: auto;
  min-width: 0;
  padding: 8px 17px;
  border: 1px solid rgba(231, 0, 11, 0.7);
  border-radius: 999px;
  background: rgba(231, 0, 11, 0.1);
  color: #fff;
  font-size: 18px;
  line-height: 20px;
}
.sn-harita .tag-button-white-text i {
  color: var(--gp-red);
  font-size: 8px;
}

.sn-harita h3 {
  font-size: 52px;
  font-weight: 700;
  line-height: 1.15;
  color: #fff;
}
.sn-harita > .container p {
  margin-top: 16px;
  font-size: 18px;
  color: #fff;
}

/* Harita alanı */
.sn-harita .gp-map-viewport {
  position: relative;
  margin-top: 56px;
}

.sn-harita .branch-map-scroll {
  margin-top: 0;
  /* Dikey tekerlek her zaman sayfayı kaydırsın; dikey gezinme sürükleme/JS ile */
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  overscroll-behavior-y: auto;
  scrollbar-width: none;
  mask-image: none;
  cursor: grab;
}
.sn-harita .branch-map-scroll::-webkit-scrollbar {
  display: none;
}
.sn-harita .branch-map-scroll.is-dragging {
  cursor: grabbing;
  user-select: none;
}

.sn-harita .branch-map,
.sn-harita .branch-map[style] {
  min-width: 0;
  margin: 0 auto;
}
.sn-harita .branch-map-img {
  pointer-events: none;
  -webkit-user-drag: none;
}

/* Pinler: kırmızı konum işareti, ucu koordinata oturur */
.sn-harita .branch-pin {
  width: 40px;
  height: 40px;
  border-radius: 0;
  transform: translate(-50%, -88%);
  transition: transform 200ms ease;
}
.sn-harita .branch-pin::before,
.sn-harita .branch-pin-label {
  display: none !important;
}
.sn-harita .branch-pin-dot {
  inset: 0;
  border-radius: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Cpath fill='%23E7000B' d='M20 5c-4.7 0-8.5 3.8-8.5 8.5 0 6.4 8.5 21.5 8.5 21.5s8.5-15.1 8.5-21.5C28.5 8.8 24.7 5 20 5zm0 11.8a3.3 3.3 0 1 1 0-6.6 3.3 3.3 0 0 1 0 6.6z'/%3E%3C/svg%3E") center / contain no-repeat;
  box-shadow: none;
  filter: drop-shadow(0 2px 6px rgba(231, 0, 11, 0.45));
}
.sn-harita .branch-pin-dot::before,
.sn-harita .branch-pin-dot::after {
  display: none;
}
.sn-harita .branch-pin.active,
.sn-harita .branch-pin:hover,
.sn-harita .branch-pin:focus-visible {
  transform: translate(-50%, -96%);
}
.sn-harita .branch-pin.active .branch-pin-dot,
.sn-harita .branch-pin:hover .branch-pin-dot,
.sn-harita .branch-pin:focus-visible .branch-pin-dot {
  transform: none;
}

/* Yakınlaştırma kontrolü: harita görünürken ekranın sağ altında sabit kalır.
   Akış içinde yer kaplamaması için negatif üst boşluk = yükseklik (114px) + alt boşluk */
.sn-harita .gp-map-zoom {
  position: sticky;
  bottom: 50px;
  z-index: 4;
  margin: -164px 55px 50px auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 53px;
  padding: 10px 0;
  border: 2px solid #fff;
  border-radius: 20px;
  background: rgba(2, 14, 74, 0.55);
  backdrop-filter: blur(6px);
}
.sn-harita .gp-map-zoom button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  transition: opacity 200ms ease;
}
.sn-harita .gp-map-zoom button:disabled {
  opacity: 0.35;
  cursor: default;
}
.sn-harita .gp-map-zoom hr {
  width: 49px;
  margin: 7px 0;
  border: 0;
  border-top: 2px solid #fff;
  opacity: 1;
}

/* Bayi kartı (popover) */
.branch-popover {
  --bs-popover-max-width: 350px;
  --bs-popover-border-radius: 20px;
  --bs-popover-bg: #06102e;
  --bs-popover-box-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
}
.branch-popover .popover-body {
  border: 1px solid #f7f7f7;
  border-radius: 20px;
  background: #06102e;
  overflow: hidden;
}
.branch-popover .branch-popover-card.dealer-card {
  width: 350px;
  max-width: calc(100vw - 32px);
  padding: 27px 20px 22px;
  border: 0;
  border-radius: 20px;
  background: #06102e;
  color: #fff;
}
.branch-popover .dealer-card img {
  display: none;
}
.branch-popover .dealer-card-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 17px;
  border: 1px solid rgba(231, 0, 11, 0.2);
  border-radius: 999px;
  background: #5a0e22;
  color: #fff;
  font-size: 16px;
  font-weight: 400;
  line-height: 20px;
}
.branch-popover .dealer-card h3 {
  margin: 13px 0 22px;
  color: #fff;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.4;
  text-transform: none;
}
.branch-popover .dealer-card ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
.branch-popover .dealer-card li {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  margin: 0 0 20px;
  color: #fff;
  font-size: 14px;
  line-height: 22px;
  word-break: break-word;
}
.branch-popover .dealer-card li:last-child {
  margin-bottom: 0;
}
.branch-popover .dealer-card li i {
  flex: 0 0 16px;
  margin-top: 4px;
  color: #fff;
  font-size: 15px;
  text-align: center;
}
.branch-popover .dealer-card li a {
  color: #fff;
}
.branch-popover .dealer-card li a:hover {
  color: var(--gp-red, #e7000b);
}
.branch-popover .branch-popover-close {
  top: 26px;
  right: 16px;
  color: #fff;
}
.branch-popover .branch-popover-nav {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}
.branch-popover .branch-popover-nav-count {
  color: rgba(255, 255, 255, 0.6);
}
.branch-popover .branch-popover-nav-btn {
  color: #fff;
}

@media screen and (max-width: 992px) {
  .sn-harita h3 {
    font-size: 40px;
  }
  .sn-harita .gp-map-viewport {
    margin-top: 44px;
  }
  .sn-harita .branch-pin {
    width: 30px;
    height: 30px;
  }
  .sn-harita .gp-map-zoom {
    bottom: 20px;
    margin: -134px 20px 20px auto;
  }
}

@media screen and (max-width: 768px) {
  .sn-harita h3 {
    font-size: 30px;
  }
  .sn-harita .tag-button-white-text,
  .sn-harita > .container p {
    font-size: 16px;
  }
  .sn-harita .gp-map-viewport {
    margin-top: 32px;
  }
  .sn-harita .gp-map-zoom {
    bottom: 16px;
    margin: -130px 16px 16px auto;
    width: 44px;
    border-radius: 16px;
  }
  .sn-harita .gp-map-zoom button {
    font-size: 18px;
  }
  .sn-harita .gp-map-zoom hr {
    width: 40px;
  }
}
