/* ============================================
   SABİT PROMO BUTONLARI - Multi-Box Hover System
   ============================================ */

.promo-sticky-container {
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ============================================
   BUTON SATIRI (Buton + Hover Tooltip)
   ============================================ */

.promo-button-row {
  display: flex;
  align-items: center;
  position: relative;
}

/* ============================================
   SABİT BUTONLAR
   ============================================ */

.promo-fixed-button {
  width: 80px;
  height: 80px;
  padding: 5px;
  box-sizing: border-box;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  cursor: pointer;
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  background-origin: content-box;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  /* GPU Hızlandırma */
  transform: translateZ(0);
  backface-visibility: hidden;
  flex-shrink: 0;
}

.promo-fixed-button:hover {
  transform: translateZ(0) scale(1.05);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

/* ============================================
   HOVER TOOLTIP - Diagram Tarzı Görünüm
   ============================================ */

.promo-tooltip {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  position: absolute;
  top: 50%;
  left: 100%;
  transform: translateY(-50%) translateX(-10px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
  pointer-events: none;
}

/* Sadece kare butonun üzerine gelindiğinde tooltip açılsın */
.promo-fixed-button:hover + .promo-tooltip,
.promo-tooltip:hover {
  opacity: 1;
  visibility: visible;
  transform: translateY(-50%) translateX(0);
  pointer-events: auto;
}

/* Ana Yatay Bağlantı Çizgisi - Ana butona bağlanır */
.promo-connector-line {
  width: 22px;
  display: flex;
  align-items: center;
  position: relative;
  flex-shrink: 0;
}

/* Yatay çizgi */
.promo-connector-line::before {
  content: '';
  width: calc(100% + 2px);
  height: 2px;
  background-color: rgba(255, 255, 255, 0.7);
}

/* JavaScript ile oluşturulan dikey uzatma çizgisi için temel stil */
.promo-connector-extender {
  pointer-events: none;
}

/* Tooltip Items Container - Dikey Sıralama (Alt Alta) */
.promo-tooltip-items {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
  position: relative;
  padding-left: 0;
  margin-left: -2px;
}

/* Her bir kutucuk + dal kombinasyonu */
.promo-tooltip-item {
  display: flex;
  flex-direction: row;
  align-items: center;
  position: relative;
  padding: 6px 0;
  padding-left: 2px;
}

/* İlk item hariç diğerlerinde dikey çizgi segmenti */
.promo-tooltip-item:not(:first-child)::before {
  content: '';
  position: absolute;
  left: 0;
  bottom: 50%;
  height: calc(50% + 6px); /* padding kadar uzat */
  width: 2px;
  background-color: inherit;
}

/* Son item hariç diğerlerinde dikey çizgi segmenti (aşağı) */
.promo-tooltip-item:not(:last-child)::after {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  height: calc(50% + 6px);
  width: 2px;
  background-color: inherit;
}

/* Yatay Dal Çizgisi - Her kutucuğun solunda */
.promo-tooltip-branch {
  width: 18px;
  height: 2px;
  background-color: rgba(255, 255, 255, 0.7);
  flex-shrink: 0;
}

/* Ok İkonu - Yatay dal sonunda */
.promo-tooltip-arrow {
  width: 0;
  height: 0;
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
  border-left: 9px solid;
  flex-shrink: 0;
}

/* Tooltip Text Kutusu */
.promo-tooltip-text {
  padding: 12px 18px;
  color: var(--promo-text, #fff);
  background-color: var(--promo-bg, #333);
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.15s ease;
  border-radius: 8px;
}

.promo-tooltip-text:hover {
  background-color: var(--promo-hover-bg, var(--promo-bg, #333));
  color: var(--promo-hover-text, var(--promo-text, #fff));
  transform: translateX(3px);
  z-index: 2;
}

/* ============================================
   TEMA RENKLERİ
   ============================================ */

/* ManusSim - Kırmızı */
.promo-theme-manussim .promo-fixed-button {
  background-color: #c62222;
}
.promo-theme-manussim .promo-connector-line::before,
.promo-theme-manussim .promo-tooltip-item::before,
.promo-theme-manussim .promo-tooltip-item::after,
.promo-theme-manussim .promo-tooltip-branch {
  background-color: #c62222;
}

/* Optimize - Yeşil */
.promo-theme-optimize .promo-fixed-button {
  background-color: #02d646;
}
.promo-theme-optimize .promo-connector-line::before,
.promo-theme-optimize .promo-tooltip-item::before,
.promo-theme-optimize .promo-tooltip-item::after,
.promo-theme-optimize .promo-tooltip-branch {
  background-color: #02d646;
}

/* PostDev - Turuncu */
.promo-theme-postdev .promo-fixed-button {
  background-color: #ff7200;
}
.promo-theme-postdev .promo-connector-line::before,
.promo-theme-postdev .promo-tooltip-item::before,
.promo-theme-postdev .promo-tooltip-item::after,
.promo-theme-postdev .promo-tooltip-branch {
  background-color: #ff7200;
}

/* ============================================
   RESPONSİVE TASARIM (Mobil)
   ============================================ */

@media (max-width: 768px) {
  .promo-sticky-container {
    bottom: 15px;
    left: 15px;
    gap: 8px;
  }

  .promo-fixed-button {
    width: 50px;
    height: 50px;
    border-radius: 10px;
  }

  /* Mobilde kutular dikey sıralanacak */
  .promo-tooltip-items {
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
  }

  .promo-tooltip-item {
    flex-direction: row;
  }

  .promo-connector-line {
    width: 15px;
    margin-top: 15px;
  }

  .promo-tooltip-branch {
    width: 12px;
  }

  .promo-tooltip-text {
    padding: 8px 12px;
    font-size: 12px;
    color: #fff;
  }

  .promo-tooltip-arrow {
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
    border-left-width: 8px;
  }
}
