  /* استایل‌های پایه چت باکس */

  .contact_section {
      background-image: url("/images/default/bg-conatct.svg");
      width: 100%;
      background-size: contain;
      background-position: right;
      background-repeat: no-repeat;
  }

  .section_title p {
      font-size: 19px;
      color: #6d6d6d;
  }

  .contact-item {
      display: flex;
      align-items: center;
      margin: 8px 0 20px;
  }

  #chatSupportInfo {
      position: fixed;
      bottom: 90px;
      right: 24px;
      background: #f1f9fb;
      padding: 10px 14px;
      border-radius: 12px;
      display: flex;
      align-items: center;
      gap: 8px;
      font-size: 14px;
      color: #333;
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
      z-index: 9998;
  }

  #chatSupportInfo img {
      width: 20px;
      height: 20px;
  }

  .contact-item img {
      height: 24px;
      width: 24px;
  }

  .contact-item span {
      font-size: 19px;
      color: #6d6d6d;
      margin-right: 12px;
  }

  .contact-item .number a {
      font-size: 17px;
      font-weight: bold;
      color: #6d6d6d;
      margin-right: 12px;
  }

  .contact_form .form_item input {
      border-radius: 16px;
      box-shadow: rgba(0, 0, 0, 0.05) 0px 6px 24px 0px, rgba(0, 0, 0, 0.08) 0px 0px 0px 1px;
  }

  .contact_form {
      border: solid 2px #eee;
      border-radius: 16px;
      padding: 64px;
      background: #fff;
      box-shadow: rgba(0, 0, 0, 0.05) 0px 6px 24px 0px, rgba(0, 0, 0, 0.08) 0px 0px 0px 1px;
      margin-top: 64px;
  }

  .shape {
      position: absolute;
      z-index: 0;
      bottom: 20%;
      right: -23%;
  }

  .shape img {
      width: 80%;
  }

  #chatBox {
      display: none;
      position: fixed;
      top: 0;
      left: 0;
      width: 100vw;
      height: 100vh;
      background: #fff;
      border: none;
      border-radius: 0;
      box-shadow: none;
      flex-direction: column;
      z-index: 99999;
      font-family: 'Poppins', 'IranSans', sans-serif;
  }

  /* استایل‌های مربوط به حالت کوچک (پیش‌فرض برای دسکتاپ) */
  #chatBox.compact-mode {
      top: auto;
      left: auto;
      bottom: 90px;
      right: 24px;
      width: 360px;
      height: 480px;
      border: 1px solid #ddd;
      border-radius: 16px;
      box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
  }

  .message {
      word-wrap: break-word;
      overflow-wrap: break-word;
      word-break: break-word;
      transition: background 0.3s;
  }

  #chatHeader {
      padding: 16px 24px;
      background: var(--bd-color-theme-primary);
      color: white;
      border-radius: 0;
      font-weight: bold;
      display: flex;
      justify-content: space-between;
      align-items: center;
      font-size: 18px;
      cursor: pointer;
  }

  /* حالت هدر در حالت کوچک */
  #chatBox.compact-mode #chatHeader {
      border-top-left-radius: 16px;
      border-top-right-radius: 16px;
      padding: 14px 20px;
      font-size: 16px;
  }

  #chatMessages {
      flex: 1;
      overflow-y: auto;
      padding: 20px;
      background: #f5f6f9;
  }

  /* حالت محتوا در حالت کوچک */
  #chatBox.compact-mode #chatMessages {
      padding: 16px;
  }

  .message {
      margin-bottom: 16px;
      max-width: 85%;
      padding: 12px 16px;
      border-radius: 20px;
      line-height: 1.6;
      position: relative;
      animation: fadeIn 0.3s ease;
      font-size: 15px;
  }

  /* حالت پیام در حالت کوچک */
  #chatBox.compact-mode .message {
      margin-bottom: 12px;
      padding: 10px 14px;
      font-size: 14px;
  }

  .user-message {
      background: #26056e;
      color: white;
      margin-left: auto;
      border-bottom-right-radius: 6px;
  }

  .bot-message {
      background: #ffffff;
      color: #333;
      border: 1px solid #eee;
      margin-right: auto;
      border-bottom-left-radius: 6px;
  }

  .product-card {
      border: 1px solid #ddd;
      border-radius: 10px;
      padding: 12px;
      margin-top: 12px;
      background: #ffffff;
      box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
      transition: box-shadow 0.3s ease;
  }

  /* حالت کارت محصول در حالت کوچک */
  #chatBox.compact-mode .product-card {
      padding: 10px;
      margin-top: 10px;
  }

  .product-card:hover {
      box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
  }

  .product-card img {
      width: 100%;
      border-radius: 6px;
      margin-bottom: 8px;
  }

  .product-card h4 {
      margin: 0 0 6px 0;
      color: #230589;
      font-size: 16px;
  }

  /* حالت عنوان محصول در حالت کوچک */
  #chatBox.compact-mode .product-card h4 {
      font-size: 15px;
  }

  .product-card .price {
      font-weight: bold;
      color: #333;
      font-size: 15px;
  }

  /* حالت قیمت در حالت کوچک */
  #chatBox.compact-mode .product-card .price {
      font-size: 14px;
  }

  #chatControls {
      padding: 16px;
      border-top: 1px solid #eee;
      background: white;
      border-radius: 0;
      display: flex;
      gap: 12px;
  }

  /* حالت کنترل‌ها در حالت کوچک */
  #chatBox.compact-mode #chatControls {
      padding: 12px;
      border-bottom-left-radius: 16px;
      border-bottom-right-radius: 16px;
      gap: 8px;
  }

  #chatInput {
      flex: 1;
      padding: 12px 16px;
      border: 1px solid #ccc;
      border-radius: 20px;
      outline: none;
      font-size: 15px;
      transition: border 0.3s;
  }

  /* حالت ورودی در حالت کوچک */
  #chatBox.compact-mode #chatInput {
      padding: 10px 14px;
      font-size: 14px;
  }

  #chatInput:focus {
      border-color: var(--bd-color-theme-secondary);
  }

  #sendBtn {
      padding: 12px 20px;
      background: var(--bd-color-theme-secondary);
      color: white;
      border: none;
      border-radius: 20px;
      cursor: pointer;
      transition: background 0.2s ease;
      font-size: 15px;
  }

  /* حالت دکمه ارسال در حالت کوچک */
  #chatBox.compact-mode #sendBtn {
      padding: 10px 16px;
      font-size: 14px;
  }

  #sendBtn:hover {
      background: var(--bd-color-theme-primary);
  }

  #chatToggleBtn {
      position: fixed;
      bottom: 24px;
      right: 24px;
      z-index: 9999;
      background: var(--bd-color-theme-primary);
      color: white;
      border: none;
      padding: 14px 18px;
      border-radius: 32px;
      font-size: 15px;
      font-weight: 500;
      box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
      cursor: pointer;
      display: flex;
      align-items: center;
      gap: 8px;
      transition: all 0.2s;
  }

  #chatToggleBtn:hover {
      transform: translateY(-2px);
      box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
  }

  #closeChat {
      background: none;
      border: none;
      color: white;
      font-size: 24px;
      cursor: pointer;
      padding: 4px 12px;
  }

  /* حالت دکمه بستن در حالت کوچک */
  #chatBox.compact-mode #closeChat {
      font-size: 18px;
      padding: 0;
  }

  .typing-indicator {
      display: inline-block;
      padding: 8px 12px;
      background: #eee;
      border-radius: 18px;
      font-size: 12px;
      opacity: 0.9;
  }

  .typing-dot {
      display: inline-block;
      width: 7px;
      height: 7px;
      background: #999;
      border-radius: 50%;
      margin-right: 4px;
      animation: typingAnimation 1.4s infinite both;
  }

  .typing-dot:nth-child(1) {
      animation-delay: 0s;
  }

  .typing-dot:nth-child(2) {
      animation-delay: 0.2s;
  }

  .typing-dot:nth-child(3) {
      animation-delay: 0.4s;
  }

  @keyframes typingAnimation {

      0%,
      60%,
      100% {
          transform: translateY(0);
      }

      30% {
          transform: translateY(-4px);
      }
  }

  @keyframes fadeIn {
      from {
          opacity: 0;
          transform: translateY(10px);
      }

      to {
          opacity: 1;
          transform: translateY(0);
      }
  }

  .rtl {
      direction: rtl;
      text-align: right;
  }

  /* دکمه تغییر اندازه */
  .resize-toggle {
      background: none;
      border: none;
      color: white;
      font-size: 16px;
      cursor: pointer;
      margin-left: 12px;
  }

  /* حالت موبایل */
  @media (max-width: 767px) {
      #chatBox {
          width: 100% !important;
          height: 100vh !important;
          max-height: 100vh !important;
          bottom: 0 !important;
          right: 0 !important;
          border-radius: 0 !important;
          position: fixed !important;
      }

      #chatToggleBtn {
          bottom: 16px !important;
          right: 16px !important;
      }

      #chatHeader {
          border-radius: 0 !important;
      }

      #chatControls {
          border-radius: 0 !important;
      }

      /* مخفی کردن دکمه تغییر اندازه در موبایل */
      .resize-toggle {
          display: none !important;
      }
  }

  .contact_section {
      background-image: url("/images/default/bg-conatct.svg");
      width: 100%;
      background-size: contain;
      background-position: right;
      background-repeat: no-repeat;
  }

  .bot-message {
      white-space: pre-line;
      line-height: 1.8;
  }

  .section_title p {
      font-size: 19px;
      color: #6d6d6d;
  }

  .contact-item {
      display: flex;
      align-items: center;
      margin: 8px 0 20px;
  }

  #chatSupportInfo {
      position: fixed;
      bottom: 90px;
      right: 24px;
      background: #f1f9fb;
      padding: 10px 14px;
      border-radius: 12px;
      display: flex;
      align-items: center;
      gap: 8px;
      font-size: 14px;
      color: #333;
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
      z-index: 9998;
  }

  #chatSupportInfo img {
      width: 20px;
      height: 20px;
  }

  .contact-item img {
      height: 24px;
      width: 24px;
  }

  .contact-item span {
      font-size: 19px;
      color: #6d6d6d;
      margin-right: 12px;
  }

  .contact-item .number a {
      font-size: 17px;
      font-weight: bold;
      color: #6d6d6d;
      margin-right: 12px;
  }

  .contact_form .form_item input {
      border-radius: 16px;
      box-shadow: rgba(0, 0, 0, 0.05) 0px 6px 24px 0px, rgba(0, 0, 0, 0.08) 0px 0px 0px 1px;
  }

  .contact_form {
      border: solid 2px #eee;
      border-radius: 16px;
      padding: 64px;
      background: #fff;
      box-shadow: rgba(0, 0, 0, 0.05) 0px 6px 24px 0px, rgba(0, 0, 0, 0.08) 0px 0px 0px 1px;
      margin-top: 64px;
  }

  .shape {
      position: absolute;
      z-index: 0;
      bottom: 20%;
      right: -23%;
  }

  .shape img {
      width: 80%;
  }

  /* استایل‌های پایه چت باکس */
  #chatBox {
      display: none;
      position: fixed;
      top: 0;
      left: 0;
      width: 100vw;
      height: 100vh;
      background: #fff;
      border: none;
      border-radius: 0;
      box-shadow: none;
      flex-direction: column;
      z-index: 99999;
      font-family: 'Poppins', 'IranSans', sans-serif;
      /* اضافه شده */
      overflow: hidden;
      /* جلوگیری از اسکرول کل چت باکس */
  }

  /* استایل‌های مربوط به حالت کوچک (پیش‌فرض برای دسکتاپ) */
  #chatBox.compact-mode {
      top: auto;
      left: auto;
      bottom: 90px;
      right: 24px;
      width: 360px;
      height: 480px;
      border: 1px solid #ddd;
      border-radius: 16px;
      box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
  }

  .message {
      word-wrap: break-word;
      overflow-wrap: break-word;
      word-break: break-word;
      transition: background 0.3s;
  }

  #chatHeader {
      padding: 16px 24px;
      background: var(--bd-color-theme-primary);
      /* رنگ آبی مشخص برای هدر */
      color: white;
      border-radius: 0;
      font-weight: bold;
      display: flex;
      justify-content: space-between;
      align-items: center;
      font-size: 18px;
      cursor: pointer;
      position: relative;
      /* اضافه شده */
      z-index: 1;
      /* اضافه شده */
  }

  #chatHeader .chat-logo {
      width: 28px;
      height: 28px;
      object-fit: contain;
      margin-right: 8px;
      border-radius: 50%;
      /* اگر دایره‌ای می‌خواهید */
  }

  /* حالت هدر در حالت کوچک */
  #chatBox.compact-mode #chatHeader {
      border-top-left-radius: 16px;
      border-top-right-radius: 16px;
      padding: 14px 20px;
      font-size: 16px;
  }

  #chatMessages {
      background: #f5f6f9 var(--chat-background-url) center/cover;
      background-blend-mode: overlay;
      background-attachment: local;
      opacity: 0.85;
      padding: 20px;
      overflow-y: auto;
      position: relative;
  }


  #chatMessages {
      position: relative;
      overflow-y: auto;
      padding: 20px;
      background: #f5f6f9;
      flex: 1;
      margin-bottom: auto;
  }

  #chatHeader {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 10px;
      position: relative;
  }

  .chat-left {
      display: flex;
      align-items: center;
      gap: 8px;
  }

  .chat-logo {
      width: 40px;
      height: 40px;
      border-radius: 50%;
      object-fit: cover;
  }

  .user-info {
      font-size: 13px;
  }

  .chat-center {
      position: absolute;
      left: 50%;
      transform: translateX(-50%);
      font-size: 16px;
      font-weight: bold;
  }

  .login-btn {
      font-size: 13px;
      color: #007bff;
      text-decoration: none;
      padding: 5px 10px;
      border: 1px solid #007bff;
      border-radius: 5px;
      transition: all 0.3s ease;
  }

  .login-btn:hover {
      background-color: #007bff;
      color: white;
  }

  .chat-right button {
      background: transparent;
      border: none;
      font-size: 18px;
      cursor: pointer;
  }

  #chatMessages::before {
      content: "";
      background-image: var(--chat-background-url);
      background-size: cover;
      background-attachment: local;
      background-position: center;
      background-repeat: no-repeat;
      opacity: 1;
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      z-index: -1;
      pointer-events: none;
  }

  /* برای حالت compact */
  #chatBox.compact-mode #chatHeader {
      background: var(--bd-color-theme-primary);
      /* همان رنگ آبی */
      border-top-left-radius: 16px;
      border-top-right-radius: 16px;
  }

  #chatBox.compact-mode #chatControls {
      background: white;
      /* همان رنگ سفید */
      border-bottom-left-radius: 16px;
      border-bottom-right-radius: 16px;
  }

  /* بهبود خوانایی پیام‌ها */
  .bot-message {
      background: rgba(255, 255, 255, 0.9);
      /* سفید با کمی شفافیت */
      backdrop-filter: blur(2px);
      /* افکت محو برای زیبایی */
  }

  .user-message {
      background: rgba(38, 5, 110, 0.9);
      /* بنفش با کمی شفافیت */
      backdrop-filter: blur(2px);
  }

  /* برای حالت compact */
  #chatBox.compact-mode #chatHeader {
      background: var(--bd-color-theme-primary);
      /* همان رنگ آبی */
      border-top-left-radius: 16px;
      border-top-right-radius: 16px;
  }

  #chatBox.compact-mode #chatControls {
      position: sticky;
      bottom: 0;
      z-index: 2;
  }

  /* بهبود خوانایی پیام‌ها */
  .bot-message {
      background: rgba(255, 255, 255, 0.9);
      /* سفید با کمی شفافیت */
      backdrop-filter: blur(2px);
      /* افکت محو برای زیبایی */
  }

  .user-message {
      background: rgba(38, 5, 110, 0.9);
      /* بنفش با کمی شفافیت */
      backdrop-filter: blur(2px);
  }

  /* حالت محتوا در حالت کوچک */
  #chatBox.compact-mode #chatMessages {
      padding: 16px;
  }

  .message {
      margin-bottom: 16px;
      max-width: 70%;
      padding: 12px 16px;
      border-radius: 20px;
      line-height: 1.6;
      position: relative;
      animation: fadeIn 0.3s ease;
      font-size: 15px;
  }

  /* حالت پیام در حالت کوچک */
  #chatBox.compact-mode .message {
      margin-bottom: 12px;
      padding: 10px 14px;
      font-size: 14px;
  }

  .user-message {
      background: #26056e;
      color: white;
      margin-left: 4px;
      border-bottom-right-radius: 6px;
      max-width: fit-content;
  }

  .bot-message {
      max-width: fit-content;
      background: #ffffff;
      color: #333;
      border: 1px solid #eee;
      margin-right: 4px;
      border-bottom-left-radius: 6px;
  }

  .product-card {
      border: 1px solid #ddd;
      border-radius: 10px;
      padding: 12px;
      margin-top: 12px;
      background: #ffffff;
      box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
      transition: box-shadow 0.3s ease;
  }

  /* حالت کارت محصول در حالت کوچک */
  #chatBox.compact-mode .product-card {
      padding: 10px;
      margin-top: 10px;
  }

  .product-card:hover {
      box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
  }

  .product-card img {
      width: 100%;
      border-radius: 6px;
      margin-bottom: 8px;
  }

  .product-card h4 {
      margin: 0 0 6px 0;
      color: #230589;
      font-size: 16px;
  }

  /* حالت عنوان محصول در حالت کوچک */
  #chatBox.compact-mode .product-card h4 {
      font-size: 15px;
  }

  .product-card .price {
      font-weight: bold;
      color: #333;
      font-size: 15px;
  }

  /* حالت قیمت در حالت کوچک */
  #chatBox.compact-mode .product-card .price {
      font-size: 14px;
  }

  #chatControls {
      padding: 16px;
      border-top: 1px solid #eee;
      background: white;
      /* پس‌زمینه سفید برای بخش کنترل */
      border-radius: 0;
      display: flex;
      gap: 12px;
      position: relative;
      /* اضافه شده */
      z-index: 1;
      /* اضافه شده */
  }

  /* حالت کنترل‌ها در حالت کوچک */
  #chatBox.compact-mode #chatControls {
      padding: 12px;
      border-bottom-left-radius: 16px;
      border-bottom-right-radius: 16px;
      gap: 8px;
  }

  #chatInput {
      flex: 1;
      padding: 12px 16px;
      border: 1px solid #ccc;
      border-radius: 20px;
      outline: none;
      font-size: 15px;
      transition: border 0.3s;
  }

  /* حالت ورودی در حالت کوچک */
  #chatBox.compact-mode #chatInput {
      padding: 10px 14px;
      font-size: 14px;
  }

  #chatInput:focus {
      border-color: var(--bd-color-theme-secondary);
  }

  #sendBtn {
      padding: 12px 20px;
      background: var(--bd-color-theme-secondary);
      color: white;
      border: none;
      border-radius: 20px;
      cursor: pointer;
      transition: background 0.2s ease;
      font-size: 15px;
  }

  /* حالت دکمه ارسال در حالت کوچک */
  #chatBox.compact-mode #sendBtn {
      padding: 10px 16px;
      font-size: 14px;
  }

  #sendBtn:hover {
      background: var(--bd-color-theme-primary);
  }

  #chatToggleBtn {
      position: fixed;
      bottom: 24px;
      right: 24px;
      z-index: 9999;
      background: var(--bd-color-theme-primary);
      color: white;
      border: none;
      padding: 14px 18px;
      border-radius: 32px;
      font-size: 15px;
      font-weight: 500;
      box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
      cursor: pointer;
      display: flex;
      align-items: center;
      gap: 8px;
      transition: all 0.2s;
  }

  #chatToggleBtn:hover {
      transform: translateY(-2px);
      box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
  }

  #closeChat {
      background: none;
      border: none;
      color: white;
      font-size: 24px;
      cursor: pointer;
      padding: 4px 12px;
  }

  /* حالت دکمه بستن در حالت کوچک */
  #chatBox.compact-mode #closeChat {
      font-size: 18px;
      padding: 0;
  }

  .typing-indicator {
      display: inline-flex;
      /* استفاده از inline-flex به جای inline-block */
      align-items: center;
      padding: 8px 12px;
      background: #eee;
      border-radius: 18px;
      font-size: 12px;
      opacity: 0.9;
      gap: 4px;
      /* فاصله بین دایره‌ها */
  }

  .typing-dot {
      width: 7px;
      height: 7px;
      background: #999;
      border-radius: 50%;
      animation: typingAnimation 1.4s infinite both;
  }

  .typing-dot:nth-child(1) {
      animation-delay: 0s;
  }

  .typing-dot:nth-child(2) {
      animation-delay: 0.2s;
  }

  .typing-dot:nth-child(3) {
      animation-delay: 0.4s;
  }

  @keyframes typingAnimation {

      0%,
      60%,
      100% {
          transform: translateY(0);
      }

      30% {
          transform: translateY(-4px);
      }
  }

  @keyframes fadeIn {
      from {
          opacity: 0;
          transform: translateY(10px);
      }

      to {
          opacity: 1;
          transform: translateY(0);
      }
  }

  .rtl {
      direction: rtl;
      text-align: right;
  }

  /* دکمه تغییر اندازه */
  .resize-toggle {
      background: none;
      border: none;
      color: white;
      font-size: 16px;
      cursor: pointer;
      margin-left: 12px;
  }

  @media (max-width: 767px) {
      :root {
          --vh: 100vh;
      }

      #chatBox {
          width: 100% !important;
          height: calc(var(--vh, 1vh) * 100) !important;
          max-height: calc(var(--vh, 1vh) * 100) !important;
          bottom: 0 !important;
          right: 0 !important;
          border-radius: 0 !important;
          position: fixed !important;
          display: flex !important;
          flex-direction: column;
          justify-content: space-between;
          overflow: hidden;
      }

      #chatToggleBtn {
          bottom: 16px !important;
          right: 16px !important;
      }

      #chatHeader,
      #chatControls {
          border-radius: 0 !important;
      }

      .resize-toggle {
          display: none !important;
      }

      #chatMessages {
          flex: 1;
          overflow-y: auto;
      }

      #chatControls {
          position: sticky;
          bottom: 0;
          background: white;
          z-index: 100;
          border-top: 1px solid #eee;
      }
  }


  #siteHeader {
      position: fixed;
      top: 0;
      right: 0;
      left: 0;
      background: linear-gradient(90deg, #00afcb 0%, #008fa8 100%);
      z-index: 9999;
      padding: 12px 24px;
      box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
      display: flex;
      justify-content: space-between;
      align-items: center;
      direction: rtl;
      font-family: 'IRANSans', sans-serif;
  }

  #siteHeader .chat-left,
  #siteHeader .chat-center {
      display: flex;
      align-items: center;
  }

  .chat-logo {
      height: 42px;
      margin-left: 12px;
  }

  .user-info {
      font-size: 15px;
      color: #ffffff;
      font-weight: 500;
  }

  .chat-title {
      font-size: 16px;
      color: #ffffff;
      font-weight: bold;
  }

  .login-btn {
      font-size: 14px;
      color: #ffffff;
      background-color: rgba(255, 255, 255, 0.2);
      padding: 6px 14px;
      border-radius: 8px;
      border: 1px solid #fff;
      text-decoration: none;
      transition: all 0.3s ease;
  }

  .login-btn:hover {
      background-color: #ffffff;
      color: #00afcb;
      text-decoration: none;
      box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  }

  .page-wrapper {
      padding-top: 70px;
      /* برای اینکه محتوا زیر هدر نرود */
  }
  