/* ==========================================================================
   Component — Floating WhatsApp Quick Contact Widget
   ==========================================================================
   Was duplicated verbatim in css/style.css, furya/style.css and
   akustik-isler/style.css (~150 lines each, brand colors hardcoded per
   copy). This is the single source, driven entirely by tokens — load one
   foundation file + the matching brand file first.

   Structure is injected at runtime by js/whatsapp-widget.js (unchanged —
   that script was already shared across all 3 sites; only the CSS wasn't).

   The trigger/badge/action-button green is WhatsApp's own product color,
   not a Furya Group brand color — kept as fixed component-local variables
   rather than themed per brand.
   ========================================================================== */

.wa-widget-container {
  --wa-green: #25D366;
  --wa-green-hover: #20ba5a;
  --wa-green-bright: #00E676;

  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9990;
  font-family: var(--font-body);
}

/* Trigger button */
.wa-trigger-btn {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--wa-green);
  color: #FFFFFF;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(37, 211, 102, 0.4);
  position: relative;
  transition: transform var(--duration-base) var(--ease-standard),
              box-shadow var(--duration-base) var(--ease-standard);
}
.wa-trigger-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 12px 28px rgba(37, 211, 102, 0.55);
}

.wa-badge-pulse {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 12px;
  height: 12px;
  background: var(--wa-green-bright);
  border: 2px solid #FFFFFF;
  border-radius: 50%;
  animation: wa-pulse 2s infinite;
}
@keyframes wa-pulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(0, 230, 118, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(0, 230, 118, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(0, 230, 118, 0); }
}

/* Chat popup window */
.wa-chat-popup {
  position: absolute;
  bottom: 72px;
  right: 0;
  width: 320px;
  background: var(--color-surface-dark);
  border: 1px solid color-mix(in srgb, var(--color-accent) 30%, transparent);
  border-radius: 14px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.4);
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(15px) scale(0.95);
  transition: all var(--duration-base) var(--ease-spring);
  pointer-events: none;
}
.wa-chat-popup.wa-popup-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.wa-popup-header {
  background: var(--surface-raised);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid color-mix(in srgb, var(--color-on-dark) 12%, transparent);
}

.wa-avatar-container {
  position: relative;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
}
.wa-avatar-icon {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--color-accent);
  color: var(--color-surface-dark);
  display: flex;
  align-items: center;
  justify-content: center;
}
.wa-online-status {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 10px;
  height: 10px;
  background: var(--wa-green);
  border: 2px solid var(--surface-raised);
  border-radius: 50%;
}

.wa-header-info { display: flex; flex-direction: column; flex-grow: 1; }
.wa-header-name { font-size: 14px; font-weight: 600; color: var(--color-on-dark); }
.wa-header-status { font-size: 11px; color: var(--color-muted); }

.wa-close-btn {
  background: transparent;
  border: none;
  color: var(--color-muted);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: color var(--duration-fast) var(--ease-standard);
}
.wa-close-btn:hover { color: var(--color-on-dark); }

.wa-popup-body { padding: 16px; background: var(--surface-sunken); }

.wa-msg-bubble {
  background: var(--surface-bubble);
  border-left: 3px solid var(--wa-green);
  border-radius: 0 10px 10px 10px;
  padding: 12px 14px;
  color: var(--color-on-dark);
  font-size: 13px;
  line-height: 1.55;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}
.wa-msg-text { margin: 0 0 6px; }
.wa-msg-time {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--color-muted);
  display: block;
  text-align: right;
}

.wa-popup-footer { padding: 12px 16px 16px; background: var(--color-surface-dark); }

.wa-action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 11px;
  background: var(--wa-green);
  color: #FFFFFF;
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius);
  transition: background var(--duration-fast) var(--ease-standard),
              transform var(--duration-fast) var(--ease-standard);
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
}
.wa-action-btn:hover {
  background: var(--wa-green-hover);
  color: #FFFFFF;
  text-decoration: none;
  transform: translateY(-1px);
}

@media (max-width: 480px) {
  .wa-widget-container { bottom: 16px; right: 16px; }
  .wa-chat-popup { width: calc(100vw - 32px); right: 0; }
}
