
/* Veri Emlak Alsancak — 3D kontrolleri */
.leaflet-container:has(> .vea-3d-controls) {
  position: relative;
}

.vea-3d-overlay {
  position: absolute;
  inset: 0;
  z-index: 1100;
  background: #e9edf1;
}

.vea-3d-overlay[hidden] {
  display: none !important;
}

.vea-3d-canvas {
  width: 100%;
  height: 100%;
}

.vea-3d-controls {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 1200;
  display: flex;
  gap: 4px;
  padding: 4px;
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 3px 15px #0002;
}

.vea-3d-controls button {
  min-width: 48px;
  min-height: 40px;
  padding: 8px 12px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #172c46;
  font: 700 13px Arial, sans-serif;
  cursor: pointer;
}

.vea-3d-controls button.is-active {
  background: #172c46;
  color: #ffffff;
}

.vea-3d-controls button:disabled {
  opacity: .65;
  cursor: wait;
}

.vea-3d-controls button:focus-visible {
  outline: 2px solid #bc945c;
  outline-offset: 2px;
}


/* VEA 3D — PANEL USTU KONTROL DUZELTMESI */

/* Haritanın mevcut düzeni ve sağ panel korunur. */
.leaflet-container:has(> .vea-3d-controls) {
    position: relative;
}

/* 3D kontrolünü sağ panelle çakışmayacak
   şekilde haritanın üst-sol köşesine taşı. */
.leaflet-container > .vea-3d-controls {
    position: absolute !important;
    top: 14px !important;
    left: 64px !important;
    right: auto !important;
    z-index: 2000 !important;
}

/* 3D harita katmanının sağ paneli örtmesini engelle. */
.leaflet-container > .vea-3d-overlay {
    z-index: 1100 !important;
}

/* Dar ekranlarda kontrolleri kompakt tut. */
@media (max-width: 650px) {
    .leaflet-container > .vea-3d-controls {
        top: 14px !important;
        left: 55px !important;
    }

    .leaflet-container > .vea-3d-controls button {
        min-width: 42px;
        padding: 7px 10px;
    }
}

/* VEA 3D — UST KONTROL SERIDI V2 */

/*
 * Eski sol/sağ konum kurallarını geçersiz kılar.
 * Kontroller ana harita alanının üst kenarında,
 * ayrı ve daima görünür bir şerit hâline gelir.
 */

.leaflet-container:has(> .vea-3d-controls) {
    overflow: visible !important;
}

.leaflet-container > .vea-3d-controls {
    position: absolute !important;
    top: -53px !important;
    left: auto !important;
    right: 12px !important;
    z-index: 2000 !important;

    display: inline-flex;
    align-items: center;
    gap: 4px;

    padding: 4px;
    background: #ffffff;
    border: 1px solid #e5eaf0;
    border-radius: 10px;
    box-shadow: 0 2px 10px #172c4618;
}

.leaflet-container > .vea-3d-controls button {
    min-width: 48px;
    min-height: 37px;
    padding: 7px 12px;
    font-size: 12px;
}

@media (max-width: 650px) {
    .leaflet-container > .vea-3d-controls {
        top: -49px !important;
        left: auto !important;
        right: 8px !important;
    }

    .leaflet-container > .vea-3d-controls button {
        min-width: 43px;
        padding: 7px 9px;
    }
}

/* VEA 3D — BODY FLOATING CONTROLS V3 */

/*
 * Kontroller artık body altında.
 * Böylece Leaflet, MapLibre ve harita
 * kapsayıcılarının overflow kuralları
 * düğmeleri gizleyemez.
 */

body > .vea-3d-floating-controls {
    position: fixed !important;

    top: auto !important;
    right: auto !important;
    bottom: 112px !important;
    left: 24px !important;

    z-index: 2147483000 !important;

    display: flex !important;
    align-items: center;
    gap: 5px;

    padding: 5px;

    background: #ffffff !important;
    border: 1px solid #e5eaf0;
    border-radius: 12px;

    box-shadow: 0 5px 20px rgba(0, 0, 0, .18);

    visibility: visible !important;
    opacity: 1 !important;
    overflow: visible !important;
}

body > .vea-3d-floating-controls button {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;

    min-width: 58px;
    min-height: 42px;
    padding: 8px 14px;

    border: 0;
    border-radius: 8px;

    background: transparent;
    color: #172c46;

    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
}

body > .vea-3d-floating-controls button.is-active {
    background: #172c46 !important;
    color: #ffffff !important;
}

@media (max-width: 650px) {
    body > .vea-3d-floating-controls {
        left: 12px !important;
        bottom: 112px !important;
    }

    body > .vea-3d-floating-controls button {
        min-width: 48px;
        padding: 8px 10px;
    }
}

/* VEA MAP CONTROLS SCROLL FIX */
.leaflet-container > .vea-3d-controls {
    position: absolute !important;
    top: 14px !important;
    right: 14px !important;
    bottom: auto !important;
    left: auto !important;
    z-index: 2000 !important;
}

/* VEA MAP LEGEND 2D3D FIX */
.map-legend {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
}

.map-legend > .vea-3d-controls {
    position: static !important;
    inset: auto !important;
    transform: none !important;
    margin-left: 12px;
    z-index: auto !important;
    flex-shrink: 0;
}

@media (max-width: 650px) {
    .map-legend > .vea-3d-controls {
        margin-left: 0;
    }
}
