/* Gulab Punjab Band - guided chatbot widget. Everything namespaced with .gc- */
.gc-root {
  --gc-primary: #7a1f2b;
  --gc-primary-dark: #5e1620;
  --gc-accent: #c9a24a;
  --gc-bg: #fbf7f0;
  --gc-text: #1f1a17;
  --gc-muted: #6f655e;
  --gc-bot-bg: #ffffff;
  --gc-user-text: #ffffff;
  --gc-border: #e6dccb;
  --gc-shadow: 0 12px 40px rgba(31, 26, 23, 0.28);
  --gc-radius: 16px;
  font-family: inherit;
  font-size: 15px;
  line-height: 1.45;
  color: var(--gc-text);
}
@media (prefers-color-scheme: dark) {
  .gc-root {
    --gc-bg: #1d1816;
    --gc-text: #f3ece4;
    --gc-muted: #b3a79d;
    --gc-bot-bg: #2b2421;
    --gc-border: #3d3430;
    --gc-primary: #9a2c3b;
    --gc-primary-dark: #7a1f2b;
    --gc-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
  }
}
.gc-root, .gc-root *, .gc-root *::before, .gc-root *::after { box-sizing: border-box; }

/* Launcher */
.gc-launcher {
  position: fixed; right: 20px; bottom: 20px; z-index: 99990;
  width: 60px; height: 60px; border-radius: 50%; border: 2px solid var(--gc-accent);
  background: var(--gc-primary); color: #fff; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 20px rgba(0,0,0,.3);
  animation: gc-pulse 2.8s ease-out infinite;
  padding: 0; font: inherit;
}
.gc-launcher:hover { background: var(--gc-primary-dark); }
.gc-launcher:focus-visible, .gc-root button:focus-visible, .gc-root input:focus-visible, .gc-root a:focus-visible {
  outline: 3px solid var(--gc-accent); outline-offset: 2px;
}
.gc-launcher svg { width: 28px; height: 28px; fill: currentColor; }
.gc-launcher.gc-hidden { display: none; }
@keyframes gc-pulse {
  0% { box-shadow: 0 6px 20px rgba(0,0,0,.3), 0 0 0 0 rgba(201,162,74,.55); }
  70% { box-shadow: 0 6px 20px rgba(0,0,0,.3), 0 0 0 16px rgba(201,162,74,0); }
  100% { box-shadow: 0 6px 20px rgba(0,0,0,.3), 0 0 0 0 rgba(201,162,74,0); }
}

/* Panel */
.gc-panel {
  position: fixed; right: 20px; bottom: 20px; z-index: 99991;
  width: 380px; height: 560px; max-height: calc(100vh - 40px);
  background: var(--gc-bg); border-radius: var(--gc-radius);
  box-shadow: var(--gc-shadow); border: 1px solid var(--gc-border);
  display: flex; flex-direction: column; overflow: hidden;
  opacity: 0; transform: translateY(16px) scale(.98); visibility: hidden;
  transition: opacity .18s ease, transform .18s ease, visibility 0s linear .18s;
}
.gc-panel.gc-open { opacity: 1; transform: none; visibility: visible; transition: opacity .18s ease, transform .18s ease; }

.gc-header {
  background: var(--gc-primary); color: #fff; padding: 12px 14px;
  display: flex; align-items: center; gap: 10px; border-bottom: 3px solid var(--gc-accent);
}
.gc-avatar {
  width: 34px; height: 34px; border-radius: 50%; background: var(--gc-accent); color: var(--gc-primary-dark);
  display: flex; align-items: center; justify-content: center; font-weight: 700; flex: none;
}
.gc-title { flex: 1; min-width: 0; }
.gc-title strong { display: block; font-size: 15px; }
.gc-title span { display: block; font-size: 12px; opacity: .85; }
.gc-close {
  background: transparent; border: 0; color: #fff; cursor: pointer; width: 36px; height: 36px;
  border-radius: 50%; font-size: 22px; line-height: 1; padding: 0; font-family: inherit;
}
.gc-close:hover { background: rgba(255,255,255,.18); }

.gc-log { flex: 1; overflow-y: auto; padding: 14px 12px; display: flex; flex-direction: column; gap: 10px; scroll-behavior: smooth; overscroll-behavior: contain; }
.gc-row { display: flex; max-width: 92%; animation: gc-in .18s ease; }
.gc-row-bot { align-self: flex-start; }
.gc-row-user { align-self: flex-end; }
@keyframes gc-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.gc-bubble { padding: 9px 13px; border-radius: 16px; word-wrap: break-word; overflow-wrap: anywhere; min-width: 0; }
.gc-row-bot .gc-bubble { background: var(--gc-bot-bg); border: 1px solid var(--gc-border); border-bottom-left-radius: 4px; }
.gc-row-user .gc-bubble { background: var(--gc-primary); color: var(--gc-user-text); border-bottom-right-radius: 4px; }
.gc-bubble p { margin: 0 0 6px; white-space: pre-line; }
.gc-bubble p:last-child { margin-bottom: 0; }
.gc-bubble strong { color: var(--gc-primary); }
@media (prefers-color-scheme: dark) { .gc-bubble strong { color: var(--gc-accent); } .gc-row-user .gc-bubble strong { color: #fff; } }
.gc-muted { color: var(--gc-muted); font-size: 13px; }

.gc-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.gc-chip, .gc-btn {
  font: inherit; font-size: 13.5px; cursor: pointer; text-decoration: none; display: inline-block;
  border-radius: 999px; padding: 7px 13px; line-height: 1.2; min-height: 34px;
  border: 1.5px solid var(--gc-primary); background: transparent; color: var(--gc-primary);
  transition: background .12s, color .12s;
}
@media (prefers-color-scheme: dark) { .gc-chip, .gc-btn { color: #f0c9ce; border-color: #b4505e; } }
.gc-chip:hover, .gc-btn:hover { background: var(--gc-primary); color: #fff; }
.gc-btn-primary { background: var(--gc-primary); color: #fff; border-color: var(--gc-primary); }
.gc-btn-primary:hover { background: var(--gc-primary-dark); }
.gc-btn-gold { background: var(--gc-accent); border-color: var(--gc-accent); color: #2b2210; }
.gc-btn-gold:hover { background: #b78f38; color: #2b2210; }
.gc-btn-quiet { border-color: var(--gc-border); color: var(--gc-muted); font-size: 12.5px; padding: 5px 11px; min-height: 30px; }
.gc-chip[aria-pressed="true"] { background: var(--gc-primary); color: #fff; border-color: var(--gc-primary); }
.gc-chip[aria-pressed="true"]::before { content: "\2713\00a0"; }

.gc-widget { margin-top: 8px; display: flex; flex-direction: column; gap: 8px; }
.gc-inline { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.gc-field {
  font: inherit; font-size: 16px; padding: 8px 10px; border-radius: 10px; min-width: 0;
  border: 1.5px solid var(--gc-border); background: var(--gc-bg); color: var(--gc-text); color-scheme: light dark;
}
.gc-error { color: #b3261e; font-size: 13px; margin-top: 4px; }
@media (prefers-color-scheme: dark) { .gc-error { color: #ff9a92; } }

.gc-summary { width: 100%; border-collapse: collapse; margin: 4px 0; font-size: 14px; }
.gc-summary th { text-align: left; color: var(--gc-muted); font-weight: 600; padding: 5px 6px 5px 0; vertical-align: top; white-space: nowrap; }
.gc-summary td { padding: 5px 4px; vertical-align: top; word-break: break-word; }
.gc-summary td:last-child { text-align: right; width: 1%; }
.gc-summary tr + tr > * { border-top: 1px solid var(--gc-border); }

.gc-typing { display: inline-flex; gap: 4px; padding: 4px 2px; }
.gc-typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--gc-muted); animation: gc-dot 1s infinite ease-in-out; }
.gc-typing i:nth-child(2) { animation-delay: .15s; }
.gc-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes gc-dot { 0%, 60%, 100% { opacity: .3; transform: none; } 30% { opacity: 1; transform: translateY(-3px); } }

.gc-form { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--gc-border); background: var(--gc-bg); }
.gc-form .gc-field { flex: 1; border-radius: 999px; padding: 9px 14px; }
.gc-send {
  width: 42px; height: 42px; border-radius: 50%; border: 0; background: var(--gc-primary); color: #fff; cursor: pointer;
  display: flex; align-items: center; justify-content: center; padding: 0; flex: none;
}
.gc-send:hover { background: var(--gc-primary-dark); }
.gc-send svg { width: 20px; height: 20px; fill: currentColor; }

.gc-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@media (max-width: 599px) {
  .gc-launcher { right: 14px; bottom: 14px; }
  .gc-panel { right: 0; bottom: 0; left: 0; top: 0; width: 100%; height: 100vh; height: 100dvh; max-height: none; border-radius: 0; border: 0; }
  .gc-row { max-width: 94%; }
}

@media (prefers-reduced-motion: reduce) {
  .gc-launcher { animation: none; }
  .gc-panel, .gc-panel.gc-open { transition: none; }
  .gc-row { animation: none; }
  .gc-typing i { animation: none; opacity: .6; }
  .gc-log { scroll-behavior: auto; }
}

.gc-summary .gc-btn { white-space: nowrap; }
.gc-avatar.gc-avatar-logo { width: 42px; height: 42px; background: #fff; padding: 2px; overflow: hidden; box-shadow: 0 0 0 2px var(--gc-accent); }
.gc-avatar.gc-avatar-logo img { width: 100%; height: 100%; object-fit: contain; border-radius: 50%; display: block; }
/* Lift the chat button above the hosting provider's badge when one is shown */
body.has-host-badge .gc-launcher { bottom: 84px; }
