/* ==========================================================================
   PiksoBot 2.0 - Ultra-Sleek Modern Live Chat Widget Styles
   Deliberate Slow 2-Phase Header Pill Animation & Reference Screenshot Design
   ========================================================================== */

/* Zero scrollbars inside widget */
.livechat-widget-container * {
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
  box-sizing: border-box;
}

.livechat-widget-container *::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

.livechat-widget-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 999999;
  font-family: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease, visibility 0.25s ease;
}

body.menu-open .livechat-widget-container,
body.mobile-menu-active .livechat-widget-container,
.mobile-nav-overlay.active ~ .livechat-widget-container,
.livechat-widget-container.menu-hidden {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  transform: scale(0.2) translateY(80px) !important;
}

/* Floating Launcher Button */
.livechat-launcher {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #FF5100;
  color: #FFFFFF;
  border: none;
  cursor: pointer;
  box-shadow: 0 10px 28px rgba(255, 81, 0, 0.38), 0 4px 10px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  outline: none;
  transform-origin: center center;
}

.livechat-launcher:hover {
  transform: scale(1.08) translateY(-2px);
  box-shadow: 0 14px 34px rgba(255, 81, 0, 0.5);
}

.livechat-launcher:active {
  transform: scale(0.95);
}

/* When chat is active, launcher smoothly shrinks and disappears in place */
.livechat-launcher.open,
.livechat-widget-container.chat-active .livechat-launcher {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  display: none !important;
  transform: scale(0.2) rotate(-45deg) !important;
}

.livechat-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  background: #10B981;
  color: #FFFFFF;
  font-size: 11px;
  font-weight: 800;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.4);
  transition: all 0.25s ease;
}

.icon-chat, .icon-close {
  width: 28px;
  height: 28px;
  transition: all 0.25s ease;
}

.icon-close {
  display: none;
}

/* Chat Main Window anchored right in place of launcher at bottom 0 right 0 */
.livechat-window {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 380px;
  height: 620px;
  max-height: calc(100vh - 48px);
  background: #FFFFFF;
  border-radius: 28px;
  box-shadow: 0 20px 60px -10px rgba(15, 23, 42, 0.22), 0 8px 24px -4px rgba(15, 23, 42, 0.12);
  border: 1px solid rgba(226, 232, 240, 0.9);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: scale(0.2) translate(40px, 40px);
  transform-origin: bottom right;
  transition: transform 0.38s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.28s ease, visibility 0.28s ease;
}

.livechat-window.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: scale(1) translate(0, 0);
}

/* Top Navigation Bar */
.lc-top-bar {
  padding: 12px 16px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  background: #FFFFFF;
  border-bottom: 1px solid #F1F5F9;
}

.lc-icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #F1F5F9;
  border: 1px solid #E2E8F0;
  color: #334155;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.lc-icon-btn:hover {
  background: #E2E8F0;
  color: #0F172A;
}

.lc-top-right-group {
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
}

/* ==========================================================================
   Centered Floating Header Pill:
   YAVAŞ-YAVAŞ AÇILAN 2 MƏRHƏLƏLİ ANIMASİYA (Profil fotosu + Sürüşmə + Adın açılması)
   ========================================================================== */
.lc-header-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 9999px;
  padding: 5px 14px 5px 6px;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.06);
  position: relative;
  overflow: hidden;
}

/* 1-ci Mərhələ: Birinci profil fotosu yavaş-yavaş gəlir və sola sürüşür */
.livechat-window.active .lc-pill-avatar-wrap {
  animation: avatarPopSlow 1.0s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes avatarPopSlow {
  0% {
    transform: scale(0.2) rotate(-15deg);
    opacity: 0;
  }
  50% {
    transform: scale(1.15) rotate(0deg);
    opacity: 1;
  }
  75% {
    transform: scale(0.95);
  }
  100% {
    transform: scale(1) translateX(0);
    opacity: 1;
  }
}

/* 2-ci Mərhələ: Sonra PiksoBot AI Support və AI köməkçi yazısı yavaş-yavaş açılır */
.livechat-window.active .lc-pill-info {
  animation: textSlowReveal 1.1s 0.45s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes textSlowReveal {
  0% {
    opacity: 0;
    transform: translateX(-16px);
    max-width: 0;
    filter: blur(4px);
  }
  40% {
    opacity: 0.6;
    max-width: 100px;
    filter: blur(2px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
    max-width: 220px;
    filter: blur(0);
  }
}

.lc-pill-avatar-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.lc-pill-avatar-img {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  display: block;
}

.lc-pill-online-dot {
  position: absolute;
  top: -1px;
  right: -1px;
  width: 10px;
  height: 10px;
  background: #10B981;
  border: 2px solid #FFFFFF;
  border-radius: 50%;
}

.lc-pill-info {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
}

.lc-pill-title {
  font-size: 13.5px;
  font-weight: 800;
  color: #0F172A;
  letter-spacing: -0.01em;
  transition: all 0.3s ease;
}

.lc-pill-subtitle {
  font-size: 11px;
  color: #64748B;
  font-weight: 500;
  margin-top: 1px;
  transition: all 0.3s ease;
}

/* Operator Live Mode Header Animation - Sleek Obsidian Black (Yaşıl deyil, Qara və Animasiyalı) */
.lc-header-pill.operator-mode {
  border: 1.5px solid #0F172A;
  background: #FFFFFF;
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.12);
  animation: headerOperatorSwitch 0.45s cubic-bezier(0.16, 1, 0.3, 1) both;
}
@keyframes headerOperatorSwitch {
  0% {
    transform: scale(0.92) translateY(-4px);
    opacity: 0.6;
  }
  50% {
    transform: scale(1.04) translateY(0);
    opacity: 1;
  }
  100% {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
}
.lc-header-pill.operator-mode .lc-pill-title {
  color: #0F172A;
  font-weight: 800;
}
.lc-header-pill.operator-mode .lc-pill-subtitle {
  color: #475569;
  font-weight: 600;
}
.lc-header-pill.operator-mode .lc-pill-avatar-img {
  border: 1.5px solid #0F172A;
}
.lc-header-pill.operator-mode .lc-pill-online-dot {
  background: #0F172A;
  border-color: #FFFFFF;
}

/* Operator Söhbətə Qoşuldu Pill / Banner (Sleek Dark) */
.lc-operator-joined-pill {
  align-self: center;
  background: #0F172A;
  color: #FFFFFF;
  border: 1px solid #1E293B;
  border-radius: 999px;
  padding: 6px 16px;
  font-size: 11.5px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 8px auto;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.18);
  animation: operatorJoinBounce 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes operatorJoinBounce {
  0% { transform: scale(0.6) translateY(-10px); opacity: 0; }
  100% { transform: scale(1) translateY(0); opacity: 1; }
}

.lc-operator-msg-tag {
  font-size: 10px;
  font-weight: 800;
  color: #059669;
  background: #ECFDF5;
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 6px;
}

/* Three Dots Options Menu Dropdown Card */
.lc-options-dropdown {
  position: absolute;
  top: 46px;
  right: 0;
  width: 220px;
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 18px;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.14);
  padding: 10px;
  display: none !important;
  pointer-events: none !important;
  visibility: hidden !important;
  flex-direction: column;
  gap: 6px;
  z-index: 100;
  transform: translateY(-8px);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.lc-options-dropdown.active {
  display: flex !important;
  pointer-events: auto !important;
  visibility: visible !important;
  opacity: 1;
  transform: translateY(0);
}

.lc-option-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #F8FAFC;
  border: 1px solid #F1F5F9;
  font-size: 13px;
  font-weight: 600;
  color: #1E293B;
  cursor: pointer;
  transition: all 0.2s ease;
  justify-content: space-between;
}

.lc-option-item:hover {
  background: #F1F5F9;
}

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

/* Toggle switch inside options */
.lc-switch {
  width: 40px;
  height: 22px;
  background: #10B981;
  border-radius: 9999px;
  position: relative;
  cursor: pointer;
  transition: background 0.2s ease;
}

.lc-switch.off {
  background: #CBD5E1;
}

.lc-switch-handle {
  width: 18px;
  height: 18px;
  background: #FFFFFF;
  border-radius: 50%;
  position: absolute;
  top: 2px;
  right: 2px;
  transition: transform 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.lc-switch.off .lc-switch-handle {
  transform: translateX(-18px);
}

/* Messages Area */
.lc-messages-body {
  flex: 1;
  padding: 16px 14px;
  overflow-y: auto;
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: #FFFFFF;
}

.lc-messages-body::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

/* Bot Message Row with Avatar */
.lc-bot-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
  animation: msgPop 0.3s ease-out;
}

.lc-bot-avatar-small {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  overflow: hidden;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}

.lc-bot-avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.lc-bot-text-wrap {
  flex: 1;
  font-size: 13.5px;
  line-height: 1.55;
  color: #1E293B;
  word-break: break-word;
}

.lc-bot-text-wrap strong {
  font-weight: 800;
  color: #0F172A;
}

/* Typewriter Cursor Effect */
.typing-cursor {
  display: inline-block;
  width: 2px;
  height: 14px;
  background: #FF5100;
  margin-left: 2px;
  animation: blinkCursor 0.8s infinite;
  vertical-align: middle;
}

@keyframes blinkCursor {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* User Message Bubble Matching Dynamic Theme Color */
.lc-user-row {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  align-self: flex-end;
  animation: msgPop 0.3s ease-out;
  max-width: 80%;
}

.lc-user-bubble {
  background: var(--lc-theme-color, #FF5100);
  color: #FFFFFF;
  padding: 10px 18px;
  border-radius: 18px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  word-break: break-word;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.15);
  transition: background 0.3s ease;
}

.lc-image-bubble {
  padding: 6px;
  background: #18181B;
  border-radius: 18px;
  overflow: hidden;
}

.lc-chat-img {
  width: 100%;
  max-width: 220px;
  border-radius: 14px;
  display: block;
  object-fit: cover;
}

.lc-user-status {
  font-size: 11px;
  color: #94A3B8;
  margin-top: 4px;
  margin-right: 4px;
  font-weight: 500;
}

/* Time Divider */
.lc-time-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  margin: 6px 0;
}

.lc-time-divider::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  background: #F1F5F9;
  z-index: 0;
}

.lc-time-divider span {
  position: relative;
  z-index: 1;
  background: #FFFFFF;
  padding: 0 10px;
  font-size: 11px;
  color: #94A3B8;
  font-weight: 600;
}

/* Reference Screenshot Action Card (Looking for answers...) */
.lc-card-prompt {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
  animation: msgPop 0.3s ease-out;
}

.lc-prompt-content {
  flex: 1;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 20px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.lc-prompt-content p {
  font-size: 13.5px;
  font-weight: 600;
  color: #1E293B;
  line-height: 1.45;
  margin: 0;
}

.lc-btn-card-action {
  background: #0F172A;
  color: #FFFFFF;
  border: none;
  padding: 12px 18px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.lc-btn-card-action:hover {
  background: #FF5100;
  transform: translateY(-1px);
}

/* Centered System/Rating Note */
.lc-system-note {
  text-align: center;
  font-size: 12px;
  color: #64748B;
  padding: 4px 12px;
  margin: 2px auto;
  line-height: 1.4;
}

@keyframes msgPop {
  from { opacity: 0; transform: translateY(8px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Typing Indicator Animation */
.typing-dots {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
}

.typing-dots span {
  width: 6px;
  height: 6px;
  background: #94A3B8;
  border-radius: 50%;
  animation: typingDotAnim 1.4s infinite;
}

.typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingDotAnim {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-4px); opacity: 1; background: #FF5100; }
}

/* Interactive Emoji Picker Popover */
.lc-emoji-picker {
  position: absolute;
  bottom: 74px;
  right: 16px;
  width: 280px;
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 20px;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.16);
  padding: 12px;
  display: none !important;
  pointer-events: none !important;
  visibility: hidden !important;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  z-index: 150;
  transform: translateY(10px);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.lc-emoji-picker.active {
  display: grid !important;
  pointer-events: auto !important;
  visibility: visible !important;
  opacity: 1;
  transform: translateY(0);
}

.lc-emoji-item {
  font-size: 20px;
  background: #F8FAFC;
  border: 1px solid #F1F5F9;
  border-radius: 10px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}

.lc-emoji-item:hover {
  transform: scale(1.2);
  background: #FFF5F0;
  border-color: #FF5100;
}

/* Bottom Input Area */
.lc-footer-wrap {
  padding: 10px 14px 12px;
  background: #FFFFFF;
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
}

.lc-input-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #FFFFFF;
  border: 1.5px solid #E2E8F0;
  border-radius: 9999px;
  padding: 4px 6px 4px 6px;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05);
  transition: all 0.2s ease;
}

.lc-input-pill:focus-within {
  border-color: #0F172A;
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.1);
}

.lc-btn-plus {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  color: #334155;
  font-size: 20px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.lc-btn-plus:hover {
  background: #E2E8F0;
  color: #0F172A;
}

#lc-input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 14px;
  color: #0F172A;
  outline: none;
  font-family: inherit;
  padding: 0 4px;
}

#lc-input::placeholder {
  color: #94A3B8;
}

.lc-btn-emoji {
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  color: #475569;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.lc-btn-send {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--lc-theme-color, #FF5100);
  color: #FFFFFF;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  pointer-events: auto !important;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(255, 81, 0, 0.25);
}

.lc-btn-send * {
  pointer-events: none !important;
}

.lc-btn-send.active, .lc-btn-send:hover {
  background: #0F172A;
  color: #FFFFFF;
  transform: scale(1.06);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.25);
}

/* Powered by Branding */
.lc-branding-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 11.5px;
  color: #94A3B8;
  font-weight: 500;
  padding: 4px 0 2px;
}

.lc-brand-logo-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease;
  cursor: pointer;
  vertical-align: middle;
}

.lc-brand-logo-link:hover {
  transform: scale(1.08) translateY(-1px);
  opacity: 0.88;
}

.lc-brand-logo-img {
  height: 18px;
  max-width: 82px;
  object-fit: contain;
  display: block;
}

/* Hidden File Input */
#lc-file-input {
  display: none;
}

/* Floating Mini Notification Toast above Launcher when Chat is Closed */
.lc-mini-toast {
  position: absolute;
  bottom: 84px;
  right: 0;
  width: 270px;
  background: #FFFFFF;
  border-radius: 16px;
  padding: 12px 14px;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.18), 0 0 0 1px rgba(15, 23, 42, 0.06);
  cursor: pointer;
  z-index: 99999999;
  animation: slideUpToast 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  transition: transform 0.22s ease, opacity 0.22s ease, box-shadow 0.22s ease;
}
.livechat-widget-container.chat-active .lc-mini-toast,
.livechat-window.active ~ .lc-mini-toast,
.livechat-window.active .lc-mini-toast {
  display: none !important;
  opacity: 0 !important;
  pointer-events: none !important;
  visibility: hidden !important;
}
.lc-mini-toast:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 42px rgba(15, 23, 42, 0.24);
}
.lc-mini-toast.closing {
  transform: translateY(12px) scale(0.85);
  opacity: 0;
  pointer-events: none;
}
.lc-mini-toast-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.lc-mini-toast-author {
  display: flex;
  align-items: center;
  gap: 8px;
}
.lc-mini-toast-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid #10B981;
}
.lc-mini-toast-name {
  font-size: 12px;
  font-weight: 800;
  color: #0F172A;
}
.lc-mini-toast-close {
  background: none;
  border: none;
  color: #94A3B8;
  font-size: 13px;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  line-height: 1;
}
.lc-mini-toast-close:hover {
  background: #F1F5F9;
  color: #0F172A;
}
.lc-mini-toast-text {
  font-size: 12px;
  color: #334155;
  margin: 0;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 230px;
}
@keyframes slideUpToast {
  from { opacity: 0; transform: translateY(16px) scale(0.92); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ==========================================================================
   SUPPORT CSAT RATING, THANK YOU CARD & OPERATOR TYPING STYLES
   ========================================================================== */

/* Operator Typing Animation Indicator (Sadə və Neytral Qara/Boz) */
.lc-operator-typing-row {
  display: flex;
  align-items: center;
  gap: 10px;
  animation: msgPop 0.25s ease-out;
  padding: 4px 0;
}
.lc-op-typing-badge {
  font-size: 11.5px;
  font-weight: 700;
  color: #1E293B;
  display: flex;
  align-items: center;
  gap: 8px;
  background: #F1F5F9;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid #E2E8F0;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}
.lc-op-typing-badge .typing-dots span {
  background: #475569;
}

/* Söhbət Sonlandı Bölücüsü */
.lc-ended-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 12px 0 6px;
  position: relative;
}
.lc-ended-divider::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  background: #E2E8F0;
}
.lc-ended-divider span {
  position: relative;
  background: #FFFFFF;
  padding: 0 12px;
  font-size: 11px;
  color: #94A3B8;
  font-weight: 700;
}

/* Dəstəyi Dəyərləndirmə Kartı */
.lc-rating-card {
  background: linear-gradient(180deg, #FFFFFF 0%, #F8FAFC 100%);
  border: 1.5px solid #E2E8F0;
  border-radius: 20px;
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  animation: msgPop 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}
.lc-rating-header {
  display: flex;
  align-items: center;
  gap: 12px;
}
.lc-rating-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #FEF3C7;
  color: #D97706;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.lc-rating-header h4 {
  font-size: 14px;
  font-weight: 800;
  color: #0F172A;
  margin: 0 0 2px 0;
}
.lc-rating-header p {
  font-size: 11.5px;
  color: #64748B;
  margin: 0;
  line-height: 1.35;
}

.lc-emoji-rating-row {
  display: flex;
  justify-content: space-between;
  gap: 6px;
  padding: 4px 0;
}
.lc-rate-emoji-btn {
  flex: 1;
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  padding: 8px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 22px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.lc-rate-emoji-btn .rate-sub {
  font-size: 10px;
  font-weight: 700;
  color: #64748B;
}
.lc-rate-emoji-btn:hover {
  transform: translateY(-2px);
  border-color: #FF5100;
  background: #FFF7ED;
}
.lc-rate-emoji-btn.active {
  background: #FFF7ED;
  border-color: #FF5100;
  box-shadow: 0 4px 12px rgba(255, 81, 0, 0.2);
  transform: scale(1.05);
}
.lc-rate-emoji-btn.active .rate-sub {
  color: #FF5100;
}

.lc-rating-feedback-wrap textarea {
  width: 100%;
  height: 52px;
  border: 1px solid #CBD5E1;
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 12.5px;
  font-family: inherit;
  resize: none;
  outline: none;
  background: #FFFFFF;
  transition: border-color 0.2s;
}
.lc-rating-feedback-wrap textarea:focus {
  border-color: #FF5100;
}

.lc-btn-submit-rating {
  width: 100%;
  height: 40px;
  background: linear-gradient(135deg, #FF5100 0%, #FF6A00 100%);
  color: #FFFFFF;
  border: none;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 12px rgba(255, 81, 0, 0.25);
}
.lc-btn-submit-rating:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(255, 81, 0, 0.35);
}

/* Təşəkkür və Yeni Söhbət Kartı */
.lc-thank-you-card {
  background: linear-gradient(180deg, #FFFFFF 0%, #F0FDF4 100%);
  border: 1.5px solid #BBF7D0;
  border-radius: 20px;
  padding: 22px 18px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  animation: msgPop 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.08);
}
.lc-thank-you-card .thank-icon {
  font-size: 32px;
}
.lc-thank-you-card h4 {
  font-size: 15px;
  font-weight: 800;
  color: #065F46;
  margin: 0;
}
.lc-thank-you-card p {
  font-size: 12px;
  color: #475569;
  margin: 0 0 10px 0;
  line-height: 1.45;
}
.lc-btn-new-chat {
  background: #0F172A;
  color: #FFFFFF;
  border: none;
  border-radius: 10px;
  padding: 10px 20px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.2);
}
.lc-btn-new-chat:hover {
  background: #FF5100;
  transform: translateY(-1px);
}

/* ==========================================================================
   FULLSCREEN CHATBOT ON MOBILE VIEWPORTS
   ========================================================================== */
@media (max-width: 768px) {
  .livechat-widget-container {
    bottom: 20px;
    right: 20px;
  }

  .livechat-window {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    width: 100dvw !important;
    height: 100vh !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    border-radius: 0 !important;
    border: none !important;
    margin: 0 !important;
    box-shadow: none !important;
    z-index: 99999999 !important;
    transform: translateY(100%) !important;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1) !important;
  }

  .livechat-window.active {
    transform: translateY(0) !important;
  }

  .lc-top-bar {
    padding: 14px 16px 12px;
  }

  .lc-header-pill {
    padding: 4px 12px 4px 6px;
  }

  .lc-pill-title {
    font-size: 12.5px;
  }

  .lc-messages-body {
    padding: 16px 14px;
  }

  .lc-footer-wrap {
    padding: 10px 14px 24px;
  }

  .lc-emoji-picker {
    right: 14px;
    width: calc(100% - 28px);
  }
}

/* ==========================================================================
   PRE-CHAT IDENTIFICATION MODAL & BLURRED BACKDROP ("Sizi necə çağıraq?")
   ========================================================================== */
.lc-prechat-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 10000;
  display: none !important;
  pointer-events: none !important;
  visibility: hidden !important;
  align-items: center;
  justify-content: center;
  padding: 16px;
  border-radius: 28px;
  box-sizing: border-box;
}

.lc-prechat-backdrop.active {
  display: flex !important;
  pointer-events: auto !important;
  visibility: visible !important;
  animation: prechatFadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes prechatFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.lc-prechat-card {
  background: #FFFFFF;
  border-radius: 22px;
  width: 100%;
  max-width: 320px;
  padding: 22px 18px 18px;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.28), 0 0 0 1px rgba(255, 255, 255, 0.8);
  text-align: center;
  position: relative;
  margin: auto;
  box-sizing: border-box;
  animation: prechatCardPop 0.38s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes prechatCardPop {
  0% { transform: scale(0.85) translateY(16px); opacity: 0; }
  100% { transform: scale(1) translateY(0); opacity: 1; }
}

.lc-prechat-avatar-wrap {
  position: relative;
  width: 58px;
  height: 58px;
  margin: 0 auto 12px;
}
.lc-prechat-avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 2.5px solid #FF5100;
  box-shadow: 0 6px 16px rgba(255, 81, 0, 0.25);
}
.lc-prechat-badge-icon {
  position: absolute;
  bottom: -2px;
  right: -2px;
  background: #FFFFFF;
  border-radius: 50%;
  font-size: 14px;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.lc-prechat-title {
  font-size: 16.5px;
  font-weight: 800;
  color: #0F172A;
  margin: 0 0 6px;
  letter-spacing: -0.01em;
}
.lc-prechat-subtitle {
  font-size: 12px;
  color: #64748B;
  margin: 0 0 16px;
  line-height: 1.45;
}

.lc-prechat-field {
  text-align: left;
  margin-bottom: 12px;
}
.lc-prechat-field label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: #334155;
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.lc-prechat-input {
  width: 100%;
  height: 40px;
  border: 1.5px solid #E2E8F0;
  border-radius: 12px;
  padding: 0 12px;
  font-size: 13px;
  font-family: inherit;
  outline: none;
  background: #F8FAFC;
  box-sizing: border-box;
  transition: all 0.2s;
}
.lc-prechat-input:focus {
  border-color: #FF5100;
  background: #FFFFFF;
  box-shadow: 0 0 0 3px rgba(255, 81, 0, 0.12);
}

.lc-prechat-btn {
  width: 100%;
  height: 44px;
  background: var(--lc-theme-color, #FF5100);
  color: #FFFFFF;
  border: none;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.lc-prechat-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.22);
}
.lc-prechat-close-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #F1F5F9;
  border: none;
  color: #64748B;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}
.lc-prechat-close-btn:hover {
  background: #E2E8F0;
  color: #0F172A;
  transform: scale(1.08);
}

.lc-prechat-skip-link {
  background: transparent;
  border: none;
  color: #64748B;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 10px;
  padding: 6px;
  width: 100%;
  text-align: center;
  transition: color 0.2s;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.lc-prechat-skip-link:hover {
  color: #0F172A;
}

.lc-messages-blurred {
  filter: blur(5px);
  pointer-events: none;
  user-select: none;
}

/* Name capture state */
.livechat-widget-container.lc-awaiting-name .lc-input-pill {
  border-color: var(--lc-theme-color, #FF5100);
  box-shadow: 0 0 0 3px rgba(255, 81, 0, 0.11), 0 8px 24px rgba(255, 81, 0, 0.12);
  animation: lcNamePromptPulse 2.2s ease-in-out infinite;
}

.livechat-widget-container.lc-awaiting-name #lc-input::placeholder {
  color: var(--lc-theme-color, #FF5100);
  font-weight: 700;
  opacity: 0.9;
}

.lc-name-question .lc-bot-text-wrap {
  border: 1px solid rgba(255, 81, 0, 0.16);
  box-shadow: 0 7px 20px rgba(255, 81, 0, 0.08);
}

@keyframes lcNamePromptPulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(255, 81, 0, 0.08), 0 8px 24px rgba(255, 81, 0, 0.08); }
  50% { box-shadow: 0 0 0 5px rgba(255, 81, 0, 0.14), 0 12px 30px rgba(255, 81, 0, 0.16); }
}

@media (prefers-reduced-motion: reduce) {
  .livechat-widget-container.lc-awaiting-name .lc-input-pill { animation: none; }
}
