/**
 * ==========================================================================
 * KAT PLANI - 3D SAHNE VE MODEL MODÜLÜ (scene-3d.css)
 * ==========================================================================
 * Bu dosya 3D bina modellerinin ve site vaziyet planının tam ekran yüksekliğe,
 * ortalanmış yerleşimine ve sahne kontrollerinin temizlenmesine odaklanır.
 */

/* --------------------------------------------------------------------------
   1. 3D SAHNE ALANI (Ortada Tam Yükseklik)
   -------------------------------------------------------------------------- */
/* --------------------------------------------------------------------------
   1. 3D SAHNE ALANI & HDRI MİMARİ GÖKYÜZÜ ATMOSFERİ
   -------------------------------------------------------------------------- */
.main-content {
  height: 100vh !important;
  overflow: hidden !important;
  display: flex !important;
  flex-direction: column !important;
}

/* 3D Görünüm Taşıyıcısı (CSS Arkaplanı Kaldırıldı - Yalnızca 3D Sahne Gökyüzü Geçerli) */
.dashboard-view {
  position: relative !important;
  width: 100% !important;
  height: calc(100vh - var(--header-height, 72px)) !important;
  max-height: calc(100vh - var(--header-height, 72px)) !important;
  padding: 0 !important;
  margin: 0 !important;
  overflow: hidden !important;
  display: flex !important;
  flex-direction: column !important;
  background: transparent !important;
}

.view-container {
  width: 100% !important;
  height: 100% !important;
  flex: 1 !important;
  position: relative !important;
  overflow: hidden !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
}

/* Çift HDRI hissiyatı yaratan CSS sis katmanı tamamen iptal edildi */
.view-container::before {
  display: none !important;
  content: none !important;
}

/* --------------------------------------------------------------------------
   2. BİNA VE SİTE 3D TAŞIYICILARI & METİN SEÇİMİNİ KESİN ENGELLEME
   -------------------------------------------------------------------------- */
.building-3d-container,
.site-3d-root,
.scene-container,
.building-3d-wrapper,
.building-3d-model,
.site-3d-viewport,
.site-3d-world {
  user-select: none !important;
  -webkit-user-select: none !important;
  -moz-user-select: none !important;
  -ms-user-select: none !important;
}

.building-3d-model *,
.site-3d-viewport * {
  user-select: none !important;
  -webkit-user-select: none !important;
  -webkit-touch-callout: none !important;
}

.building-3d-container,
.site-3d-root {
  width: 100% !important;
  height: 100% !important;
  flex: 1 !important;
  position: relative !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin: 0 !important;
  padding: 0 !important;
  z-index: 2;
}

.scene-container,
.site-3d-viewport {
  width: 100% !important;
  height: 100% !important;
  min-height: 100% !important;
  border: none !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  position: relative !important;
  overflow: visible !important;
  cursor: grab !important;
}

.scene-container:active,
.site-3d-viewport:active {
  cursor: grabbing !important;
}

/* --------------------------------------------------------------------------
   3. 3D GERÇEKÇİ MİMARİ APARTMAN DETAYLANDIRMASI (PENCERE, BALKON, KAT HATTI)
   -------------------------------------------------------------------------- */

/* Her Daire Hücresine Gerçekçi Mimari Derinlik ve Ortam Gölgelendirmesi */
.building-3d-model > div {
  border-radius: 0px !important;
  box-shadow: 
    inset 0 1px 0 rgba(255, 255, 255, 0.4),
    inset 0 -2px 4px rgba(0, 0, 0, 0.15),
    0 1px 3px rgba(0, 0, 0, 0.2) !important;
}

/* Cephe Yüzeylerinde Gerçek Cam Parıltısı ve Mimari Yansıma */
.building-3d-model > div::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.35) 0%, rgba(255, 255, 255, 0.08) 45%, transparent 55%, rgba(0, 0, 0, 0.08) 100%);
  border-bottom: 2px solid rgba(0, 0, 0, 0.18); /* Kat döşeme hattı (kat silmesi) */
  z-index: 1;
}

/* Daire Hücrelerinde Fransız Balkon / Pencere Pervazı İllüzyonu */
.building-3d-model > div::after {
  content: "";
  position: absolute;
  bottom: 3px;
  left: 6px;
  right: 6px;
  height: 3px;
  background: rgba(15, 23, 42, 0.25);
  border-top: 1px solid rgba(255, 255, 255, 0.6);
  pointer-events: none;
  z-index: 2;
}

/* Daire İçindeki Metin ve İsimlerin Okunaklı ve Şık Tipografisi */
.building-3d-model span,
.building-3d-model strong,
.building-3d-model div {
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
  letter-spacing: 0.02em;
}

/* --------------------------------------------------------------------------
   4. 3D MİMARİ ZEMİN PLATFORMU VE BİNA TEMAS GÖLGESİ (Tam Taban Seviyesi)
   -------------------------------------------------------------------------- */
.arch-ground-platform {
  position: absolute !important;
  top: 100% !important;
  bottom: auto !important;
  left: 50% !important;
  width: 220% !important;
  height: 550px !important;
  max-width: 1400px !important;
  transform: translate3d(-50%, -50%, 0px) rotateX(90deg) !important;
  transform-origin: center center !important;
  background: 
    radial-gradient(circle at center, rgba(255, 255, 255, 0.95) 0%, rgba(241, 245, 249, 0.9) 35%, rgba(226, 232, 240, 0.65) 60%, rgba(203, 213, 225, 0.2) 85%, transparent 100%),
    linear-gradient(rgba(203, 213, 225, 0.4) 1px, transparent 1px),
    linear-gradient(90deg, rgba(203, 213, 225, 0.4) 1px, transparent 1px) !important;
  background-size: 100% 100%, 30px 30px, 30px 30px !important;
  background-position: center center !important;
  border: 1.5px solid rgba(203, 213, 225, 0.6) !important;
  box-shadow: 
    0 0 60px 20px rgba(148, 163, 184, 0.25),
    inset 0 0 80px rgba(226, 232, 240, 0.8) !important;
  pointer-events: none !important;
  z-index: -2 !important;
  transform-style: preserve-3d !important;
}

/* Binanın Doğrudan Zemin Üzerine Düşürdüğü Gerçekçi Yumuşak Temas Gölgesi */
.arch-building-shadow {
  position: absolute !important;
  top: 100% !important;
  bottom: auto !important;
  left: 50% !important;
  width: 115% !important;
  height: 380px !important;
  transform: translate3d(-50%, -50%, 2px) rotateX(90deg) !important;
  transform-origin: center center !important;
  background: radial-gradient(ellipse at center, rgba(15, 23, 42, 0.35) 0%, rgba(15, 23, 42, 0.15) 50%, transparent 80%) !important;
  filter: blur(10px) !important;
  pointer-events: none !important;
  z-index: -1 !important;
}

/* --------------------------------------------------------------------------
   5. 3D MODEL VE İZOMETRİK SVG ÖLÇEKLENDİRME
   -------------------------------------------------------------------------- */
.scene-container svg,
.site-3d-viewport svg,
.site-svg-viewport {
  width: 100% !important;
  height: 100% !important;
  max-height: calc(100vh - 85px) !important;
  display: block !important;
  margin: auto !important;
  filter: drop-shadow(0 12px 28px rgba(15, 23, 42, 0.18));
}

/* --------------------------------------------------------------------------
   6. DÖNDÜR, ZOOM, GENİŞLET, SIFIRLA VE TÜM SAHNE KONTROLLERİNİ KALDIRMA
   -------------------------------------------------------------------------- */
.scene-controls,
.site-controls-bar,
.zoom-controls,
.controls-group,
.controls-hint,
.control-badge,
.site-info-badge,
button[title*="Döndür"],
button[title*="döndür"],
button[title*="Yakınlaştır"],
button[title*="Uzaklaştır"],
button[title*="Yaklaş"],
button[title*="Uzaklaş"],
button[title*="Sıfırla"],
button[title*="Açıyı Sıfırla"],
button[title*="Görünümü Sıfırla"],
button[title*="Tam Ekran"],
button[title*="Genişlet"] {
  display: none !important;
}

/* --------------------------------------------------------------------------
   7. SIFIRDAN ÜRETİLEN 3D CANVAS & SAHNE OPTİMİZASYONU
   -------------------------------------------------------------------------- */
.arch-3d-canvas {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  outline: none !important;
  user-select: none !important;
  -webkit-user-select: none !important;
  touch-action: none !important;
  cursor: grab !important;
  z-index: 5 !important;
}

.arch-3d-canvas:active {
  cursor: grabbing !important;
}

/* --------------------------------------------------------------------------
   8. ESKİ 3D MODELİ KESİN VE TAMAMEN İPTAL ETME
   -------------------------------------------------------------------------- */
.building-3d-wrapper,
.building-3d-model,
.site-3d-viewport.arch-active .site-3d-world,
.site-3d-world.arch-hidden {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
  position: absolute !important;
  z-index: -9999 !important;
}

/* --------------------------------------------------------------------------
   9. 3D DAİRE HOVER BİLGİ KARTI (GLASSMORPHISM POPUP) & ANLIK DURUM DEĞİŞTİRİCİ
   -------------------------------------------------------------------------- */
.arch-apt-popup {
  position: fixed !important;
  z-index: 9999 !important;
  min-width: 260px !important;
  max-width: 320px !important;
  overflow: hidden !important;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.82) 0%, rgba(255, 255, 255, 0.50) 50%, rgba(255, 255, 255, 0.66) 100%) !important;
  backdrop-filter: blur(32px) saturate(210%) contrast(106%) !important;
  -webkit-backdrop-filter: blur(32px) saturate(210%) contrast(106%) !important;
  border: 1px solid rgba(255, 255, 255, 0.80) !important;
  border-radius: 16px !important;
  box-shadow: 
    0 28px 60px -12px rgba(15, 23, 42, 0.18),
    0 10px 22px -5px rgba(15, 23, 42, 0.08),
    inset 0 1.5px 1px 0 rgba(255, 255, 255, 0.98),
    inset 0 -1.5px 2px 0 rgba(0, 0, 0, 0.03),
    inset 0 0 0 1px rgba(255, 255, 255, 0.40) !important;
  padding: 14px 16px !important;
  font-family: var(--font-body, 'Inter', sans-serif) !important;
  color: #0f172a !important;
  pointer-events: auto !important;
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity 0.22s cubic-bezier(0.16, 1, 0.3, 1), transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.22s !important;
  user-select: none !important;
  -webkit-user-select: none !important;
}

/* Cam Yüzey Işık Parıltısı (Specular Glare Sheen) */
.arch-apt-popup::before {
  content: '' !important;
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  height: 45% !important;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.32) 0%, rgba(255, 255, 255, 0.02) 80%, transparent 100%) !important;
  border-top-left-radius: inherit !important;
  border-top-right-radius: inherit !important;
  pointer-events: none !important;
  z-index: 1 !important;
}

.arch-apt-popup.visible {
  opacity: 1 !important;
  visibility: visible !important;
  transform: translateY(0px) !important;
}

/* Popup Başlık Alanı */
.arch-popup-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  border-bottom: 1px solid rgba(148, 163, 184, 0.25) !important;
  padding-bottom: 8px !important;
  margin-bottom: 10px !important;
}

.arch-popup-title-group {
  display: flex !important;
  align-items: baseline !important;
  gap: 8px !important;
}

.arch-popup-apt-number {
  font-size: 17px !important;
  font-weight: 800 !important;
  color: #0f172a !important;
  letter-spacing: -0.02em !important;
}

.arch-popup-floor {
  font-size: 13px !important;
  color: #64748b !important;
  font-weight: 500 !important;
}

.arch-popup-current-status {
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  padding: 3px 8px !important;
  border-radius: 6px !important;
  text-transform: uppercase !important;
  letter-spacing: 0.03em !important;
  border: 1px solid transparent !important;
}

.arch-popup-current-status.satilik {
  background: rgba(224, 242, 254, 0.88) !important;
  color: #0284c7 !important;
  border-color: rgba(186, 230, 253, 0.9) !important;
}

.arch-popup-current-status.satildi {
  background: rgba(254, 226, 226, 0.85) !important;
  color: #b91c1c !important;
  border-color: rgba(254, 202, 202, 0.9) !important;
}

.arch-popup-current-status.rezerve {
  background: rgba(254, 243, 199, 0.85) !important;
  color: #b45309 !important;
  border-color: rgba(253, 230, 138, 0.9) !important;
}

.arch-popup-current-status.kapali {
  background: rgba(241, 245, 249, 0.85) !important;
  color: #475569 !important;
  border-color: rgba(203, 213, 225, 0.9) !important;
}

/* Bilgi Detay Izgarası */
.arch-popup-details {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 6px !important;
  margin-bottom: 12px !important;
  background: rgba(255, 255, 255, 0.45) !important;
  border: 1px solid rgba(255, 255, 255, 0.7) !important;
  border-radius: 8px !important;
  padding: 8px 10px !important;
}

.arch-popup-detail-item {
  display: flex !important;
  flex-direction: column !important;
  gap: 2px !important;
}

.arch-popup-detail-label {
  font-size: 10px !important;
  text-transform: uppercase !important;
  font-weight: 700 !important;
  color: #64748b !important;
  letter-spacing: 0.04em !important;
}

.arch-popup-detail-val {
  font-size: 13px !important;
  font-weight: 700 !important;
  color: #0f172a !important;
}

/* Hızlı Durum Değiştirme Butonları */
.arch-popup-action-label {
  font-size: 11px !important;
  font-weight: 700 !important;
  color: #64748b !important;
  margin-bottom: 6px !important;
  text-transform: uppercase !important;
  letter-spacing: 0.03em !important;
}

.arch-popup-status-group {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 5px !important;
}

.arch-status-btn {
  border-radius: 6px !important;
  border: 1px solid rgba(255, 255, 255, 0.8) !important;
  background: rgba(255, 255, 255, 0.5) !important;
  color: #475569 !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  padding: 7px 4px !important;
  cursor: pointer !important;
  text-align: center !important;
  transition: all 0.15s ease !important;
}

.arch-status-btn:hover {
  background: rgba(255, 255, 255, 0.85) !important;
  border-color: rgba(212, 175, 55, 0.8) !important;
  color: #0f172a !important;
}

/* Durum Butonları Aktif Stilleri */
.arch-status-btn[data-status="satilik"].active {
  background: #0284c7 !important;
  border-color: #0369a1 !important;
  color: #ffffff !important;
}

.arch-status-btn[data-status="satildi"].active {
  background: #ef4444 !important;
  border-color: #dc2626 !important;
  color: #ffffff !important;
}

.arch-status-btn[data-status="rezerve"].active {
  background: #f59e0b !important;
  border-color: #d97706 !important;
  color: #ffffff !important;
}

.arch-status-btn[data-status="kapali"].active {
  background: #64748b !important;
  border-color: #475569 !important;
  color: #ffffff !important;
}

/* Sessiz Arka Plan Güncellemesi (Modalın ekranda görünmeden arkada çalışmasını sağlar) */
.arch-silent-update .modal-overlay {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}


