/* ═══════════════════════════════════════════════
   DALFAST — WhatsApp Chat Widget Styles
═══════════════════════════════════════════════ */
:root { --wa-green: #25D366; --wa-green-d: #1EBE5A; --wa-teal-bg: #075E54; }

#dalfast-wa { position: fixed; z-index: 9998; }

/* ── FLOATING BUTTON ── */
.wa-fab {
  position: fixed; bottom: 24px; right: 24px; z-index: 9998;
  width: 60px; height: 60px; border-radius: 50%;
  background: var(--wa-green); border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 28px rgba(37,211,102,0.45);
  transition: transform 0.25s cubic-bezier(0.4,0,0.2,1), box-shadow 0.25s;
}
.wa-fab:hover { transform: scale(1.08); box-shadow: 0 12px 36px rgba(37,211,102,0.55); }
.wa-fab.active { transform: scale(0.9); }
.wa-fab-pulse {
  position: absolute; inset: 0; border-radius: 50%;
  background: var(--wa-green); opacity: 0.6; z-index: -1;
  animation: waPulse 2.2s ease-out infinite;
}
@keyframes waPulse { 0%{transform:scale(1);opacity:0.6} 100%{transform:scale(1.8);opacity:0} }
.wa-fab-badge {
  position: absolute; top: -2px; right: -2px;
  width: 22px; height: 22px; border-radius: 50%;
  background: #FF3B30; color: white; font-size: 0.7rem; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid white; font-family: 'Inter', sans-serif;
}

/* ── CHAT PANEL ── */
.wa-panel {
  position: fixed; bottom: 96px; right: 24px; z-index: 9998;
  width: 370px; max-width: calc(100vw - 32px);
  background: #fff; border-radius: 18px; overflow: hidden;
  box-shadow: 0 24px 70px rgba(0,0,0,0.28);
  transform: translateY(20px) scale(0.95); opacity: 0; pointer-events: none;
  transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
  font-family: 'Inter', sans-serif;
}
.wa-panel.open { transform: translateY(0) scale(1); opacity: 1; pointer-events: auto; }
.wa-panel[dir="rtl"] { right: auto; left: 24px; text-align: right; }

/* ── HEADER ── */
.wa-head {
  background: var(--wa-teal-bg); color: #fff;
  padding: 16px 18px; display: flex; align-items: center; gap: 12px;
}
.wa-head-avatar {
  width: 44px; height: 44px; border-radius: 50%; background: #fff;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.wa-head-info { flex: 1; }
.wa-head-name { font-weight: 700; font-size: 0.975rem; }
.wa-head-status { font-size: 0.75rem; color: rgba(255,255,255,0.75); display: flex; align-items: center; gap: 5px; margin-top: 2px; }
.wa-dot { width: 7px; height: 7px; border-radius: 50%; background: #4ADE80; display: inline-block; box-shadow: 0 0 0 2px rgba(74,222,128,0.3); }
.wa-close {
  width: 30px; height: 30px; border-radius: 50%; background: rgba(255,255,255,0.15);
  color: #fff; border: none; cursor: pointer; font-size: 0.9rem; flex-shrink: 0;
  transition: background 0.2s;
}
.wa-close:hover { background: rgba(255,255,255,0.28); }

/* ── BODY ── */
.wa-body {
  padding: 18px; max-height: 60vh; overflow-y: auto;
  background: #E5DDD5;
  background-image: linear-gradient(rgba(229,221,213,0.92), rgba(229,221,213,0.92));
}
.wa-bubble {
  background: #fff; border-radius: 0 12px 12px 12px; padding: 12px 14px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.1); margin-bottom: 16px; max-width: 90%;
  position: relative;
}
.wa-bubble-text { font-size: 0.9rem; color: #1a1a1a; line-height: 1.5; }
.wa-bubble-time { font-size: 0.68rem; color: #999; margin-top: 4px; }

.wa-lang-row { background: #fff; border-radius: 12px; padding: 12px 14px; margin-bottom: 14px; box-shadow: 0 1px 2px rgba(0,0,0,0.08); }
.wa-lang-label { font-size: 0.72rem; font-weight: 700; color: #888; text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 8px; }
.wa-lang-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.wa-lang {
  padding: 5px 10px; border-radius: 100px; border: 1.5px solid #e0e0e0;
  background: #fff; font-size: 0.75rem; font-weight: 600; color: #555;
  cursor: pointer; transition: all 0.2s; font-family: inherit;
}
.wa-lang:hover { border-color: var(--wa-green); }
.wa-lang.active { background: var(--wa-green); border-color: var(--wa-green); color: #fff; }

.wa-sub { font-size: 0.78rem; color: #667; margin-bottom: 10px; font-weight: 600; }
.wa-topics { display: flex; flex-direction: column; gap: 8px; }
.wa-topic {
  display: flex; align-items: center; gap: 11px;
  background: #fff; border: 1.5px solid #eee; border-radius: 12px;
  padding: 11px 14px; cursor: pointer; transition: all 0.2s;
  font-family: inherit; font-size: 0.875rem; font-weight: 600; color: #2a2a2a;
  text-align: left; box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
.wa-topic:hover { border-color: var(--wa-green); transform: translateX(2px); box-shadow: 0 3px 10px rgba(37,211,102,0.15); }
.wa-panel[dir="rtl"] .wa-topic { text-align: right; }
.wa-panel[dir="rtl"] .wa-topic:hover { transform: translateX(-2px); }
.wa-topic-icon { font-size: 1.25rem; flex-shrink: 0; }
.wa-topic span:nth-child(2) { flex: 1; }
.wa-topic-arrow { color: var(--wa-green); font-weight: 700; }
.wa-panel[dir="rtl"] .wa-topic-arrow { transform: scaleX(-1); }

/* ── FOOTER ── */
.wa-foot { padding: 14px 18px 16px; background: #fff; border-top: 1px solid #f0f0f0; }
.wa-start-btn {
  width: 100%; display: flex; align-items: center; justify-content: center; gap: 9px;
  background: var(--wa-green); color: #fff; border: none; border-radius: 12px;
  padding: 13px; font-family: inherit; font-size: 0.9375rem; font-weight: 700;
  cursor: pointer; transition: background 0.2s; box-shadow: 0 4px 14px rgba(37,211,102,0.3);
}
.wa-start-btn:hover { background: var(--wa-green-d); }
.wa-powered { text-align: center; font-size: 0.68rem; color: #999; margin-top: 9px; }

/* ── RESPONSIVE ── */
@media(max-width: 480px) {
  .wa-fab { bottom: 18px; right: 18px; width: 56px; height: 56px; }
  .wa-panel { bottom: 84px; right: 12px; left: 12px; width: auto; max-width: none; }
  .wa-panel[dir="rtl"] { right: 12px; left: 12px; }
}
@media(prefers-reduced-motion: reduce) { .wa-fab-pulse { animation: none; } }
