/* =====================================================================
   PWD WhatsApp Lite — Frontend Widget CSS
   ===================================================================== */

:root {
  --pwd-walite-green:      #25D366;
  --pwd-walite-green-dark: #128C7E;
  --pwd-walite-white:      #fff;
  --pwd-walite-shadow:     0 8px 32px rgba(0,0,0,.18);
  --pwd-walite-radius:     16px;
  --pwd-walite-transition: all .22s cubic-bezier(.4,0,.2,1);
}

/* =====================================================================
   Floating button
   ===================================================================== */

#pwd-walite-root {
  position: fixed;
  z-index: 999999;
  bottom: var(--pwd-walite-offset-y, 24px);
  right: var(--pwd-walite-offset-x, 24px);
  left: auto;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

#pwd-walite-root.pwd-walite-pos-left {
  left: var(--pwd-walite-offset-x, 24px);
  right: auto;
  align-items: flex-start;
}

#pwd-walite-root.pwd-walite-pos-center {
  left: 50%;
  right: auto;
  transform: translateX(-50%);
  align-items: center;
}

/* =====================================================================
   Trigger button
   ===================================================================== */

.pwd-walite-trigger {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  position: relative;
}

.pwd-walite-trigger__bubble {
  width: var(--pwd-walite-btn-size, 60px);
  height: var(--pwd-walite-btn-size, 60px);
  border-radius: var(--pwd-walite-btn-radius, 50%);
  background: var(--pwd-walite-btn-bg, #25D366);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(37,211,102,.45);
  transition: var(--pwd-walite-transition);
  position: relative;
  flex-shrink: 0;
}

.pwd-walite-trigger__bubble:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 28px rgba(37,211,102,.55);
}

.pwd-walite-trigger__bubble svg {
  width: calc(var(--pwd-walite-btn-size, 60px) * 0.48);
  height: calc(var(--pwd-walite-btn-size, 60px) * 0.48);
  fill: var(--pwd-walite-btn-icon, #fff);
}

/* Pulse animation */
.pwd-walite-pulse .pwd-walite-trigger__bubble::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: inherit;
  background: var(--pwd-walite-btn-bg, #25D366);
  opacity: .35;
  animation: pwd-walite-pulse 2s ease infinite;
}

@keyframes pwd-walite-pulse {
  0%   { transform: scale(1);   opacity: .35; }
  70%  { transform: scale(1.3); opacity: 0; }
  100% { transform: scale(1.3); opacity: 0; }
}

/* Label pill */
.pwd-walite-trigger__label {
  background: var(--pwd-walite-label-bg, #25D366);
  color: var(--pwd-walite-label-color, #fff);
  padding: 8px 16px;
  border-radius: 24px;
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 2px 10px rgba(0,0,0,.15);
  animation: pwd-walite-slide-in .3s ease;
  order: -1;
}

#pwd-walite-root.pwd-walite-pos-left .pwd-walite-trigger__label {
  order: 1;
}

@keyframes pwd-walite-slide-in {
  from { opacity: 0; transform: translateX(10px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* =====================================================================
   Chat Widget Popup
   ===================================================================== */

.pwd-walite-popup {
  width: 320px;
  background: var(--pwd-walite-body-bg, #fff);
  border-radius: var(--pwd-walite-widget-radius, 16px);
  box-shadow: var(--pwd-walite-shadow);
  overflow: hidden;
  transform-origin: bottom right;
  animation: pwd-walite-pop-in .25s cubic-bezier(.34,1.56,.64,1);
  border: 1px solid rgba(0,0,0,.08);
}

#pwd-walite-root.pwd-walite-pos-left .pwd-walite-popup {
  transform-origin: bottom left;
}

#pwd-walite-root.pwd-walite-pos-center .pwd-walite-popup {
  transform-origin: bottom center;
}

@keyframes pwd-walite-pop-in {
  from { opacity: 0; transform: scale(0.85) translateY(8px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

/* Widget header */
.pwd-walite-popup__header {
  background: var(--pwd-walite-header-bg, #25D366);
  color: var(--pwd-walite-header-color, #fff);
  padding: 18px 18px 16px;
  position: relative;
}

.pwd-walite-popup__header-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.pwd-walite-popup__logo {
  width: 36px;
  height: 36px;
  background: rgba(255,255,255,.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
}

.pwd-walite-popup__logo svg { width: 20px; height: 20px; fill: #fff; }



.pwd-walite-popup__title {
  font-size: 15px;
  font-weight: 700;
  color: var(--pwd-walite-header-color, #fff);
  margin: 0 0 3px;
}

.pwd-walite-popup__subtitle {
  font-size: 12px;
  color: rgba(255,255,255,.85);
  margin: 0;
}

/* Agent list */
.pwd-walite-popup__agents {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 280px;
  overflow-y: auto;
}

.pwd-walite-agent-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--pwd-walite-body-bg, #fff);
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  transition: var(--pwd-walite-transition);
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
}

.pwd-walite-agent-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(0,0,0,.1);
  border-color: var(--pwd-walite-green);
  text-decoration: none;
  color: inherit;
}

.pwd-walite-agent__avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  background: #EDF2F7;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
  overflow: hidden;
  position: relative;
}

.pwd-walite-agent__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pwd-walite-agent__status-dot {
  position: absolute;
  bottom: 1px;
  right: 1px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid var(--pwd-walite-body-bg, #fff);
  background: #CBD5E0;
}

.pwd-walite-agent__status-dot.online { background: #25D366; }
.pwd-walite-agent__status-dot.away   { background: #F6AD55; }

.pwd-walite-agent__info { flex: 1; min-width: 0; }

.pwd-walite-agent__name {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--pwd-walite-body-color, #1A202C);
  margin: 0 0 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pwd-walite-agent__title {
  font-size: 11.5px;
  color: #718096;
  margin: 0 0 3px;
}

.pwd-walite-agent__badge {
  font-size: 10px;
  font-weight: 600;
  padding: 1px 7px;
  border-radius: 20px;
}

.pwd-walite-agent__badge.online {
  background: #F0FFF4;
  color: #276749;
}

.pwd-walite-agent__badge.away {
  background: #FEFCBF;
  color: #7B341E;
}

.pwd-walite-agent__cta {
  width: 32px;
  height: 32px;
  background: #25D366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: var(--pwd-walite-transition);
}

.pwd-walite-agent__cta svg { width: 16px; height: 16px; fill: #fff; }
.pwd-walite-agent-card:hover .pwd-walite-agent__cta { transform: scale(1.1); }

/* Response time bar */
.pwd-walite-popup__footer {
  padding: 10px 14px;
  background: #F7FAFC;
  border-top: 1px solid rgba(0,0,0,.06);
  font-size: 11px;
  color: #718096;
  text-align: center;
}

/* =====================================================================
   Inline button (shortcode / WooCommerce)
   ===================================================================== */

.pwd-walite-inline-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: #25D366;
  color: #fff !important;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none !important;
  transition: var(--pwd-walite-transition);
  border: none;
  cursor: pointer;
  font-family: inherit;
}

.pwd-walite-inline-btn:hover {
  background: #128C7E;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(37,211,102,.4);
}

.pwd-walite-inline-btn__icon { display: flex; }
.pwd-walite-inline-btn__icon svg { fill: #fff; }

.pwd-walite-woo-wrap {
  margin: 12px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* =====================================================================
   Hidden state
   ===================================================================== */

.pwd-walite-popup.pwd-walite-hidden {
  display: none;
}

.pwd-walite-trigger.pwd-walite-hidden {
  display: none;
}

/* =====================================================================
   Responsive
   ===================================================================== */

@media (max-width: 480px) {
  .pwd-walite-popup {
    width: calc(100vw - 24px);
    max-width: 320px;
  }
}
