.axo-assistant-root {
  position: fixed;
  right: var(--axo-root-right, 31px);
  bottom: var(--axo-root-bottom, 37px);
  z-index: 9999;
  direction: rtl;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: bottom 0.22s ease;
}

.axo-assistant-root.axo-ready {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

.axo-chat-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 1;
}

.axo-chat-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.axo-chat-toggle {
  width: var(--axo-toggle-size, 70px);
  height: var(--axo-toggle-size, 70px);
  border: 0;
  border-radius: 50%;
  background: var(--axo-toggle-bg, #D2BA93);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--axo-toggle-padding, 7px);
  box-shadow: -5px 5px 7px -3px rgba(0, 0, 0, 0.32);
  transition: background-color 0.2s ease;
  z-index: 3;
}

.axo-chat-toggle:hover {
  background: var(--axo-toggle-bg-hover, #323040);
}

.axo-chat-toggle:hover .axo-chat-toggle-icon {
  background-color: var(--axo-toggle-icon-color-hover, #ffffff);
}

.axo-chat-toggle-icon {
  width: var(--axo-toggle-icon-size, 56px);
  height: var(--axo-toggle-icon-size, 56px);
  pointer-events: none;
  background-color: var(--axo-toggle-icon-color, #ffffff);
  -webkit-mask-image: var(--axo-toggle-icon-url, none);
  mask-image: var(--axo-toggle-icon-url, none);
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
}

.axo-chat-popup {
  position: absolute;
  right: 0;
  bottom: calc(100% + 12px);
  width: min(370px, calc(100vw - 28px));
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 2;
}

.axo-chat-popup.is-open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.axo-chat-close {
  position: absolute;
  top: -25px;
  left: -15px;
  border: 0;
  background: transparent;
  color: #ffffff;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
  transition: color 0.2s ease;
  z-index: 4;
}

.axo-chat-close:hover,
.axo-chat-close:active {
  color: #D2BA93;
}

#chat-box {
  direction: rtl;
  border: 1px solid #ddd;
  border-radius: 20px;
  width: 100%;
  display: flex;
  flex-direction: column;
  height: min(70vh, 560px);
  min-height: 0;
  background: #fff;
  position: relative;
  overflow: hidden;
}

#chat-header {
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  border-bottom: 1px solid #ddd;
}

#user-info {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  max-width: 420px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #fff;
}

#user-info input {
  height: 40px;
  padding: 0 10px;
  border: 1px solid #ddd;
  border-radius: 6px;
  direction: rtl;
  text-align: right;
}

#guest-error {
  min-height: 16px;
  color: #c53929;
  font-size: 12px;
  text-align: right;
  display: none;
}

#user-info button {
  height: 42px;
  background: #D2BA93;
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

#messages {
  flex: 1;
  min-height: 0;
  padding: 12px;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  display: flex;
  flex-direction: column;
  direction: rtl;
}

#messages::before {
  content: "";
  margin-top: auto;
}

.msg {
  margin-bottom: 8px;
  padding: 8px 12px;
  border-radius: 6px;
  max-width: 80%;
  direction: rtl;
  text-align: right;
}

.msg.user {
  background: #D2BA93;
  color: #fff;
  margin-left: auto;
  margin-right: 0;
}

.msg.bot {
  background: #1F1D29;
  color: #fff;
  margin-right: auto;
  margin-left: 0;
}

.msg.bot.msg-typing {
  background-color: transparent;
  color: inherit;
}

.msg.bot.msg-typing .loader {
  width: 64px;
  height: 8px;
  --_g: no-repeat radial-gradient(farthest-side, #1F1D29 94%, #0000);
  background:
    var(--_g) 25% 0,
    var(--_g) 75% 0;
  background-size: 8px 8px;
  position: relative;
  animation: axo-loader-0 1s linear infinite;
}

.msg.bot.msg-typing .loader:before {
  content: "";
  position: absolute;
  height: 8px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #1F1D29;
  inset: 0;
  margin: auto;
  animation: axo-loader-1 1s cubic-bezier(0.5, 300, 0.5, -300) infinite;
}

@keyframes axo-loader-0 {
  0%,24% { background-position: 25% 0, 75% 0; }
  40% { background-position: 25% 0, 85% 0; }
  50%,72% { background-position: 25% 0, 75% 0; }
  90% { background-position: 15% 0, 75% 0; }
  100% { background-position: 25% 0, 75% 0; }
}

@keyframes axo-loader-1 {
  100% { transform: translate(0.1px); }
}

#chat-input {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 8px 10px;
  border-top: 1px solid #ddd;
}

#chat-input textarea {
  flex: 1;
  min-height: 44px;
  max-height: 120px;
  padding: 10px 12px;
  border: none;
  outline: none;
  resize: none;
  line-height: 1.45;
  overflow-y: hidden;
  direction: rtl;
  text-align: right;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

#chat-input button {
  height: 44px;
  padding: 0 18px;
  background: #D2BA93;
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

#chat-footer {
  height: 36px;
  font-size: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border-top: 1px solid #eee;
  color: #777;
}

#chat-footer a {
  color: #323040;
  text-decoration: none;
}

.chat-inactive #messages,
.chat-inactive #chat-input {
  filter: blur(4px);
  pointer-events: none;
  opacity: 0.6;
}

@media (min-width: 768px) and (max-width: 1024px) {
  .axo-assistant-root {
    right: var(--axo-root-right, 31px);
    bottom: var(--axo-root-bottom, 37px);
  }

  body.user-profile .axo-assistant-root,
  body.page-user-profile .axo-assistant-root {
    right: var(--axo-dashboard-right, 31px);
    bottom: var(--axo-dashboard-bottom, 30px);
  }
}

@media (max-width: 767px) {
  .axo-assistant-root {
    right: var(--axo-root-right, 14px);
    bottom: var(--axo-root-bottom, 14px);
  }

  .axo-chat-popup {
    width: min(340px, calc(100vw - 20px));
    bottom: 0;
  }

  #chat-box {
    height: min(62vh, 500px);
  }

  body.user-profile .axo-assistant-root,
  body.page-user-profile .axo-assistant-root {
    right: var(--axo-dashboard-right, 14px);
    bottom: var(--axo-dashboard-bottom, 75px);
  }

  body.axo-services-account .axo-assistant-root {
    right: var(--axo-dashboard-right, 14px);
    bottom: var(--axo-dashboard-bottom, 90px);
  }
}

.axo-admin-table .axo-col-60 {
  width: 60px;
}

.axo-admin-table .axo-col-80 {
  width: 80px;
}

.axo-admin-table .axo-col-120 {
  width: 120px;
}

.axo-admin-table .axo-col-140 {
  width: 140px;
}

.axo-admin-table .axo-col-160 {
  width: 160px;
}

.axo-admin-table .axo-col-180 {
  width: 180px;
}

.axo-admin-table .axo-col-200 {
  width: 200px;
}

.axo-admin-table .axo-col-260 {
  width: 260px;
}

.axo-mt-24 {
  margin-top: 24px;
}

.axo-chat-view {
  background: #fff;
  border: 1px solid #dcdcde;
  padding: 0;
  border-radius: 8px;
  max-width: 900px;
  position: relative;
  height: 460px;
  overflow: hidden;
  overflow-x: hidden;
}

.axo-chat-view-head {
  padding: 10px 12px;
  border-bottom: 1px solid #e5e5e5;
  direction: ltr;
}

.axo-chat-view-body {
  height: calc(100% - 52px);
  overflow-y: auto;
  padding: 12px 16px 16px;
}

.axo-chat-row {
  display: flex;
  margin-bottom: 12px;
}

.axo-chat-row-user {
  justify-content: flex-end;
}

.axo-chat-row-bot {
  justify-content: flex-start;
}

.axo-chat-bubble {
  max-width: 80%;
  padding: 10px 12px;
  border-radius: 10px;
}

.axo-chat-bubble-user {
  background: #d5f5e3;
  text-align: right;
}

.axo-chat-bubble-bot {
  background: #f1f1f1;
  text-align: left;
}

.axo-chat-text {
  white-space: pre-wrap;
}

.axo-chat-time {
  font-size: 11px;
  opacity: 0.7;
  margin-top: 6px;
}

.axo-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
  white-space: nowrap;
}

.axo-bulk-form {
  margin: 12px 0 0;
}

.axo-bulk-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.axo-table-tools {
  display: flex;
  align-items: center;
  gap: 8px;
}

.axo-table-tools .search-box {
  margin: 0;
}

.axo-table-tools input[type="search"] {
  min-width: 220px;
}

.axo-table-tools input[type="date"],
.axo-table-tools select {
  height: 30px;
}

.axo-table-tools .axo-jalali-date {
  min-width: 120px;
}

.axo-table-tools .spinner {
  float: none;
  margin: 0;
}

.axo-filter-count {
  font-weight: 600;
  white-space: nowrap;
}

.axo-bulk-form .tablenav.top {
  margin: 0 0 8px;
  min-height: 30px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  width: 100%;
}

.axo-bulk-form .tablenav.top .alignleft,
.axo-bulk-form .tablenav.top .alignright {
  float: none;
}

.axo-admin-table th.check-column,
.axo-admin-table td.check-column {
  width: 44px;
  text-align: center;
  vertical-align: middle;
  padding: 8px 0;
}

.axo-admin-table .check-column input[type="checkbox"] {
  margin: 0;
}

.axo-button-close {
  background: transparent !important;
  border-color: #f59e0b !important;
  color: #f59e0b !important;
}

.axo-button-close:hover,
.axo-button-close:focus {
  background: transparent !important;
  border-color: #d97706 !important;
  color: #d97706 !important;
}

.axo-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.axo-section-head h2 {
  margin: 0;
}

.axo-conversation-head {
  padding-bottom: 20px;
}

.axo-close-x {
  min-width: 32px;
  padding: 0 10px;
  line-height: 30px;
  text-align: center;
  font-size: 20px;
  background: transparent !important;
  border-color: #f59e0b !important;
  color: #f59e0b !important;
}

.axo-close-x:hover,
.axo-close-x:focus {
  background: transparent !important;
  border-color: #d97706 !important;
  color: #d97706 !important;
}

.axo-chat-list-close-wrap {
  margin-left: 0;
  margin-inline-start: auto;
  display: flex;
  align-items: center;
}

.axo-conversation-tools {
  margin: 0 0 10px;
}

.button.button-link-delete {
  background: transparent !important;
  border-color: #d63638 !important;
  color: #d63638 !important;
}

.button.button-link-delete:hover,
.button.button-link-delete:focus {
  background: transparent !important;
  border-color: #b32d2e !important;
  color: #b32d2e !important;
}

.axo-chat-view-close {
  position: static;
}

.axo-style-chat-layout {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  margin-top: 50px;
  flex-wrap: wrap;
}

.axo-style-chat-preview-pane {
  width: 360px;
  min-width: 360px;
  border: 1px solid #dcdcde;
  border-radius: 8px;
  background: #fff;
  padding: 14px;
  position: sticky;
  top: calc(32px + 25px);
  align-self: flex-start;
}

.axo-style-chat-preview-title {
  font-weight: 600;
  margin-bottom: 12px;
}

.axo-style-chat-preview-canvas {
  height: 560px;
  border: 1px dashed #c3c4c7;
  border-radius: 8px;
  background: linear-gradient(180deg, #f8f9fb, #eef2f7);
  position: relative;
  padding: 54px 10px 10px;
  overflow: hidden;
}

.axo-style-chat-reset-defaults {
  position: absolute;
  left: 10px;
  top: 10px;
  z-index: 2;
}

.axo-style-chat-widget {
  position: relative;
  width: 100%;
  max-width: 330px;
  margin: 0 auto;
  direction: rtl;
}

.axo-style-chat-close-preview {
  position: absolute;
  border: 0;
  background: transparent;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
  z-index: 3;
  color: #ffffff;
}

.axo-style-chat-box-preview {
  border: 1px solid var(--chat-divider, #ddd);
  border-radius: 20px;
  background: #fff;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 460px;
}

.axo-style-chat-header-preview {
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid var(--chat-divider, #ddd);
  font-weight: 600;
}

.axo-style-chat-messages-preview {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-bottom: 1px solid var(--chat-divider, #ddd);
}

.axo-style-chat-msg-preview {
  max-width: 80%;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 14px;
}

.axo-style-chat-msg-preview.user {
  margin-left: auto;
  margin-right: 0;
}

.axo-style-chat-msg-preview.bot {
  margin-right: auto;
  margin-left: 0;
}

.axo-style-chat-loading-preview {
  background: transparent !important;
  padding: 2px 0 !important;
}

.axo-style-chat-loader {
  width: 64px;
  height: 8px;
  --_g: no-repeat radial-gradient(farthest-side, var(--chat-loader, #1F1D29) 94%, #0000);
  background: var(--_g) 25% 0, var(--_g) 75% 0;
  background-size: 8px 8px;
  position: relative;
  animation: axo-loader-0 1s linear infinite;
}

.axo-style-chat-loader:before {
  content: "";
  position: absolute;
  height: 8px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--chat-loader, #1F1D29);
  inset: 0;
  margin: auto;
  animation: axo-loader-1 1s cubic-bezier(0.5, 300, 0.5, -300) infinite;
}

.axo-style-chat-input-preview {
  border-top: 1px solid var(--chat-divider, #ddd);
  padding: 8px 10px;
  display: flex;
  align-items: flex-end;
  gap: 8px;
}

.axo-style-chat-input-preview textarea {
  flex: 1;
  min-height: 44px;
  max-height: 72px;
  border: 1px solid var(--chat-divider, #ddd);
  border-radius: 6px;
  resize: none;
  padding: 10px 12px;
  font-family: inherit;
}

.axo-style-chat-input-preview textarea::placeholder {
  color: var(--chat-placeholder, #757575);
}

.axo-style-chat-input-preview button {
  height: 44px;
  padding: 0 16px;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
}

.axo-style-chat-footer-preview {
  height: 36px;
  border-top: 1px solid var(--chat-divider, #ddd);
  font-size: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.axo-style-chat-controls {
  flex: 1;
  min-width: 0;
}

.axo-style-chat-controls .form-table th {
  width: 290px;
}

.axo-style-layout {
  flex-wrap: wrap;
}

.axo-style-controls {
  min-width: 0 !important;
}

.axo-style-preview-pane {
  position: sticky;
  top: calc(32px + 25px);
  align-self: flex-start;
}

.axo-style-controls .form-table,
.axo-style-chat-controls .form-table {
  display: block;
  width: 100%;
  max-width: 100%;
  table-layout: fixed;
}

.axo-style-controls .form-table tbody,
.axo-style-chat-controls .form-table tbody {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 18px;
}

.axo-style-controls .form-table tr,
.axo-style-chat-controls .form-table tr {
  display: block;
  width: calc(50% - 9px);
  margin: 0;
  padding: 10px;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  background: #fff;
  box-sizing: border-box;
}

.axo-style-controls .form-table th,
.axo-style-chat-controls .form-table th,
.axo-style-controls .form-table td,
.axo-style-chat-controls .form-table td {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.axo-style-controls .form-table th,
.axo-style-chat-controls .form-table th {
  margin-bottom: 8px;
}

.axo-style-controls .form-table input[type="text"],
.axo-style-controls .form-table input[type="number"],
.axo-style-controls .form-table input[type="color"],
.axo-style-chat-controls .form-table input[type="text"],
.axo-style-chat-controls .form-table input[type="number"],
.axo-style-chat-controls .form-table input[type="color"] {
  max-width: 100%;
}

.axo-style-section-actions {
  margin-top: 14px !important;
}

.axo-style-section-actions .button {
  margin-left: 8px;
}

@media (max-width: 1400px) {
  .axo-style-controls .form-table tr,
  .axo-style-chat-controls .form-table tr {
    width: 100%;
  }

  .axo-style-preview-pane,
  .axo-style-chat-preview-pane {
    position: static;
    top: auto;
  }
}

@media (max-width: 782px) {
  .axo-style-preview-pane,
  .axo-style-chat-preview-pane {
    top: calc(46px + 25px);
  }
}

.axo-style-layout {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}

.axo-style-preview-pane {
  width: 320px;
  min-width: 320px;
  border: 1px solid #dcdcde;
  border-radius: 8px;
  background: #fff;
  padding: 14px;
}

.axo-style-preview-title {
  font-weight: 600;
  margin-bottom: 12px;
}

.axo-style-preview-canvas {
  height: 380px;
  border: 1px dashed #c3c4c7;
  border-radius: 8px;
  background: linear-gradient(180deg, #f8f9fb, #eef2f7);
  position: relative;
}

.axo-style-reset-defaults {
  position: absolute;
  left: 10px;
  top: 10px;
  z-index: 2;
}

.axo-style-preview-toggle {
  position: absolute;
  right: 22px;
  bottom: 22px;
  width: var(--axo-toggle-size, 70px);
  height: var(--axo-toggle-size, 70px);
  border: 0;
  border-radius: 50%;
  background: var(--axo-toggle-bg, #D2BA93);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--axo-toggle-padding, 7px);
  box-shadow: -5px 5px 7px -3px rgba(0, 0, 0, 0.32);
}

.axo-style-preview-toggle:hover {
  background: var(--axo-toggle-bg-hover, #323040);
}

.axo-style-preview-toggle:hover .axo-style-preview-icon {
  background-color: var(--axo-toggle-icon-color-hover, #ffffff);
}

.axo-style-preview-icon {
  width: var(--axo-toggle-icon-size, 56px);
  height: var(--axo-toggle-icon-size, 56px);
  background-color: var(--axo-toggle-icon-color, #ffffff);
  -webkit-mask-image: var(--axo-toggle-icon-url, none);
  mask-image: var(--axo-toggle-icon-url, none);
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
}

.axo-style-controls {
  flex: 1;
  min-width: 420px;
}

.axo-style-page-title {
  margin-bottom: 30px !important;
}

.axo-style-icon-tools {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.axo-style-icon-current img {
  width: 56px;
  height: 56px;
  object-fit: contain;
  border: 1px solid #dcdcde;
  border-radius: 6px;
  padding: 4px;
  background: #fff;
}


