@font-face {
  font-family: "Yekan Bakh";
  src: local("Yekan Bakh"), local("YekanBakh"), local("Yekan Bakh FaNum"), local("Yekan Bakh FN");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

#shcd-chatbot-widget,
#shcd-chatbot-widget * {
  box-sizing: border-box;
  font-family: "Yekan Bakh", "YekanBakh", "IRANYekanX", "IRANYekan", "Vazirmatn", Dana, sans-serif !important;
  font-feature-settings: "ss01" 1;
}

.shcd-chatbot {
  --shcd-chat-primary: #38008a;
  --shcd-chat-violet: #6f19ff;
  --shcd-chat-pink: #ff3bbd;
  --shcd-chat-cyan: #00c2ff;
  --shcd-panel-bg: rgba(255,255,255,.78);
  --shcd-panel-text: #221633;
  --shcd-soft-bg: rgba(246,241,255,.78);
  --shcd-bot-bg: rgba(255,255,255,.92);
  --shcd-user-bg: linear-gradient(135deg, var(--shcd-chat-primary), var(--shcd-chat-violet) 55%, var(--shcd-chat-pink));
  --shcd-chatbot-bottom-offset: 0px;
  --shcd-chatbot-panel-bottom: 84px;
  --shcd-chatbot-panel-width: min(394px, calc(100vw - 36px));
  --shcd-chatbot-mobile-bottom-offset: 56px;
  position: fixed;
  bottom: calc(24px + var(--shcd-chatbot-bottom-offset));
  z-index: 999999;
  direction: rtl;
}

.shcd-chatbot.is-left { left: 24px; }
.shcd-chatbot.is-right { right: 24px; }

.shcd-chat-toggle {
  border: 0;
  cursor: pointer;
  color: #fff;
  transition: transform .22s ease, box-shadow .22s ease;
  isolation: isolate;
  margin-top: var(--shcd-chat-toggle-margin-top, 0px);
}

.shcd-chat-toggle .shcd-toggle-icon {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  line-height: 1;
  text-align: center;
  font-weight: 950;
  font-size: inherit;
}

.shcd-chat-toggle small {
  position: relative;
  z-index: 1;
  font-size: 12px;
  font-weight: 950;
  color: rgba(255,255,255,.92);
}

.shcd-chatbot.launcher-orb .shcd-chat-toggle {
  width: 60px;
  height: 60px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 31px;
  background:
    radial-gradient(circle at 30% 20%, rgba(255,255,255,.95), transparent 23%),
    linear-gradient(135deg, var(--shcd-chat-primary), var(--shcd-chat-violet) 52%, var(--shcd-chat-pink) 76%, var(--shcd-chat-cyan));
  box-shadow: 0 18px 42px rgba(56, 0, 138, .34), inset -8px -8px 16px rgba(0,0,0,.16), inset 9px 9px 16px rgba(255,255,255,.22);
}

.shcd-chatbot.launcher-minimal .shcd-chat-toggle {
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  border-radius: 20px;
  font-size: 29px;
  background: rgba(255,255,255,.28);
  backdrop-filter: blur(16px);
  box-shadow: 10px 10px 24px rgba(56,0,138,.20), inset 0 0 0 1px rgba(255,255,255,.44);
}

.shcd-chatbot.launcher-assistant .shcd-chat-toggle {
  min-width: 104px;
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  border-radius: 22px;
  background: linear-gradient(135deg, var(--shcd-chat-primary), var(--shcd-chat-violet), var(--shcd-chat-cyan));
  box-shadow: 0 18px 38px rgba(56,0,138,.28);
}

.shcd-chat-toggle:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 24px 50px rgba(56, 0, 138, .42);
}

.shcd-chatbot.is-open .shcd-chat-toggle {
  transform: rotate(90deg);
}

.shcd-chatbot.launcher-assistant.is-open .shcd-chat-toggle {
  transform: none;
}

.shcd-chat-panel {
  position: absolute;
  bottom: var(--shcd-chatbot-panel-bottom);
  width: var(--shcd-chatbot-panel-width);
  overflow: hidden;
  border-radius: 32px;
  color: var(--shcd-panel-text);
  background:
    radial-gradient(circle at 14% 0%, rgba(255,59,189,.14), transparent 30%),
    radial-gradient(circle at 88% 4%, rgba(0,194,255,.16), transparent 28%),
    var(--shcd-panel-bg);
  border: 1px solid rgba(255,255,255,.70);
  box-shadow: 0 28px 76px rgba(36, 26, 51, .24), -10px -10px 30px rgba(255,255,255,.48), inset 0 0 0 1px rgba(255,255,255,.34);
  backdrop-filter: blur(20px);
  animation: shcdPop .22s ease both;
}

.shcd-chatbot.is-left .shcd-chat-panel { left: 0; }
.shcd-chatbot.is-right .shcd-chat-panel { right: 0; }

@keyframes shcdPop {
  from { transform: translateY(12px) scale(.98); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}

.shcd-chat-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 18px 19px;
  color: #fff;
  background: linear-gradient(135deg, var(--shcd-chat-primary), var(--shcd-chat-violet) 54%, var(--shcd-chat-pink) 76%, var(--shcd-chat-cyan));
}

.shcd-chat-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.shcd-chat-avatar {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  font-weight: 950;
  background: rgba(255,255,255,.18);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.28);
}

.shcd-chat-head strong {
  display: block;
  margin-bottom: 3px;
  font-size: 17px;
  font-weight: 950;
}

.shcd-chat-head small {
  display: block;
  color: rgba(255,255,255,.82);
  font-size: 13px;
  font-weight: 700;
}

.shcd-pulse {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #64ffb5;
  box-shadow: 0 0 0 8px rgba(100, 255, 181, .18), 0 0 16px rgba(100,255,181,.9);
}

.shcd-chat-messages {
  height: 350px;
  overflow-y: auto;
  padding: 18px;
  scroll-behavior: smooth;
  background: var(--shcd-soft-bg);
}

.shcd-chat-messages::-webkit-scrollbar { width: 7px; }
.shcd-chat-messages::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(56,0,138,.26);
}

.shcd-msg {
  display: flex;
  margin: 0 0 13px;
}

.shcd-msg span {
  position: relative;
  max-width: 85%;
  white-space: pre-wrap;
  word-break: break-word;
  padding: 12px 14px;
  border-radius: 20px;
  font-size: 14.5px;
  line-height: 1.95;
}

.shcd-msg span b {
  font-weight: 700;
}

.shcd-msg.assistant span {
  color: var(--shcd-panel-text);
  background: var(--shcd-bot-bg);
  box-shadow: 7px 7px 15px rgba(66,48,95,.10), -7px -7px 15px rgba(255,255,255,.78);
}

.shcd-msg.user {
  justify-content: flex-start;
}

.shcd-msg.user span {
  margin-right: auto;
  padding-left: 44px;
  color: #fff;
  background: var(--shcd-user-bg);
  box-shadow: 0 12px 24px rgba(56,0,138,.24);
}

.shcd-ticks {
  position: absolute;
  left: 13px;
  bottom: 7px;
  color: rgba(255,255,255,.86);
  font-size: 12px;
  font-weight: 950;
  letter-spacing: -2px;
}

.shcd-msg.typing span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 62px;
  min-height: 41px;
}

.shcd-msg.typing i {
  width: 7px;
  height: 7px;
  display: block;
  border-radius: 50%;
  background: var(--shcd-chat-primary);
  opacity: .55;
  animation: shcdTyping 1s infinite ease-in-out;
}

.shcd-msg.typing i:nth-child(2) { animation-delay: .14s; }
.shcd-msg.typing i:nth-child(3) { animation-delay: .28s; }

@keyframes shcdTyping {
  0%, 80%, 100% { transform: translateY(0); opacity: .45; }
  40% { transform: translateY(-5px); opacity: 1; }
}

.shcd-chat-error {
  margin: 0 18px 10px;
  padding: 11px 13px;
  border-radius: 16px;
  color: #941337;
  background: rgba(220, 35, 84, .13);
  font-size: 13px;
  font-weight: 800;
}

.shcd-chat-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 82px;
  align-items: stretch;
  gap: 10px;
  padding: 14px;
  border-top: 1px solid rgba(56,0,138,.08);
  background: rgba(255,255,255,.64);
}

#shcd-chatbot-widget .shcd-chat-form .shcd-chat-input {
  display: block !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  min-height: 56px !important;
  height: 56px !important;
  max-height: 120px !important;
  resize: none !important;
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid rgba(181, 209, 98, .85) !important;
  outline: none !important;
  border-radius: 20px !important;
  padding: 14px 16px !important;
  margin: 0 !important;
  color: #241a33 !important;
  background: rgba(255,255,255,.96) !important;
  box-shadow: inset 5px 5px 11px rgba(66,48,95,.11), inset -5px -5px 11px rgba(255,255,255,.9) !important;
  font-size: 14.5px !important;
  font-weight: 700 !important;
  line-height: 1.8 !important;
  text-align: right !important;
  overflow: auto !important;
}

#shcd-chatbot-widget .shcd-chat-form .shcd-chat-input::placeholder {
  color: #d89b23 !important;
  opacity: 1 !important;
}

#shcd-chatbot-widget .shcd-chat-form .shcd-chat-submit {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 82px !important;
  min-width: 82px !important;
  height: 100% !important;
  min-height: 56px !important;
  padding: 0 12px !important;
  margin: 0 !important;
  border: 0 !important;
  outline: none !important;
  border-radius: 20px !important;
  cursor: pointer;
  color: #fff !important;
  font-size: 16px !important;
  line-height: 1.2 !important;
  font-weight: 950 !important;
  text-align: center !important;
  white-space: nowrap !important;
  background: linear-gradient(135deg, var(--shcd-chat-primary), var(--shcd-chat-violet) 58%, var(--shcd-chat-pink)) !important;
  box-shadow: 0 11px 24px rgba(56,0,138,.24) !important;
  appearance: none;
  -webkit-appearance: none;
}

.shcd-chat-form button:disabled {
  opacity: .55;
  cursor: not-allowed;
}

.shcd-chatbot.theme-midnight {
  --shcd-panel-bg: rgba(21, 14, 34, .88);
  --shcd-panel-text: #f5eeff;
  --shcd-soft-bg: radial-gradient(circle at 10% 0%, rgba(111,25,255,.25), transparent 35%), rgba(16, 10, 26, .94);
  --shcd-bot-bg: rgba(255,255,255,.10);
  --shcd-user-bg: linear-gradient(135deg, #5b13d5, #8d2bff 62%, #00a8d9);
}

.shcd-chatbot.theme-midnight .shcd-chat-panel {
  border-color: rgba(255,255,255,.14);
  box-shadow: 0 30px 80px rgba(7,4,14,.46), inset 0 0 0 1px rgba(255,255,255,.08);
}

.shcd-chatbot.theme-midnight .shcd-chat-head {
  background: linear-gradient(135deg, #14062f, var(--shcd-chat-primary), #007ea5);
}

.shcd-chatbot.theme-midnight .shcd-chat-form {
  background: rgba(20,13,34,.88);
  border-color: rgba(255,255,255,.08);
}

.shcd-chatbot.theme-midnight .shcd-chat-form .shcd-chat-input {
  color: #fff !important;
  background: rgba(255,255,255,.10) !important;
  border-color: rgba(173, 255, 227, .55) !important;
  box-shadow: inset 5px 5px 12px rgba(0,0,0,.16), inset -5px -5px 12px rgba(255,255,255,.04) !important;
}

.shcd-chatbot.theme-aurora {
  --shcd-soft-bg: radial-gradient(circle at 12% 10%, rgba(255,189,89,.18), transparent 32%), radial-gradient(circle at 86% 0%, rgba(0,194,255,.24), transparent 30%), #fff8ff;
  --shcd-bot-bg: rgba(255,255,255,.90);
  --shcd-user-bg: linear-gradient(135deg, var(--shcd-chat-primary), #ff3bbd 58%, #00c2ff);
}

.shcd-chatbot.theme-aurora .shcd-chat-head {
  background: linear-gradient(135deg, var(--shcd-chat-primary), #ff3bbd, #00c2ff);
}

@media (max-width: 520px) {
  .shcd-chatbot {
    bottom: calc(16px + var(--shcd-chatbot-mobile-bottom-offset));
  }
  .shcd-chatbot.is-left { left: 12px; }
  .shcd-chatbot.is-right { right: 12px; }
  .shcd-chat-panel {
    width: min(350px, calc(100vw - 24px));
    max-width: calc(100vw - 24px);
    border-radius: 24px;
  }
  .shcd-chat-messages { height: min(44vh, 360px); }
  .shcd-chatbot.launcher-assistant .shcd-chat-toggle { min-width: 86px; }
  #shcd-chatbot-widget .shcd-chat-form {
    grid-template-columns: 250px minmax(0, 1fr);
    gap: 8px;
    padding: 12px;
  }
  #shcd-chatbot-widget .shcd-chat-form .shcd-chat-input {
    min-height: 52px !important;
    height: 52px !important;
    font-size: 14px !important;
    padding: 12px 14px !important;
  }
  #shcd-chatbot-widget .shcd-chat-form .shcd-chat-submit {
    width: 72px !important;
    min-width: 72px !important;
    min-height: 52px !important;
    font-size: 15px !important;
  }
}


/* Dedicated utility classes for custom positioning and theme isolation */
#shcd-chatbot-widget .shcd-chatbot.has-custom-bubble-offset {
  bottom: calc(24px + var(--shcd-chatbot-bottom-offset));
}

#shcd-chatbot-widget .shcd-chatbot .shcd-chat-toggle,
#shcd-chatbot-widget .shcd-chatbot .shcd-chat-input,
#shcd-chatbot-widget .shcd-chatbot .shcd-chat-submit {
  box-sizing: border-box !important;
}
