@charset "UTF-8";
:root {
  --gold: #C9A84C;
  --gold-light: #E8C96B;
  --navy: #0D1B2A;
  --navy2: #1B2E45;
  --text: #1a1a2e;
  --muted: #6b7280;
  --surface: #f8f8f6;
  --border: #e5e5e0;
}

* {
  font-family: "Inter", sans-serif;
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  overflow: hidden;
  background: #fff;
  color: var(--text);
}

/* ── Header ── */
#header {
  height: 56px;
  display: flex;
  align-items: center;
  padding: 0 20px;
  background: #fff;
  border-bottom: 1px solid var(--border);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  gap: 16px;
}

.logo-mark {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  width: 150px;
}

.logo-icon {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-text {
  font-weight: 800;
  font-size: 15px;
  color: var(--navy);
}

.header-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  padding-left: 16px;
  border-left: 1px solid var(--border);
}

.header-back {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
  margin-left: auto;
  padding: 6px 12px;
  border-radius: 8px;
  transition: all 0.2s;
}

.header-back:hover {
  background: var(--surface);
  color: var(--text);
}

/* ── Main layout ── */
#main {
  display: flex;
  height: calc(var(--real-vh, 100vh) - 56px);
  margin-top: 56px;
}

/* ── Chat panel (left) ── */
#chatPanel {
  width: 460px;
  min-width: 340px;
  flex-shrink: 0;
  height: 100%;
  min-height: 0; /* height:100% constrains children; min-height:0 lets flex shrink */
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--border);
  background: #fff;
  overflow: hidden; /* clip children to the panel bounds */
}

/* ── Recommendations panel (right) ── */
#recsPanel {
  flex: 1;
  overflow-y: auto;
  background: var(--surface);
  padding: 24px;
}

#recsPanel::-webkit-scrollbar {
  width: 4px;
}

#recsPanel::-webkit-scrollbar-thumb {
  background: #d1cfc6;
  border-radius: 2px;
}

.recs-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.recs-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--navy);
}

.recs-subtitle {
  font-size: 13px;
  color: var(--muted);
  margin-top: 2px;
}

.recs-count {
  background: rgba(201, 168, 76, 0.12);
  color: #7a5c10;
  border: 1px solid rgba(201, 168, 76, 0.25);
  font-size: 12px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 100px;
}

.recs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}

/* ── Rec card ── */
.rec-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.25s ease;
}

.rec-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.09);
  border-color: rgba(201, 168, 76, 0.3);
}

.rec-card-img {
  height: 140px;
  overflow: hidden;
  background: var(--surface);
  position: relative;
}

.rec-card-img img {
  width: 100%;
  height: 100%;
  -o-object-fit: cover;
     object-fit: cover;
  transition: transform 0.3s;
}

.rec-card:hover .rec-card-img img {
  transform: scale(1.04);
}

.rec-card-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(13, 27, 42, 0.8);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 100px;
  backdrop-filter: blur(6px);
}

.rec-card-body {
  padding: 12px 14px;
}

.rec-card-name {
  font-size: 14px;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 2px;
}

.rec-card-name span {
  color: var(--gold);
}

.rec-card-meta {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 8px;
}

.rec-card-price {
  font-size: 16px;
  font-weight: 900;
  color: var(--navy);
}

.rec-card-price .cur {
  font-size: 11px;
  color: var(--gold);
  font-weight: 700;
  margin-right: 1px;
}

.rec-card-btn {
  width: 100%;
  margin-top: 10px;
  background: var(--navy);
  color: #fff;
  border: none;
  border-radius: 7px;
  padding: 8px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  transition: background 0.2s;
}

.rec-card-btn:hover {
  background: var(--navy2);
}

/* ── Empty recs state ── */
.recs-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--muted);
}

.recs-empty-icon {
  font-size: 40px;
  margin-bottom: 16px;
}

.recs-empty h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}

.recs-empty p {
  font-size: 13px;
  line-height: 1.6;
}

/* ── Chat messages area ── */
#chatMessages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

#chatMessages::-webkit-scrollbar {
  width: 4px;
}

#chatMessages::-webkit-scrollbar-thumb {
  background: #d1cfc6;
  border-radius: 2px;
}

.msg-group {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
  align-items: flex-start;
}

.msg-group.user {
  flex-direction: row-reverse;
}

.msg-avatar {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.msg-avatar.ai {
  border-radius: 8px;
  overflow: hidden;
}

.msg-avatar.user {
  background: var(--navy);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.msg-bubble {
  max-width: 80%;
  padding: 12px 16px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.6;
}

.msg-bubble.ai {
  background: var(--surface);
  color: var(--text);
  border-radius: 4px 14px 14px 14px;
  border: 1px solid var(--border);
}

.msg-bubble.user {
  background: var(--navy);
  color: #fff;
  border-radius: 14px 4px 14px 14px;
}

.msg-bubble strong {
  font-weight: 700;
}

.msg-bubble em {
  font-style: italic;
  color: var(--muted);
}

.msg-bubble.user strong {
  color: var(--gold-light);
}

/* ── Typing indicator ── */
.typing-dots {
  display: flex;
  gap: 4px;
  align-items: center;
  padding: 4px 2px;
}

.typing-dot {
  width: 7px;
  height: 7px;
  background: var(--muted);
  border-radius: 50%;
  animation: typingBounce 1.4s infinite ease-in-out;
}

.typing-dot:nth-child(2) {
  animation-delay: 0.2s;
}

.typing-dot:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes typingBounce {
  0%, 60%, 100% {
    transform: translateY(0);
    opacity: 0.4;
  }
  30% {
    transform: translateY(-6px);
    opacity: 1;
  }
}
/* ── Suggestion chips ── */
.chips-wrap {
  padding: 0 20px 12px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.chip {
  background: #fff;
  border: 1.5px solid var(--border);
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 100px;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.chip:hover {
  border-color: var(--gold);
  color: #7a5c10;
  background: rgba(201, 168, 76, 0.05);
}

/* ── Chat input ── */
#chatInputArea {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
}

.chat-input-wrap {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  justify-content: center;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 14px;
  padding: 8px 8px 8px 14px;
  transition: all 0.2s;
}

.chat-input-wrap:focus-within {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201, 168, 76, 0.1);
  background: #fff;
}

#chatInput {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-size: 14px;
  color: var(--text);
  resize: none;
  max-height: 120px;
  min-height: 30px;
  line-height: 1.5;
  font-family: inherit;
}

#chatInput::-moz-placeholder {
  color: #9ca3af;
}

#chatInput::placeholder {
  color: #9ca3af;
}

#sendBtn {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  border: none;
  flex-shrink: 0;
  background: var(--navy);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

#sendBtn:hover {
  background: var(--navy2);
}

#sendBtn:disabled {
  background: #d1cfc6;
  cursor: not-allowed;
}

.input-hint {
  font-size: 11px;
  color: var(--muted);
  text-align: center;
  margin-top: 6px;
}

/* ── Toast ── */
#toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: var(--navy);
  color: #fff;
  border-radius: 10px;
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 600;
  transition: transform 0.3s ease;
  z-index: 999;
  white-space: nowrap;
}

#toast.show {
  transform: translateX(-50%) translateY(0);
}

/* ── Vehicle detail overlay ── */
#detailOverlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(10, 14, 26, 0.6);
  backdrop-filter: blur(8px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 24px;
  align-items: flex-start;
  justify-content: center;
}

#detailOverlay.active {
  display: flex;
}

@media (max-width: 620px) {
  #detailOverlay {
    padding: 12px 0 0;
    align-items: flex-end;
  }
  .detail-box {
    border-radius: 20px 20px 0 0;
    max-height: 92dvh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
}
.detail-box {
  background: #fff;
  border-radius: 20px;
  max-width: 780px;
  width: 100%;
  margin: auto;
  overflow: hidden;
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.2);
  animation: modalIn 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: scale(0.94) translateY(16px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}
.detail-header {
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.detail-make {
  font-size: 22px;
  font-weight: 900;
  color: var(--navy);
}

.detail-make span {
  color: var(--gold);
}

.detail-sub {
  font-size: 13px;
  color: var(--muted);
  margin-top: 3px;
}

.detail-close {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  transition: all 0.2s;
  flex-shrink: 0;
}

.detail-close:hover {
  background: #f0f0ee;
  color: var(--text);
}

.detail-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

@media (max-width: 620px) {
  .detail-body {
    grid-template-columns: 1fr;
  }
}
.detail-gallery {
  padding: 20px;
}

.detail-main-img {
  border-radius: 10px;
  overflow: hidden;
  height: 220px;
  background: var(--surface);
  margin-bottom: 8px;
}

.detail-main-img img {
  width: 100%;
  height: 100%;
  -o-object-fit: cover;
     object-fit: cover;
}

.detail-thumbs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
}

.detail-thumb {
  width: 60px;
  height: 44px;
  border-radius: 7px;
  overflow: hidden;
  border: 2px solid transparent;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s;
}

.detail-thumb.active, .detail-thumb:hover {
  border-color: var(--gold);
}

.detail-thumb img {
  width: 100%;
  height: 100%;
  -o-object-fit: cover;
     object-fit: cover;
}

.detail-info {
  padding: 20px;
  border-left: 1px solid var(--border);
}

.detail-price-box {
  background: var(--surface);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 16px;
}

.detail-price {
  font-size: 30px;
  font-weight: 900;
  color: var(--navy);
}

.detail-price .cur {
  font-size: 16px;
  color: var(--gold);
  font-weight: 700;
}

.detail-price-note {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

.detail-specs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-bottom: 14px;
}

.ds {
  background: var(--surface);
  border-radius: 7px;
  padding: 8px 10px;
}

.ds-l {
  font-size: 10px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.ds-v {
  font-size: 12px;
  font-weight: 700;
  color: var(--navy);
  margin-top: 2px;
}

.detail-desc {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 14px;
}

.detail-features {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 16px;
}

.detail-feature-chip {
  background: rgba(201, 168, 76, 0.1);
  color: #7a5c10;
  border: 1px solid rgba(201, 168, 76, 0.25);
  font-size: 10px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 100px;
}

.detail-actions {
  display: flex;
  gap: 8px;
}

.detail-btn-primary {
  flex: 1;
  background: var(--navy);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 10px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  transition: background 0.2s;
}

.detail-btn-primary:hover {
  background: var(--navy2);
}

.detail-btn-outline {
  flex: 1;
  background: transparent;
  border: 1.5px solid var(--border);
  color: var(--navy);
  border-radius: 8px;
  padding: 10px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  transition: all 0.2s;
}

.detail-btn-outline:hover {
  border-color: var(--gold);
  color: #7a5c10;
}

/* ── Test drive modal ── */
#tdModal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 600;
  background: rgba(10, 14, 26, 0.7);
  backdrop-filter: blur(8px);
  align-items: center;
  justify-content: center;
  padding: 20px;
}

#tdModal.active {
  display: flex;
}

.td-box {
  background: #fff;
  border-radius: 18px;
  max-width: 440px;
  width: 100%;
  padding: 28px;
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.2);
  animation: modalIn 0.3s ease;
}

.form-group {
  margin-bottom: 14px;
}

.form-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 5px;
}

.form-input, .form-textarea {
  width: 100%;
  background: #fff;
  border: 1.5px solid var(--border);
  color: var(--text);
  padding: 10px 13px;
  border-radius: 9px;
  font-size: 13px;
  font-family: inherit;
  outline: none;
  transition: all 0.2s;
}

.form-input:focus, .form-textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201, 168, 76, 0.1);
}

.form-input::-moz-placeholder, .form-textarea::-moz-placeholder {
  color: #d1d5db;
}

.form-input::placeholder, .form-textarea::placeholder {
  color: #d1d5db;
}

.form-textarea {
  resize: vertical;
  min-height: 70px;
}

.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* ── Mobile responsive ── */
@media (max-width: 900px) {
  #chatPanel {
    width: 100%;
    min-width: 0;
    border-right: none;
  }
  #recsPanel {
    display: none;
  }
  #recsPanel.mobile-show {
    display: block;
    position: fixed;
    inset: 56px 0 0 0;
    z-index: 80;
    overflow-y: auto;
  }
  /* Larger touch targets */
  #sendBtn {
    width: 42px;
    height: 42px;
  }
  .chip {
    padding: 8px 14px;
    font-size: 13px;
  }
  /* Hide "Press Enter to send" hint — wastes space on mobile */
  .input-hint {
    display: none;
  }
  /* Smooth scroll momentum on iOS */
  #chatMessages {
    -webkit-overflow-scrolling: touch;
  }
}
@media (max-width: 900px) {
  .mobile-recs-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text);
    cursor: pointer;
  }
}
.mobile-recs-btn {
  display: none;
}

/* ── Extra mobile tweaks ── */
@media (max-width: 480px) {
  .header-title {
    display: none;
  }
  .logo-mark {
    width: 120px;
  }
  .header-back {
    padding: 6px 8px;
  }
}
@media (max-width: 360px) {
  .mobile-recs-btn span#mobileRecsBtnLabel {
    display: none;
  }
}
/* ── Inline chat vehicle strip (mobile only) ── */
.chat-recs-strip {
  display: none;
  padding: 6px 20px 10px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  flex-direction: row;
  gap: 10px;
}

.chat-recs-strip::-webkit-scrollbar {
  display: none;
}

.chat-recs-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0 20px 4px;
  display: none;
}

@media (max-width: 900px) {
  .chat-recs-strip {
    display: flex;
  }
  .chat-recs-label {
    display: block;
  }
}
.chat-rec-thumb {
  flex-shrink: 0;
  width: 140px;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  background: #fff;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.chat-rec-thumb:active {
  transform: scale(0.97);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.chat-rec-img {
  height: 82px;
  overflow: hidden;
  background: var(--surface);
  position: relative;
}

.chat-rec-img img {
  width: 100%;
  height: 100%;
  -o-object-fit: cover;
     object-fit: cover;
}

.chat-rec-type {
  position: absolute;
  top: 5px;
  left: 5px;
  background: rgba(13, 27, 42, 0.75);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 100px;
  backdrop-filter: blur(4px);
}

.chat-rec-info {
  padding: 8px 10px 9px;
}

.chat-rec-name {
  font-size: 12px;
  font-weight: 800;
  color: var(--navy);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 1px;
}

.chat-rec-year {
  font-size: 10px;
  color: var(--muted);
  margin-bottom: 4px;
}

.chat-rec-price {
  font-size: 13px;
  font-weight: 900;
  color: var(--navy);
}

.chat-rec-price span {
  font-size: 10px;
  color: var(--gold);
  font-weight: 700;
  margin-right: 1px;
}/*# sourceMappingURL=chat.css.map */