/* iq-chat.css  v24  — Refined Premium Redesign */

/* ══ RESET ══════════════════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body.iq-body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 15px;
  line-height: 1.55;
  color: #1a2235;
  background: linear-gradient(135deg, #1a6dd0 0%, #2F80ED 100%);
  height: 100dvh;
  overflow: hidden;
}


/* ══ PAGE SHELL ═════════════════════════════════════════════════════ */
.iq-page {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
}


/* ══ LOGIN GATE ═════════════════════════════════════════════════════ */
.iq-gate {
  display: flex;
  justify-content: center;
  align-items: center;
  flex: 1;
  padding: 40px 20px;
}

.iq-gate__card {
  background: #fff;
  border-radius: 24px;
  padding: 48px 44px;
  max-width: 460px;
  width: 100%;
  text-align: center;
  box-shadow: 0 24px 80px rgba(0,0,0,0.35), 0 4px 16px rgba(0,0,0,0.10);
  animation: fadeInUp 0.5s cubic-bezier(0.22,1,0.36,1) forwards;
}

.iq-gate__icon { margin-bottom: 18px; line-height: 1; }

.iq-gate__title {
  font-size: 22px;
  font-weight: 800;
  color: #1a2235;
  margin-bottom: 10px;
  letter-spacing: -0.02em;
}

.iq-gate__sub {
  font-size: 14.5px;
  color: #6b7280;
  line-height: 1.65;
  margin-bottom: 28px;
}

.iq-gate__actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.iq-gate__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  border-radius: 12px;
  font-size: 14.5px;
  font-weight: 600;
  text-decoration: none;
  transition: all .2s ease;
}

.iq-gate__btn--primary {
  background: #2F80ED;
  color: #fff;
  box-shadow: 0 4px 14px rgba(47,128,237,.30);
}
.iq-gate__btn--primary:hover { background: #1a6dd0; transform: translateY(-2px); }
.iq-gate__btn--secondary { background: #f5f7fa; color: #1a2235; border: 1.5px solid #e0e5ed; }
.iq-gate__btn--secondary:hover { background: #eaeff5; transform: translateY(-2px); }

.iq-gate__note { font-size: 12.5px; color: #9ca3af; }
.iq-gate__note a { color: #2F80ED; text-decoration: none; }
.iq-gate__note a:hover { text-decoration: underline; }


/* ══ SPLIT LAYOUT ═══════════════════════════════════════════════════ */
.iq-split {
  display: grid;
  grid-template-columns: 440px 1fr;
  flex: 1;
  height: 100dvh;
  overflow: hidden;
  position: relative;
}


/* ══ LEFT PANEL ═════════════════════════════════════════════════════ */
.iq-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 130px 48px 36px;
  position: relative;
  overflow: hidden;
  background: linear-gradient(160deg, #1d78e0 0%, #2F80ED 45%, #1a6dd0 100%);
}

/* ── Floating orbs ── */
.iq-panel__orb {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}
.iq-panel__orb--1 {
  width: 300px; height: 300px;
  top: -80px; right: -100px;
  background: radial-gradient(circle, rgba(99,179,255,0.22) 0%, transparent 65%);
  animation: orbFloat 8s ease-in-out infinite;
}
.iq-panel__orb--2 {
  width: 250px; height: 250px;
  bottom: -50px; left: -60px;
  background: radial-gradient(circle, rgba(255,255,255,0.14) 0%, transparent 60%);
  animation: orbFloat 10s ease-in-out infinite reverse;
}
.iq-panel__orb--3 {
  width: 150px; height: 150px;
  top: 40%; left: 60%;
  background: radial-gradient(circle, rgba(147,197,255,0.15) 0%, transparent 55%);
  animation: orbFloat 7s ease-in-out 1s infinite;
}
@keyframes orbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50%      { transform: translate(12px, -18px) scale(1.08); }
}

/* ── Dot grid overlay ── */
.iq-panel__grid {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,0.07) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
  z-index: 0;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0) 60%);
  -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0) 60%);
}

.iq-panel__inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* ── Brand logo ── */
.iq-panel__brand { margin-bottom: 36px; }
.iq-panel__logo {
  height: 28px;
  width: auto;
  filter: brightness(0) invert(1);
  opacity: 0.85;
}

/* ── Eyebrow ── */
.iq-panel__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(255,255,255,0.55);
  margin-bottom: 14px;
  padding: 5px 14px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 99px;
  width: fit-content;
  backdrop-filter: blur(4px);
}

/* ── Headline ── */
.iq-panel__copy { margin-bottom: 32px; }
.iq-panel__title {
  font-size: 38px;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.10;
  letter-spacing: -0.035em;
  margin-bottom: 14px;
}
.iq-panel__sub {
  font-size: 15px;
  color: rgba(255,255,255,0.60);
  line-height: 1.65;
  max-width: 300px;
  font-weight: 400;
}

/* ── Stats row ── */
.iq-panel__stats {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 18px 22px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 16px;
  margin-bottom: 32px;
  backdrop-filter: blur(8px);
}
.iq-stat {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.iq-stat__num {
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
}
.iq-stat__label {
  font-size: 10.5px;
  font-weight: 500;
  color: rgba(255,255,255,0.45);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.iq-stat__divider {
  width: 1px;
  height: 32px;
  background: rgba(255,255,255,0.12);
  flex-shrink: 0;
}

/* ── How it works ── */
.iq-panel__how { display: flex; flex-direction: column; gap: 0; margin-bottom: 28px; }
.iq-how__label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(255,255,255,0.40);
  margin-bottom: 16px;
}
.iq-how__steps {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.iq-how__step {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  border-radius: 12px;
  transition: background .2s;
}
.iq-how__step:hover { background: rgba(255,255,255,0.06); }
.iq-how__num {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: rgba(255,255,255,0.85);
}
.iq-how__content { display: flex; flex-direction: column; gap: 1px; }
.iq-how__step-title {
  font-size: 13.5px;
  font-weight: 600;
  color: rgba(255,255,255,0.90);
}
.iq-how__step-sub {
  font-size: 11.5px;
  color: rgba(255,255,255,0.42);
  font-weight: 400;
}

/* ── Trust row ── */
.iq-panel__trust-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.iq-trust-avatars {
  display: flex;
  margin-right: -4px;
}
.iq-trust-av {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10.5px;
  font-weight: 700;
  color: #fff;
  border: 2px solid rgba(13,45,107,0.6);
  margin-left: -6px;
}
.iq-trust-av:first-child { margin-left: 0; }
.iq-trust-label {
  font-size: 12px;
  color: rgba(255,255,255,0.50);
  font-weight: 500;
}


/* ══ RIGHT PANEL — CHAT WRAP ════════════════════════════════════════ */
.iq-chat-wrap {
  background: linear-gradient(160deg, #1d78e0 0%, #2F80ED 45%, #1a6dd0 100%);
  display: flex;
  align-items: stretch;
  padding: 130px 28px 20px 16px;
  overflow: hidden;
  position: relative;
}/* Subtle noise texture */
.iq-chat-wrap::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
  z-index: 0;
  opacity: 0.5;
}

/* Bottom glow */
.iq-chat-wrap::after {
  content: '';
  position: absolute;
  bottom: -60px;
  left: 10%;
  right: 10%;
  height: 200px;
  background: radial-gradient(ellipse 100% 80% at 50% 100%, rgba(99,179,255,0.20) 0%, transparent 65%);
  filter: blur(30px);
  pointer-events: none;
  z-index: 0;
}


/* ══ CHAT CONTAINER ═════════════════════════════════════════════════ */
.iq-chat-container {
  background: #ffffff;
  border-radius: 24px;
  box-shadow:
    0 40px 120px rgba(0,0,0,0.28),
    0 12px 40px rgba(0,0,0,0.12),
    inset 0 1px 0 rgba(255,255,255,1);
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  position: relative;
  z-index: 1;
  animation: fadeInUp 0.5s cubic-bezier(0.22,1,0.36,1) forwards;
  border: 1px solid rgba(255,255,255,0.9);
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(28px) scale(0.99); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}


/* ── Chat header ── */
.iq-chat-container__header {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 16px 20px;
  border-bottom: 1px solid #f0f3f8;
  background: linear-gradient(to bottom, #ffffff 0%, #f9fbff 100%);
  flex-shrink: 0;
}

.iq-chat-container__avatar {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #2F80ED 0%, #1558a8 100%);
  border-radius: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(47,128,237,.35), 0 1px 3px rgba(0,0,0,.1);
}

.iq-chat-container__info { flex: 1; min-width: 0; }

.iq-chat-container__name {
  font-size: 14.5px;
  font-weight: 700;
  color: #0d1117;
  letter-spacing: -0.02em;
}

.iq-chat-container__sub {
  font-size: 11.5px;
  color: #9ca3af;
  margin-top: 1px;
  font-weight: 400;
}

.iq-chat-container__status {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 600;
  color: #16a34a;
  background: rgba(22,163,74,.07);
  padding: 5px 12px;
  border-radius: 99px;
  flex-shrink: 0;
  border: 1px solid rgba(22,163,74,.12);
}

.iq-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #16a34a;
  animation: statusPulse 2.4s ease-in-out infinite;
}

@keyframes statusPulse {
  0%, 100% { opacity: 1; transform: scale(1); box-shadow: 0 0 0 0 rgba(22,163,74,.4); }
  50%       { opacity: .7; transform: scale(1.3); box-shadow: 0 0 0 4px rgba(22,163,74,0); }
}


/* ══ PROGRESS BAR ═══════════════════════════════════════════════════ */
.iqc-progress {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 20px;
  background: #f8faff;
  border-bottom: 1px solid #eef1f8;
  flex-shrink: 0;
}

.iqc-progress[hidden] { display: none !important; }

.iqc-progress__label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #6b7280;
  min-width: 72px;
  white-space: nowrap;
}

.iqc-progress__pct {
  font-size: 11px;
  font-weight: 700;
  color: #2F80ED;
  min-width: 32px;
  text-align: right;
}

.iqc-progress__bar {
  flex: 1;
  height: 4px;
  background: #e8edf5;
  border-radius: 999px;
  overflow: hidden;
}

.iqc-progress__fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #2F80ED, #60a5fa);
  border-radius: 999px;
  transition: width .5s cubic-bezier(0.22,1,0.36,1);
  box-shadow: 0 0 8px rgba(47,128,237,.4);
}


/* ══ CHAT FEED ══════════════════════════════════════════════════════ */
.iqc-feed {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 24px 20px 12px;
  display: flex;
  flex-direction: column;
  gap: 0;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  background: linear-gradient(to bottom, #ffffff 0%, #f8fbff 100%);
}

.iqc-feed::-webkit-scrollbar { width: 4px; }
.iqc-feed::-webkit-scrollbar-track { background: transparent; }
.iqc-feed::-webkit-scrollbar-thumb { background: #dde3ef; border-radius: 99px; }
.iqc-feed::-webkit-scrollbar-thumb:hover { background: #b8c2d4; }


/* ── Chat rows ── */
.iqc-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  animation: msgIn .32s cubic-bezier(0.22,1,0.36,1) forwards;
  margin-bottom: 16px;
  width: 100%;
}

@keyframes msgIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.iqc-row--ai   { align-self: flex-start; max-width: 82%; }
.iqc-row--user { align-self: flex-end;   max-width: 62%; flex-direction: row-reverse; gap: 0; }

/* AI avatar */
.iqc-avatar {
  width: 30px;
  height: 30px;
  background: linear-gradient(135deg, #2F80ED, #1558a8);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
  box-shadow: 0 3px 10px rgba(47,128,237,.28);
}

.iqc-avatar-letter {
  font-size: 11px;
  font-weight: 800;
  color: #fff;
  line-height: 1;
  letter-spacing: -0.02em;
}

/* Message groups */
.iqc-group {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 0;
  flex: 1;
}

/* ── Bubbles ── */
.iqc-bubble {
  font-size: 14px;
  line-height: 1.75;
  word-break: break-word;
}

/* AI: premium light bubble */
.iqc-bubble--ai {
  background: #f5f7fc;
  color: #1f2937;
  padding: 12px 16px;
  border-radius: 4px 16px 16px 16px;
  display: inline-block;
  margin-bottom: 5px;
  border: 1px solid #eaecf4;
  box-shadow: 0 1px 4px rgba(0,0,0,.04);
}

/* User: rich blue bubble */
.iqc-bubble--user {
  background: linear-gradient(135deg, #2F80ED 0%, #1a6dd0 100%);
  color: #ffffff;
  border-radius: 16px 16px 4px 16px;
  padding: 11px 17px;
  font-size: 14px;
  display: inline-block;
  box-shadow: 0 4px 16px rgba(47,128,237,.30), 0 1px 3px rgba(47,128,237,.15);
}

.iqc-bubble strong { font-weight: 600; }
.iqc-bubble--ai strong { color: #111827; }
.iqc-bubble--user strong { color: #fff; }

.iqc-hint {
  font-size: 12px;
  color: #9ca3af;
  margin-top: 4px;
  display: block;
  font-style: italic;
}


/* ── Typing indicator ── */
.iqc-typing { animation: msgIn .25s ease forwards; }

.iqc-typing__dots {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #f5f7fc;
  padding: 12px 16px;
  border-radius: 4px 16px 16px 16px;
  border: 1px solid #eaecf4;
  box-shadow: 0 1px 4px rgba(0,0,0,.04);
}

.iqc-typing__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #2F80ED;
  animation: typingBounce 1.4s ease-in-out infinite;
  opacity: 0.4;
}
.iqc-typing__dot:nth-child(2) { animation-delay: .2s; }
.iqc-typing__dot:nth-child(3) { animation-delay: .4s; }

@keyframes typingBounce {
  0%, 80%, 100% { transform: translateY(0);    opacity: .3; }
  40%           { transform: translateY(-5px); opacity: 1; }
}


/* ══ CHIPS / SERVICE PILLS ══════════════════════════════════════════ */
.iqc-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 2px 0 16px 40px;
  animation: msgIn .3s ease .06s both;
}

.iqc-chips--services {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  padding: 4px 0 16px 40px;
  animation: msgIn .3s ease .06s both;
}

.iqc-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: #ffffff;
  border: 1.5px solid #e8edf6;
  border-radius: 12px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  cursor: pointer;
  transition: all .22s cubic-bezier(0.22,1,0.36,1);
  white-space: nowrap;
  box-shadow: 0 1px 4px rgba(0,0,0,.05), 0 1px 2px rgba(0,0,0,.03);
  letter-spacing: -0.01em;
}

.iqc-chip:hover {
  background: linear-gradient(135deg, #EBF3FF, #dbeafe);
  border-color: #2F80ED;
  color: #1558a8;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(47,128,237,.18);
}

.iqc-chip:active { transform: translateY(0) scale(0.98); }

.iqc-chip--service {
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 16px;
  white-space: normal;
  background: #ffffff;
  border: 1.5px solid #e8edf6;
  box-shadow: 0 2px 8px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.03);
}

.iqc-chip--service:hover {
  background: linear-gradient(145deg, #f0f6ff, #e8f0fe);
  border-color: #2F80ED;
  transform: translateY(-3px);
  box-shadow: 0 10px 28px rgba(47,128,237,.20);
}

.iqc-chip__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  background: linear-gradient(135deg, #EBF3FF, #dbeafe);
  border-radius: 10px;
  flex-shrink: 0;
  color: #2F80ED;
  transition: all .22s ease;
}

.iqc-chip--service:hover .iqc-chip__icon {
  background: linear-gradient(135deg, #2F80ED, #1a6dd0);
  color: #fff;
}

.iqc-chip__label { font-size: 13px; font-weight: 600; color: inherit; letter-spacing: -0.01em; }
.iqc-chip__sub   { font-size: 11px; color: #9ca3af; font-weight: 400; margin-top: 1px; display: block; }

.iqc-chip--primary {
  background: linear-gradient(135deg, #2F80ED, #1a6dd0);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 14px rgba(47,128,237,.28);
}
.iqc-chip--primary .iqc-chip__label { color: #fff; }
.iqc-chip--primary:hover { background: linear-gradient(135deg, #1a6dd0, #1558a8); box-shadow: 0 8px 22px rgba(47,128,237,.38); }

.iqc-chip--selected { background: linear-gradient(135deg, #EBF3FF, #dbeafe); border-color: #2F80ED; color: #1558a8; }
.iqc-chip--selected .iqc-chip__label { color: #1558a8; }


/* ══ QUOTE CARD ═════════════════════════════════════════════════════ */
.iqc-qcard {
  background: #fff;
  border: 1px solid #e4e8f4;
  border-radius: 20px;
  overflow: hidden;
  animation: msgIn .35s cubic-bezier(0.22,1,0.36,1) forwards;
  box-shadow:
    0 8px 32px rgba(0,0,0,.08),
    0 2px 8px rgba(0,0,0,.04);
  margin-bottom: 10px;
}

.iqc-qcard__top {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  background: linear-gradient(135deg, #EFF6FF 0%, #DBEAFE 100%);
  border-bottom: 1px solid #BFDBFE;
}

.iqc-qcard__icon   { font-size: 30px; line-height: 1; }
.iqc-qcard__meta   { flex: 1; min-width: 0; }
.iqc-qcard__svc    { font-size: 14px; font-weight: 700; color: #1e40af; letter-spacing: -0.01em; }
.iqc-qcard__est    { font-size: 11px; color: #3b82f6; margin-top: 2px; }
.iqc-qcard__price  { font-size: 28px; font-weight: 800; color: #1e40af; letter-spacing: -0.04em; }

.iqc-qcard__breakdown { padding: 16px 20px; }

.iqc-qcard__breakdown-title {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .09em;
  color: #9ca3af;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid #f0f3f8;
}

.iqc-qcard__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13.5px;
  padding: 6px 0;
  border-bottom: 1px solid #f5f7fb;
}
.iqc-qcard__row:last-child { border-bottom: none; }
.iqc-qcard__row--base span:first-child { font-weight: 500; color: #374151; }
.iqc-qcard__row--base span:last-child  { font-weight: 700; color: #1e40af; }
.iqc-qcard__row--mod  span:last-child  { color: #d97706; font-weight: 600; }
.iqc-qcard__row--addon span:last-child { color: #059669; font-weight: 600; }
.iqc-qcard__row--note { color: #9ca3af; font-size: 12px; font-style: italic; }

.iqc-qcard__row--total {
  font-size: 15px;
  font-weight: 800;
  color: #111827;
  padding-top: 12px;
  margin-top: 6px;
  border-top: 2px solid #e8ecf5;
  border-bottom: none;
  letter-spacing: -0.01em;
}
.iqc-qcard__row--total span:last-child { color: #1e40af; font-size: 18px; }
.iqc-qcard__row--total em { font-size: 11px; font-weight: 400; color: #9ca3af; font-style: normal; }

.iqc-qcard__perks {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding: 12px 20px 14px;
  border-top: 1px solid #f0f3f8;
}

.iqc-qcard__perk {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 500;
  color: #15803d;
  background: #f0fdf4;
  padding: 4px 10px;
  border-radius: 8px;
  border: 1px solid #bbf7d0;
}

.iqc-qcard__actions {
  display: flex;
  gap: 9px;
  padding: 0 20px 16px;
  flex-wrap: wrap;
}

.iqc-qcard__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 12px 20px;
  border: none;
  border-radius: 13px;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all .22s cubic-bezier(0.22,1,0.36,1);
  letter-spacing: -0.01em;
}

.iqc-qcard__btn--book {
  flex: 1;
  background: linear-gradient(135deg, #2F80ED 0%, #1a6dd0 100%);
  color: #fff;
  box-shadow: 0 6px 20px rgba(47,128,237,.30);
}
.iqc-qcard__btn--book:hover { background: linear-gradient(135deg, #1a6dd0, #1558a8); transform: translateY(-2px); box-shadow: 0 10px 28px rgba(47,128,237,.38); }
.iqc-qcard__btn--modify { background: #f5f7fa; color: #374151; border: 1.5px solid #e4e8f0; }
.iqc-qcard__btn--modify:hover { background: #eaeff7; transform: translateY(-2px); }
.iqc-qcard__footnote { text-align: center; font-size: 11px; color: #b0bbc9; padding: 0 20px 16px; }


/* ══ MODIFY PANEL ═══════════════════════════════════════════════════ */
.iqc-modify-panel { border-top: 2px solid #edf0f8; background: #f8faff; }
.iqc-modify-panel[hidden] { display: none !important; }

.iqc-modify__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 20px;
  border-bottom: 1px solid #edf0f8;
}

.iqc-modify__title { font-size: 13.5px; font-weight: 700; color: #0d1117; letter-spacing: -0.01em; }

.iqc-modify__close {
  background: none;
  border: none;
  font-size: 20px;
  color: #9ca3af;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 8px;
  transition: all .15s;
}
.iqc-modify__close:hover { background: #fee2e2; color: #ef4444; }

.iqc-modify__body { padding: 12px 20px; }

.iqc-modify__section-title {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .09em;
  color: #9ca3af;
  margin: 12px 0 6px;
}
.iqc-modify__section-title:first-child { margin-top: 0; }

.iqc-modify__row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  cursor: pointer;
  font-size: 13px;
}
.iqc-modify__row:hover { color: #2F80ED; }
.iqc-modify__chk { accent-color: #2F80ED; width: 15px; height: 15px; cursor: pointer; }
.iqc-modify__row-label { flex: 1; color: #374151; }
.iqc-modify__row-price { font-weight: 600; color: #059669; white-space: nowrap; }

.iqc-modify__radio-group { display: flex; flex-direction: column; }
.iqc-modify__radio-row { display: flex; align-items: center; gap: 10px; padding: 7px 0; cursor: pointer; font-size: 13px; }
.iqc-modify__radio-row input[type="radio"] { accent-color: #2F80ED; width: 15px; height: 15px; cursor: pointer; }

.iqc-modify__footer { display: flex; gap: 9px; padding: 13px 20px; border-top: 1px solid #edf0f8; }

.iqc-modify__apply {
  flex: 1;
  padding: 11px;
  background: linear-gradient(135deg, #2F80ED, #1a6dd0);
  color: #fff;
  border: none;
  border-radius: 11px;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all .2s ease;
  box-shadow: 0 4px 14px rgba(47,128,237,.25);
}
.iqc-modify__apply:hover { background: linear-gradient(135deg, #1a6dd0, #1558a8); transform: translateY(-1px); }

.iqc-modify__restart {
  padding: 11px 16px;
  background: #fff;
  color: #6b7280;
  border: 1.5px solid #e4e8f0;
  border-radius: 11px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s;
}
.iqc-modify__restart:hover { background: #fef2f2; color: #ef4444; border-color: #fecaca; }


/* ══ INPUT BAR ══════════════════════════════════════════════════════ */
.iq-chat-container__input {
  padding: 12px 16px 10px;
  border-top: 1px solid #f0f3f8;
  background: #fafbfd;
  flex-shrink: 0;
  border-radius: 0 0 24px 24px;
}

.iqc-input-wrap {
  display: flex;
  align-items: flex-end;
  gap: 9px;
  background: #fff;
  border: 1.5px solid #e4e8f4;
  border-radius: 16px;
  padding: 9px 9px 9px 16px;
  transition: border-color .2s, box-shadow .2s;
  box-shadow: 0 2px 8px rgba(0,0,0,.05);
}

.iqc-input-wrap:focus-within {
  border-color: #2F80ED;
  box-shadow: 0 0 0 4px rgba(47,128,237,.10), 0 2px 8px rgba(0,0,0,.05);
}

.iqc-input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-family: inherit;
  font-size: 14.5px;
  color: #1a2235;
  resize: none;
  max-height: 110px;
  min-height: 22px;
  line-height: 1.55;
  overflow-y: auto;
}

.iqc-input::placeholder { color: #c0ccdb; font-weight: 400; }

/* Legacy alias */
.iqc-bar__input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-family: inherit;
  font-size: 14.5px;
  color: #1a2235;
  resize: none;
  max-height: 110px;
  min-height: 22px;
  line-height: 1.55;
  overflow-y: auto;
}
.iqc-bar__input::placeholder { color: #c0ccdb; }

.iqc-send-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, #2F80ED, #1a6dd0);
  border: none;
  border-radius: 50%;
  color: #fff;
  cursor: pointer;
  flex-shrink: 0;
  transition: all .22s cubic-bezier(0.22,1,0.36,1);
  box-shadow: 0 4px 14px rgba(47,128,237,.30);
}

.iqc-send-btn:hover:not(:disabled) { background: linear-gradient(135deg, #1a6dd0, #1558a8); transform: translateY(-1px) scale(1.05); box-shadow: 0 6px 18px rgba(47,128,237,.38); }
.iqc-send-btn:active:not(:disabled) { transform: translateY(0) scale(0.97); }
.iqc-send-btn:disabled { background: #dde3ef; box-shadow: none; cursor: default; }

/* Legacy alias */
.iqc-bar__send {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, #2F80ED, #1a6dd0);
  border: none;
  border-radius: 50%;
  color: #fff;
  cursor: pointer;
  flex-shrink: 0;
  transition: all .22s ease;
  box-shadow: 0 4px 14px rgba(47,128,237,.30);
}
.iqc-bar__send:hover:not(:disabled) { background: linear-gradient(135deg, #1a6dd0, #1558a8); transform: translateY(-1px); }
.iqc-bar__send:disabled { background: #dde3ef; cursor: default; }

.iq-chat-container__hint {
  text-align: center;
  font-size: 10.5px;
  color: #c8d2de;
  margin-top: 7px;
  font-weight: 400;
}
.iq-chat-container__hint a { color: #c8d2de; text-decoration: none; }
.iq-chat-container__hint a:hover { color: #9ca3af; text-decoration: underline; }


/* ══ BOOKING MODAL ══════════════════════════════════════════════════ */
.iqbm-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0,0,0,.55);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  backdrop-filter: blur(6px);
  padding: 0;
  animation: overlayIn .2s ease forwards;
}

.iqbm-overlay[hidden] { display: none !important; }

@keyframes overlayIn { from { opacity: 0; } to { opacity: 1; } }

.iqbm-panel {
  background: #fff;
  border-radius: 24px 24px 0 0;
  width: 100%;
  max-width: 620px;
  max-height: 94dvh;
  overflow-y: auto;
  animation: panelSlideUp .3s cubic-bezier(0.22,1,0.36,1) forwards;
}

@keyframes panelSlideUp {
  from { transform: translateY(30px); opacity: .6; }
  to   { transform: translateY(0);    opacity: 1; }
}

@media (min-width: 640px) {
  .iqbm-overlay { align-items: center; padding: 20px; }
  .iqbm-panel { border-radius: 22px; max-height: 92dvh; }
}

.iqbm-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 20px 20px 14px;
  border-bottom: 1px solid #f0f2f5;
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 1;
  border-radius: 24px 24px 0 0;
}

.iqbm-header__left { display: flex; align-items: center; gap: 12px; }

.iqbm-header__icon {
  width: 40px;
  height: 40px;
  background: #eff6ff;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #2563eb;
  flex-shrink: 0;
}

.iqbm-header__title { font-size: 17px; font-weight: 700; color: #1a2235; margin-bottom: 2px; letter-spacing: -0.01em; }
.iqbm-header__sub   { font-size: 12.5px; color: #6b7280; }

.iqbm-close {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f5f7fa;
  border: none;
  border-radius: 50%;
  color: #6b7280;
  cursor: pointer;
  flex-shrink: 0;
  transition: all .15s;
}
.iqbm-close:hover { background: #fee2e2; color: #ef4444; }

.iqbm-quote-bar {
  padding: 11px 20px;
  background: linear-gradient(135deg, #eff6ff, #dbeafe);
  font-size: 12.5px;
  font-weight: 600;
  color: #1e40af;
  border-bottom: 1px solid #bfdbfe;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.iqbm-quote-bar__item  { white-space: nowrap; }
.iqbm-quote-bar__price { margin-left: auto; font-weight: 800; font-size: 14.5px; }

.iqbm-body { padding: 20px; }

.iqbm-row      { display: flex; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.iqbm-field    { flex: 1; min-width: 150px; display: flex; flex-direction: column; gap: 4px; }
.iqbm-field--grow { flex: 2; }
.iqbm-field--unit { flex: 0 0 100px; }
.iqbm-field--full { flex: 1 1 100%; }

.iqbm-label      { font-size: 12.5px; font-weight: 600; color: #374151; }
.iqbm-label--opt { font-weight: 400; color: #9ca3af; }

.iqbm-input {
  width: 100%;
  padding: 9px 13px;
  border: 1.5px solid #e0e5ed;
  border-radius: 10px;
  font-family: inherit;
  font-size: 14px;
  color: #1a2235;
  background: #fff;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
  -webkit-appearance: none;
  appearance: none;
}

.iqbm-input:focus { border-color: #2F80ED; box-shadow: 0 0 0 3px rgba(47,128,237,.10); }

.iqbm-input--error {
  border-color: #ef4444 !important;
  box-shadow: 0 0 0 3px rgba(239,68,68,.10) !important;
}

.iqbm-select {
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 15px;
  padding-right: 32px;
}

.iqbm-textarea    { resize: vertical; min-height: 68px; }
.iqbm-field-error { font-size: 11px; color: #ef4444; min-height: 14px; }

.iqbm-error-banner {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 10px;
  padding: 11px 14px;
  font-size: 13px;
  color: #b91c1c;
  margin-bottom: 12px;
}
.iqbm-error-banner[hidden] { display: none !important; }

.iqbm-actions { display: flex; flex-direction: column; align-items: center; gap: 10px; }

.iqbm-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 13px;
  background: linear-gradient(135deg, #2F80ED, #1a6dd0);
  color: #fff;
  border: none;
  border-radius: 13px;
  font-size: 14.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all .2s ease;
  box-shadow: 0 4px 14px rgba(47,128,237,.25);
}
.iqbm-submit:hover:not(:disabled) { background: linear-gradient(135deg, #1a6dd0, #1558a8); transform: translateY(-2px); }
.iqbm-submit:disabled { opacity: .55; cursor: default; transform: none; box-shadow: none; }

.iqbm-submit__spinner { display: flex; align-items: center; }
.iqbm-submit__spinner[hidden] { display: none !important; }
.iqbm-submit__spinner svg { animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.iqbm-secure-note { display: flex; align-items: center; gap: 5px; font-size: 11.5px; color: #9ca3af; }


/* ══ RESPONSIVE ═════════════════════════════════════════════════════ */
@media (max-width: 960px) {
  .iq-page  { overflow: hidden; }
  .iq-split { grid-template-columns: 1fr; height: 100dvh; overflow: hidden; }
  .iq-panel { display: none; }
  .iq-chat-wrap {
    padding: 92px 16px 16px;
    height: 100%;
    min-height: unset;
    align-items: stretch;
  }
  .iq-chat-container {
    height: 100%;
    border-radius: 16px;
  }
}

@media (max-width: 600px) {
  .iq-page  { overflow: hidden; }
  .iq-split { height: 100dvh; }
  .iq-chat-wrap { padding: 88px 10px 10px; }

  .iq-chat-container {
    height: 100%;
    border-radius: 14px;
  }

  .iq-chat-container__header { padding: 12px 14px; }
  .iq-chat-container__avatar { width: 32px; height: 32px; border-radius: 9px; }
  .iq-chat-container__name   { font-size: 13px; }
  .iq-chat-container__status { font-size: 11px; padding: 4px 10px; }

  .iqc-feed { padding: 14px 12px 6px; }
  .iqc-row--user { max-width: 85%; }

  .iq-chat-container__input { padding: 8px 10px 6px; border-radius: 0 0 14px 14px; }
  .iqc-input-wrap { padding: 6px 6px 6px 12px; border-radius: 11px; }

  .iqc-chips { padding-left: 0; }
  .iqc-chips--services { padding-left: 0; }
  .iqc-chip { font-size: 12px; padding: 6px 13px; }

  .iq-gate__card { padding: 32px 20px; border-radius: 18px; }

  .iqc-qcard__top       { padding: 14px 14px; }
  .iqc-qcard__breakdown { padding: 12px 14px; }
  .iqc-qcard__actions   { padding: 0 14px 12px; flex-direction: column; }
  .iqc-qcard__perks     { padding: 8px 14px; }
}

@media (max-width: 380px) {
  .iqc-chip { font-size: 11.5px; padding: 5px 11px; }
}
