/* ===== Webify Floating Lead Panel (Robust Fixed) ===== */

:root{
  --wflp-gap-left: 35px;
  --wflp-top: 140px;          /* מיקום בדסקטופ */
  --wflp-panel-w: 360px;
  --wflp-tab-w: 50px;
  --wflp-tab-h: 200px;
  --wflp-z: 2147483647;       /* הכי גבוה */
}

/* container (רק לשמירת state/class) */
.wflp{
  position: static !important;
  z-index: var(--wflp-z) !important;
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

/* ===== TAB (always visible) ===== */
.wflp__tab{
  position: fixed !important;
  left: var(--wflp-gap-left) !important;
  right: auto !important;
  top: var(--wflp-top) !important;

  width: var(--wflp-tab-w) !important;
  height: var(--wflp-tab-h) !important;

  border: none !important;
  border-radius: 12px !important;
  background: #3B77B4 !important;
  color: #fff !important;
  cursor: pointer !important;

  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;

  box-shadow: 0 10px 28px rgba(0,0,0,0.18) !important;
  z-index: var(--wflp-z) !important;

  transition: transform .28s ease !important;
  will-change: transform;
}

/* vertical text bottom-to-top */
.wflp__tabText{
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: .5px;
}

/* כשהפאנל פתוח בדסקטופ – מזיזים את הכפתור ימינה (ב־transform) */
.wflp.is-open .wflp__tab{
  transform: translateX(calc(var(--wflp-panel-w) + 10px)) !important;
}

/* ===== PANEL ===== */
.wflp__panel{
  position: fixed !important;
  left: var(--wflp-gap-left) !important;
  right: auto !important;
  top: var(--wflp-top) !important;

  width: var(--wflp-panel-w) !important;
  max-width: calc(100vw - (var(--wflp-gap-left) * 2) - var(--wflp-tab-w)) !important;

  background: #ffffff !important;
  border-radius: 14px !important;
  box-shadow: 0 12px 40px rgba(0,0,0,0.18) !important;
  overflow: hidden;

  transform: translateX(-110%) !important;
  transition: transform .28s ease !important;
  will-change: transform;

  z-index: var(--wflp-z) !important;
}

.wflp.is-open .wflp__panel{
  transform: translateX(0) !important;
}

/* close button */
.wflp__close{
    position: absolute;
    top: 10px;
    left: 15px;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.06);
    font-size: 25px;
    line-height: 15px;
    cursor: pointer;
    z-index: 2;
	padding: 10px;
}

/* overlay */
.wflp__overlay{
  display: none;
}

html.wflp-lock,
body.wflp-lock{
  overflow: hidden !important;
}

/* ===== Mobile ===== */
@media (max-width: 767px){
  :root{
    --wflp-gap-left: 12px;
    --wflp-panel-w: 92vw;
    --wflp-tab-w: 46px;
    --wflp-tab-h: 180px;
  }

  .wflp__tab{
    top: auto !important;
    bottom: 110px !important;
    left: 12px !important;
  }

  .wflp__panel{
    top: auto !important;
    bottom: 110px !important;
    left: 12px !important;

    width: var(--wflp-panel-w) !important;
    max-width: var(--wflp-panel-w) !important;

    max-height: 80vh;
    overflow-y: scroll;
    -webkit-overflow-scrolling: touch;
  }

  /* במובייל: הכפתור לא זז כשפתוח */
  .wflp.is-open .wflp__tab{
    transform: none !important;
  }

  .wflp__overlay{
    display: none;
  }
  .wflp.is-open .wflp__overlay{
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: calc(var(--wflp-z) - 1);
  }
}
/* Mobile tap stability + prevent bounce scrolling behind */
.wflp__tab,
.wflp__close{
  touch-action: manipulation;
}

.wflp__overlay{
  touch-action: none;
}

@media (max-width: 767px){
  .wflp__panel{
    overscroll-behavior: contain;
  }
}
