/**
 * Hotelsazi Chat Widget Styles
 * Full Version: Right Aligned + 55px Inputs + Responsive Fixes
 */

/* CSS Variables */
#hotelsazi-chat-widget {
  --hsd-font: 'Vazirmatn', 'Tahoma', 'Arial', sans-serif;
  --hsd-primary: hsl(173, 58%, 39%);
  --hsd-primary-hover: hsl(173, 58%, 34%);
  --hsd-bg: hsl(0, 0%, 100%);
  --hsd-fg: hsl(220, 13%, 18%);
  --hsd-muted: hsl(220, 9%, 46%);
  --hsd-muted-bg: hsl(220, 14%, 96%);
  --hsd-border: hsl(220, 13%, 91%);
  --hsd-header-bg: hsl(220, 13%, 18%);
  --hsd-header-fg: hsl(0, 0%, 100%);
  --hsd-bubble-user: hsl(173, 58%, 39%);
  --hsd-bubble-user-fg: hsl(0, 0%, 100%);
  --hsd-bubble-bot: hsl(220, 14%, 96%);
  --hsd-bubble-bot-fg: hsl(220, 13%, 18%);
  --hsd-destructive: hsl(0, 84%, 60%);
  --hsd-radius: 16px; /* کمی گردتر */
  --hsd-shadow: 0 8px 32px -8px hsla(220, 13%, 18%, 0.15), 0 4px 16px -4px hsla(220, 13%, 18%, 0.1);
  --hsd-launcher-shadow: 0 4px 20px -4px hsla(173, 58%, 39%, 0.4), 0 2px 8px -2px hsla(220, 13%, 18%, 0.1);
}

/* Reset for widget container */
#hotelsazi-chat-widget,
#hotelsazi-chat-widget * {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

#hotelsazi-chat-widget {
  font-family: var(--hsd-font);
  font-size: 14px;
  line-height: 1.7;
  color: var(--hsd-fg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  direction: rtl;
  text-align: right;
}

/* ============= Launcher Button (Right Side) ============= */
#hotelsazi-chat-widget .hsd-launcher {
  position: fixed;
  bottom: 24px;
  right: 24px !important; /* سمت راست */
  left: auto !important;  /* حذف چپ */
  z-index: 999998;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 60px; /* کمی بزرگتر و راحت‌تر */
  padding: 0 20px;
  border: none;
  border-radius: 9999px;
  background: var(--hsd-primary);
  color: var(--hsd-bubble-user-fg);
  font-family: var(--hsd-font);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  box-shadow: var(--hsd-launcher-shadow);
  transition: all 0.2s ease;
  animation: hsd-fade-in 0.2s ease-out;
  flex-direction: row-reverse;
}

#hotelsazi-chat-widget .hsd-launcher:hover {
  background: var(--hsd-primary-hover);
  transform: scale(1.02);
}

#hotelsazi-chat-widget .hsd-launcher:active {
  transform: scale(0.98);
}

/* ============= Chat Panel (Responsive Fixes) ============= */
#hotelsazi-chat-widget .hsd-panel {
  position: fixed;
  bottom: 96px;
  right: 24px !important; /* سمت راست */
  left: auto !important;
  z-index: 999999;
  
  width: calc(100vw - 48px); /* عرض مناسب در موبایل */
  max-width: 380px;
  
  /* تنظیم ارتفاع برای موبایل */
  height: 600px;
  max-height: 70vh; /* جلوگیری از اشغال کل صفحه */
  
  background: var(--hsd-bg);
  border-radius: var(--hsd-radius);
  box-shadow: var(--hsd-shadow);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: hsd-slide-up 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@media (min-width: 768px) {
  #hotelsazi-chat-widget .hsd-panel {
    width: 380px;
    height: 650px;
    max-height: 80vh;
  }
}

/* ============= Header ============= */
#hotelsazi-chat-widget .hsd-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--hsd-header-bg);
  color: var(--hsd-header-fg);
  border-radius: var(--hsd-radius) var(--hsd-radius) 0 0;
}

#hotelsazi-chat-widget .hsd-header-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

#hotelsazi-chat-widget .hsd-header-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: hsla(173, 58%, 39%, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

#hotelsazi-chat-widget .hsd-header h3 {
  font-size: 14px;
  font-weight: 600;
  margin: 0;
}

#hotelsazi-chat-widget .hsd-header p {
  font-size: 12px;
  opacity: 0.8;
  margin: 0;
}

#hotelsazi-chat-widget .hsd-header-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--hsd-header-fg);
  cursor: pointer;
  transition: background 0.2s;
}

#hotelsazi-chat-widget .hsd-header-close:hover {
  background: hsla(0, 0%, 100%, 0.1);
}

/* ============= Messages Area ============= */
#hotelsazi-chat-widget .hsd-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

#hotelsazi-chat-widget .hsd-bubble-row {
  display: flex;
  animation: hsd-fade-in 0.2s ease-out;
}

#hotelsazi-chat-widget .hsd-bubble-row-user {
  justify-content: flex-end;
}

#hotelsazi-chat-widget .hsd-bubble-row-bot {
  justify-content: flex-start;
}

#hotelsazi-chat-widget .hsd-bubble {
  max-width: 80%;
  padding: 10px 16px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-wrap: break-word;
}

/* Rich text inside messages (bold + clickable links) */
#hotelsazi-chat-widget .hsd-bubble strong {
  font-weight: 700;
}

#hotelsazi-chat-widget .hsd-bubble a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  opacity: 0.95;
}

#hotelsazi-chat-widget .hsd-bubble a:hover {
  opacity: 1;
}

#hotelsazi-chat-widget .hsd-bubble-user {
  background: var(--hsd-bubble-user);
  color: var(--hsd-bubble-user-fg);
  border-bottom-left-radius: 4px;
  border-bottom-right-radius: 16px;
}

#hotelsazi-chat-widget .hsd-bubble-bot {
  background: var(--hsd-bubble-bot);
  color: var(--hsd-bubble-bot-fg);
  border-bottom-right-radius: 4px;
  border-bottom-left-radius: 16px;
  display: flex;
  flex-direction: column;
}

#hotelsazi-chat-widget .hsd-feedback-btns {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid hsla(0, 0%, 0%, 0.05);
  justify-content: flex-end;
}

#hotelsazi-chat-widget .hsd-feedback-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border: 1px solid hsla(0, 0%, 0%, 0.1);
  border-radius: 4px;
  background: transparent;
  color: var(--hsd-muted);
  cursor: pointer;
  transition: all 0.2s;
}

#hotelsazi-chat-widget .hsd-feedback-btn:hover:not(:disabled) {
  background: hsla(0, 0%, 0%, 0.05);
  color: var(--hsd-fg);
}

#hotelsazi-chat-widget .hsd-feedback-btn.selected {
  background: var(--hsd-primary);
  color: var(--hsd-bubble-user-fg);
  border-color: var(--hsd-primary);
}

#hotelsazi-chat-widget .hsd-feedback-btn:disabled {
  opacity: 0.8;
  cursor: default;
}

/* Typing Indicator */
#hotelsazi-chat-widget .hsd-typing {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 12px 16px;
}

#hotelsazi-chat-widget .hsd-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--hsd-muted);
  animation: hsd-bounce 1.4s ease-in-out infinite;
}

#hotelsazi-chat-widget .hsd-dot:nth-child(2) {
  animation-delay: 0.2s;
}

#hotelsazi-chat-widget .hsd-dot:nth-child(3) {
  animation-delay: 0.4s;
}

/* ============= Input Area (Fixed 55px) ============= */
#hotelsazi-chat-widget .hsd-input-area {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px;
  border-top: 1px solid var(--hsd-border);
  background: var(--hsd-bg);
  flex-direction: row-reverse;
}

#hotelsazi-chat-widget .hsd-input {
  flex: 1;
  /* تغییر: ارتفاع ۵۵ پیکسل */
  height: 55px !important;
  min-height: 55px !important;
  padding: 0 16px;
  border: 1px solid var(--hsd-border);
  border-radius: var(--hsd-radius);
  background: var(--hsd-bg);
  color: var(--hsd-fg);
  font-family: var(--hsd-font);
  font-size: 15px; /* کمی بزرگتر برای خوانایی */
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

#hotelsazi-chat-widget .hsd-input::placeholder {
  color: var(--hsd-muted);
}

#hotelsazi-chat-widget .hsd-input:focus {
  border-color: var(--hsd-primary);
  box-shadow: 0 0 0 2px hsla(173, 58%, 39%, 0.2);
}

#hotelsazi-chat-widget .hsd-input:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

#hotelsazi-chat-widget .hsd-send-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  /* تغییر: ارتفاع ۵۵ پیکسل برای هماهنگی */
  height: 55px !important;
  border: none;
  border-radius: var(--hsd-radius);
  background: var(--hsd-primary);
  color: var(--hsd-bubble-user-fg);
  cursor: pointer;
  transition: all 0.2s;
}

#hotelsazi-chat-widget .hsd-send-btn:hover:not(:disabled) {
  background: var(--hsd-primary-hover);
}

#hotelsazi-chat-widget .hsd-send-btn:active:not(:disabled) {
  transform: scale(0.95);
}

#hotelsazi-chat-widget .hsd-send-btn:disabled {
  background: var(--hsd-muted-bg);
  color: var(--hsd-muted);
  cursor: not-allowed;
}

/* ============= Registration Form (Fixed 55px) ============= */
#hotelsazi-chat-widget .hsd-registration {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 24px;
}

#hotelsazi-chat-widget .hsd-registration-header {
  text-align: center;
  margin-bottom: 32px;
}

#hotelsazi-chat-widget .hsd-registration-header h2 {
  font-size: 20px;
  font-weight: 600;
  color: var(--hsd-fg);
  margin: 0 0 8px 0;
}

#hotelsazi-chat-widget .hsd-registration-header p {
  font-size: 14px;
  color: var(--hsd-muted);
  margin: 0;
}

#hotelsazi-chat-widget .hsd-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

#hotelsazi-chat-widget .hsd-form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

#hotelsazi-chat-widget .hsd-form-field label {
  font-size: 14px;
  font-weight: 500;
  color: var(--hsd-fg);
}

#hotelsazi-chat-widget .hsd-error {
  font-size: 12px;
  color: var(--hsd-destructive);
  margin: 4px 0 0 0;
}

#hotelsazi-chat-widget .hsd-api-error {
  background: hsla(0, 84%, 60%, 0.1);
  border: 1px solid hsla(0, 84%, 60%, 0.2);
  border-radius: 6px;
  padding: 10px 12px;
  margin-bottom: 12px;
  text-align: center;
}

#hotelsazi-chat-widget .hsd-submit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  /* تغییر: ارتفاع ۵۵ پیکسل */
  height: 55px !important;
  min-height: 55px !important;
  margin-top: 8px;
  border: none;
  border-radius: var(--hsd-radius);
  background: var(--hsd-primary);
  color: var(--hsd-bubble-user-fg);
  font-family: var(--hsd-font);
  font-size: 16px; /* فونت کمی بزرگتر */
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

#hotelsazi-chat-widget .hsd-submit-btn:hover:not(:disabled) {
  background: var(--hsd-primary-hover);
}

#hotelsazi-chat-widget .hsd-submit-btn:active:not(:disabled) {
  transform: scale(0.98);
}

#hotelsazi-chat-widget .hsd-submit-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ============= Loading State ============= */
#hotelsazi-chat-widget .hsd-loading {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
}

#hotelsazi-chat-widget .hsd-loading-spinner {
  width: 24px;
  height: 24px;
  border: 2px solid var(--hsd-primary);
  border-top-color: transparent;
  border-radius: 50%;
  animation: hsd-spin 0.8s linear infinite;
}

#hotelsazi-chat-widget .hsd-spinner {
  animation: hsd-spin 0.8s linear infinite;
}

/* ============= Animations ============= */
@keyframes hsd-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes hsd-slide-up {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes hsd-bounce {
  0%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-6px); }
}

@keyframes hsd-spin {
  to { transform: rotate(360deg); }
}

#hotelsazi-chat-widget .hsd-fade-in {
  animation: hsd-fade-in 0.2s ease-out;
}/**
 * Hotelsazi Chat Widget Styles
 * Full Version: Right Aligned + 55px Inputs + Responsive Fixes
 */

/* CSS Variables */
#hotelsazi-chat-widget {
  --hsd-font: 'Vazirmatn', 'Tahoma', 'Arial', sans-serif;
  --hsd-primary: hsl(173, 58%, 39%);
  --hsd-primary-hover: hsl(173, 58%, 34%);
  --hsd-bg: hsl(0, 0%, 100%);
  --hsd-fg: hsl(220, 13%, 18%);
  --hsd-muted: hsl(220, 9%, 46%);
  --hsd-muted-bg: hsl(220, 14%, 96%);
  --hsd-border: hsl(220, 13%, 91%);
  --hsd-header-bg: hsl(220, 13%, 18%);
  --hsd-header-fg: hsl(0, 0%, 100%);
  --hsd-bubble-user: hsl(173, 58%, 39%);
  --hsd-bubble-user-fg: hsl(0, 0%, 100%);
  --hsd-bubble-bot: hsl(220, 14%, 96%);
  --hsd-bubble-bot-fg: hsl(220, 13%, 18%);
  --hsd-destructive: hsl(0, 84%, 60%);
  --hsd-radius: 16px; /* کمی گردتر */
  --hsd-shadow: 0 8px 32px -8px hsla(220, 13%, 18%, 0.15), 0 4px 16px -4px hsla(220, 13%, 18%, 0.1);
  --hsd-launcher-shadow: 0 4px 20px -4px hsla(173, 58%, 39%, 0.4), 0 2px 8px -2px hsla(220, 13%, 18%, 0.1);
}

/* Reset for widget container */
#hotelsazi-chat-widget,
#hotelsazi-chat-widget * {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

#hotelsazi-chat-widget {
  font-family: var(--hsd-font);
  font-size: 14px;
  line-height: 1.7;
  color: var(--hsd-fg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  direction: rtl;
  text-align: right;
}

/* ============= Launcher Button (Right Side) ============= */
#hotelsazi-chat-widget .hsd-launcher {
  position: fixed;
  bottom: 24px;
  right: 24px !important; /* سمت راست */
  left: auto !important;  /* حذف چپ */
  z-index: 999998;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 60px; /* کمی بزرگتر و راحت‌تر */
  padding: 0 20px;
  border: none;
  border-radius: 9999px;
  background: var(--hsd-primary);
  color: var(--hsd-bubble-user-fg);
  font-family: var(--hsd-font);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  box-shadow: var(--hsd-launcher-shadow);
  transition: all 0.2s ease;
  animation: hsd-fade-in 0.2s ease-out;
  flex-direction: row-reverse;
}

#hotelsazi-chat-widget .hsd-launcher:hover {
  background: var(--hsd-primary-hover);
  transform: scale(1.02);
}

#hotelsazi-chat-widget .hsd-launcher:active {
  transform: scale(0.98);
}

/* ============= Chat Panel (Responsive Fixes) ============= */
#hotelsazi-chat-widget .hsd-panel {
  position: fixed;
  bottom: 96px;
  right: 24px !important; /* سمت راست */
  left: auto !important;
  z-index: 999999;
  
  width: calc(100vw - 48px); /* عرض مناسب در موبایل */
  max-width: 380px;
  
  /* تنظیم ارتفاع برای موبایل */
  height: 600px;
  max-height: 70vh; /* جلوگیری از اشغال کل صفحه */
  
  background: var(--hsd-bg);
  border-radius: var(--hsd-radius);
  box-shadow: var(--hsd-shadow);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: hsd-slide-up 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@media (min-width: 768px) {
  #hotelsazi-chat-widget .hsd-panel {
    width: 380px;
    height: 650px;
    max-height: 80vh;
  }
}

/* ============= Header ============= */
#hotelsazi-chat-widget .hsd-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--hsd-header-bg);
  color: var(--hsd-header-fg);
  border-radius: var(--hsd-radius) var(--hsd-radius) 0 0;
}

#hotelsazi-chat-widget .hsd-header-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

#hotelsazi-chat-widget .hsd-header-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: hsla(173, 58%, 39%, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

#hotelsazi-chat-widget .hsd-header h3 {
  font-size: 14px;
  font-weight: 600;
  margin: 0;
}

#hotelsazi-chat-widget .hsd-header p {
  font-size: 12px;
  opacity: 0.8;
  margin: 0;
}

#hotelsazi-chat-widget .hsd-header-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--hsd-header-fg);
  cursor: pointer;
  transition: background 0.2s;
}

#hotelsazi-chat-widget .hsd-header-close:hover {
  background: hsla(0, 0%, 100%, 0.1);
}

/* ============= Messages Area ============= */
#hotelsazi-chat-widget .hsd-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

#hotelsazi-chat-widget .hsd-bubble-row {
  display: flex;
  animation: hsd-fade-in 0.2s ease-out;
}

#hotelsazi-chat-widget .hsd-bubble-row-user {
  justify-content: flex-end;
}

#hotelsazi-chat-widget .hsd-bubble-row-bot {
  justify-content: flex-start;
}

#hotelsazi-chat-widget .hsd-bubble {
  max-width: 80%;
  padding: 10px 16px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-wrap: break-word;
}

#hotelsazi-chat-widget .hsd-bubble-user {
  background: var(--hsd-bubble-user);
  color: var(--hsd-bubble-user-fg);
  border-bottom-left-radius: 4px;
  border-bottom-right-radius: 16px;
}

#hotelsazi-chat-widget .hsd-bubble-bot {
  background: var(--hsd-bubble-bot);
  color: var(--hsd-bubble-bot-fg);
  border-bottom-right-radius: 4px;
  border-bottom-left-radius: 16px;
  display: flex;
  flex-direction: column;
}

#hotelsazi-chat-widget .hsd-feedback-btns {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid hsla(0, 0%, 0%, 0.05);
  justify-content: flex-end;
}

#hotelsazi-chat-widget .hsd-feedback-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border: 1px solid hsla(0, 0%, 0%, 0.1);
  border-radius: 4px;
  background: transparent;
  color: var(--hsd-muted);
  cursor: pointer;
  transition: all 0.2s;
}

#hotelsazi-chat-widget .hsd-feedback-btn:hover:not(:disabled) {
  background: hsla(0, 0%, 0%, 0.05);
  color: var(--hsd-fg);
}

#hotelsazi-chat-widget .hsd-feedback-btn.selected {
  background: var(--hsd-primary);
  color: var(--hsd-bubble-user-fg);
  border-color: var(--hsd-primary);
}

#hotelsazi-chat-widget .hsd-feedback-btn:disabled {
  opacity: 0.8;
  cursor: default;
}

/* Typing Indicator */
#hotelsazi-chat-widget .hsd-typing {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 12px 16px;
}

#hotelsazi-chat-widget .hsd-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--hsd-muted);
  animation: hsd-bounce 1.4s ease-in-out infinite;
}

#hotelsazi-chat-widget .hsd-dot:nth-child(2) {
  animation-delay: 0.2s;
}

#hotelsazi-chat-widget .hsd-dot:nth-child(3) {
  animation-delay: 0.4s;
}

/* ============= Input Area (Fixed 55px) ============= */
#hotelsazi-chat-widget .hsd-input-area {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px;
  border-top: 1px solid var(--hsd-border);
  background: var(--hsd-bg);
  flex-direction: row-reverse;
}

#hotelsazi-chat-widget .hsd-input {
  flex: 1;
  /* تغییر: ارتفاع ۵۵ پیکسل */
  height: 55px !important;
  min-height: 55px !important;
  padding: 0 16px;
  border: 1px solid var(--hsd-border);
  border-radius: var(--hsd-radius);
  background: var(--hsd-bg);
  color: var(--hsd-fg);
  font-family: var(--hsd-font);
  font-size: 15px; /* کمی بزرگتر برای خوانایی */
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

#hotelsazi-chat-widget .hsd-input::placeholder {
  color: var(--hsd-muted);
}

#hotelsazi-chat-widget .hsd-input:focus {
  border-color: var(--hsd-primary);
  box-shadow: 0 0 0 2px hsla(173, 58%, 39%, 0.2);
}

#hotelsazi-chat-widget .hsd-input:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

#hotelsazi-chat-widget .hsd-send-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  /* تغییر: ارتفاع ۵۵ پیکسل برای هماهنگی */
  height: 55px !important;
  border: none;
  border-radius: var(--hsd-radius);
  background: var(--hsd-primary);
  color: var(--hsd-bubble-user-fg);
  cursor: pointer;
  transition: all 0.2s;
}

#hotelsazi-chat-widget .hsd-send-btn:hover:not(:disabled) {
  background: var(--hsd-primary-hover);
}

#hotelsazi-chat-widget .hsd-send-btn:active:not(:disabled) {
  transform: scale(0.95);
}

#hotelsazi-chat-widget .hsd-send-btn:disabled {
  background: var(--hsd-muted-bg);
  color: var(--hsd-muted);
  cursor: not-allowed;
}

/* ============= Registration Form (Fixed 55px) ============= */
#hotelsazi-chat-widget .hsd-registration {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 24px;
}

#hotelsazi-chat-widget .hsd-registration-header {
  text-align: center;
  margin-bottom: 32px;
}

#hotelsazi-chat-widget .hsd-registration-header h2 {
  font-size: 20px;
  font-weight: 600;
  color: var(--hsd-fg);
  margin: 0 0 8px 0;
}

#hotelsazi-chat-widget .hsd-registration-header p {
  font-size: 14px;
  color: var(--hsd-muted);
  margin: 0;
}

#hotelsazi-chat-widget .hsd-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

#hotelsazi-chat-widget .hsd-form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

#hotelsazi-chat-widget .hsd-form-field label {
  font-size: 14px;
  font-weight: 500;
  color: var(--hsd-fg);
}

#hotelsazi-chat-widget .hsd-error {
  font-size: 12px;
  color: var(--hsd-destructive);
  margin: 4px 0 0 0;
}

#hotelsazi-chat-widget .hsd-api-error {
  background: hsla(0, 84%, 60%, 0.1);
  border: 1px solid hsla(0, 84%, 60%, 0.2);
  border-radius: 6px;
  padding: 10px 12px;
  margin-bottom: 12px;
  text-align: center;
}

#hotelsazi-chat-widget .hsd-submit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  /* تغییر: ارتفاع ۵۵ پیکسل */
  height: 55px !important;
  min-height: 55px !important;
  margin-top: 8px;
  border: none;
  border-radius: var(--hsd-radius);
  background: var(--hsd-primary);
  color: var(--hsd-bubble-user-fg);
  font-family: var(--hsd-font);
  font-size: 16px; /* فونت کمی بزرگتر */
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

#hotelsazi-chat-widget .hsd-submit-btn:hover:not(:disabled) {
  background: var(--hsd-primary-hover);
}

#hotelsazi-chat-widget .hsd-submit-btn:active:not(:disabled) {
  transform: scale(0.98);
}

#hotelsazi-chat-widget .hsd-submit-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ============= Loading State ============= */
#hotelsazi-chat-widget .hsd-loading {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
}

#hotelsazi-chat-widget .hsd-loading-spinner {
  width: 24px;
  height: 24px;
  border: 2px solid var(--hsd-primary);
  border-top-color: transparent;
  border-radius: 50%;
  animation: hsd-spin 0.8s linear infinite;
}

#hotelsazi-chat-widget .hsd-spinner {
  animation: hsd-spin 0.8s linear infinite;
}

/* ============= Animations ============= */
@keyframes hsd-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes hsd-slide-up {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes hsd-bounce {
  0%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-6px); }
}

@keyframes hsd-spin {
  to { transform: rotate(360deg); }
}

#hotelsazi-chat-widget .hsd-fade-in {
  animation: hsd-fade-in 0.2s ease-out;
}
/* مخفی کردن پیام خوش‌آمدگویی تکراری */
#hotelsazi-chat-widget .hsd-messages > .hsd-bubble-row-bot:first-child + .hsd-bubble-row-bot {
  display: none !important;
}
/* Message content (renders safe HTML for clickable links) */
#hotelsazi-chat-widget .hsd-message-content {
  word-break: break-word;
}

#hotelsazi-chat-widget .hsd-message-content a {
  text-decoration: underline;
  cursor: pointer;
  word-break: break-word;
}

#hotelsazi-chat-widget .hsd-message-content a:visited {
  text-decoration: underline;
}
