/* ── Floating Buttons container ──────────────────────────────────────────────
   style.css has body > *{position:relative;z-index:1} which creates a stacking
   context at z-index:1 for every direct body child.  Raising this container
   to z-index:99999 puts it above all other sections — no layout changes needed.
   ─────────────────────────────────────────────────────────────────────────── */
body > #floating-buttons,
#floating-buttons {
  z-index: 99999 !important;
}

/* Back to Top */
#backToTop {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: none;
  border: 2px solid var(--accent-main);
  color: #fff;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.2rem;
  z-index: 9000;

  /* progress ring */
  --p: 0deg;
  background: conic-gradient(var(--accent-main) var(--p), #222 var(--p));
}
#backToTop.is-visible { display: flex; }

/* WhatsApp */
.floating-btn.whatsapp {
  position: fixed;
  right: 30px;
  bottom: 100px;
  background: #25d366;
  color: #fff;
  font-size: 28px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  z-index: 9001;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

/* Theme Picker */
.theme-picker {
  position: fixed;
  bottom: 170px;
  left: 30px;
  z-index: 9001;
}
.theme-picker .theme-fab {
  background: var(--accent-main);
  color: #fff;
  border: none;
  padding: 0.6rem;
  border-radius: 50%;
  font-size: 1rem;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
  transition: var(--transition);
}

/* Swatches مخفية افتراضياً */
.theme-picker .theme-swatches {
  display: none;
  position: absolute;
  bottom: 60px;
  right: 0;
  background: #111;
  padding: 0.6rem;
  border-radius: 8px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.5);
  flex-direction: column;
  gap: 0.5rem;
}

/* تظهر فقط عند الفتح */
.theme-picker.open .theme-swatches {
  display: flex;
}

.theme-swatch {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid #444;
  cursor: pointer;
  transition: var(--transition);
}
.theme-swatch:hover { transform: scale(1.1); }

/* الألوان */
.theme-swatch[data-theme="shiffera"] { background: #ff3b30; }
.theme-swatch[data-theme="dos"]      { background: #b0b0b0; }
.theme-swatch[data-theme="ps"]       { background: #1e90ff; }
.theme-swatch[data-theme="vsc"]      { background: #007acc; }
.theme-swatch[data-theme="terminal"] { background: #00ff00; }

/* Responsive توزيع الأزرار */
@media (max-width: 768px) {
  #floating-buttons {
    position: fixed;
    bottom: 60px;
    right: 25px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    z-index: 1200;
  }

  /* الأزرار الرئيسية فقط */
  #floating-buttons .floating-btn,
  #floating-buttons #backToTop,
  #floating-buttons .theme-picker {
    margin-bottom: 12px;   /* مسافة بين الأزرار */
    position: relative !important;
    right: auto !important;
    bottom: auto !important;
  }

  /* آخر زر بدون مسافة */
  #floating-buttons .theme-picker {
    margin-bottom: 0;
  }

  #floating-buttons .floating-btn,
  #floating-buttons #backToTop,
  #floating-buttons .theme-picker .theme-fab {
    width: 44px;
    height: 44px;
    font-size: 18px;
  }
}

@media (max-width: 480px) {
  #floating-buttons .floating-btn,
  #floating-buttons #backToTop,
  #floating-buttons .theme-picker {
    margin-bottom: 10px;
  }
}


/* end of file */