/* ═══════════════════════════════════════════════════════════════════
   VUMA ASISTENT v5 — light theme matching VumaTech aesthetic
   - FAB: black pill, BOTTOM-RIGHT (replaces legacy WhatsApp button)
   - Mobile FAB lifted above sticky CTA bar
   - Embedded section: narrower, cleaner, no emoji clutter
   - Panel: light/white with black header
   - Hides any pre-existing WhatsApp floating button
   ═══════════════════════════════════════════════════════════════════ */

/* ─── Hide legacy WhatsApp floating button ─────────────────────────── */
/* Vuma Asistent replaces WhatsApp as primary contact widget. We target
   common WhatsApp button patterns by href and class. The :not(...) clauses
   protect Vuma Asistent's own elements from being accidentally hidden. */
a[href*="wa.me"]:not(.va-fab):not(.va-section-cta),
a[href*="whatsapp.com/send"]:not(.va-fab):not(.va-section-cta),
a[href*="api.whatsapp.com"]:not(.va-fab):not(.va-section-cta),
button[aria-label*="WhatsApp" i]:not(.va-fab),
button[title*="WhatsApp" i]:not(.va-fab),
[class*="whatsapp"]:not([class*="va-"]),
[class*="WhatsApp"]:not([class*="va-"]),
[id*="whatsapp"]:not([id*="va-"]),
[id*="WhatsApp"]:not([id*="va-"]) {
  display: none !important;
}

:root {
  --va-black: #0a0a0a;
  --va-black-2: #1a1a1a;
  --va-white: #ffffff;
  --va-cream: #fafaf9;
  --va-gray-50: #f5f5f4;
  --va-gray-100: #e7e5e4;
  --va-gray-200: #d6d3d1;
  --va-gray-400: #a8a29e;
  --va-gray-500: #78716c;
  --va-gray-700: #44403c;
  --va-gray-900: #1c1917;
  --va-accent: #22c55e;
  --va-accent-glow: rgba(34, 197, 94, 0.25);
  --va-bubble-user: #0a0a0a;
  --va-bubble-bot: #f5f5f4;
  --va-shadow-lg: 0 24px 60px -16px rgba(0, 0, 0, 0.18), 0 8px 24px -8px rgba(0, 0, 0, 0.10);
  --va-shadow-md: 0 8px 24px -8px rgba(0, 0, 0, 0.20);
  --va-radius: 16px;
  --va-font: 'DM Sans', 'Segoe UI', system-ui, -apple-system, sans-serif;
}

/* ─── FLOATING BUTTON (matches site CTA style: black pill) ──────────── */
.va-fab {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 999998;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 20px 13px 14px;
  background: var(--va-black);
  color: #fff;
  border: none;
  border-radius: 999px;
  font-family: var(--va-font);
  font-weight: 600;
  font-size: 14.5px;
  letter-spacing: -0.005em;
  cursor: pointer;
  box-shadow: var(--va-shadow-md);
  transition: transform 0.2s, box-shadow 0.2s, opacity 0.25s, background 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.va-fab:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 32px -8px rgba(0, 0, 0, 0.28);
  background: var(--va-black-2);
}
.va-fab:active { transform: translateY(0); }
.va-fab.va-hidden { opacity: 0; pointer-events: none; transform: scale(0.7); }

.va-fab-icon {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--va-accent);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  position: relative;
}
.va-fab-icon::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid var(--va-accent);
  animation: va-fab-pulse 2.4s ease-out infinite;
}
@keyframes va-fab-pulse {
  0%   { opacity: 0.7; transform: scale(1); }
  100% { opacity: 0;   transform: scale(1.55); }
}
.va-fab.va-no-pulse .va-fab-icon::after { display: none; }
.va-fab-icon svg { width: 16px; height: 16px; color: #fff; }

/* ─── CHAT PANEL ──────────────────────────────────────────────────── */
.va-panel {
  position: fixed;
  right: 22px;
  bottom: 92px;
  z-index: 999999;
  width: 380px;
  height: min(620px, calc(100vh - 120px));
  background: var(--va-white);
  border: 1px solid var(--va-gray-100);
  border-radius: var(--va-radius);
  box-shadow: var(--va-shadow-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  font-family: var(--va-font);
  color: var(--va-gray-900);
  transform-origin: bottom right;
  animation: va-popin 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes va-popin {
  from { opacity: 0; transform: scale(0.94) translateY(10px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
.va-panel.va-closing { animation: va-popout 0.18s ease-in forwards; }
@keyframes va-popout {
  to { opacity: 0; transform: scale(0.95) translateY(8px); }
}

/* HEADER (black, matches site nav style) */
.va-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  background: var(--va-black);
  color: #fff;
  flex-shrink: 0;
}
.va-header-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--va-accent);
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: -0.02em;
  position: relative;
  flex-shrink: 0;
}
.va-header-avatar::after {
  content: '';
  position: absolute;
  bottom: -1px;
  right: -1px;
  width: 11px;
  height: 11px;
  background: var(--va-accent);
  border-radius: 50%;
  border: 2px solid var(--va-black);
}
.va-header-meta { flex: 1; min-width: 0; }
.va-header-title {
  font-size: 14.5px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.01em;
  margin: 0;
  line-height: 1.2;
}
.va-header-status {
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.7);
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 3px;
  letter-spacing: 0.02em;
}
.va-header-status::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--va-accent);
  border-radius: 50%;
  box-shadow: 0 0 6px var(--va-accent);
}
.va-header-actions { display: flex; gap: 2px; }
.va-icon-btn {
  width: 32px; height: 32px;
  display: grid; place-items: center;
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  border-radius: 8px;
  transition: background 0.15s, color 0.15s;
}
.va-icon-btn:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }
.va-icon-btn svg { width: 17px; height: 17px; }

/* MESSAGES AREA */
.va-messages {
  flex: 1;
  overflow-y: auto;
  padding: 18px 16px 8px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--va-cream);
  scrollbar-width: thin;
  scrollbar-color: var(--va-gray-200) transparent;
}
.va-messages::-webkit-scrollbar { width: 6px; }
.va-messages::-webkit-scrollbar-thumb { background: var(--va-gray-200); border-radius: 3px; }

.va-msg {
  display: flex;
  max-width: 85%;
  animation: va-slidein 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes va-slidein {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.va-msg-bot { align-self: flex-start; }
.va-msg-user { align-self: flex-end; }

.va-bubble {
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.5;
  word-wrap: break-word;
  white-space: pre-wrap;
}
.va-msg-bot .va-bubble {
  background: var(--va-bubble-bot);
  color: var(--va-gray-900);
  border: 1px solid var(--va-gray-100);
  border-bottom-left-radius: 6px;
}
.va-msg-user .va-bubble {
  background: var(--va-bubble-user);
  color: #fff;
  border-bottom-right-radius: 6px;
  font-weight: 500;
}
.va-bubble strong { font-weight: 700; }
.va-msg-bot .va-bubble strong { color: var(--va-black); }
.va-msg-user .va-bubble strong { color: #fff; }
.va-bubble a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
  font-weight: 600;
}
.va-msg-bot .va-bubble a { color: var(--va-black); text-decoration-color: var(--va-accent); text-decoration-thickness: 2px; }
.va-msg-bot .va-bubble a:hover { color: #16a34a; }
.va-msg-user .va-bubble a { text-decoration-color: rgba(255,255,255,0.7); }

/* TYPING INDICATOR */
.va-typing {
  display: inline-flex;
  gap: 4px;
  padding: 12px 14px;
  background: var(--va-bubble-bot);
  border: 1px solid var(--va-gray-100);
  border-radius: 16px;
  border-bottom-left-radius: 6px;
}
.va-typing span {
  width: 7px; height: 7px;
  background: var(--va-gray-400);
  border-radius: 50%;
  animation: va-blink 1.3s infinite;
}
.va-typing span:nth-child(2) { animation-delay: 0.2s; }
.va-typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes va-blink {
  0%, 60%, 100% { opacity: 0.3; }
  30% { opacity: 1; }
}

/* QUICK STARTERS */
.va-starters {
  padding: 4px 16px 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  flex-shrink: 0;
  background: var(--va-cream);
}
.va-starter {
  background: var(--va-white);
  border: 1px solid var(--va-gray-200);
  color: var(--va-gray-900);
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 12.5px;
  font-family: var(--va-font);
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
  white-space: nowrap;
}
.va-starter:hover {
  background: var(--va-black);
  color: #fff;
  border-color: var(--va-black);
}
.va-starter:active { transform: scale(0.97); }
.va-starters.va-fade-out {
  animation: va-fadeout 0.25s ease forwards;
}
@keyframes va-fadeout {
  to { opacity: 0; max-height: 0; padding-top: 0; padding-bottom: 0; overflow: hidden; }
}

/* INPUT AREA */
.va-input-area {
  padding: 10px 12px 12px;
  border-top: 1px solid var(--va-gray-100);
  background: var(--va-white);
  flex-shrink: 0;
}
.va-input-row {
  display: flex;
  gap: 8px;
  align-items: flex-end;
  background: var(--va-gray-50);
  border-radius: 12px;
  padding: 4px;
  border: 1px solid transparent;
  transition: border-color 0.15s, background 0.15s;
}
.va-input-row:focus-within {
  border-color: var(--va-black);
  background: var(--va-white);
}
.va-textarea {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--va-gray-900);
  font-family: var(--va-font);
  font-size: 14px;
  line-height: 1.45;
  resize: none;
  padding: 9px 6px 9px 12px;
  max-height: 120px;
  min-height: 38px;
}
.va-textarea::placeholder { color: var(--va-gray-400); }
.va-send {
  width: 38px; height: 38px;
  background: var(--va-black);
  border: none;
  border-radius: 9px;
  display: grid; place-items: center;
  cursor: pointer;
  color: #fff;
  transition: background 0.15s, opacity 0.15s, transform 0.1s;
  flex-shrink: 0;
}
.va-send:hover:not(:disabled) { background: var(--va-black-2); }
.va-send:active:not(:disabled) { transform: scale(0.94); }
.va-send:disabled { opacity: 0.3; cursor: not-allowed; }
.va-send svg { width: 17px; height: 17px; }

.va-footer-note {
  text-align: center;
  font-size: 10.5px;
  color: var(--va-gray-500);
  margin-top: 8px;
  letter-spacing: 0.01em;
}
.va-footer-note a { color: var(--va-gray-700); text-decoration: underline; }

/* ─── EMBEDDED SECTION (na main page) ────────────────────────────── */
.va-section {
  font-family: var(--va-font);
  background: var(--va-cream);
  border: 1px solid var(--va-gray-100);
  border-radius: 18px;
  padding: 32px 36px;
  color: var(--va-gray-900);
  position: relative;
  overflow: hidden;
}
.va-section::before {
  content: '';
  position: absolute;
  top: -30%;
  right: -15%;
  width: 40%;
  height: 160%;
  background: radial-gradient(circle, rgba(34, 197, 94, 0.05) 0%, transparent 65%);
  pointer-events: none;
}
.va-section-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 28px;
  align-items: center;
}
.va-section-content { min-width: 0; }
.va-section-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--va-black);
  color: #fff;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.va-section-badge::before {
  content: '';
  width: 5px; height: 5px;
  background: var(--va-accent);
  border-radius: 50%;
  box-shadow: 0 0 5px var(--va-accent);
  animation: va-blink-soft 2s infinite;
}
@keyframes va-blink-soft {
  50% { opacity: 0.5; }
}
.va-section-title {
  font-size: clamp(20px, 2.6vw, 26px);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
  line-height: 1.15;
  color: var(--va-black);
}
.va-section-title-accent {
  position: relative;
  display: inline-block;
}
.va-section-title-accent::after {
  content: '';
  position: absolute;
  left: 0; right: 0;
  bottom: 0.06em;
  height: 0.32em;
  background: var(--va-accent);
  opacity: 0.35;
  z-index: -1;
  border-radius: 2px;
}
.va-section-desc {
  color: var(--va-gray-700);
  font-size: 14.5px;
  line-height: 1.5;
  margin: 0 0 18px;
  max-width: 460px;
}
.va-section-examples {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 20px;
}
.va-section-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  background: var(--va-black);
  color: #fff;
  border: none;
  border-radius: 9px;
  font-family: var(--va-font);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: -0.005em;
  cursor: pointer;
  transition: transform 0.15s, background 0.15s;
}
.va-section-cta:hover {
  background: var(--va-black-2);
  transform: translateY(-2px);
}
.va-section-cta svg { width: 16px; height: 16px; }

.va-section-visual {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.va-section-orb {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: var(--va-black);
  position: relative;
  box-shadow: 0 16px 36px -10px rgba(0, 0, 0, 0.22);
  display: grid;
  place-items: center;
  animation: va-float 4.5s ease-in-out infinite;
}
@keyframes va-float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-8px); }
}
.va-section-orb::before {
  content: '';
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  border: 1.5px solid var(--va-accent);
  opacity: 0.4;
  animation: va-orb-ring 3.2s ease-in-out infinite;
}
.va-section-orb::after {
  content: '';
  position: absolute;
  inset: -22px;
  border-radius: 50%;
  border: 1.5px solid var(--va-accent);
  opacity: 0.18;
  animation: va-orb-ring 3.2s ease-in-out infinite 0.6s;
}
@keyframes va-orb-ring {
  0%, 100% { opacity: 0.15; transform: scale(1); }
  50%      { opacity: 0.55; transform: scale(1.05); }
}
.va-section-orb-icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--va-accent);
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 800;
  font-size: 14px;
  letter-spacing: -0.02em;
  position: relative;
  z-index: 1;
}

/* ─── MOBILE ──────────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .va-fab {
    right: 14px;
    bottom: 80px; /* lifted above sticky CTA bar (Pokličite nas / Cenik) */
    padding: 11px 16px 11px 12px;
    font-size: 14px;
  }
  .va-panel {
    right: 0;
    bottom: 0;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    border-radius: 0;
    border: none;
  }
  .va-section {
    padding: 24px 20px;
  }
  .va-section-inner {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 18px;
  }
  .va-section-visual { order: -1; }
  .va-section-orb { width: 90px; height: 90px; }
  .va-section-orb-icon { width: 36px; height: 36px; font-size: 12px; }
  .va-section-examples { justify-content: center; }
  .va-section-desc { margin-left: auto; margin-right: auto; }
}

.va-fab:hover .va-fab-icon::after { animation-play-state: paused; opacity: 0; }
