/* ==========================================================================
   Profić — plutajuci gumb i chat prozor, dolje desno na SVAKOJ stranici.

   Odvojeno od "Imaš pitanja?" gumba u zaglavlju (koji ostaje kakav je -
   otvara isti provjereni obrazac). Ovo je novi ulaz, po vlasnikovoj uputi:
   "dolje desno... IMAŠ PITANJE... Profić je AI asistent".
   ========================================================================== */

.profic-gumb {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 900;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  height: 52px;
  padding: 0 18px 0 9px;
  border: none;
  border-radius: 26px;
  background: var(--po-tamna-ploha, #141B22);
  color: var(--po-na-tamnoj, #E8EDE6);
  font-family: var(--po-font-tekst);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.15;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(20, 27, 34, .28);
  transition: box-shadow .16s ease, transform .16s ease;
}

.profic-gumb:hover { box-shadow: 0 8px 22px rgba(20, 27, 34, .36); transform: translateY(-1px) }

.profic-gumb-tekst { display: flex; flex-direction: column }
.profic-gumb-tekst small { font-size: 11px; font-weight: 400; color: #9AA8A6 }

.profic-gumb-znak {
  position: relative;
  flex: 0 0 auto;
  width: 38px; height: 38px;
  display: grid;
  place-items: center;
}

.profic-gumb-znak img {
  width: 34px; height: 34px;
  display: block;
  animation: profic-otkucaj 2.8s ease-in-out infinite;
  transform-origin: center;
}

.profic-gumb-znak::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1.5px solid rgba(142, 212, 79, .85);
  opacity: 0;
  animation: profic-prsten 2.8s ease-out infinite;
}

.profic-gumb:hover .profic-gumb-znak img,
.profic-gumb:hover .profic-gumb-znak::after { animation-duration: 1.5s }

@keyframes profic-otkucaj {
  0%   { transform: scale(1) }
  6%   { transform: scale(1.11) }
  13%  { transform: scale(1) }
  19%  { transform: scale(1.06) }
  32%  { transform: scale(1) }
  100% { transform: scale(1) }
}

@keyframes profic-prsten {
  0%   { opacity: .75; transform: scale(.72) }
  26%  { opacity: 0;   transform: scale(1.28) }
  100% { opacity: 0;   transform: scale(1.28) }
}

@media (prefers-reduced-motion: reduce) {
  .profic-gumb-znak img,
  .profic-gumb-znak::after { animation: none }
  .profic-gumb-znak::after { opacity: .5 }
}

@media (max-width: 560px) {
  .profic-gumb { right: 12px; bottom: 12px; padding: 0 14px 0 8px; height: 48px }
  .profic-gumb-tekst small { display: none }
}

/* ------------------------------------------------------------------ ploca */

.profic-ploca {
  position: fixed;
  right: 20px;
  bottom: 84px;
  z-index: 900;
  width: min(380px, calc(100vw - 24px));
  height: min(560px, calc(100vh - 120px));
  display: flex;
  flex-direction: column;
  background: var(--po-ploha, #fff);
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(20, 27, 34, .28);
  overflow: hidden;
}

.profic-ploca[hidden] { display: none }

.profic-zaglavlje {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: var(--po-tamna-ploha, #141B22);
  color: var(--po-na-tamnoj, #E8EDE6);
}

.profic-zaglavlje img { width: 26px; height: 26px; flex: 0 0 auto }

.profic-zaglavlje strong {
  font-family: var(--po-font-naslov);
  font-size: 15px;
  flex: 1 1 auto;
}

.profic-zatvori {
  flex: 0 0 auto;
  width: 30px; height: 30px;
  display: grid;
  place-items: center;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.profic-zatvori:hover { background: rgba(255, 255, 255, .12) }

.profic-poruke {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--po-ploha-2, #EFF3EC);
}

.profic-red { display: flex; align-items: flex-end; gap: 8px; max-width: 92% }
.profic-red img { flex: 0 0 auto; width: 22px; height: 22px; margin-bottom: 3px }
.profic-red.profic-korisnik { align-self: flex-end; flex-direction: row-reverse }

.profic-mjehur {
  padding: 9px 12px;
  border-radius: 12px;
  font-family: var(--po-font-tekst);
  font-size: 13.5px;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}

.profic-korisnik .profic-mjehur {
  background: var(--po-akcent, #64B224);
  color: var(--po-na-akcentu, #12171A);
  border-bottom-right-radius: 3px;
}

.profic-profic .profic-mjehur {
  background: var(--po-ploha, #fff);
  color: var(--po-na-plohi, #141B22);
  border-bottom-left-radius: 3px;
}

.profic-tockice { display: inline-flex; gap: 4px; padding: 12px 14px }
.profic-tockice span {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--po-na-plohi-tiha, #666F6D);
  animation: profic-tocka 1.1s ease-in-out infinite;
}
.profic-tockice span:nth-child(2) { animation-delay: .15s }
.profic-tockice span:nth-child(3) { animation-delay: .3s }

@keyframes profic-tocka {
  0%, 60%, 100% { opacity: .3; transform: translateY(0) }
  30% { opacity: 1; transform: translateY(-2px) }
}

@media (prefers-reduced-motion: reduce) {
  .profic-tockice span { animation: none; opacity: .7 }
}

.profic-eskalacija-obrazac label {
  display: block;
  font-size: 12.5px;
  color: var(--po-na-plohi-blaga, #5B6969);
  margin-bottom: 6px;
}

.profic-eskalacija-red { display: flex; gap: 6px }

.profic-eskalacija-red input {
  flex: 1 1 auto;
  min-width: 0;
  height: 34px;
  padding: 0 10px;
  border: 1px solid #D5DBD3;
  border-radius: 8px;
  font-family: var(--po-font-tekst);
  font-size: 13px;
}

.profic-eskalacija-red button {
  flex: 0 0 auto;
  height: 34px;
  padding: 0 14px;
  border: none;
  border-radius: 8px;
  background: var(--po-akcent, #64B224);
  color: var(--po-na-akcentu, #12171A);
  font-family: var(--po-font-naslov);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
}

.profic-eskalacija-red button:disabled { opacity: .55; cursor: default }

.profic-greska {
  min-height: 16px;
  margin: 6px 0 0;
  font-size: 12px;
  color: var(--po-nedostupno, #C0392B);
}

.profic-unosna {
  flex: 0 0 auto;
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 10px;
  border-top: 1px solid #E3E7E1;
  background: var(--po-ploha, #fff);
}

.profic-unosna textarea {
  flex: 1 1 auto;
  min-height: 38px;
  max-height: 96px;
  padding: 9px 12px;
  border: 1px solid #D5DBD3;
  border-radius: 10px;
  font-family: var(--po-font-tekst);
  font-size: 13.5px;
  resize: none;
}

.profic-unosna textarea:disabled { background: #F2F3F1 }

.profic-unosna button {
  flex: 0 0 auto;
  height: 38px;
  padding: 0 16px;
  border: none;
  border-radius: 10px;
  background: var(--po-akcent, #64B224);
  color: var(--po-na-akcentu, #12171A);
  font-family: var(--po-font-naslov);
  font-weight: 600;
  font-size: 13.5px;
  cursor: pointer;
}

.profic-unosna button:disabled { opacity: .55; cursor: default }

@media (max-width: 560px) {
  .profic-ploca {
    right: 12px;
    left: 12px;
    bottom: 76px;
    width: auto;
    height: min(70vh, 520px);
  }
}
