/* Call Button Pro v2 - Frontend */
:root {
  --cbp-btn-color: #e53e1a;
  --cbp-txt-color: #ffffff;
  --cbp-font-size: 14px;
  --cbp-btn-size:  62px;
  --cbp-shadow:    0 6px 24px rgba(0,0,0,.28);
  --cbp-z:         99999;
  --cbp-btn-font:  Tahoma, sans-serif;
  --cbp-br-font:   Tahoma, sans-serif;
}

/* ── Wrapper ─────────────────────────────────────────────────────────────── */
#cbp-wrapper {
  position: fixed;
  z-index:  var(--cbp-z);
  display:  flex;
  gap:      10px;
  align-items: flex-end;
  flex-direction: column;
}
#cbp-wrapper.cbp-pos-bottom-right { bottom:24px; right:24px; align-items:flex-end; }
#cbp-wrapper.cbp-pos-bottom-left  { bottom:24px; left:24px;  align-items:flex-start; }
#cbp-wrapper.cbp-pos-top-right    { top:24px;    right:24px; align-items:flex-end;   flex-direction:column-reverse; }
#cbp-wrapper.cbp-pos-top-left     { top:24px;    left:24px;  align-items:flex-start; flex-direction:column-reverse; }
#cbp-wrapper.cbp-pos-center-right { top:50%;     right:24px; transform:translateY(-50%); align-items:flex-end; }
#cbp-wrapper.cbp-pos-center-left  { top:50%;     left:24px;  transform:translateY(-50%); align-items:flex-start; }

/* ── Visibility ──────────────────────────────────────────────────────────── */
#cbp-wrapper.cbp-show-both    { display:flex; }
#cbp-wrapper.cbp-show-desktop { display:flex; }
#cbp-wrapper.cbp-show-mobile  { display:none; }
@media (max-width:768px) {
  #cbp-wrapper.cbp-show-mobile  { display:flex; }
  #cbp-wrapper.cbp-show-desktop { display:none; }
}

/* ════════════════════════════════════════════════════
   MAIN BUTTON BASE
══════════════════════════════════════════════════════ */
.cbp-btn {
  display:         inline-flex;
  align-items:     center;
  justify-content: center;
  gap:             10px;
  background:      var(--cbp-btn-color);
  color:           var(--cbp-txt-color);
  text-decoration: none;
  border:          none;
  cursor:          pointer;
  box-shadow:      var(--cbp-shadow);
  transition:      transform .2s, box-shadow .2s, background .3s;
  flex-shrink:     0;
  position:        relative;
  z-index:         1;
  padding:         0;
  line-height:     1;
  white-space:     nowrap;
}
.cbp-btn:hover  { transform:scale(1.08); box-shadow:0 8px 32px rgba(0,0,0,.32); }
.cbp-btn:active { transform:scale(.95); }

/* ── Button Icon ──────────────────────────────────────────────────────────── */
.cbp-btn-icon svg {
  display: block;
  width:   calc(var(--cbp-btn-size) * .42);
  height:  calc(var(--cbp-btn-size) * .42);
  flex-shrink: 0;
}

/* ── Button Label ─────────────────────────────────────────────────────────── */
.cbp-btn-label {
  font-weight: 700;
  font-size:   calc(var(--cbp-font-size) * 1.08);
  direction:   rtl;
  letter-spacing: .01em;
}

/* ════════════════════════════════════════════════════
   BUTTON MODES
══════════════════════════════════════════════════════ */

/* ── mode: icon only (circle/square) ───────────────────────────────────── */
#cbp-wrapper.cbp-mode-icon .cbp-btn {
  width:  var(--cbp-btn-size);
  height: var(--cbp-btn-size);
}

/* ── mode: icon + text (pill) ───────────────────────────────────────────── */
#cbp-wrapper.cbp-mode-icon_text .cbp-btn {
  height:  var(--cbp-btn-size);
  padding: 0 calc(var(--cbp-btn-size) * .36) 0 calc(var(--cbp-btn-size) * .28);
  direction: rtl;
}
html[dir="rtl"] #cbp-wrapper.cbp-mode-icon_text .cbp-btn {
  padding: 0 calc(var(--cbp-btn-size) * .28) 0 calc(var(--cbp-btn-size) * .36);
}

/* ── mode: text only ────────────────────────────────────────────────────── */
#cbp-wrapper.cbp-mode-text .cbp-btn {
  height:  var(--cbp-btn-size);
  padding: 0 calc(var(--cbp-btn-size) * .42);
  direction: rtl;
}

/* ════════════════════════════════════════════════════
   BUTTON SHAPES
══════════════════════════════════════════════════════ */
#cbp-wrapper.cbp-shape-circle   .cbp-btn { border-radius: 50%; }
#cbp-wrapper.cbp-shape-rounded  .cbp-btn { border-radius: 14px; }
#cbp-wrapper.cbp-shape-pill     .cbp-btn { border-radius: 999px; }
#cbp-wrapper.cbp-shape-square   .cbp-btn { border-radius: 4px; }

/* icon-only circle must stay circular */
#cbp-wrapper.cbp-mode-icon.cbp-shape-circle .cbp-btn {
  border-radius: 50%;
}

/* ════════════════════════════════════════════════════
   BRANCHES PANEL
══════════════════════════════════════════════════════ */
#cbp-branches {
  background:    #fff;
  border-radius: 18px;
  box-shadow:    0 8px 40px rgba(0,0,0,.18);
  overflow:      hidden;
  min-width:     255px;
  max-width:     310px;
  transform-origin: bottom right;
  animation:     cbp-panel-in .28s cubic-bezier(.175,.885,.32,1.275);
}
#cbp-wrapper.cbp-pos-bottom-left  #cbp-branches,
#cbp-wrapper.cbp-pos-top-left     #cbp-branches,
#cbp-wrapper.cbp-pos-center-left  #cbp-branches { transform-origin: bottom left; }
#cbp-branches.cbp-hidden  { display: none; }
#cbp-branches.cbp-closing { animation: cbp-panel-out .2s ease forwards; }

@keyframes cbp-panel-in  { from{opacity:0;transform:scale(.82) translateY(12px)} to{opacity:1;transform:none} }
@keyframes cbp-panel-out { from{opacity:1;transform:none} to{opacity:0;transform:scale(.82) translateY(12px)} }

.cbp-branch-item {
  display:     flex;
  align-items: center;
  gap:         14px;
  padding:     15px 18px;
  text-decoration: none;
  color:       #1a1a2e;
  border-bottom: 1px solid #f0f2f5;
  transition:  background .15s, transform .15s;
  direction:   rtl;
}
.cbp-branch-item:last-of-type { border-bottom: none; }
.cbp-branch-item:hover { background:#f8f9ff; transform: translateX(-3px); }
.cbp-branch-item:hover .cbp-bi-icon svg { color: var(--cbp-btn-color, #e53e1a); }

.cbp-bi-icon {
  width: 40px; height: 40px;
  background: #f1f5f9;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: background .2s;
}
.cbp-bi-icon svg { width: 20px; height: 20px; color: #475569; transition: color .2s; }
.cbp-bi-info { display: flex; flex-direction: column; gap: 3px; }
.cbp-bi-info strong { font-weight: 700; font-size: 1em; color: #1a1a2e; }
.cbp-bi-info span   { font-size: .85em; color: #64748b; direction: ltr; }

/* Copyright */
.cbp-copyright {
  text-align: center;
  padding:    9px 14px;
  font-size:  11px;
  color:      #94a3b8;
  background: #f8fafc;
  border-bottom: 1px solid #e9ecef;
  direction:  rtl;
}
.cbp-cr-single {
  background: rgba(0,0,0,.55);
  color: #fff;
  border-radius: 8px;
  padding: 4px 12px;
  font-size: 10px;
  border-bottom: none;
  text-align: center;
}

/* ════════════════════════════════════════════════════
   ANIMATIONS
══════════════════════════════════════════════════════ */
#cbp-wrapper.cbp-motion-pulse      .cbp-btn { animation: cbp-pulse 2s ease-in-out infinite; }
#cbp-wrapper.cbp-motion-bounce     .cbp-btn { animation: cbp-bounce 2s cubic-bezier(.36,.07,.19,.97) infinite; }
#cbp-wrapper.cbp-motion-ring       .cbp-btn { animation: cbp-ring 2.2s ease-in-out infinite; }
#cbp-wrapper.cbp-motion-swing      .cbp-btn { animation: cbp-swing 2s ease-in-out infinite; transform-origin: top center; }
#cbp-wrapper.cbp-motion-heartbeat  .cbp-btn { animation: cbp-heartbeat 1.4s ease-in-out infinite; }
#cbp-wrapper.cbp-motion-tada       .cbp-btn { animation: cbp-tada 1.6s ease infinite; }
#cbp-wrapper.cbp-motion-float      .cbp-btn { animation: cbp-float 3s ease-in-out infinite; }
#cbp-wrapper.cbp-motion-glow       .cbp-btn { animation: cbp-glow 2s ease-in-out infinite alternate; }

@keyframes cbp-pulse     { 0%,100%{box-shadow:0 0 0 0 color-mix(in srgb,var(--cbp-btn-color) 55%,transparent)} 50%{box-shadow:0 0 0 16px transparent} }
@keyframes cbp-bounce    { 0%,20%,50%,80%,100%{transform:translateY(0)} 40%{transform:translateY(-14px)} 60%{transform:translateY(-7px)} }
@keyframes cbp-ring      { 0%,100%{transform:rotate(0)} 5%,15%{transform:rotate(12deg)} 10%,20%{transform:rotate(-12deg)} 25%{transform:rotate(0)} }
@keyframes cbp-swing     { 0%,100%{transform:rotate(0)} 20%{transform:rotate(15deg)} 40%{transform:rotate(-10deg)} 60%{transform:rotate(5deg)} 80%{transform:rotate(-5deg)} }
@keyframes cbp-heartbeat { 0%,100%{transform:scale(1)} 14%,42%{transform:scale(1.18)} 28%,70%{transform:scale(1)} }
@keyframes cbp-tada      { 0%{transform:scaleX(1)} 10%,20%{transform:scale3d(.9,.9,.9) rotate(-3deg)} 30%,50%,70%,90%{transform:scale3d(1.12,1.12,1.12) rotate(3deg)} 40%,60%,80%{transform:scale3d(1.12,1.12,1.12) rotate(-3deg)} 100%{transform:scaleX(1)} }
@keyframes cbp-float     { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-11px)} }
@keyframes cbp-glow      { from{box-shadow:0 0 10px 4px color-mix(in srgb,var(--cbp-btn-color) 45%,transparent)} to{box-shadow:0 0 28px 10px color-mix(in srgb,var(--cbp-btn-color) 75%,transparent)} }

.cbp-btn:hover { animation-play-state: paused; }

/* ── center-right/left needs no Y transform when animated ────────────────── */
#cbp-wrapper.cbp-pos-center-right.cbp-motion-bounce .cbp-btn,
#cbp-wrapper.cbp-pos-center-left.cbp-motion-bounce  .cbp-btn,
#cbp-wrapper.cbp-pos-center-right.cbp-motion-float  .cbp-btn,
#cbp-wrapper.cbp-pos-center-left.cbp-motion-float   .cbp-btn { animation: none; }

/* ── Branch number (conditionally shown) ──────────────────────────────────── */
.cbp-bi-number {
  font-size:  .84em;
  color:      #64748b;
  direction:  ltr;
  display:    block;
  margin-top: 1px;
}

/* ══════════════════════════════════════════════════════
   SOCIAL BAR
══════════════════════════════════════════════════════ */
#cbp-social-bar {
  position:        fixed;
  z-index:         99998;
  display:         flex;
  flex-direction:  column;
  gap:             8px;
  align-items:     flex-start;
}

/* ── Positions ──────────────────────────────────────────────────────────── */
#cbp-social-bar.cbp-sb-pos-center-left  { top:50%; left:0;   transform:translateY(-50%); }
#cbp-social-bar.cbp-sb-pos-center-right { top:50%; right:0;  transform:translateY(-50%); align-items:flex-end; }
#cbp-social-bar.cbp-sb-pos-bottom-left  { bottom:24px; left:24px; }
#cbp-social-bar.cbp-sb-pos-bottom-right { bottom:24px; right:24px; align-items:flex-end; }
#cbp-social-bar.cbp-sb-pos-top-left     { top:24px; left:24px; }
#cbp-social-bar.cbp-sb-pos-top-right    { top:24px; right:24px; align-items:flex-end; }

/* Horizontal strip mode for bottom positions */
#cbp-social-bar.cbp-sb-pos-bottom-left,
#cbp-social-bar.cbp-sb-pos-bottom-right { flex-direction:row; }
#cbp-social-bar.cbp-sb-pos-top-left,
#cbp-social-bar.cbp-sb-pos-top-right    { flex-direction:row; }

/* ── Visibility ──────────────────────────────────────────────────────────── */
#cbp-social-bar.cbp-show-both    { display:flex; }
#cbp-social-bar.cbp-show-desktop { display:flex; }
#cbp-social-bar.cbp-show-mobile  { display:none; }
@media (max-width:768px) {
  #cbp-social-bar.cbp-show-mobile  { display:flex; }
  #cbp-social-bar.cbp-show-desktop { display:none; }
}

/* ── Single item ─────────────────────────────────────────────────────────── */
.cbp-sb-item {
  display:         flex;
  align-items:     center;
  gap:             0;
  background:      var(--cbp-sc, #333);
  color:           #fff;
  text-decoration: none;
  border-radius:   0 10px 10px 0;
  overflow:        hidden;
  box-shadow:      2px 2px 12px rgba(0,0,0,.22);
  transition:      transform .22s cubic-bezier(.34,1.56,.64,1), box-shadow .2s, gap .2s, padding .2s;
  max-width:       46px;
}

/* Right-side bar: rounded on left */
#cbp-social-bar.cbp-sb-pos-center-right  .cbp-sb-item,
#cbp-social-bar.cbp-sb-pos-bottom-right  .cbp-sb-item,
#cbp-social-bar.cbp-sb-pos-top-right     .cbp-sb-item {
  border-radius: 10px 0 0 10px;
}

/* Bottom/top bar: fully rounded */
#cbp-social-bar.cbp-sb-pos-bottom-left   .cbp-sb-item,
#cbp-social-bar.cbp-sb-pos-bottom-right  .cbp-sb-item,
#cbp-social-bar.cbp-sb-pos-top-left      .cbp-sb-item,
#cbp-social-bar.cbp-sb-pos-top-right     .cbp-sb-item { border-radius:50%; max-width:none; }

.cbp-sb-item:hover {
  transform:   translateX(4px) scale(1.06);
  box-shadow:  4px 4px 18px rgba(0,0,0,.32);
  gap:         10px;
  max-width:   220px;
  padding-right: 14px;
}
#cbp-social-bar.cbp-sb-pos-center-right .cbp-sb-item:hover {
  transform:   translateX(-4px) scale(1.06);
  padding-left: 14px;
  padding-right: 0;
}
#cbp-social-bar.cbp-sb-pos-bottom-left .cbp-sb-item:hover,
#cbp-social-bar.cbp-sb-pos-bottom-right .cbp-sb-item:hover,
#cbp-social-bar.cbp-sb-pos-top-left .cbp-sb-item:hover,
#cbp-social-bar.cbp-sb-pos-top-right .cbp-sb-item:hover {
  transform: scale(1.12);
  padding-right: 0;
  max-width: none;
  gap: 0;
}

.cbp-sb-icon {
  width:         46px;
  height:        46px;
  display:       flex;
  align-items:   center;
  justify-content:center;
  flex-shrink:   0;
}
.cbp-sb-icon svg { width:22px; height:22px; }

.cbp-sb-label {
  font-size:    12px;
  font-weight:  700;
  white-space:  nowrap;
  overflow:     hidden;
  max-width:    0;
  opacity:      0;
  transition:   max-width .22s, opacity .2s;
  direction:    rtl;
}
.cbp-sb-item:hover .cbp-sb-label {
  max-width: 120px;
  opacity:   1;
}

/* ── Style: icons+labels (always visible labels) ─────────────────────────── */
#cbp-social-bar.cbp-sb-style-icons_labels .cbp-sb-item {
  max-width:    none;
  gap:          10px;
  padding-right:14px;
  border-radius:10px;
}
#cbp-social-bar.cbp-sb-style-icons_labels .cbp-sb-label {
  max-width: 120px;
  opacity:   1;
}
#cbp-social-bar.cbp-sb-style-icons_labels .cbp-sb-item:hover {
  padding-right: 14px;
  transform: scale(1.05) translateX(4px);
}
