/**
 * KurtarVIP - Hızlı İletişim & Etkileşim Stilleri
 * 
 * 1. Masaüstü Floating WhatsApp & Akıllı VIP Asistan Balonu (>= 768px)
 * 2. Mobil 3 Aksiyonlu Yapışkan VIP Alt Bar (< 768px)
 * 3. Back-to-Top Dikey Hizalama & Çakışma Önleme
 * 4. Safe-Area Padding & Performans Optimizasyonları (GPU Haricinde 60fps)
 */

/* ==========================================================================
   1. MASAÜSTÜ FLOATING WHATSAPP (>= 768px)
   ========================================================================== */
.desktop-floating-wa {
  position: fixed;
  right: 30px;
  bottom: 30px;
  z-index: 9990;
  display: block;
}

/* Ana Dairesel WhatsApp Butonu */
.desktop-floating-wa .wa-floating-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
  border: 2px solid rgba(159, 125, 80, 0.75);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.45), 0 0 20px rgba(37, 211, 102, 0.35);
  color: #ffffff;
  text-decoration: none;
  cursor: pointer;
  transform: translate3d(0, 0, 0);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease;
  z-index: 2;
}

.desktop-floating-wa .wa-floating-btn:hover {
  transform: scale(1.08) translateY(-3px);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.55), 0 0 30px rgba(37, 211, 102, 0.55);
  border-color: #d4af37;
  color: #ffffff;
}

.desktop-floating-wa .wa-btn-icon {
  font-size: 32px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Çift Katmanlı Nabız (Pulse) Animasyonu */
.desktop-floating-wa .wa-pulse-ring {
  position: absolute;
  top: -6px;
  left: -6px;
  right: -6px;
  bottom: -6px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 1;
}

.desktop-floating-wa .wa-pulse-green {
  border: 2px solid rgba(37, 211, 102, 0.8);
  animation: waPulseGreenAnim 2.2s infinite cubic-bezier(0.215, 0.61, 0.355, 1);
}

.desktop-floating-wa .wa-pulse-gold {
  border: 1.5px solid rgba(159, 125, 80, 0.85);
  animation: waPulseGoldAnim 2.2s infinite cubic-bezier(0.215, 0.61, 0.355, 1) 0.5s;
}

@keyframes waPulseGreenAnim {
  0% {
    transform: scale(0.95);
    opacity: 0.9;
  }
  70% {
    transform: scale(1.6);
    opacity: 0;
  }
  100% {
    transform: scale(1.7);
    opacity: 0;
  }
}

@keyframes waPulseGoldAnim {
  0% {
    transform: scale(0.95);
    opacity: 0.8;
  }
  75% {
    transform: scale(1.85);
    opacity: 0;
  }
  100% {
    transform: scale(1.95);
    opacity: 0;
  }
}

/* Akıllı Karşılama Balonu (VIP Destek Asistanı) */
.desktop-floating-wa .wa-assistant-card {
  position: absolute;
  right: 76px;
  bottom: 8px;
  width: 290px;
  background: rgba(14, 24, 27, 0.96);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(159, 125, 80, 0.45);
  border-radius: 16px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6), 0 0 25px rgba(159, 125, 80, 0.15);
  padding: 14px 16px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px) scale(0.96);
  transition: opacity 0.35s ease, transform 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275), visibility 0.35s ease;
  pointer-events: none;
  z-index: 3;
}

.desktop-floating-wa .wa-assistant-card.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

/* Balon Ok Ucu (Tooltip Arrow) */
.desktop-floating-wa .wa-assistant-card::after {
  content: '';
  position: absolute;
  right: -8px;
  bottom: 22px;
  width: 0;
  height: 0;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-left: 8px solid rgba(14, 24, 27, 0.96);
}

.desktop-floating-wa .wa-assistant-close {
  position: absolute;
  top: 8px;
  right: 10px;
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.5);
  font-size: 18px;
  line-height: 1;
  padding: 4px;
  cursor: pointer;
  transition: color 0.2s ease;
}

.desktop-floating-wa .wa-assistant-close:hover {
  color: #ffffff;
}

.desktop-floating-wa .wa-assistant-body {
  display: block;
  text-decoration: none;
  color: inherit;
}

.desktop-floating-wa .wa-assistant-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.desktop-floating-wa .wa-assistant-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #9f7d50 0%, #d4af37 100%);
  color: #101d20;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  box-shadow: 0 4px 10px rgba(159, 125, 80, 0.4);
}

.desktop-floating-wa .wa-assistant-info {
  display: flex;
  flex-direction: column;
}

.desktop-floating-wa .wa-assistant-name {
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.02em;
}

.desktop-floating-wa .wa-assistant-status {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.7);
  display: flex;
  align-items: center;
  gap: 5px;
}

.desktop-floating-wa .wa-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #25D366;
  box-shadow: 0 0 8px #25D366;
  display: inline-block;
  animation: waDotPulse 1.8s infinite;
}

@keyframes waDotPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.85); }
}

.desktop-floating-wa .wa-assistant-msg {
  font-size: 12px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.85);
  margin: 0 0 10px 0;
}

.desktop-floating-wa .wa-assistant-msg strong {
  color: #9f7d50;
}

.desktop-floating-wa .wa-assistant-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: rgba(37, 211, 102, 0.15);
  border: 1px solid rgba(37, 211, 102, 0.45);
  color: #25D366;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 20px;
  transition: all 0.25s ease;
}

.desktop-floating-wa .wa-assistant-btn:hover {
  background: #25D366;
  color: #ffffff;
}

/* ==========================================================================
   2. YUKARI ÇIK (BACK-TO-TOP) BUTONU İLE HİZALAMA
   ========================================================================== */
@media (min-width: 768px) {
  .back-to-top-wrapper.back-to-top-btn-show {
    bottom: 105px !important;
    right: 38px !important;
    z-index: 9995 !important;
  }
}

@media (max-width: 767.98px) {
  .back-to-top-wrapper {
    display: none !important;
  }
}

/* ==========================================================================
   3. MOBİL 3 AKSİYONLU YAPIŞKAN VIP ALT BAR (< 768px)
   ========================================================================== */
.mobile-sticky-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 9998;
  background: rgba(10, 18, 20, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid rgba(159, 125, 80, 0.4);
  box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.65), 0 0 15px rgba(159, 125, 80, 0.1);
  padding: 6px 12px calc(6px + env(safe-area-inset-bottom, 0px));
}

.mobile-sticky-bar .mobile-bar-inner {
  display: grid;
  grid-template-columns: 1fr 1.15fr 1fr;
  align-items: center;
  position: relative;
  max-width: 500px;
  margin: 0 auto;
}

/* Standart Aksiyon Butonları (Sol & Sağ) */
.mobile-sticky-bar .mobile-bar-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.75);
  padding: 6px 4px;
  min-height: 48px;
  border-radius: 10px;
  transition: all 0.2s ease;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.mobile-sticky-bar .mobile-bar-item:active {
  transform: scale(0.95);
  color: #ffffff;
}

.mobile-sticky-bar .item-icon-box {
  font-size: 19px;
  line-height: 1;
  margin-bottom: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.85);
  transition: color 0.2s ease;
}

.mobile-sticky-bar .item-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* Sol Aksiyon Vurgusu (Hemen Ara) */
.mobile-sticky-bar .item-call:hover .item-icon-box,
.mobile-sticky-bar .item-call:hover .item-label {
  color: #4cd964;
}

/* Sağ Aksiyon Vurgusu (Rezervasyon) */
.mobile-sticky-bar .item-booking:hover .item-icon-box,
.mobile-sticky-bar .item-booking:hover .item-label {
  color: #9f7d50;
}

/* Orta Aksiyon: Yükseltilmiş WhatsApp VIP Butonu */
.mobile-sticky-bar .item-whatsapp-vip {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  text-decoration: none;
  padding: 0 4px 2px;
  z-index: 3;
}

.mobile-sticky-bar .vip-wa-center-btn {
  position: relative;
  width: 58px;
  height: 58px;
  margin-top: -24px;
  margin-bottom: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mobile-sticky-bar .vip-wa-ring {
  position: absolute;
  top: -4px;
  left: -4px;
  right: -4px;
  bottom: -4px;
  border-radius: 50%;
  border: 2px solid rgba(159, 125, 80, 0.65);
  box-shadow: 0 0 16px rgba(159, 125, 80, 0.35);
  animation: vipWaRingPulse 2.4s infinite cubic-bezier(0.215, 0.61, 0.355, 1);
  pointer-events: none;
}

@keyframes vipWaRingPulse {
  0% { transform: scale(0.95); opacity: 0.9; }
  50% { transform: scale(1.15); opacity: 0.35; }
  100% { transform: scale(0.95); opacity: 0.9; }
}

.mobile-sticky-bar .vip-wa-core {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
  border: 2.5px solid #d4af37;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5), 0 0 20px rgba(37, 211, 102, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 29px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.mobile-sticky-bar .item-whatsapp-vip:active .vip-wa-core {
  transform: scale(0.92);
}

.mobile-sticky-bar .item-label-vip {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #d4af37;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

/* ==========================================================================
   4. MOBİL SAFE AREA & RESPONSIVE GÖRÜNÜRLÜK KURALLARI
   ========================================================================== */
@media (min-width: 768px) {
  .desktop-floating-wa {
    display: block !important;
  }
  .mobile-sticky-bar {
    display: none !important;
  }
}

@media (max-width: 767.98px) {
  .desktop-floating-wa {
    display: none !important;
  }
  .mobile-sticky-bar {
    display: block !important;
  }
  
  /* Sayfa içeriklerinin alt bar tarafından örtülmesini engelleyen güvenli taban dolgusu */
  body {
    padding-bottom: calc(74px + env(safe-area-inset-bottom, 0px)) !important;
  }
}
