/* Carpart Inquiry Popup — Autofun Gast Cache */
#inq-overlay {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: grid;
  place-items: end center;
  padding: 0;
}
#inq-overlay[hidden] { display: none !important; }
body.inq-open { overflow: hidden; }

.inq-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(12, 35, 64, 0.45);
  backdrop-filter: blur(2px);
}

.inq-sheet {
  position: relative;
  z-index: 1;
  width: min(560px, 100%);
  max-height: min(92vh, 900px);
  margin: 0;
  background: #fff;
  border-radius: 18px 18px 0 0;
  box-shadow: 0 -8px 40px rgba(15, 23, 42, 0.2);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding-bottom: env(safe-area-inset-bottom, 0);
}

@media (min-width: 720px) {
  #inq-overlay { place-items: center; padding: 1rem; }
  .inq-sheet {
    border-radius: 16px;
    max-height: min(86vh, 820px);
  }
}

.inq-head {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem 1.1rem 0.75rem;
  background: linear-gradient(180deg, #133456, #0c2340);
  color: #fff;
}
.inq-head h2 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 800;
}
.inq-sub {
  margin: 0.2rem 0 0;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.7);
}
.inq-x {
  border: 0;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  font-size: 1.4rem;
  cursor: pointer;
  line-height: 1;
}

.inq-vehicle {
  padding: 0.65rem 1rem;
  background: #f1f5f9;
  border-bottom: 1px solid #e2e8f0;
  font-size: 0.85rem;
  color: #475569;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.inq-pill {
  display: inline-block;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  padding: 0.25rem 0.7rem;
  font-weight: 700;
  color: #0c2340;
  font-size: 0.8rem;
}
.inq-reset {
  border: 0;
  background: transparent;
  color: #f85a00;
  font-weight: 700;
  font-size: 0.78rem;
  cursor: pointer;
}

.inq-chat {
  flex: 1;
  overflow-y: auto;
  padding: 0.85rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  background: #f8fafc;
  min-height: 180px;
}
.inq-msg {
  max-width: 95%;
  padding: 0.65rem 0.8rem;
  border-radius: 12px;
  font-size: 0.9rem;
  line-height: 1.4;
}
.inq-msg--bot {
  align-self: flex-start;
  background: #fff;
  border: 1px solid #e2e8f0;
  color: #0f172a;
}
.inq-msg--user {
  align-self: flex-end;
  background: #0c2340;
  color: #fff;
  font-weight: 600;
}
.inq-hint { color: #64748b; font-size: 0.82rem; }
.inq-meta { margin: 0 0 0.5rem; color: #64748b; font-size: 0.75rem; }

.inq-products { display: flex; flex-direction: column; gap: 0.5rem; }
.inq-prod {
  display: flex;
  gap: 0.65rem;
  justify-content: space-between;
  padding: 0.65rem;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
}
.inq-prod__brand {
  margin: 0;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #f85a00;
}
.inq-prod h3 {
  margin: 0.15rem 0;
  font-size: 0.92rem;
  color: #0c2340;
}
.inq-prod__detail { margin: 0; font-size: 0.78rem; color: #64748b; }
.inq-prod__side { text-align: right; flex-shrink: 0; }
.inq-prod__vk {
  display: block;
  font-size: 1.05rem;
  color: #f85a00;
  font-variant-numeric: tabular-nums;
}
.inq-prod__vk-label {
  display: block;
  font-size: 0.65rem;
  color: #94a3b8;
  margin-bottom: 0.35rem;
}
.inq-add {
  border: 0;
  background: #0c2340;
  color: #fff;
  font-weight: 700;
  font-size: 0.75rem;
  padding: 0.35rem 0.55rem;
  border-radius: 8px;
  cursor: pointer;
  min-height: 34px;
}

.inq-suggest {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding: 0.5rem 1rem;
  border-top: 1px solid #e2e8f0;
  background: #fff;
  max-height: 140px;
  overflow-y: auto;
}
.inq-suggest__item {
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  border-radius: 999px;
  padding: 0.4rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: #0c2340;
  cursor: pointer;
}
.inq-suggest__item:hover {
  border-color: #f85a00;
  color: #f85a00;
}

.inq-compose {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-top: 1px solid #e2e8f0;
  background: #fff;
}
.inq-compose input {
  flex: 1;
  min-height: 46px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 0.55rem 0.85rem;
  font: inherit;
  font-size: 0.95rem;
}
.inq-compose input:focus {
  outline: 2px solid rgba(248, 90, 0, 0.35);
  border-color: #f85a00;
}
.inq-send {
  border: 0;
  background: #f85a00;
  color: #fff;
  font-weight: 800;
  padding: 0 1rem;
  border-radius: 12px;
  cursor: pointer;
  min-height: 46px;
}

.inq-cart {
  border-top: 1px solid #e2e8f0;
  background: #0c2340;
  color: #fff;
  padding: 0.65rem 1rem 0.85rem;
  max-height: 140px;
  overflow-y: auto;
}
.inq-cart__head {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  margin-bottom: 0.4rem;
}
.inq-cart__head span { color: #f85a00; font-weight: 800; }
.inq-cart ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.inq-cart li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  padding: 0.25rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.inq-cart li button {
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.6);
  font-size: 1.1rem;
  cursor: pointer;
}
