/* ZedWP Ultra-Sleek Live Chat Widget Styles */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
  --zh-chat-font: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --zh-chat-bg: rgba(10, 13, 22, 0.88);
  --zh-chat-card-bg: rgba(255, 255, 255, 0.04);
  --zh-chat-border: rgba(255, 255, 255, 0.12);
  --zh-chat-accent: #00f2fe;
  --zh-chat-gradient: linear-gradient(135deg, #00f2fe 0%, #4facfe 50%, #6366f1 100%);
  --zh-chat-user-bg: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
  --zh-chat-wa-gradient: linear-gradient(135deg, #0f9d58 0%, #25d366 100%);
  --zh-chat-email-gradient: linear-gradient(135deg, #0284c7 0%, #00f2fe 100%);
  --zh-chat-shadow: 0 25px 60px -10px rgba(0, 0, 0, 0.8), 0 0 35px rgba(0, 242, 254, 0.15);
}

#zedwp-chat-widget {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 999999;
  font-family: var(--zh-chat-font);
  box-sizing: border-box;
}

#zedwp-chat-widget * {
  box-sizing: border-box;
}

/* Tooltip Hint Bubble */
.zh-chat-tooltip {
  position: absolute;
  bottom: 74px;
  right: 0;
  background: rgba(15, 20, 32, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(0, 242, 254, 0.3);
  padding: 8px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5), 0 0 15px rgba(0, 242, 254, 0.2);
  display: flex;
  align-items: center;
  gap: 6px;
  opacity: 0;
  transform: translateY(10px) scale(0.9);
  pointer-events: none;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.zh-chat-tooltip.show {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.zh-chat-tooltip::after {
  content: '';
  position: absolute;
  bottom: -6px;
  right: 24px;
  width: 10px;
  height: 10px;
  background: rgba(15, 20, 32, 0.92);
  border-right: 1px solid rgba(0, 242, 254, 0.3);
  border-bottom: 1px solid rgba(0, 242, 254, 0.3);
  transform: rotate(45deg);
}

/* Trigger Floating Action Button */
.zh-chat-trigger {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: #0b0f19;
  padding: 3px;
  position: relative;
  cursor: pointer;
  border: none;
  outline: none;
  box-shadow: var(--zh-chat-shadow);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.4s ease;
}

/* Rotating Gradient Border Ring */
.zh-chat-trigger-ring {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--zh-chat-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.zh-chat-trigger-ring::before {
  content: '';
  position: absolute;
  inset: -100%;
  background: conic-gradient(from 0deg, #00f2fe, #4facfe, #6366f1, #00f2fe);
  animation: zh-spin 4s linear infinite;
}

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

.zh-chat-trigger-inner {
  position: relative;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: #0f1422;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.zh-chat-trigger:hover {
  transform: scale(1.1) translateY(-3px);
  box-shadow: 0 15px 35px rgba(0, 242, 254, 0.5), 0 0 25px rgba(0, 242, 254, 0.3);
}

.zh-chat-trigger:active {
  transform: scale(0.92);
}

/* Pulse Outer Ring Animation */
.zh-chat-trigger::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid rgba(0, 242, 254, 0.6);
  animation: zh-radar 2.4s infinite cubic-bezier(0.2, 0.8, 0.2, 1);
  pointer-events: none;
}

@keyframes zh-radar {
  0% { transform: scale(1); opacity: 0.9; }
  100% { transform: scale(1.35); opacity: 0; }
}

/* Trigger SVG Icons Switch */
.zh-chat-icon-svg {
  width: 26px;
  height: 26px;
  color: #00f2fe;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: absolute;
}

.zh-chat-icon-svg.close {
  opacity: 0;
  transform: rotate(-180deg) scale(0.4);
  color: #fff;
}

.zh-chat-trigger.active .zh-chat-icon-svg.chat {
  opacity: 0;
  transform: rotate(180deg) scale(0.4);
}

.zh-chat-trigger.active .zh-chat-icon-svg.close {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

/* Unread Badge */
.zh-chat-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  background: linear-gradient(135deg, #ff3b30, #ff2d55);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #0b0f19;
  box-shadow: 0 4px 10px rgba(255, 59, 48, 0.5);
  animation: zh-badgeBounce 1.2s ease infinite alternate;
  z-index: 10;
}

@keyframes zh-badgeBounce {
  0% { transform: translateY(0); }
  100% { transform: translateY(-4px); }
}

/* Chat Window Modal Panel */
.zh-chat-window {
  position: absolute;
  bottom: 80px;
  right: 0;
  width: 390px;
  height: 560px;
  max-height: calc(100vh - 120px);
  background: var(--zh-chat-bg);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  border: 1px solid var(--zh-chat-border);
  border-radius: 24px;
  box-shadow: var(--zh-chat-shadow);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(30px) scale(0.92) rotate(-1deg);
  transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
              visibility 0.4s ease;
  transform-origin: bottom right;
}

.zh-chat-window.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1) rotate(0deg);
}

/* Window Header */
.zh-chat-header {
  padding: 18px 20px;
  background: rgba(15, 20, 32, 0.95);
  border-bottom: 1px solid var(--zh-chat-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
}

.zh-chat-header::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0, 242, 254, 0.5), transparent);
}

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

.zh-chat-avatar-wrap {
  position: relative;
}

.zh-chat-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #00f2fe 0%, #4facfe 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #0b0f19;
  font-weight: 900;
  font-size: 17px;
  border: 2px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 4px 15px rgba(0, 242, 254, 0.3);
}

.zh-chat-avatar-dot {
  position: absolute;
  bottom: 1px;
  right: 1px;
  width: 12px;
  height: 12px;
  background: #10b981;
  border: 2px solid #0f1420;
  border-radius: 50%;
  box-shadow: 0 0 8px #10b981;
}

.zh-chat-title-group h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.2px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.zh-chat-online-badge {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #10b981;
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.zh-chat-title-group p {
  margin: 3px 0 0 0;
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.55);
}

.zh-chat-close-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.6);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.zh-chat-close-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  transform: rotate(90deg);
}

/* Chat Message Body */
.zh-chat-body {
  flex: 1;
  padding: 18px 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
  scroll-behavior: smooth;
}

.zh-chat-body::-webkit-scrollbar {
  width: 4px;
}
.zh-chat-body::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}

.zh-chat-timestamp {
  text-align: center;
  font-size: 10.5px;
  color: rgba(255, 255, 255, 0.35);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-weight: 600;
  margin: 2px 0 6px;
}

/* Messages */
.zh-chat-msg {
  display: flex;
  flex-direction: column;
  max-width: 86%;
  animation: zh-slideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes zh-slideUp {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.zh-chat-msg.bot {
  align-self: flex-start;
}

.zh-chat-msg.user {
  align-self: flex-end;
}

.zh-chat-bubble {
  padding: 12px 16px;
  border-radius: 18px;
  font-size: 13.5px;
  line-height: 1.55;
  color: #fff;
  word-wrap: break-word;
  position: relative;
}

.zh-chat-msg.bot .zh-chat-bubble {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-top-left-radius: 4px;
  backdrop-filter: blur(8px);
}

.zh-chat-msg.user .zh-chat-bubble {
  background: var(--zh-chat-user-bg);
  border-top-right-radius: 4px;
  box-shadow: 0 4px 18px rgba(37, 99, 235, 0.35);
}

/* Typing Animated Indicator */
.zh-typing-indicator {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 12px 18px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  border-top-left-radius: 4px;
  width: max-content;
}

.zh-typing-dot {
  width: 6px;
  height: 6px;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 50%;
  animation: zh-dotFlash 1.4s infinite ease-in-out;
}

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

@keyframes zh-dotFlash {
  0%, 100% { transform: scale(0.8); opacity: 0.4; }
  50% { transform: scale(1.4); opacity: 1; background: #00f2fe; }
}

/* Direct Action Buttons Card */
.zh-chat-channels {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}

.zh-chat-channel-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 16px;
  border-radius: 12px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.zh-chat-channel-btn.whatsapp {
  background: var(--zh-chat-wa-gradient);
  box-shadow: 0 4px 15px rgba(37, 211, 102, 0.25);
  color: #fff;
}

.zh-chat-channel-btn.whatsapp:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(37, 211, 102, 0.45);
}

.zh-chat-channel-btn.email {
  background: var(--zh-chat-email-gradient);
  box-shadow: 0 4px 15px rgba(0, 242, 254, 0.2);
  color: #0b0f19;
}

.zh-chat-channel-btn.email:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 242, 254, 0.4);
}

/* Interactive Chips */
.zh-chat-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.zh-chat-chip {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
  font-size: 12px;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.25s ease;
  outline: none;
}

.zh-chat-chip:hover {
  background: rgba(0, 242, 254, 0.15);
  border-color: rgba(0, 242, 254, 0.5);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 242, 254, 0.2);
}

/* Footer Input Area */
.zh-chat-footer {
  padding: 14px 16px;
  background: rgba(12, 16, 26, 0.95);
  border-top: 1px solid var(--zh-chat-border);
  display: flex;
  align-items: center;
  gap: 10px;
}

.zh-chat-input-wrap {
  flex: 1;
  position: relative;
}

.zh-chat-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 16px;
  padding: 11px 16px;
  color: #fff;
  font-size: 13.5px;
  font-family: inherit;
  outline: none;
  transition: all 0.25s ease;
}

.zh-chat-input:focus {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--zh-chat-accent);
  box-shadow: 0 0 16px rgba(0, 242, 254, 0.25);
}

.zh-chat-input::placeholder {
  color: rgba(255, 255, 255, 0.35);
}

.zh-chat-send-btn {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  background: var(--zh-chat-gradient);
  border: none;
  color: #0b0f19;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  outline: none;
}

.zh-chat-send-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 4px 15px rgba(0, 242, 254, 0.4);
}

.zh-chat-send-btn:active {
  transform: scale(0.92);
}

/* Mobile Responsive (Silky Smooth Bottom Sheet) */
@media (max-width: 640px) {
  #zedwp-chat-widget {
    bottom: 20px;
    right: 20px;
  }
  .zh-chat-window {
    width: calc(100vw - 32px);
    right: 0;
    bottom: 70px;
    height: min(520px, calc(100vh - 100px));
    border-radius: 24px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7), 0 0 30px rgba(59, 130, 246, 0.2);
  }
}
