/* AI Chatbot v7.2 — US TECH MASTER */

:root {
  --gc-accent: #1A3C6B;
  --gc-accent-dark: #122a4d;
  --gc-radius: 16px;
  --gc-shadow: 0 8px 32px rgba(0,0,0,.14), 0 2px 8px rgba(0,0,0,.08);
  --gc-font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ── Bubble ─────────────────────────────────────── */
#gc-bubble {
  position: fixed;
  bottom: 90px;
  right: 28px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--gc-accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 99999;
  box-shadow: 0 4px 16px rgba(0,0,0,.22);
  transition: transform .2s ease, box-shadow .2s ease;
  outline: none;
}
#gc-bubble:hover  { transform: scale(1.07); box-shadow: 0 6px 20px rgba(0,0,0,.28); }
#gc-bubble:active { transform: scale(.96); }
#gc-bubble.gc-open { background: #444; }

/* ── Window ─────────────────────────────────────── */
#gc-window {
  position: fixed;
  bottom: 96px;
  right: 28px;
  width: 370px;
  max-width: calc(100vw - 24px);
  height: 560px;
  max-height: calc(100vh - 110px);
  border-radius: var(--gc-radius);
  background: #fff;
  box-shadow: var(--gc-shadow);
  display: flex;
  flex-direction: column;
  z-index: 99990;
  overflow: hidden;
  font-family: var(--gc-font);
  border: 1px solid rgba(0,0,0,.08);
  animation: gc-slide-in .22s ease;
}
@keyframes gc-slide-in {
  from { opacity: 0; transform: translateY(14px) scale(.97); }
  to   { opacity: 1; transform: translateY(0)    scale(1); }
}

/* ── Header ─────────────────────────────────────── */
#gc-header {
  background: var(--gc-accent);
  color: #fff;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}
#gc-header-left { display: flex; align-items: center; gap: 11px; }
#gc-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255,255,255,.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  flex-shrink: 0;
  letter-spacing: .03em;
}
#gc-bot-name  { font-weight: 600; font-size: 15px; line-height: 1.2; }
#gc-status    { font-size: 11px; opacity: .8; display: flex; align-items: center; gap: 5px; margin-top: 2px; }
#gc-status-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 0 2px rgba(74,222,128,.3);
  display: inline-block;
}
#gc-close {
  background: none; border: none; color: #fff;
  cursor: pointer; padding: 4px; opacity: .7;
  border-radius: 6px; transition: opacity .15s;
  display: flex; align-items: center;
}
#gc-close:hover { opacity: 1; background: rgba(255,255,255,.12); }

/* ── Lead capture screen ─────────────────────────── */
#gc-lead-screen {
  flex: 1;
  overflow-y: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 20px;
  background: #f9fafb;
}
#gc-lead-inner {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
#gc-lead-icon {
  width: 52px; height: 52px;
  border-radius: 14px;
  background: var(--gc-accent);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 4px;
}
#gc-lead-title {
  font-size: 17px;
  font-weight: 700;
  color: #111;
  margin: 0;
  line-height: 1.3;
}
#gc-lead-sub {
  font-size: 13px;
  color: #555;
  margin: 0 0 6px;
  line-height: 1.5;
}
#gc-lead-inner input {
  width: 100%;
  padding: 10px 13px;
  border: 1.5px solid #dde1e8;
  border-radius: 9px;
  font-size: 14px;
  font-family: var(--gc-font);
  outline: none;
  box-sizing: border-box;
  transition: border-color .15s;
  background: #fff;
  color: #111;
}
#gc-lead-inner input:focus { border-color: var(--gc-accent); }
#gc-lead-inner input::placeholder { color: #9ca3af; }
#gc-lead-error {
  font-size: 12px;
  color: #dc2626;
  display: none;
  margin: -4px 0 0;
}
#gc-lead-submit {
  background: var(--gc-accent);
  color: #fff;
  border: none;
  border-radius: 9px;
  padding: 11px 16px;
  font-size: 14px;
  font-weight: 600;
  font-family: var(--gc-font);
  cursor: pointer;
  transition: background .15s, transform .1s;
  margin-top: 2px;
  letter-spacing: .02em;
}
#gc-lead-submit:hover  { background: var(--gc-accent-dark); }
#gc-lead-submit:active { transform: scale(.98); }
#gc-lead-privacy {
  font-size: 11px;
  color: #9ca3af;
  text-align: center;
  margin: 0;
  line-height: 1.5;
}

/* ── Chat screen ─────────────────────────────────── */
#gc-chat-screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #fff;
}
#gc-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px 14px 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  scroll-behavior: smooth;
}
#gc-messages::-webkit-scrollbar { width: 4px; }
#gc-messages::-webkit-scrollbar-thumb { background: #ddd; border-radius: 4px; }

/* Message bubbles */
.gc-msg {
  max-width: 84%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.6;
  word-break: break-word;
}
.gc-user {
  background: var(--gc-accent);
  color: #fff;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}
.gc-bot {
  background: #f0f2f5;
  color: #111;
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}
/* Markdown inside bot messages */
.gc-bot p  { margin: 0 0 .5em; }
.gc-bot p:last-child { margin-bottom: 0; }
.gc-bot ul, .gc-bot ol { margin: .4em 0 .4em 1.2em; padding: 0; }
.gc-bot li { margin-bottom: .2em; }
.gc-bot strong { font-weight: 600; }
.gc-bot a  { color: var(--gc-accent); text-decoration: underline; }
.gc-bot h1,.gc-bot h2,.gc-bot h3 { font-size: 14px; font-weight: 600; margin: .6em 0 .2em; }
.gc-bot code { background: rgba(0,0,0,.07); padding: 1px 5px; border-radius: 4px; font-size: 13px; }
.gc-bot pre  { background: rgba(0,0,0,.07); padding: 8px 10px; border-radius: 8px; overflow-x: auto; font-size: 12px; }

/* Typing indicator */
.gc-typing {
  display: flex !important;
  align-items: center;
  gap: 5px;
  padding: 12px 16px;
}
.gc-typing span {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #aaa;
  animation: gc-bounce .9s infinite ease-in-out;
}
.gc-typing span:nth-child(2) { animation-delay: .15s; }
.gc-typing span:nth-child(3) { animation-delay: .30s; }
@keyframes gc-bounce {
  0%,80%,100% { transform: scale(.7); opacity: .5; }
  40%         { transform: scale(1.1); opacity: 1; }
}

/* Quick reply buttons */
#gc-quick-wrap {
  padding: 0 12px 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.gc-quick-btn {
  background: #fff;
  border: 1.5px solid var(--gc-accent);
  color: var(--gc-accent);
  border-radius: 20px;
  padding: 6px 13px;
  font-size: 12.5px;
  font-family: var(--gc-font);
  cursor: pointer;
  transition: background .15s, color .15s;
  white-space: nowrap;
}
.gc-quick-btn:hover {
  background: var(--gc-accent);
  color: #fff;
}

/* Input row */
#gc-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-top: 1px solid #eef0f3;
  flex-shrink: 0;
  background: #fff;
}
#gc-input {
  flex: 1;
  border: 1.5px solid #dde1e8;
  border-radius: 22px;
  padding: 9px 15px;
  font-size: 14px;
  font-family: var(--gc-font);
  outline: none;
  transition: border-color .15s;
  background: #f8f9fb;
  color: #111;
  line-height: 1.4;
}
#gc-input:focus { border-color: var(--gc-accent); background: #fff; }
#gc-input::placeholder { color: #adb5bd; }
#gc-input:disabled { opacity: .6; }
#gc-send {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--gc-accent);
  border: none;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background .15s, transform .1s;
}
#gc-send:hover  { background: var(--gc-accent-dark); }
#gc-send:active { transform: scale(.93); }
#gc-send:disabled { opacity: .45; cursor: not-allowed; }

/* Footer note */
#gc-footer-note {
  text-align: center;
  font-size: 11px;
  color: #b0b7c3;
  padding: 5px 12px 9px;
  flex-shrink: 0;
}
#gc-footer-note a { color: #b0b7c3; text-decoration: underline; }

/* ── Mobile ──────────────────────────────────────── */
@media (max-width: 480px) {
  #gc-window {
    bottom: 0; right: 0;
    width: 100vw;
    max-width: 100vw;
    height: 100%;
    max-height: 100%;
    border-radius: 0;
    border: none;
  }
  #gc-bubble { bottom: 20px; right: 20px; }
}

/* ══════════════════════════════════════════════════
   IN-CHAT BOOKING PANEL  (v7.0)
══════════════════════════════════════════════════ */

#gc-booking-panel {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: #fff;
  border-top: 2px solid var(--gc-accent);
  display: flex;
  flex-direction: column;
  z-index: 10;
  max-height: 88%;
  border-radius: 0 0 var(--gc-radius) var(--gc-radius);
  box-shadow: 0 -4px 20px rgba(0,0,0,.10);
  animation: gc-slide-up .22s ease;
}
@keyframes gc-slide-up {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

#gc-booking-inner {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  flex: 1;
}

#gc-booking-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 16px 11px;
  border-bottom: 1px solid #eef0f3;
  flex-shrink: 0;
}
#gc-booking-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--gc-accent);
  letter-spacing: .01em;
}
#gc-booking-close {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  color: #94a3b8;
  line-height: 1;
  padding: 2px 4px;
  border-radius: 4px;
  transition: color .15s;
}
#gc-booking-close:hover { color: #e53e3e; }

#gc-booking-body {
  flex: 1;
  overflow-y: auto;
  padding: 14px 16px 4px;
}

.gc-bstep-label {
  font-size: 11.5px;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: .07em;
  margin: 0 0 8px;
}

/* Service selection buttons */
#gc-service-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.gc-svc-btn {
  width: 100%;
  text-align: left;
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 9px;
  padding: 11px 13px;
  cursor: pointer;
  transition: border-color .15s, background .15s;
  font-family: var(--gc-font);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.gc-svc-btn:hover  { border-color: var(--gc-accent); background: #f0f5ff; }
.gc-svc-btn.selected { border-color: var(--gc-accent); background: #f0f5ff; box-shadow: 0 0 0 2px rgba(26,60,107,.12); }
.gc-svc-name { font-size: 13px; font-weight: 600; color: #1e293b; line-height: 1.3; }
.gc-svc-meta { font-size: 11.5px; color: #64748b; white-space: nowrap; }

/* Date picker */
#gc-bdate {
  width: 100%;
  padding: 9px 12px;
  border: 1.5px solid #dde1e8;
  border-radius: 9px;
  font-size: 14px;
  font-family: var(--gc-font);
  outline: none;
  box-sizing: border-box;
  background: #f8f9fb;
  color: #111;
}
#gc-bdate:focus { border-color: var(--gc-accent); background: #fff; }

/* Slot grid */
.gc-slot-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 4px;
}
.gc-slot-btn {
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 7px;
  padding: 7px 12px;
  font-size: 12.5px;
  font-family: var(--gc-font);
  cursor: pointer;
  color: #334155;
  transition: border-color .15s, background .15s;
}
.gc-slot-btn:hover  { border-color: var(--gc-accent); background: #f0f5ff; }
.gc-slot-btn.selected { border-color: var(--gc-accent); background: var(--gc-accent); color: #fff; }

/* Step 3 — contact fields */
#gc-bstep-3 input,
#gc-bstep-3 select,
#gc-bstep-3 textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1.5px solid #dde1e8;
  border-radius: 9px;
  font-size: 13.5px;
  font-family: var(--gc-font);
  outline: none;
  box-sizing: border-box;
  background: #f8f9fb;
  color: #111;
  margin-bottom: 7px;
}
#gc-bstep-3 input:focus,
#gc-bstep-3 select:focus,
#gc-bstep-3 textarea:focus { border-color: var(--gc-accent); background: #fff; }
#gc-bstep-3 textarea { resize: vertical; min-height: 52px; }
.gc-brow { display: flex; gap: 7px; }
.gc-brow input { flex: 1; }

/* Footer buttons */
#gc-booking-footer {
  display: flex;
  gap: 8px;
  padding: 10px 16px 12px;
  border-top: 1px solid #eef0f3;
  flex-shrink: 0;
}
#gc-bback {
  background: #f1f5f9;
  border: none;
  border-radius: 8px;
  padding: 9px 14px;
  font-size: 13px;
  font-family: var(--gc-font);
  cursor: pointer;
  color: #475569;
  transition: background .15s;
}
#gc-bback:hover { background: #e2e8f0; }
#gc-bnext {
  flex: 1;
  background: var(--gc-accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 9px 14px;
  font-size: 13px;
  font-weight: 600;
  font-family: var(--gc-font);
  cursor: pointer;
  transition: background .15s;
}
#gc-bnext:hover    { background: var(--gc-accent-dark); }
#gc-bnext:disabled { opacity: .55; cursor: not-allowed; }

#gc-booking-error {
  font-size: 12px;
  color: #e53e3e;
  padding: 0 16px 8px;
  text-align: center;
  min-height: 18px;
  flex-shrink: 0;
}

/* Step 4 — confirmation card */
.gc-bconfirm {
  text-align: center;
  padding: 8px 0 12px;
}
.gc-bconfirm-icon    { font-size: 38px; line-height: 1; margin-bottom: 8px; }
.gc-bconfirm-heading { font-size: 15px; font-weight: 700; color: #1e293b; margin-bottom: 14px; }
.gc-bconfirm-details {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 9px;
  padding: 12px 14px;
  margin-bottom: 12px;
  text-align: left;
}
.gc-bconfirm-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  padding: 5px 0;
  border-bottom: 1px solid #f1f5f9;
  color: #334155;
}
.gc-bconfirm-row:last-child { border-bottom: none; }
.gc-bconfirm-row span { color: #64748b; }
.gc-bconfirm-note {
  font-size: 12px;
  color: #64748b;
  line-height: 1.5;
  margin-bottom: 12px;
}
.gc-bconfirm-pay {
  display: block;
  background: #0d9488;
  color: #fff;
  text-decoration: none;
  border-radius: 8px;
  padding: 9px 14px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 8px;
  transition: background .15s;
}
.gc-bconfirm-pay:hover { background: #0f766e; }
.gc-bconfirm-done {
  width: 100%;
  background: #f1f5f9;
  border: none;
  border-radius: 8px;
  padding: 9px 14px;
  font-size: 13px;
  font-family: var(--gc-font);
  cursor: pointer;
  color: #475569;
  transition: background .15s;
}
.gc-bconfirm-done:hover { background: #e2e8f0; }

/* ── Booking panel on mobile ── */
@media (max-width: 480px) {
  #gc-booking-panel { max-height: 90%; }
}


#gc-bubble { pointer-events: auto !important; z-index: 999999; }

#gc-bubble svg {
  pointer-events: none;
}