/* تماس شناور v3.0 — محمد پیرفلکه | شرکت وب آسا گیل | https://webasagil.ir/ */
#tsh-floating-wrap, #tsh-floating-wrap * { box-sizing: border-box; }

.tsh-float-wrap {
  position: fixed;
  z-index: var(--tsh-z, 99999);
  direction: rtl;
  line-height: 1.5;
  font-family: inherit;
}
.tsh-float-buttons {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: var(--tsh-gap, 14px);
}

/* ---- ریست استایل دکمه‌های قالب ---- */
#tsh-floating-wrap button {
  all: unset;
  box-sizing: border-box;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
#tsh-floating-wrap button:focus-visible {
  outline: 3px solid rgba(0, 0, 0, .35);
  outline-offset: 3px;
}

/* ---- دکمه‌های شناور ---- */
#tsh-floating-wrap .tsh-float-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  color: var(--tsh-fab-icon, #fff);
  background: var(--tsh-fab-bg, #d91512);
  box-shadow: 0 10px 24px rgba(0, 0, 0, .22), 0 2px 6px rgba(0, 0, 0, .12);
  transition: transform .2s ease, box-shadow .2s ease;
}
#tsh-floating-wrap .tsh-support-btn {width: var(--tsh-support-size, 74px);height: var(--tsh-support-size, 74px);border-radius: 35px;}
#tsh-floating-wrap .tsh-float-btn:hover  { transform: translateY(-2px) scale(1.04); box-shadow: 0 14px 30px rgba(0, 0, 0, .26); }
#tsh-floating-wrap .tsh-float-btn:active { transform: scale(.96); }

.tsh-shape-circle .tsh-float-btn { border-radius: 50%; }
.tsh-shape-drop   .tsh-float-btn { border-radius: 50% 50% 10px 50%; }

#tsh-floating-wrap .tsh-float-btn svg { display: block; width: 46%; height: 46%; }
#tsh-floating-wrap .tsh-float-btn .tsh-fab-img { display: block; width: 56%; height: 56%; object-fit: contain; }
.tsh-chat-bubble { fill: currentColor; }
.tsh-chat-dots circle { fill: var(--tsh-fab-bg, #d91512); }

/* ---- پنل ---- */
.tsh-support-panel {
  position: absolute;
  bottom: calc(100% + 14px);
  right: 0;
  width: min(340px, calc(100vw - 28px));
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px) scale(.97);
  transform-origin: bottom right;
  transition: opacity .22s ease, transform .22s ease, visibility .22s;
}
.tsh-support-panel.is-open { opacity: 1; visibility: visible; transform: none; }

.tsh-panel-card {
  background: var(--tsh-panel, #fff);
  color: var(--tsh-text, #222);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .22), 0 0 0 1px rgba(0, 0, 0, .05);
}
.tsh-panel-head {
  position: relative;
  padding: 20px 22px 16px;
  background: #fdeeee;
  background: linear-gradient(135deg, color-mix(in srgb, var(--tsh-color, #d91512) 16%, transparent), transparent 85%);
}
.tsh-panel-title    { font-size: 18px; font-weight: 700; margin: 0 0 4px; padding-left: 40px; }
.tsh-panel-subtitle { font-size: 13px; opacity: .65; }

#tsh-floating-wrap .tsh-panel-close {
  position: absolute;
  top: 14px;
  left: 14px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: inherit;
  background: rgba(127, 127, 127, .14);
  transition: background .15s;
}
#tsh-floating-wrap .tsh-panel-close:hover { background: rgba(127, 127, 127, .28); }

/* ---- آیتم‌ها ---- */
.tsh-contact-list { display: grid; gap: 10px; padding: 12px 14px 16px; }
#tsh-floating-wrap a.tsh-contact-item,
#tsh-floating-wrap a.tsh-contact-item:visited {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 12px;
  border-radius: 16px;
  background: rgba(127, 127, 127, .09);
  color: var(--tsh-text, #222);
  text-decoration: none;
  box-shadow: none;
  border: 0;
  transition: background .18s ease, transform .18s ease;
}
#tsh-floating-wrap a.tsh-contact-item:hover {
  background: rgba(127, 127, 127, .17);
  transform: translateX(-3px);
  color: var(--tsh-text, #222);
}
.tsh-contact-icon {
  flex: none;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: #fff;
  border: 1px solid rgba(217, 21, 18, .2);
  border: 1px solid color-mix(in srgb, var(--tsh-color, #d91512) 25%, transparent);
  overflow: hidden;
}
.tsh-contact-icon:empty { display: none; }
.tsh-contact-icon img { width: 28px; height: 28px; object-fit: contain; display: block; }
.tsh-contact-icon svg { width: 26px; height: 26px; display: block; }
.tsh-contact-label { flex: 1; font-size: 15px; font-weight: 600; }

@media (max-width: 767px) {
  .tsh-support-panel { width: min(320px, calc(100vw - 28px)); }
}
@media (prefers-reduced-motion: reduce) {
  .tsh-support-panel, #tsh-floating-wrap .tsh-float-btn, #tsh-floating-wrap a.tsh-contact-item { transition: none; }
}
/* نمایش بر اساس دستگاه */
@media (min-width: 768px) { .tsh-dev-mobile { display: none !important; } }
@media (max-width: 767px) { .tsh-dev-desktop { display: none !important; } }
