/* ============================================================
   PID24 CHAT WIDGET — CSS
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Archivo:wght@400;600;700;900&display=swap');

#pid24-root *, #pid24-root *::before, #pid24-root *::after {
  box-sizing: border-box; margin: 0; padding: 0;
}
#pid24-root {
  font-family: 'Archivo', sans-serif;
  position: fixed; bottom: 28px; right: 28px;
  z-index: 99999; display: flex;
  flex-direction: column; align-items: flex-end; gap: 12px;
}

/* LAUNCHER */
#pid24-launcher {
  width: 62px; height: 62px; border-radius: 50%; border: none;
  background: #032F52; cursor: pointer;
  box-shadow: 0 6px 28px rgba(3,47,82,.45);
  display: flex; align-items: center; justify-content: center;
  transition: transform .25s ease, box-shadow .25s ease;
  padding: 0; flex-shrink: 0;
}
#pid24-launcher:hover { transform: scale(1.08); box-shadow: 0 10px 36px rgba(3,47,82,.55); }
#pid24-launcher svg { width: 44px; height: 44px; }
#pid24-ico-close svg { width: 24px; height: 24px; }

/* PANEL */
#pid24-panel {
  width: 380px; max-width: calc(100vw - 40px);
  background: #f5f7fa; border-radius: 18px; overflow: hidden;
  box-shadow: 0 16px 60px rgba(3,47,82,.22);
  display: flex; flex-direction: column; max-height: 580px;min-height: 580px;
  transform-origin: bottom right;
  transition: opacity .28s ease, transform .28s ease;
}
#pid24-panel.pid24-hidden {
  opacity: 0; transform: scale(.88) translateY(16px); pointer-events: none;
    height: 0px;
    min-height: 0px;
}

/* HEADER */
#pid24-header {
  background: #032F52; padding: 14px 16px;
  display: flex; align-items: center; gap: 10px; flex-shrink: 0;
}
#pid24-header-logo {
  display: flex; align-items: baseline; flex-shrink: 0; line-height: 1;
}
#pid24-logo-text {
  font-family: 'Archivo', sans-serif; font-weight: 900;
  font-size: 24px; color: #fff; letter-spacing: -.04em;
}
#pid24-logo-dot {
  font-family: 'Archivo', sans-serif; font-weight: 900;
  font-size: 24px; color: #f2c94c;
}
#pid24-header-info {
  flex: 1; display: flex; flex-direction: column; padding-left: 10px;
}
#pid24-header-name { color: #fff; font-size: 13px; font-weight: 700; line-height: 1.2; }
#pid24-header-sub  { color: #7fb8d8; font-size: 11px; line-height: 1.3; }

#pid24-header-links {
  display: flex; flex-direction: column; align-items: flex-end; gap: 3px;
}
#pid24-header-links a {
  color: #7fb8d8; font-size: 11px; text-decoration: none;
  transition: color .2s; white-space: nowrap;
}
#pid24-header-links a:hover { color: #f2c94c; }

#pid24-close {
  background: rgba(255,255,255,.12); border: none; color: #fff;
  width: 28px; height: 28px; border-radius: 50%; font-size: 18px;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background .2s; flex-shrink: 0;
}
#pid24-close:hover { background: rgba(255,255,255,.25); }

/* MESSAGES */
#pid24-messages {
  flex: 1; overflow-y: auto;
  padding: 18px 16px 12px;
  display: flex; flex-direction: column;
  gap: 10px; scroll-behavior: smooth;
}
#pid24-messages::-webkit-scrollbar { width: 4px; }
#pid24-messages::-webkit-scrollbar-thumb { background: rgba(3,47,82,.2); border-radius: 4px; }

/* BUBBLES */
.pid24-bubble {
  max-width: 82%;
  padding: 16px 20px;
  border-radius: 16px;
  font-size: 14.5px; line-height: 1.55;
  animation: pid24FadeUp .22s ease both;
}
@keyframes pid24FadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.pid24-bubble--bot {
  background: #fff; color: #032F52;
  border-bottom-left-radius: 5px; align-self: flex-start;
  box-shadow: 0 2px 10px rgba(3,47,82,.08);
}
.pid24-bubble--user {
  background: #032F52; color: #fff;
  border-bottom-right-radius: 5px; align-self: flex-end;
}
.pid24-bubble--result {
  background: linear-gradient(135deg, #032F52 0%, #1a5c8a 100%);
  color: #fff; max-width: 90%; align-self: flex-start;
}
.pid24-bubble--result a { color: #f2c94c; text-decoration: underline; font-weight: 700; }

/* TYPING DOTS */
.pid24-typing { align-self: flex-start; }
.pid24-dots {
  display: flex; gap: 5px; padding: 13px 16px;
  background: #fff; border-radius: 16px; border-bottom-left-radius: 5px;
  box-shadow: 0 2px 10px rgba(3,47,82,.08);
}
.pid24-dots span {
  width: 8px; height: 8px; border-radius: 50%; background: #4596CC;
  animation: pid24Dot 1.2s infinite ease-in-out;
}
.pid24-dots span:nth-child(2) { animation-delay: .2s; }
.pid24-dots span:nth-child(3) { animation-delay: .4s; }
@keyframes pid24Dot {
  0%, 80%, 100% { transform: scale(.7); opacity: .5; }
  40%            { transform: scale(1);  opacity: 1; }
}

/* INPUT */
#pid24-input-area {
  background: #fff; border-top: 1px solid rgba(3,47,82,.08);
  display: flex; align-items: center;
  padding: 10px 12px; gap: 8px; flex-shrink: 0;
}
#pid24-input {
  flex: 1; border: none; outline: none;
  font-family: inherit; font-size: 14.5px;
  color: #032F52; background: transparent; padding: 4px 0;
}
#pid24-input::placeholder { color: #aab8c4; }
#pid24-send {
  width: 36px; height: 36px; background: #032F52; border: none;
  border-radius: 50%; color: #fff; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; transition: background .2s, transform .15s;
}
#pid24-send:hover { background: #4596CC; transform: scale(1.07); }
#pid24-send svg { width: 16px; height: 16px; }

/* QUICK REPLIES */
#pid24-quick {
  padding: 8px 12px 12px;
  display: flex; flex-wrap: wrap; gap: 7px;
  background: #f5f7fa;
}
#pid24-quick:empty { display: none; }
.pid24-qbtn {
  background: #fff; border: 1.5px solid #c5daea;
  color: #032F52; font-family: inherit; font-size: 13px; font-weight: 600;
  padding: 6px 14px; border-radius: 20px; cursor: pointer; line-height: 1.3;
  transition: background .2s, border-color .2s, color .2s;
}
.pid24-qbtn:hover { background: #032F52; border-color: #032F52; color: #fff; }

/* MOBILE */
@media (max-width: 480px) {
  #pid24-root { bottom: 16px; right: 16px; }
  #pid24-panel { max-height: 70vh; }
}
/* ---- RESULT CARDS ---- */
.pid24-result {
    max-width: 90%;
    align-self: flex-start;
    padding: 18px 20px;
}
.pid24-result--found {
    background: linear-gradient(135deg, #032F52 0%, #1a5c8a 100%);
    color: #fff;
}
.pid24-result--notfound {
    background: linear-gradient(135deg, #4a4a4a 0%, #2a2a2a 100%);
    color: #fff;
}
.pid24-result-btn {
    display: inline-block;
    margin-top: 4px;
    background: #f2c94c;
    color: #032F52 !important;
    font-weight: 700;
    padding: 9px 18px;
    border-radius: 6px;
    text-decoration: none !important;
    font-size: 13.5px;
    transition: background .2s;
}
.pid24-result-btn:hover { background: #fce4a8; }
.pid24-result-btn--outline {
    background: transparent;
    color: #fff !important;
    border: 2px solid rgba(255,255,255,.5);
}
.pid24-result-btn--outline:hover {
    background: rgba(255,255,255,.1);
}
.pid24-bubble.pid24-bubble--bot,
.pid24-bubble.pid24-bubble--user{
    padding: 7px !important;
}

/* ---- MULTI-SELECT ---- */
.pid24-qbtn--selected {
    background: #032F52;
    border-color: #032F52;
    color: #fff;
}
.pid24-qbtn--confirm {
    background: #f2c94c;
    border-color: #f2c94c;
    color: #032F52;
    font-weight: 700;
    width: 100%;
    margin-top: 4px;
}
.pid24-qbtn--confirm:hover {
    background: #fce4a8;
    border-color: #fce4a8;
}
#pid24-quick .pid24-qbtn{
    padding: 7px !important;
}
.pid24-result-btn{
    padding: 7px !important;
}
#pid24-launcher{
    position: absolute;
    bottom: 60px;
    z-index: 1;
    border: 1px solid white;
}
#pid24-panel{
    z-index: 99;
}