/* ===========================
   PrivateLenders Chatbot CSS
   File: assets/chatbot.css
   =========================== */

:root {
  --plcb-brand: #c5a059;
  --plcb-brand-2: #b08b43;
  --plcb-bg: #ffffff;
  --plcb-panel: #ffffff;
  --plcb-text: #0f172a;
  --plcb-muted: #64748b;
  --plcb-border: rgba(15, 23, 42, 0.10);
  --plcb-shadow: 0 18px 55px rgba(2, 6, 23, 0.18);
  --plcb-soft-shadow: 0 6px 22px rgba(2, 6, 23, 0.10);
  --plcb-radius: 18px;
  --plcb-radius-sm: 12px;
  --plcb-font: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
}

* {
  box-sizing: border-box;
}

#plcb-launcher,
#plcb-panel {
  font-family: var(--plcb-font);
}

/* Visibility Utilities */
.plcb-open {
  display: flex !important;
  animation: plcb-fade-in 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.plcb-hidden {
  display: none !important;
  pointer-events: none;
  opacity: 0;
}

@keyframes plcb-fade-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ---------- Launcher ---------- */
#plcb-launcher {
  position: fixed;
  right: 18px;
  bottom: 18px;
  width: 60px;
  height: 60px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--plcb-brand), var(--plcb-brand-2));
  box-shadow: var(--plcb-shadow);
  cursor: pointer;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: transform .18s ease, filter .18s ease;
}

#plcb-launcher:hover {
  transform: translateY(-2px) scale(1.02);
  filter: brightness(1.02);
}

#plcb-launcher:active {
  transform: translateY(0) scale(.98);
}

.plcb-launcher-img {
  width: 30px;
  height: 30px;
  object-fit: cover;
  border-radius: 10px;
  background: #fff;
  padding: 4px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .15);
}

/* little online dot */
#plcb-launcher .plcb-dot {
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: #22c55e;
  border: 2px solid #fff;
  right: 10px;
  top: 10px;
  box-shadow: 0 6px 16px rgba(34, 197, 94, .35);
}

/* ---------- Panel ---------- */
#plcb-panel {
  position: fixed;
  right: 18px;
  bottom: 18px;
  width: 390px;
  height: 560px;
  max-height: calc(100vh - 36px);
  background: var(--plcb-panel);
  border: 1px solid var(--plcb-border);
  border-radius: var(--plcb-radius);
  box-shadow: var(--plcb-shadow);
  z-index: 999999;
  display: none;
  /* toggled by JS */
  flex-direction: column;
  overflow: hidden;
}

/* Mobile: full width bottom sheet */
@media (max-width: 480px) {
  #plcb-panel {
    right: 10px;
    left: 10px;
    bottom: 10px;
    width: auto;
    height: 70vh;
  }

  #plcb-launcher {
    right: 14px;
    bottom: 14px;
  }
}

/* ---------- Header ---------- */
#plcb-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 14px;
  background: linear-gradient(180deg, rgba(197, 160, 89, .20), rgba(197, 160, 89, .06));
  border-bottom: 1px solid var(--plcb-border);
}

.plcb-title {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.plcb-avatar {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(197, 160, 89, .25);
  box-shadow: var(--plcb-soft-shadow);
  flex: 0 0 auto;
}

.plcb-name {
  font-weight: 800;
  color: var(--plcb-text);
  font-size: 14px;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 240px;
}

.plcb-sub {
  font-size: 12px;
  color: var(--plcb-muted);
  margin-top: 2px;
}

.plcb-close-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: rgba(15, 23, 42, .06);
  border: 1px solid rgba(15, 23, 42, .08);
  border-radius: 12px;
  cursor: pointer;
  transition: transform .15s ease, background .15s ease;
}

.plcb-close-btn:hover {
  transform: scale(1.03);
  background: rgba(15, 23, 42, .09);
}

.plcb-close-btn svg {
  width: 20px;
  height: 20px;
  fill: rgba(15, 23, 42, .75);
}

/* ---------- Quick Pills ---------- */
#plcb-quick {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 10px 12px;
  border-bottom: 1px solid var(--plcb-border);
  background: #fff;
}

.plcb-pill {
  appearance: none;
  border: 1px solid rgba(197, 160, 89, .30);
  background: rgba(197, 160, 89, .10);
  color: #2b1f09;
  font-weight: 700;
  font-size: 10px;
  padding: 5px 8px;
  border-radius: 999px;
  cursor: pointer;
  transition: transform .15s ease, background .15s ease, border-color .15s ease;
}

.plcb-pill:hover {
  transform: translateY(-1px);
  background: rgba(197, 160, 89, .16);
  border-color: rgba(197, 160, 89, .45);
}

.plcb-pill:active {
  transform: translateY(0);
}

/* ---------- Messages ---------- */
#plcb-messages {
  flex: 1;
  padding: 14px 12px;
  overflow: auto;
  background: linear-gradient(180deg, rgba(15, 23, 42, .015), rgba(15, 23, 42, .00));
  scroll-behavior: smooth;
}

/* nicer scrollbar */
#plcb-messages::-webkit-scrollbar {
  width: 10px;
}

#plcb-messages::-webkit-scrollbar-thumb {
  background: rgba(15, 23, 42, .12);
  border-radius: 999px;
  border: 3px solid transparent;
  background-clip: content-box;
}

#plcb-messages::-webkit-scrollbar-thumb:hover {
  background: rgba(15, 23, 42, .18);
  background-clip: content-box;
}

.plcb-row {
  display: flex;
  margin: 10px 0;
  gap: 8px;
}

.plcb-row.user {
  justify-content: flex-end;
}

.plcb-row.bot {
  justify-content: flex-start;
}

.plcb-bubble {
  max-width: 82%;
  padding: 10px 12px;
  border-radius: 16px;
  line-height: 1.35;
  font-size: 13.5px;
  word-wrap: break-word;
  overflow-wrap: anywhere;
  box-shadow: 0 10px 25px rgba(2, 6, 23, .08);
  border: 1px solid rgba(15, 23, 42, .06);
}

/* user bubble */
.plcb-row.user .plcb-bubble {
  background: linear-gradient(180deg, var(--plcb-brand), var(--plcb-brand-2));
  color: #fff;
  border: none;
  border-bottom-right-radius: 8px;
}

/* bot bubble */
.plcb-row.bot .plcb-bubble {
  background: #fff;
  color: var(--plcb-text);
  border-bottom-left-radius: 8px;
}

/* links inside bubbles */
.plcb-bubble a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Typing dots */
.plcb-typing-row .plcb-bubble {
  background: #fff;
  color: var(--plcb-muted);
  min-width: 64px;
}

.plcb-typing-dots {
  display: inline-flex;
  gap: 4px;
  align-items: center;
  justify-content: center;
}

.plcb-typing-dots span {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: rgba(15, 23, 42, .35);
  animation: plcb-bounce 1.1s infinite ease-in-out;
}

.plcb-typing-dots span:nth-child(2) {
  animation-delay: .15s;
}

.plcb-typing-dots span:nth-child(3) {
  animation-delay: .3s;
}

@keyframes plcb-bounce {

  0%,
  80%,
  100% {
    transform: translateY(0);
    opacity: .55;
  }

  40% {
    transform: translateY(-4px);
    opacity: 1;
  }
}

/* ---------- Footer (Input) ---------- */
#plcb-footer {
  display: flex;
  gap: 10px;
  padding: 12px;
  border-top: 1px solid var(--plcb-border);
  background: #fff;
}

#plcb-input {
  flex: 1;
  height: 42px;
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, .12);
  padding: 0 12px;
  font-size: 13.5px;
  outline: none;
  transition: box-shadow .15s ease, border-color .15s ease;
  background: #fff;
  color: var(--plcb-text);
}

#plcb-input::placeholder {
  color: rgba(100, 116, 139, .95);
}

#plcb-input:focus {
  border-color: rgba(197, 160, 89, .70);
  box-shadow: 0 0 0 3px rgba(197, 160, 89, .18);
}

#plcb-send {
  height: 42px;
  padding: 0 14px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(180deg, var(--plcb-brand), var(--plcb-brand-2));
  color: #fff;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(197, 160, 89, .25);
  transition: transform .15s ease, filter .15s ease;
}

#plcb-send:hover {
  transform: translateY(-1px);
  filter: brightness(1.03);
}

#plcb-send:active {
  transform: translateY(0);
}

#plcb-send:disabled {
  opacity: .55;
  cursor: not-allowed;
  filter: grayscale(0.2);
}

/* ---------- Lead Form Overlay ---------- */
#plcb-lead {
  position: absolute;
  inset: 0;
  display: none;
  /* toggled by JS */
  flex-direction: column;
  padding: 14px 14px 16px;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.plcb-lead-title {
  font-size: 18px;
  font-weight: 900;
  color: var(--plcb-text);
  margin: 6px 0 10px;
}

.plcb-lead-inputs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.plcb-lead-inputs input,
.plcb-lead-inputs select,
.plcb-lead-inputs textarea {
  width: 100%;
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, .12);
  padding: 10px 10px;
  font-size: 13.5px;
  outline: none;
  background: #fff;
  color: var(--plcb-text);
  transition: box-shadow .15s ease, border-color .15s ease;
}

.plcb-lead-inputs textarea {
  grid-column: 1 / -1;
  resize: none;
  min-height: 86px;
}

.plcb-lead-inputs select {
  background: #fff;
}

.plcb-lead-inputs input:focus,
.plcb-lead-inputs select:focus,
.plcb-lead-inputs textarea:focus {
  border-color: rgba(197, 160, 89, .70);
  box-shadow: 0 0 0 3px rgba(197, 160, 89, .18);
}

#plcb_submit {
  grid-column: 1 / -1;
  height: 44px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(180deg, var(--plcb-brand), var(--plcb-brand-2));
  color: #fff;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 12px 26px rgba(197, 160, 89, .30);
  transition: transform .15s ease, filter .15s ease;
}

#plcb_submit:hover {
  transform: translateY(-1px);
  filter: brightness(1.03);
}

#plcb_submit:active {
  transform: translateY(0);
}

#plcb_submit:disabled {
  opacity: .6;
  cursor: not-allowed;
}

/* close lead icon row */
#plcb-close-lead {
  padding: 0;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: rgba(197, 160, 89, .12) !important;
  border: 1px solid rgba(197, 160, 89, .28) !important;
  display: flex;
  align-items: center;
  justify-content: center;
}

#plcb-close-lead:hover {
  background: rgba(197, 160, 89, .18) !important;
}

.plcb-lead-help {
  margin-top: 10px;
  font-size: 12px;
  color: var(--plcb-muted);
}

/* Responsive lead form */
@media (max-width: 480px) {
  .plcb-lead-inputs {
    grid-template-columns: 1fr;
  }
}

/* ---------- Optional: dark mode (auto) ---------- */
@media (prefers-color-scheme: dark) {
  :root {
    --plcb-bg: #0b1220;
    --plcb-panel: #0b1220;
    --plcb-text: #e5e7eb;
    --plcb-muted: #94a3b8;
    --plcb-border: rgba(148, 163, 184, .18);
    --plcb-shadow: 0 18px 55px rgba(0, 0, 0, 0.50);
  }

  #plcb-panel {
    background: var(--plcb-panel);
    border-color: var(--plcb-border);
  }

  #plcb-header {
    background: linear-gradient(180deg, rgba(197, 160, 89, .16), rgba(197, 160, 89, .04));
    border-bottom-color: var(--plcb-border);
  }

  #plcb-quick,
  #plcb-footer {
    background: rgba(2, 6, 23, .55);
    border-color: var(--plcb-border);
  }

  #plcb-messages {
    background: linear-gradient(180deg, rgba(2, 6, 23, .35), rgba(2, 6, 23, .15));
  }

  .plcb-row.bot .plcb-bubble {
    background: rgba(255, 255, 255, .06);
    border-color: rgba(148, 163, 184, .16);
    color: var(--plcb-text);
  }

  #plcb-input {
    background: rgba(255, 255, 255, .06);
    border-color: rgba(148, 163, 184, .20);
    color: var(--plcb-text);
  }

  .plcb-close-btn {
    background: rgba(255, 255, 255, .06);
    border-color: rgba(148, 163, 184, .18);
  }

  .plcb-close-btn svg {
    fill: rgba(229, 231, 235, .85);
  }

  #plcb-lead {
    background: rgba(2, 6, 23, .75);
  }

  .plcb-lead-inputs input,
  .plcb-lead-inputs select,
  .plcb-lead-inputs textarea {
    background: rgba(255, 255, 255, .06);
    border-color: rgba(148, 163, 184, .20);
    color: var(--plcb-text);
  }
}


/* ===========================
   Professional polish overrides
   =========================== */

/* Softer glassy header + subtle color accents */
#plcb-header {
  background:
    radial-gradient(900px 120px at 10% 0%, rgba(197, 160, 89, .28), transparent 55%),
    radial-gradient(700px 120px at 90% 0%, rgba(34, 197, 94, .18), transparent 55%),
    linear-gradient(180deg, rgba(255, 255, 255, .78), rgba(255, 255, 255, .42));
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* Colorful modern close button */
.plcb-close-btn {
  background:
    linear-gradient(135deg, rgba(59, 130, 246, .24), rgba(34, 197, 94, .18), rgba(197, 160, 89, .24));
  border: 1px solid rgba(15, 23, 42, .10);
  box-shadow: 0 10px 22px rgba(2, 6, 23, .10);
}

.plcb-close-btn:hover {
  transform: translateY(-1px) scale(1.03);
  filter: brightness(1.04);
}

.plcb-close-btn:active {
  transform: translateY(0) scale(.99);
}

.plcb-close-btn svg {
  fill: rgba(15, 23, 42, .88);
}

/* Modern launcher: glass ring + stronger pop */
#plcb-launcher {
  border: 1px solid rgba(255, 255, 255, .35);
  background:
    radial-gradient(120px 120px at 30% 20%, rgba(255, 255, 255, .35), transparent 45%),
    linear-gradient(180deg, var(--plcb-brand), var(--plcb-brand-2));
}

#plcb-launcher::after {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(59, 130, 246, .45), rgba(34, 197, 94, .35), rgba(197, 160, 89, .45));
  z-index: -1;
  filter: blur(10px);
  opacity: .65;
}

/* Cleaner bubbles */
.plcb-bubble {
  border: 1px solid rgba(15, 23, 42, .07);
  box-shadow: 0 10px 26px rgba(2, 6, 23, .10);
}

.plcb-row.bot .plcb-bubble {
  background: linear-gradient(180deg, rgba(255, 255, 255, .98), rgba(255, 255, 255, .92));
}

.plcb-row.user .plcb-bubble {
  box-shadow: 0 14px 34px rgba(197, 160, 89, .22);
}

/* Quick pills look more premium */
.plcb-pill {
  background: linear-gradient(180deg, rgba(197, 160, 89, .14), rgba(197, 160, 89, .08));
  box-shadow: 0 8px 18px rgba(2, 6, 23, .06);
}

.plcb-pill:hover {
  box-shadow: 0 10px 22px rgba(2, 6, 23, .08);
}

/* Lead overlay more premium */
#plcb-lead {
  background:
    radial-gradient(900px 180px at 20% 0%, rgba(197, 160, 89, .22), transparent 60%),
    radial-gradient(800px 180px at 90% 0%, rgba(59, 130, 246, .14), transparent 60%),
    rgba(255, 255, 255, .88);
}



/* ===========================
   Tidio-style (modern) theme
   =========================== */

:root {
  --plcb-primary: #eab34e;
  /* golden yellow */
  --plcb-primary-2: #c7963d;
  --plcb-accent: #22c55e;
  --plcb-bg: #ffffff;
  --plcb-panel: #ffffff;
  --plcb-text: #0f172a;
  --plcb-muted: #64748b;
  --plcb-border: rgba(15, 23, 42, 0.10);
  --plcb-shadow: 0 18px 55px rgba(2, 6, 23, 0.18);
  --plcb-soft-shadow: 0 10px 30px rgba(2, 6, 23, 0.10);
}

/* Force light style even if user device is dark mode */
#plcb-panel,
#plcb-messages,
#plcb-footer,
#plcb-quick,
#plcb-header,
#plcb-lead {
  color-scheme: light;
}

/* ---------- Launcher (Pill Shape) ---------- */
/* ---------- Launcher (Icon Only) ---------- */
#plcb-launcher {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 65px;
  height: 65px;
  padding: 0;
  border: none;
  border-radius: 50% !important;
  background: linear-gradient(180deg, #132442, #0b162c) !important;
  box-shadow: 0 10px 30px rgba(11, 22, 44, 0.4) !important;
  cursor: pointer;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

#plcb-launcher:hover {
  transform: scale(1.08);
}

#plcb-launcher:active {
  transform: scale(0.95);
}

.plcb-launcher-logo {
  width: 32px;
  height: 32px;
  fill: #eab34e; /* golden yellow icon */
  transition: transform 0.3s ease;
}

#plcb-launcher:hover .plcb-launcher-logo {
  transform: scale(1.05);
}

/* Mobile adjustments */
@media (max-width: 480px) {
  #plcb-launcher {
    width: 64px;
    height: 64px;
    right: 15px;
    bottom: 15px;
  }
}

.plcb-launcher-inner {
  display: flex;
  align-items: center;
  gap: 10px;
}

.plcb-icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}

.plcb-icon-wrap svg {
  width: 24px;
  height: 24px;
}

.plcb-text-wrap {
  color: #fff;
  font-weight: 700;
  font-size: 16px;
  white-space: nowrap;
  letter-spacing: 0.3px;
}

/* Online Badge (Green Dot) */
.plcb-online-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 14px;
  height: 14px;
  background: #10b981;
  /* bright green */
  border: 2px solid #fff;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.4);
  animation: plcb-pulse 2s infinite;
}

@keyframes plcb-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  }

  70% {
    box-shadow: 0 0 0 6px rgba(16, 185, 129, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}

/* ---------- Hint Bubble (Typing) ---------- */
#plcb-hint {
  position: fixed;
  right: 20px;
  bottom: 90px;
  max-width: 260px;
  background: #ffffff;
  color: #1e293b;
  padding: 14px 18px;
  border-radius: 16px;
  border-bottom-right-radius: 4px;
  /* like a speech bubble */
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  z-index: 999998;
  opacity: 0;
  transform: translateY(10px) scale(0.95);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
  border: 1px solid rgba(0, 0, 0, 0.06);
}

#plcb-hint.plcb-hint-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

/* Jumping/Bouncing effect for the text or hint */
#plcb-hint::after {
  /* Cursor */
  content: '|';
  animation: plcb-blink 1s infinite;
  margin-left: 2px;
  color: var(--plcb-primary);
}

@keyframes plcb-blink {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0;
  }
}

/* Media Query Adjustment */
@media (max-width: 480px) {
  #plcb-launcher {
    width: 60px;
    height: 60px;
    padding: 0;
    border-radius: 50%;
  }

  .plcb-text-wrap {
    display: none;
    /* Hide text on mobile to save space */
  }

  .plcb-icon-wrap {
    margin: 0;
  }

  #plcb-hint {
    bottom: 90px;
    right: 15px;
    max-width: 220px;
  }
}

/* Panel layout */
#plcb-panel {
  width: 380px !important;
  height: 610px !important;
  border-radius: 22px !important;
  background: var(--plcb-panel) !important;
  border: 1px solid rgba(15, 23, 42, .10) !important;
  overflow: hidden !important;
}

/* Header like Website */
#plcb-header {
  padding: 16px 14px !important;
  background: linear-gradient(180deg, #132442, #0b162c) !important;
  border-bottom: 2px solid #eab34e !important;
}

.plcb-name {
  color: #fff !important;
  font-size: 15px !important;
  font-weight: 900 !important;
}

.plcb-sub {
  color: rgba(255, 255, 255, .82) !important;
}

.plcb-avatar {
  border: 2px solid rgba(255, 255, 255, .45) !important;
  background: rgba(255, 255, 255, .18) !important;
  box-shadow: 0 12px 28px rgba(0, 0, 0, .22) !important;
}

/* Close button: small round colorful */
.plcb-close-btn {
  width: 36px !important;
  height: 36px !important;
  border-radius: 999px !important;
  border: 1px solid rgba(255, 255, 255, .25) !important;
  background: rgba(255, 255, 255, .16) !important;
  box-shadow: 0 12px 28px rgba(0, 0, 0, .20) !important;
}

.plcb-close-btn svg {
  fill: #fff !important;
}

.plcb-close-btn:hover {
  filter: brightness(1.06);
  transform: translateY(-1px) scale(1.03);
}

/* Quick buttons: readable + modern chips */
#plcb-quick {
  background: #f6f8ff !important;
  border-bottom: 1px solid rgba(15, 23, 42, .08) !important;
  padding: 10px 12px !important;
  gap: 6px !important;
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
}

.plcb-pill {
  background: #fff !important;
  border: 1px solid rgba(234, 179, 78, .4) !important;
  color: rgba(15, 23, 42, .90) !important;
  font-weight: 800 !important;
  font-size: 10.5px !important;
  padding: 6px 8px !important;
  line-height: 1.2 !important;
  height: auto !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  box-shadow: 0 8px 18px rgba(2, 6, 23, .06) !important;
}

.plcb-pill:hover {
  border-color: rgba(234, 179, 78, 1) !important;
  box-shadow: 0 10px 22px rgba(2, 6, 23, .08) !important;
}

.plcb-pill:active {
  transform: translateY(0) scale(.99);
}

/* Messages: light background */
#plcb-messages {
  background: #f8fafc !important;
  padding: 14px 12px !important;
}

/* Bubbles (high contrast) */
.plcb-bubble {
  border: none !important;
  box-shadow: none !important;
  font-size: 14px !important;
}

.plcb-row.bot .plcb-bubble {
  background: #ffffff !important;
  color: var(--plcb-text) !important;
  border: 1px solid rgba(15, 23, 42, .08) !important;
  border-bottom-left-radius: 10px !important;
}

.plcb-row.user .plcb-bubble {
  background: linear-gradient(180deg, var(--plcb-primary), var(--plcb-primary-2)) !important;
  color: #0b162c !important;
  border-bottom-right-radius: 10px !important;
  font-weight: 600 !important;
}

/* Footer input + send like tidio */
#plcb-footer {
  background: #ffffff !important;
  border-top: 1px solid rgba(15, 23, 42, .10) !important;
  padding: 12px !important;
}

#plcb-input {
  height: 46px !important;
  border-radius: 14px !important;
  border: 1px solid rgba(234, 179, 78, .35) !important;
  background: #f8fafc !important;
  font-size: 14px !important;
}

#plcb-input:focus {
  border-color: rgba(234, 179, 78, .8) !important;
  box-shadow: 0 0 0 3px rgba(234, 179, 78, .2) !important;
}

#plcb-send {
  height: 46px !important;
  border-radius: 14px !important;
  background: linear-gradient(180deg, var(--plcb-primary), var(--plcb-primary-2)) !important;
  box-shadow: 0 12px 26px rgba(234, 179, 78, .28) !important;
  color: #0b162c !important;
  font-weight: 900 !important;
}

/* Lead overlay */
#plcb-lead {
  background: rgba(248, 250, 252, .95) !important;
  backdrop-filter: blur(10px) !important;
  -webkit-backdrop-filter: blur(10px) !important;
}

.plcb-lead-title {
  font-weight: 900 !important;
}

#plcb_submit {
  background: linear-gradient(180deg, var(--plcb-primary), var(--plcb-primary-2)) !important;
  box-shadow: 0 12px 26px rgba(47, 111, 237, .28) !important;
}

#plcb-close-lead {
  background: rgba(47, 111, 237, .12) !important;
  border: 1px solid rgba(47, 111, 237, .22) !important;
}

/* Mobile tweaks */
@media (max-width: 480px) {
  #plcb-panel {
    height: 75vh !important;
  }

  /* Ensure adjustments for icon-only launcher on mobile */
  #plcb-launcher {
    width: 64px !important;
    height: 64px !important;
    padding: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }
}



/* Legacy Text Styles Removed */



/* ===========================
   FIX: keep input bar visible
   (messages should scroll, footer stays)
   =========================== */
#plcb-panel {
  display: flex !important;
  flex-direction: column !important;
}

#plcb-header,
#plcb-quick,
#plcb-footer {
  flex: 0 0 auto !important;
}

#plcb-messages {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  /* critical for flex scroll */
  overflow: auto !important;
  -webkit-overflow-scrolling: touch;
}



/* ===========================
   Mobile header close button fixes
   =========================== */
#plcb-header {
  position: relative !important;
}

.plcb-close-btn {
  position: absolute !important;
  right: 12px !important;
  top: 12px !important;
  z-index: 20 !important;
  pointer-events: auto !important;
}

.plcb-title {
  padding-right: 56px !important;
}

/* space for close button */

.plcb-avatar {
  width: 44px !important;
  height: 44px !important;
}

.plcb-avatar img {
  border-radius: 50% !important;
}

/* Tap targets */
.plcb-pill,
#plcb-send,
.plcb-close-btn {
  -webkit-tap-highlight-color: transparent;
}



/* Legacy Styles Removed */



/* ===========================
   FIX: prevent auto-open + ensure close works
   =========================== */

/* Default closed */
#plcb-panel {
  display: none !important;
}

#plcb-panel.plcb-open {
  display: flex !important;
}

/* Launcher visibility toggle */
#plcb-launcher {
  display: flex !important;
}

#plcb-launcher.plcb-hidden {
  display: none !important;
}

/* Force close button to look like an X button (not a switch) */
.plcb-close-btn {
  width: 36px !important;
  height: 36px !important;
  border-radius: 999px !important;
  background: rgba(255, 255, 255, .18) !important;
  border: 1px solid rgba(255, 255, 255, .28) !important;
}

.plcb-close-btn svg {
  display: block !important;
  width: 20px !important;
  height: 20px !important;
  fill: #fff !important;
}

/* Date Separator */
.plcb-date {
  text-align: center;
  font-size: 11px;
  color: #94a3b8;
  margin: 12px 0 8px;
  font-weight: 500;
  letter-spacing: 0.3px;
}