#ts-chat-widget * { box-sizing: border-box; }
#ts-chat-bubble {
  position: fixed; bottom: 24px; right: 24px; z-index: 2147483646;
  width: 60px; height: 60px; border-radius: 50%;
  background: #E8571C; display: flex; align-items: center; justify-content: center;
  cursor: pointer; box-shadow: 0 4px 16px rgba(0,0,0,0.3);
  transition: transform 0.2s ease;
}
#ts-chat-bubble:hover { transform: scale(1.06); }

#ts-chat-window {
  position: fixed; bottom: 96px; right: 24px; z-index: 2147483647;
  width: 340px; max-width: calc(100vw - 32px); height: 480px; max-height: 72vh;
  background: #fff; border-radius: 12px; overflow: hidden;
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
  display: flex; flex-direction: column;
  opacity: 0; pointer-events: none; transform: translateY(12px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  font-family: Arial, sans-serif;
}
#ts-chat-window.ts-chat-open {
  opacity: 1; pointer-events: auto; transform: translateY(0);
}

#ts-chat-header {
  background: #14100D; color: #fff; padding: 16px 18px;
  display: flex; align-items: center; justify-content: space-between;
  flex-shrink: 0;
}
#ts-chat-header-info strong { display: block; font-size: 15px; }
#ts-chat-header-info span { display: block; font-size: 11px; color: #F2A93B; }
#ts-chat-close { cursor: pointer; font-size: 22px; line-height: 1; color: #8B857D; }
#ts-chat-close:hover { color: #fff; }

#ts-chat-body {
  flex: 1; overflow-y: auto; padding: 14px; background: #f7f7f7;
}

#ts-chat-greeting {
  background: #fff; border: 1px solid #eee; border-radius: 10px;
  padding: 12px 14px; font-size: 13.5px; line-height: 1.5; color: #14100D;
  margin-bottom: 14px;
}

#ts-chat-accordion { display: flex; flex-direction: column; gap: 8px; }

.ts-chat-item {
  border: 1px solid #E8571C; border-radius: 8px; overflow: hidden; background: #fff;
}

.ts-chat-menu-btn {
  width: 100%; background: #fff; border: none; color: #E8571C;
  padding: 11px 13px; font-size: 13px; text-align: left; font-weight: 600;
  cursor: pointer; display: flex; align-items: center; justify-content: space-between;
  transition: background 0.15s ease;
}
.ts-chat-menu-btn:hover { background: #fff5f0; }
.ts-chat-arrow { transition: transform 0.2s ease; font-size: 11px; }
.ts-chat-item-open .ts-chat-arrow { transform: rotate(180deg); }
.ts-chat-item-open .ts-chat-menu-btn { background: #E8571C; color: #fff; }

.ts-chat-answer {
  max-height: 0; overflow: hidden; transition: max-height 0.25s ease;
  font-size: 13px; line-height: 1.6; color: #333; background: #fafafa;
}
.ts-chat-item-open .ts-chat-answer {
  max-height: 300px; padding: 12px 14px;
}

@media (max-width: 480px) {
  #ts-chat-window { right: 12px; bottom: 88px; width: calc(100vw - 24px); }
  #ts-chat-bubble { right: 16px; bottom: 16px; }
}

/* RTL support for Arabic version */
#ts-chat-widget[dir="rtl"] #ts-chat-window { text-align: right; }
#ts-chat-widget[dir="rtl"] .ts-chat-menu-btn { text-align: right; }
#ts-chat-widget[dir="rtl"] #ts-chat-header-info span { text-align: right; }
#ts-chat-widget[dir="rtl"] .ts-chat-answer { text-align: right; }
