/* ویجت تماس شناور + دکمه بازگشت به بالا (بدون CSS قدیمی قالب) */
:root {
  --theam-color: var(--gold, #e39c27);
  --theam-second-color: var(--ink, #20233a);
  --maincolor: var(--gold-dark, #c9820e);
}

.cp-top {
  position: fixed;
  right: 15px;
  bottom: 15px;
  display: inline-block;
  visibility: hidden;
  overflow: hidden;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  transition: opacity 0.3s 0s, visibility 0s 0.3s;
  white-space: nowrap;
  text-indent: 100%;
  opacity: 0;
  background: var(--theam-second-color);
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.35);
  z-index: 99999;
}

.cp-top svg {
  float: right;
  stroke: #fff;
  padding: 10px;
  width: 50px;
  height: 50px;
}

.cp-top.cp-is-visible,
.cp-top.cp-fade-out,
.no-touch .cp-top:hover {
  transition: opacity 0.3s 0s, visibility 0s 0s;
}

.cp-top.cp-is-visible {
  visibility: visible;
  opacity: 1;
}

.no-touch .cp-top:hover {
  opacity: 1;
  background-color: var(--gold-dark, #c9820e);
}

@keyframes jump-shaking {
  0% { transform: translateX(0); }
  25% { transform: translateY(-9px); }
  35% { transform: translateY(-9px) rotate(17deg); }
  55% { transform: translateY(-9px) rotate(-17deg); }
  65% { transform: translateY(-9px) rotate(17deg); }
  75% { transform: translateY(-9px) rotate(-17deg); }
  100% { transform: translateY(0) rotate(0deg); }
}

.elm_c_wrap {
  position: fixed;
  left: 25px;
  bottom: 20px;
  z-index: 999;
}

.body_ismobile .elm_c_wrap.elm_c_top {
  left: 12px;
  bottom: 90px;
}

.body_ismobile.woocommerce-account .elm_c_wrap.elm_c_top {
  left: 12px;
  bottom: 15px;
  display: none;
}

.elm_c_btn {
  justify-content: center;
  align-items: center;
  width: 60px;
  height: 60px;
  background-color: var(--maincolor);
  color: #fff;
  border-radius: 50%;
  margin-top: 7px;
  box-shadow: 6px 7px 28px -12px rgba(16, 16, 16, 0.3);
  display: none;
  position: relative;
  transition: transform 0.2s ease, box-shadow 0.3s ease;
  transform: translateZ(0);
  backface-visibility: hidden;
}

.elm_c_btn.is_main {
  display: flex;
  opacity: 1;
  margin: 0;
  cursor: pointer;
  animation: jump-shaking 3s ease infinite;
  will-change: transform;
}

.elm_c_btn.is_main:hover,
.elm_c_btn.is_main.is_active {
  animation: none;
  will-change: auto;
}

.elm_c_btn.is_main::before,
.elm_c_btn.is_main::after {
  content: "";
  width: 60px;
  height: 60px;
  background-color: inherit;
  border-radius: 50%;
  position: absolute;
  top: 0;
  left: 0;
  z-index: -1;
  opacity: 0;
  visibility: hidden;
  transition: transform 0.4s ease, opacity 0.4s ease;
}

.elm_c_btn.is_main:hover {
  box-shadow: none;
}

.elm_c_btn.is_main:hover::before {
  opacity: 0.2;
  visibility: visible;
  transform: scale(1.2);
}

.elm_c_btn.is_main:hover::after {
  opacity: 0.1;
  visibility: visible;
  transform: scale(1.4);
}

.elm_c_btn.is_main .close,
.elm_c_btn.is_main.is_active .open {
  display: none;
}

.elm_c_btn.is_main.is_active .close {
  display: block;
}

.elm_c_list {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 75px;
  bottom: 70px;
  transform: scaleY(0) translateY(20px);
  transform-origin: bottom center;
  opacity: 0;
  pointer-events: none;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
  will-change: transform, opacity;
  backface-visibility: hidden;
}

.elm_c_list.is_active {
  transform: scaleY(1) translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.elm_c_list:not(.is_active) {
  will-change: auto;
}

.elm_c_list .elm_c_btn {
  display: flex;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.elm_c_list.is_active .elm_c_btn {
  opacity: 1;
  transform: translateY(0);
}

.elm_c_list.is_active .elm_c_btn:nth-child(1) { transition-delay: 0.05s; }
.elm_c_list.is_active .elm_c_btn:nth-child(2) { transition-delay: 0.1s; }
.elm_c_list.is_active .elm_c_btn:nth-child(3) { transition-delay: 0.15s; }
.elm_c_list.is_active .elm_c_btn:nth-child(4) { transition-delay: 0.2s; }
.elm_c_list.is_active .elm_c_btn:nth-child(5) { transition-delay: 0.25s; }

.elm_c_btn.btn_c_all { background-color: #ed801a; }
.btn_c_telegram { background-color: #2bbafe; color: #fff !important; }
.btn_c_whatsapp { background-color: #02df73; color: #fff !important; }
.btn_c_itaa { background-color: #d13f00; color: #fff !important; }
.btn_c_rubika { background: #e9e9e9 !important; }
.btn_c_call { background-color: #4caf50; }
.btn_c_sms {
  background-color: #ff9800;
  position: relative;
}

.btn_c_sms span {
  position: absolute;
  left: 35px;
  background: #ff9800;
  width: 140px;
  height: 60px;
  top: 0;
  padding-left: 30px;
  padding-right: 10px;
  border-radius: 0 20px 20px 0;
  z-index: -1;
  line-height: 60px;
  color: #fff;
  opacity: 0;
  transform: translateX(-10px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.btn_c_sms:hover span {
  opacity: 1;
  transform: translateX(0);
}

.elm_c_btn svg {
  fill: #fff;
  stroke: #fff;
  width: 26px;
  height: 26px;
  margin: 16px auto auto;
  display: block;
}

.elm_c_btn.btn_c_rubika svg {
  fill: #414141;
  stroke: #414141;
}

.pack-theme {
  fill: none;
  stroke: #414141;
  transition: stroke 0.3s ease;
}
