﻿/* ExirChat Widget CSS */

#exirchat-root,
#exirchat-root *,
#exirchat-root *::before,
#exirchat-root *::after {
  box-sizing: border-box !important;
}

#exirchat-root ul, #exirchat-root ol, #exirchat-root li { list-style: none; margin: 0; padding: 0; }
#exirchat-root p, #exirchat-root h1, #exirchat-root h2, #exirchat-root h3, #exirchat-root h4 { margin: 0; padding: 0; }
#exirchat-root a { text-decoration: none; color: inherit; }
#exirchat-root input, #exirchat-root textarea, #exirchat-root select { margin: 0; font-family: inherit; font-size: inherit; }
#exirchat-root img { display: block; }

#exirchat-root {
  font-family: Tahoma, Arial, sans-serif;
  direction: rtl;
  --exirchat-accent:        #7c3aed;
  --exirchat-accent-hover:  #6d28d9;
  --exirchat-accent-light:  #f5f3ff;
  --exirchat-accent-border: #ddd6fe;
  --exirchat-bg:            #ffffff;
  --exirchat-text:          #111111;
  --exirchat-radius:        20px;
}

/* FAB Bubble */
.exirchat-fab-bubble {
  position: fixed;
  bottom: 36px;
  left: 96px;
  background: #fff;
  border: 1px solid #ede9fe;
  border-radius: 20px 20px 20px 4px;
  padding: 10px 14px 10px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 20px rgba(124,58,237,0.12), 0 1px 4px rgba(0,0,0,0.06);
  font-size: 13px;
  font-family: Tahoma, Arial, sans-serif;
  color: #1e1e2e;
  font-weight: 500;
  white-space: nowrap;
  z-index: 99999;
  animation: exirchat-bubbleIn 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  transform-origin: bottom right;
}

.exirchat-fab-bubble.hide {
  animation: exirchat-bubbleOut 0.2s ease forwards;
  pointer-events: none;
}

@keyframes exirchat-bubbleIn {
  from { opacity: 0; transform: scale(0.8) translateX(8px); }
  to   { opacity: 1; transform: scale(1) translateX(0); }
}

@keyframes exirchat-bubbleOut {
  from { opacity: 1; transform: scale(1); }
  to   { opacity: 0; transform: scale(0.85); }
}

/* FAB Button */
.exirchat-fab {
  position: fixed;
  bottom: 28px;
  left: 28px;
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: var(--exirchat-accent, #7c3aed);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(124,58,237,0.35);
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
  z-index: 99999;
  padding: 0;
  margin: 0;
}

.exirchat-fab:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(124,58,237,0.45);
  background: var(--exirchat-accent-hover, #6d28d9);
}

.exirchat-fab svg, .exirchat-fab img {
  width: 22px;
  height: 22px;
  color: #fff;
  pointer-events: none;
}

.exirchat-fab-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  background: #e53935;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #f5f5f5;
  padding: 0;
  margin: 0;
}

/* Widget Window */
.exirchat-widget {
  position: fixed;
  bottom: 96px;
  left: 28px;
  width: 360px;
  height: calc(100vh - 120px);
  max-height: 580px;
  background: var(--exirchat-bg, #fff);
  border-radius: var(--exirchat-radius, 20px);
  box-shadow: 0 8px 40px rgba(0,0,0,0.12), 0 2px 8px rgba(0,0,0,0.06);
  display: none;
  flex-direction: column;
  overflow: hidden;
  z-index: 99998;
  animation: exirchat-slideUp 0.25s cubic-bezier(0.22, 1, 0.36, 1);
  border: 1px solid rgba(0,0,0,0.06);
}

.exirchat-widget.open { display: flex; }

@keyframes exirchat-slideUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Header */
.exirchat-widget-header {
  background: var(--exirchat-accent, #7c3aed);
  padding: 16px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.exirchat-header-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.exirchat-header-logo {
  width: 38px;
  height: 38px;
  background: rgba(255,255,255,0.1);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  overflow: hidden;
  flex-shrink: 0;
  padding: 0;
  margin: 0;
}

.exirchat-header-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.exirchat-header-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.exirchat-header-title {
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.01em;
  margin: 0;
  padding: 0;
}

.exirchat-header-slogan {
  color: rgba(255,255,255,0.5);
  font-size: 11px;
  margin: 0;
  padding: 0;
}

.exirchat-header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.exirchat-btn-back,
.exirchat-btn-close {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: none;
  background: rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.8);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
  padding: 0;
  margin: 0;
}

.exirchat-btn-back:hover,
.exirchat-btn-close:hover {
  background: rgba(255,255,255,0.18);
  color: #fff;
}

/* Pages */
.exirchat-widget-page {
  flex: 1;
  overflow-y: auto;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.exirchat-widget-page::-webkit-scrollbar { width: 3px; }
.exirchat-widget-page::-webkit-scrollbar-track { background: transparent; }
.exirchat-widget-page::-webkit-scrollbar-thumb { background: #e0e0e0; border-radius: 4px; }

/* FAQ Header */
.exirchat-faq-section-header { padding-bottom: 4px; }

.exirchat-faq-section-title {
  font-size: 11px;
  font-weight: 700;
  color: #aaa;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0;
  padding: 0;
}

/* FAQ List */
.exirchat-faq-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.exirchat-faq-item {
  border-radius: 10px;
  overflow: hidden;
  transition: background 0.15s;
}

.exirchat-faq-question {
  width: 100%;
  background: transparent;
  border: none;
  padding: 11px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  font-family: Tahoma, Arial, sans-serif;
  font-size: 13px;
  color: #333;
  text-align: right;
  transition: background 0.15s, color 0.15s;
  gap: 8px;
  border-radius: 10px;
  margin: 0;
}

.exirchat-faq-question:hover {
  background: var(--exirchat-accent-light, #f5f3ff);
  color: var(--exirchat-accent, #7c3aed);
}

.exirchat-faq-arrow {
  color: #ccc;
  flex-shrink: 0;
  transition: transform 0.2s, color 0.15s;
}

.exirchat-faq-question:hover .exirchat-faq-arrow {
  color: var(--exirchat-accent, #7c3aed);
  transform: translateX(-2px);
}

/* Show More Button */
.exirchat-btn-show-more {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 14px;
  background: transparent;
  border: 1px solid #e8e8e8;
  border-radius: 10px;
  font-family: Tahoma, Arial, sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: #666;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  margin-top: 2px;
}

.exirchat-btn-show-more:hover {
  background: var(--exirchat-accent-light, #f5f3ff);
  border-color: var(--exirchat-accent-border, #ddd6fe);
  color: var(--exirchat-accent, #7c3aed);
}

/* Experts Section */
.exirchat-experts-section {
  background: #f8f8f8;
  border-radius: 14px;
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-top: 6px;
  border: 1px solid #efefef;
}

.exirchat-experts-avatars {
  position: relative;
  display: flex;
  align-items: center;
  height: 52px;
  width: 148px;
}

.exirchat-expert-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2.5px solid #fff;
  object-fit: cover;
  position: absolute;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  margin: 0;
  padding: 0;
}

.exirchat-av1 { right: 0px;  z-index: 4; }
.exirchat-av2 { right: 28px; z-index: 3; }
.exirchat-av3 { right: 56px; z-index: 2; }
.exirchat-av4 { right: 84px; z-index: 1; }

.exirchat-online-dot {
  position: absolute;
  bottom: 2px;
  right: 0px;
  width: 11px;
  height: 11px;
  background: #22c55e;
  border-radius: 50%;
  border: 2px solid #f8f8f8;
  z-index: 5;
}

.exirchat-experts-label {
  font-size: 12.5px;
  color: #666;
  font-weight: 500;
  text-align: center;
  margin: 0;
  padding: 0;
}

.exirchat-btn-start-chat {
  background: var(--exirchat-accent, #7c3aed);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 10px 24px;
  font-family: Tahoma, Arial, sans-serif;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: background 0.15s, transform 0.15s;
  box-shadow: 0 4px 14px rgba(124,58,237,0.3);
  margin: 0;
}

.exirchat-btn-start-chat:hover {
  background: var(--exirchat-accent-hover, #6d28d9);
  transform: translateY(-1px);
}

/* FAQ Search */
.exirchat-faq-search-wrap { position: relative; }

.exirchat-search-icon {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #bbb;
  pointer-events: none;
  display: flex;
  align-items: center;
}

.exirchat-faq-search {
  width: 100%;
  padding: 10px 36px 10px 14px;
  border: 1px solid #e8e8e8;
  border-radius: 10px;
  font-family: Tahoma, Arial, sans-serif;
  font-size: 13px;
  color: #333;
  outline: none;
  transition: border-color 0.15s;
  background: #f8f8f8;
  direction: rtl;
  margin: 0;
}

.exirchat-faq-search:focus {
  border-color: var(--exirchat-accent, #7c3aed);
  background: #fff;
}

/* FAQ Empty */
.exirchat-faq-empty {
  text-align: center;
  padding: 28px 16px;
  color: #ccc;
  font-size: 13px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

/* Answer Page */
.exirchat-answer-wrap {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.exirchat-answer-question {
  font-size: 14px;
  font-weight: 700;
  color: #111;
  line-height: 1.8;
  padding-bottom: 14px;
  border-bottom: 1px solid #f0f0f0;
  margin: 0;
}

.exirchat-answer-body {
  font-size: 13px;
  color: #555;
  line-height: 2;
  background: #f8f8f8;
  border-radius: 10px;
  padding: 14px;
  margin: 0;
}

/* Feedback */
.exirchat-feedback-box {
  background: #f8f8f8;
  border: 1px solid #efefef;
  border-radius: 12px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.exirchat-feedback-label {
  font-size: 12.5px;
  font-weight: 600;
  color: #555;
  text-align: center;
  margin: 0;
  padding: 0;
}

.exirchat-feedback-btns {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.exirchat-feedback-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 20px;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
  background: #fff;
  font-family: Tahoma, Arial, sans-serif;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  color: #555;
  margin: 0;
}

.exirchat-feedback-btn:hover {
  border-color: #bbb;
  background: #f5f5f5;
  color: #111;
}

.exirchat-feedback-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.exirchat-like-btn:hover, .exirchat-like-btn.active {
  background: #f0fdf4;
  border-color: #86efac;
  color: #16a34a;
}

.exirchat-dislike-btn:hover, .exirchat-dislike-btn.active {
  background: #fff5f5;
  border-color: #fca5a5;
  color: #dc2626;
}

.exirchat-feedback-result {
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.8;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  animation: exirchat-fadeIn 0.25s ease;
  margin: 0;
}

.exirchat-feedback-result-icon { width: 26px; height: 26px; flex-shrink: 0; }

.exirchat-feedback-result.positive { background: #f0fdf4; color: #16a34a; border: 1px solid #bbf7d0; }
.exirchat-feedback-result.negative { background: #fff5f5; color: #dc2626; border: 1px solid #fecaca; }

.exirchat-btn-contact-expert {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  padding: 8px 18px;
  background: var(--exirchat-accent, #7c3aed);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-family: Tahoma, Arial, sans-serif;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}

.exirchat-btn-contact-expert:hover { background: var(--exirchat-accent-hover, #6d28d9); }

@keyframes exirchat-fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Experts List */
.exirchat-experts-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.exirchat-expert-card {
  background: #f8f8f8;
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid #efefef;
  transition: border-color 0.15s, background 0.15s;
}

.exirchat-expert-card:hover { border-color: #ddd; background: #f2f2f2; }

.exirchat-expert-card-avatar-wrap { position: relative; flex-shrink: 0; }

.exirchat-expert-card-avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  margin: 0;
  padding: 0;
}

.exirchat-expert-card-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.exirchat-expert-card-name-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.exirchat-expert-card-name {
  font-size: 13.5px;
  font-weight: 700;
  color: #111;
  margin: 0;
  padding: 0;
}

.exirchat-expert-online-badge {
  font-size: 10px;
  font-weight: 600;
  color: #16a34a;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 20px;
  padding: 1px 7px;
  line-height: 1.6;
}

.exirchat-expert-card-role {
  font-size: 11.5px;
  color: #999;
  margin: 0;
  padding: 0;
}

.exirchat-expert-card-socials { display: flex; align-items: center; }

.exirchat-social-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  transition: transform 0.15s, opacity 0.15s;
  text-decoration: none;
  padding: 0;
  margin: 0;
}

.exirchat-social-btn:hover { transform: scale(1.08); opacity: 0.9; }
.exirchat-social-btn.instagram { background: #e1306c; }
.exirchat-social-btn.telegram  { background: #2aabee; }
.exirchat-social-btn.whatsapp  { background: #25d366; }
.exirchat-social-btn.twitter   { background: #1d9bf0; }
.exirchat-social-btn.bale      { background: #5b3cc4; }
.exirchat-social-btn.ita       { background: #1a73e8; }
.exirchat-social-btn.soroush   { background: #e91e63; }
.exirchat-social-btn.rubika    { background: #f57c00; }
.exirchat-social-btn.igap      { background: #00897b; }
.exirchat-social-btn.gap       { background: #43a047; }
.exirchat-social-btn.custom    { background: #607d8b; }

/* Responsive */
@media (max-width: 420px) {
  .exirchat-widget { width: calc(100vw - 20px); left: 10px; bottom: 86px; }
  .exirchat-fab { left: 16px; bottom: 16px; }
  .exirchat-fab-bubble { left: 80px; bottom: 24px; }
}
