/* RND Asistent — plutajuci kontakt u stilu drustvenih mreza (js/contact-assistant.js).
   Zatvoreno: zaobljena "pilula" sa RND avatarom u story prstenu.
   Otvoreno (desktop): panel iznad dugmeta. Telefon (<=640px): bottom sheet.
   Z-slojevi: zaglavlje 40 < asistent 80 < obavestenje o kolacicima 1000
   (dok je obavestenje otvoreno, asistent se ne prikazuje). */

.rnd-assistant {
  --ra-bg: #0E1C2B;
  --ra-line: rgba(148,163,184,.16);
  --ra-ring: conic-gradient(from 210deg, #10B981, #22D3EE, #8B5CF6, #EC4899, #FB967F, #10B981);
  --ra-ease: cubic-bezier(.16,1,.3,1);
  position: fixed; z-index: 80; right: 24px; bottom: calc(24px + env(safe-area-inset-bottom));
  font-family: var(--font-body, system-ui); color: #E2E8F0;
}
body:has(.cc) .rnd-assistant, body:has(dialog[open]) .rnd-assistant { display: none; }

/* ---------- avatar: RND znak u prstenu (emerald = web, ljubicasto-roze = mreze) ---------- */
.ra-avatar { position: relative; flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--ra-ring); }
.ra-avatar::before { content: ''; position: absolute; inset: 2px; border-radius: 50%; background: #0B1622; }
.ra-avatar img { position: relative; width: 18px; height: auto; }

/* ---------- zatvoreno stanje ---------- */
.ra-toggle {
  display: flex; align-items: center; gap: 12px; margin-left: auto;
  min-height: 60px; padding: 9px 22px 9px 10px; border-radius: 999px;
  border: 1px solid var(--ra-line); background: rgba(11,22,34,.94); color: #fff; cursor: pointer; font: inherit; text-align: left;
  box-shadow: 0 18px 40px -18px rgba(0,0,0,.85), 0 2px 6px rgba(0,0,0,.25);
  transition: border-color .2s, transform .25s var(--ra-ease), box-shadow .25s var(--ra-ease);
}
.ra-toggle:hover { border-color: rgba(52,211,153,.55); transform: translateY(-2px); box-shadow: 0 22px 44px -18px rgba(0,0,0,.9), 0 0 0 4px rgba(16,185,129,.1); }
.ra-toggle-text { display: grid; line-height: 1.2; }
.ra-toggle-text b { font-size: .95rem; font-weight: 700; letter-spacing: -.01em; }
.ra-toggle-text small { font-size: .74rem; color: #94A3B8; }
/* zelena tacka RND znaka: "na vezi" */
.ra-toggle .ra-avatar::after { content: ''; position: absolute; right: -1px; bottom: 1px; width: 11px; height: 11px; border-radius: 50%; background: #10B981; border: 2px solid #0B1622; }
.rnd-assistant.is-open .ra-toggle { border-color: rgba(52,211,153,.45); }

/* ---------- panel ---------- */
.ra-panel {
  position: absolute; right: 0; bottom: calc(100% + 14px); width: 372px; max-width: calc(100vw - 32px);
  max-height: calc(100dvh - 130px); overflow-y: auto; overscroll-behavior: contain;
  padding: 22px 22px 20px; border-radius: 28px; background: var(--ra-bg); border: 1px solid var(--ra-line);
  box-shadow: 0 34px 70px -24px rgba(0,0,0,.9), 0 8px 18px -8px rgba(0,0,0,.5);
  transform-origin: bottom right; opacity: 0; transform: translateY(10px) scale(.98);
  transition: opacity .16s ease, transform .16s ease;
  scrollbar-width: thin; scrollbar-color: rgba(148,163,184,.3) transparent;
}
.ra-panel[hidden] { display: none; }
.rnd-assistant.is-shown .ra-panel { opacity: 1; transform: none; transition: opacity .22s var(--ra-ease), transform .24s var(--ra-ease); }
.ra-grab { display: none; }

.ra-close {
  position: absolute; top: 14px; right: 14px; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  border: 0; background: rgba(148,163,184,.1); color: #CBD5E1; cursor: pointer; transition: background .2s, color .2s;
}
.ra-close:hover { background: rgba(148,163,184,.2); color: #fff; }
.ra-close svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }

.ra-top { display: flex; align-items: center; gap: 12px; padding-right: 44px; }
.ra-top .ra-avatar { width: 48px; height: 48px; }
.ra-top .ra-avatar img { width: 21px; }
.ra-panel p { margin: 0; max-width: none; }
.ra-org { font-weight: 700; font-size: 1rem; color: #fff; letter-spacing: -.01em; }
.ra-status { display: flex; align-items: center; gap: 6px; margin-top: 2px !important; font-size: .78rem; color: #94A3B8 !important; }
.ra-status i { width: 7px; height: 7px; border-radius: 50%; background: #10B981; box-shadow: 0 0 0 3px rgba(16,185,129,.18); flex: none; }

.ra-panel h2.ra-q { margin: 20px 0 16px; font-size: 1.28rem; line-height: 1.25; letter-spacing: -.02em; color: #F8FAFC; text-wrap: balance; }
.ra-panel h2.ra-q::after { display: none; }
.ra-label { font-size: .7rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #7F93A8 !important; margin: 0 0 12px !important; }
.ra-label--follow { margin-top: 20px !important; padding-top: 18px; border-top: 1px solid var(--ra-line); }

/* ---------- brzi kontakt: "ikonice aplikacija" ---------- */
.ra-panel ul { list-style: none; margin: 0; padding: 0; }
.ra-panel li { margin: 0; padding: 0; max-width: none; }
.ra-panel li::before, .ra-panel li::after { content: none !important; }
.ra-apps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.ra-app { display: grid; justify-items: center; gap: 8px; padding: 6px 2px 8px; border-radius: 18px; text-decoration: none; color: #CBD5E1; transition: background .2s; }
.ra-app:hover { background: rgba(148,163,184,.08); color: #fff; }
.ra-tile {
  display: grid; place-items: center; width: 56px; height: 56px; border-radius: 18px; color: #fff;
  box-shadow: 0 10px 20px -10px rgba(0,0,0,.8), inset 0 1px 0 rgba(255,255,255,.18);
  transition: transform .25s var(--ra-ease);
}
.ra-app:hover .ra-tile { transform: translateY(-3px); }
.ra-tile svg { width: 27px; height: 27px; fill: currentColor; }
.ra-app-name { font-size: .76rem; font-weight: 600; }
.ra-viber .ra-tile { background: linear-gradient(160deg, #8A7BFF, #7360F2 55%, #5A45D6); }
.ra-whatsapp .ra-tile { background: linear-gradient(160deg, #4BE07F, #25D366 55%, #17A84F); }
.ra-phone .ra-tile { background: linear-gradient(160deg, #34D399, #10B981 55%, #047857); }
.ra-email .ra-tile { background: linear-gradient(160deg, #38BDF8, #0EA5E9 55%, #0369A1); }

/* glavni poziv: isto dugme kao na celom sajtu (.btn), samo zaobljeno i puno sirine */
.rnd-assistant .ra-cta { display: flex; justify-content: center; gap: 8px; width: 100%; margin-top: 14px; border-radius: 999px; min-height: 48px; }
.ra-cta-arrow { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s; }
.ra-cta:hover .ra-cta-arrow { transform: translateX(3px); }

/* ---------- pratite RND: zaobljeni "chip"-ovi ---------- */
.ra-social { display: flex; flex-wrap: wrap; gap: 8px; }
.ra-chip, .rnd-follow a {
  display: inline-flex; align-items: center; gap: 9px; min-height: 44px; padding: 6px 14px 6px 6px; border-radius: 999px;
  border: 1px solid var(--ra-line); background: rgba(148,163,184,.05); color: #CBD5E1; text-decoration: none; font-size: .86rem; font-weight: 600;
  transition: border-color .2s, background .2s, color .2s;
}
.ra-chip:hover, .rnd-follow a:hover { color: #fff; border-color: rgba(148,163,184,.4); background: rgba(148,163,184,.1); }
.ra-chip-ico, .rnd-follow .rnd-ico { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; color: #fff; flex: none; }
.ra-chip-ico svg, .rnd-follow .rnd-ico svg { width: 16px; height: 16px; fill: currentColor; }
.ra-arrow { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; opacity: .6; transition: transform .2s, opacity .2s; }
.ra-chip:hover .ra-arrow { transform: translate(2px,-2px); opacity: 1; }
.ra-instagram .ra-chip-ico, .rnd-follow .rnd-ico--instagram { background: radial-gradient(circle at 30% 107%, #FDF497 0%, #FD5949 45%, #D6249F 60%, #285AEB 90%); }
.ra-tiktok .ra-chip-ico, .rnd-follow .rnd-ico--tiktok { background: #010101; }
.ra-tiktok .ra-chip-ico svg, .rnd-follow .rnd-ico--tiktok svg { filter: drop-shadow(-1px -1px 0 #25F4EE) drop-shadow(1px 1px 0 #FE2C55); }
.ra-linkedin .ra-chip-ico, .rnd-follow .rnd-ico--linkedin { background: #0A66C2; }
.rnd-follow .rnd-ico--facebook { background: #0866FF; }
.rnd-follow .rnd-ico--youtube { background: #FF0033; }

/* ---------- kontakt stranica: blok "Pratite RND" ---------- */
.rnd-follow { margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--tech-line, rgba(148,163,184,.16)); }
.rnd-follow h3 { color: #B9CDDD; font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; margin: 0 0 14px; }
.rnd-follow > div { display: flex; flex-wrap: wrap; gap: 10px; }
.rnd-follow a > span[aria-hidden="true"] { opacity: .6; transition: transform .2s; }
.rnd-follow a:hover > span[aria-hidden="true"] { transform: translate(2px,-2px); opacity: 1; }

/* ---------- podnozje: diskretni monohromatski znakovi, RND ostaje dominantan ---------- */
.site-foot a .rnd-ico { display: inline-grid; place-items: center; width: 16px; height: 16px; margin-right: 8px; vertical-align: -3px; opacity: .75; transition: opacity .2s; }
.site-foot a .rnd-ico svg { width: 14px; height: 14px; fill: currentColor; }
.site-foot a:hover .rnd-ico { opacity: 1; }

.rnd-assistant :is(button, a):focus-visible, .rnd-follow a:focus-visible { outline: 2px solid #5EEAD4; outline-offset: 3px; }

/* ---------- telefon: bottom sheet ---------- */
.ra-scrim { position: fixed; inset: 0; background: rgba(2,8,16,.6); opacity: 0; pointer-events: none; transition: opacity .2s; }
@media (max-width: 640px), (max-height: 520px) {
  .rnd-assistant { right: 14px; bottom: calc(14px + env(safe-area-inset-bottom)); }
  body:has(.c-sticky) .rnd-assistant { bottom: calc(80px + env(safe-area-inset-bottom)); }
  .rnd-assistant.is-open .ra-scrim { opacity: 1; pointer-events: auto; }
  .ra-panel {
    position: fixed; left: 0; right: 0; bottom: 0; width: auto; max-width: none; max-height: 88dvh;
    border-radius: 28px 28px 0 0; border-bottom: 0;
    padding: 12px 18px calc(18px + env(safe-area-inset-bottom));
    transform: translateY(24px); transform-origin: bottom center;
  }
  .ra-grab { display: block; width: 40px; height: 4px; margin: 0 auto 14px; border-radius: 4px; background: rgba(148,163,184,.35); }
  .ra-close { top: 22px; }
  .ra-toggle { min-height: 56px; padding: 8px 18px 8px 8px; }
}
@media (max-width: 400px) {
  .ra-toggle-text small { display: none; }
  .ra-tile { width: 52px; height: 52px; border-radius: 16px; }
}
/* niski ekrani (telefon polozen, veliki zoom): panel ne sme preko visine ekrana */
@media (max-height: 520px) {
  .ra-panel { max-height: calc(100dvh - 24px); }
  .rnd-assistant:not(.is-open) .ra-toggle-text small { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .ra-panel, .rnd-assistant.is-shown .ra-panel { transform: none !important; transition: opacity .12s linear; }
  .ra-toggle, .ra-tile, .ra-arrow, .ra-cta-arrow { transition: none; }
}

/* u panelu: tri jednake kolone (Instagram · TikTok · LinkedIn u jednom redu) */
.ra-social { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.ra-panel .ra-chip { flex-direction: column; justify-content: center; gap: 7px; width: 100%; min-height: 0; padding: 12px 6px 10px; border-radius: 18px; font-size: .78rem; text-align: center; }
.ra-panel .ra-chip-ico { width: 36px; height: 36px; }
.ra-panel .ra-chip-ico svg { width: 18px; height: 18px; }
.ra-panel .ra-chip .ra-arrow { position: absolute; top: 9px; right: 9px; width: 12px; height: 12px; }
.ra-panel .ra-chip { position: relative; }
.ra-status { align-items: flex-start; line-height: 1.4; }
.ra-status i { margin-top: 5px; }
