#pgc-root {
  --pgc-color: #2e7d32;
  --pgc-text: #1a1a1a;
  --pgc-muted: #8a8a8a;
  --pgc-line: #ececec;
  --pgc-soft: #f5f5f4;
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 99999;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--pgc-text);
}
#pgc-root *, #pgc-root *::before, #pgc-root *::after { box-sizing: border-box; }
#pgc-root [hidden] { display: none !important; }
#pgc-root button { font: inherit; color: inherit; margin: 0; }

/* Spúšťač */
.pgc-launcher {
  width: 52px; height: 52px; border-radius: 50%;
  border: 0; cursor: pointer; padding: 0;
  background: var(--pgc-color); color: #fff !important;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 14px rgba(0,0,0,.14);
  transition: transform .15s ease, box-shadow .15s ease;
}
.pgc-launcher:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0,0,0,.18); }

/* Panel */
.pgc-panel {
  width: 360px; height: 540px; max-height: calc(100vh - 48px);
  background: #fff; border-radius: 14px; overflow: hidden;
  display: flex; flex-direction: column;
  border: 1px solid var(--pgc-line);
  box-shadow: 0 10px 30px rgba(0,0,0,.08);
  animation: pgc-in .16s ease-out;
}
@keyframes pgc-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.pgc-header {
  display: flex; align-items: center; gap: 8px;
  padding: 14px 10px 12px 18px;
  border-bottom: 1px solid var(--pgc-line);
}
.pgc-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--pgc-color); flex: none; }
.pgc-title { flex: 1; font-weight: 600; font-size: 14.5px; letter-spacing: -.01em; }
.pgc-icon {
  width: 30px; height: 30px; border: 0; border-radius: 8px; cursor: pointer; padding: 0;
  background: transparent; color: var(--pgc-muted) !important;
  display: flex; align-items: center; justify-content: center;
}
.pgc-icon:hover { background: var(--pgc-soft); color: var(--pgc-text) !important; }

/* Správy */
.pgc-messages {
  flex: 1; overflow-y: auto; padding: 18px;
  display: flex; flex-direction: column; gap: 12px;
  scrollbar-width: thin; scrollbar-color: #ddd transparent;
}
.pgc-msg { max-width: 88%; word-wrap: break-word; overflow-wrap: anywhere; }
.pgc-msg p { margin: 0 0 6px; }
.pgc-msg p:last-child { margin-bottom: 0; }
.pgc-msg ul { margin: 4px 0 6px; padding-left: 18px; }
.pgc-msg li { margin: 3px 0; }
.pgc-msg a { color: var(--pgc-color); text-decoration: underline; text-underline-offset: 2px; }
.pgc-msg strong { font-weight: 600; }

.pgc-assistant { align-self: flex-start; padding: 2px 0; }
.pgc-user {
  align-self: flex-end; white-space: pre-wrap;
  background: var(--pgc-soft); padding: 8px 13px; border-radius: 14px 14px 4px 14px;
}
.pgc-error { color: #a33; }

/* Predvolené otázky */
.pgc-suggestions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.pgc-chip {
  border: 1px solid var(--pgc-line); background: #fff; cursor: pointer;
  border-radius: 999px; padding: 6px 12px; font-size: 13px !important; line-height: 1.3;
  text-align: left; transition: border-color .12s, background .12s;
}
.pgc-chip:hover { border-color: var(--pgc-color); background: var(--pgc-soft); }

/* Píše… */
.pgc-typing { display: flex; gap: 4px; padding: 8px 0; }
.pgc-typing span {
  width: 6px; height: 6px; border-radius: 50%; background: #c4c4c4;
  animation: pgc-blink 1.2s infinite ease-in-out;
}
.pgc-typing span:nth-child(2) { animation-delay: .15s; }
.pgc-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes pgc-blink { 0%, 80%, 100% { opacity: .3; } 40% { opacity: 1; } }

/* Vstup */
.pgc-form {
  display: flex; align-items: flex-end; gap: 6px;
  margin: 0 12px; padding: 6px 6px 6px 14px;
  border: 1px solid var(--pgc-line); border-radius: 12px; background: #fff;
  transition: border-color .12s;
}
.pgc-form:focus-within { border-color: #cfcfcf; }
.pgc-input {
  flex: 1; resize: none; border: 0 !important; outline: none; box-shadow: none !important;
  background: transparent; padding: 6px 0; margin: 0;
  font: inherit; color: inherit; line-height: 1.45;
  min-height: 0; max-height: 120px;
  overflow-y: auto;                   /* dlhý text sa dá posúvať… */
  scrollbar-width: none;              /* …ale scrollbar nie je vidieť */
}
.pgc-input::-webkit-scrollbar { display: none; }
.pgc-send {
  width: 32px; height: 32px; flex: none; border: 0; border-radius: 9px; cursor: pointer; padding: 0;
  background: var(--pgc-color); color: #fff !important;
  display: flex; align-items: center; justify-content: center;
  transition: opacity .12s;
}
.pgc-send:disabled { opacity: .35; cursor: default; }
.pgc-note { font-size: 11px; color: var(--pgc-muted); text-align: center; padding: 8px 12px 10px; }

@media (max-width: 480px) {
  #pgc-root { right: 16px; bottom: 16px; }
  .pgc-panel {
    position: fixed; inset: 0; width: 100%; height: 100%; max-height: none;
    border-radius: 0; border: 0;
  }
}

/* Prebitie focus štýlov témy (čierny rámik okolo poľa a tlačidiel) */
#pgc-root .pgc-input:focus,
#pgc-root .pgc-input:focus-visible {
  outline: none !important;
  border: 0 !important;
  box-shadow: none !important;
}
#pgc-root button:focus { outline: none !important; }
#pgc-root button:focus-visible {
  outline: 2px solid var(--pgc-color) !important;
  outline-offset: 2px !important;
}
