/* =========================================================
   NEOD Book A Ride — Full Styles (Panel + Map + Suggest)
   ========================================================= */

/* ---------------- Layout ---------------- */
.neod-wrap {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 18px;
  align-items: start;
  font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica, Arial;
}
@media (max-width: 980px) {
  .neod-wrap { grid-template-columns: 1fr; }
}

/* ---------------- Left Panel ---------------- */
.neod-panel {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 14px 16px 16px;
  box-shadow: 0 4px 16px rgba(0,0,0,.05);
}

/* === 输入区 === */
.neod-inputs {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 48px;
  grid-template-rows: auto auto;
  column-gap: 12px;
  row-gap: 12px;
  align-items: center;
  margin-top: 0;
}
.neod-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  grid-column: 1;
  position: relative; /* 让下拉定位到输入框 */
}
.neod-field label {
  font-size: 13px;
  color: #374151;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}
.neod-field input {
  width: 100%;
  height: 50px;
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  font-size: 16px;
  color: #111;
  background: #fff;
}
.neod-field input::placeholder { color: #9aa3b2; }
.neod-field input:focus {
  border-color: #b7c7ff;
  box-shadow: 0 0 0 3px rgba(70,114,255,.12);
  outline: 0;
}

/* === S/D 图标样式 === */
.neod-pin {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  aspect-ratio: 1/1;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 800;
  color: #fff;
  line-height: 1;
  box-shadow: 0 0 0 2px #fff inset, 0 1px 3px rgba(0,0,0,.08);
}
.neod-pin-s { background: #22c55e; }
.neod-pin-d { background: #2563eb; }

/* === SWAP 按钮 === */
.neod-swap-btn {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(calc(-50% + 16px));
  width: 46px;
  height: 46px;
  border-radius: 999px;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  color: #111;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 18px rgba(0,0,0,.14);
  cursor: pointer;
  transition: transform .12s ease, box-shadow .2s ease, background-color .2s ease;
}
.neod-swap-btn:hover { background: #eef1f5; transform: translateY(calc(-50% + 15px)); }
.neod-swap-btn:active { transform: translateY(calc(-50% + 16px)); }
.neod-swap-btn svg { width: 20px; height: 20px; display: block; }
.neod-swap-btn svg path {
  stroke: #111; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; fill: none;
}
@media (max-width: 560px) { .neod-swap-btn { transform: translateY(calc(-50% + 14px)); } }

/* === Realtime Traffic 开关 === */
.neod-toggle-row { display: flex; justify-content: flex-end; align-items: center; margin: 8px 0 12px; }
.neod-toggle { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; user-select: none; }
.neod-toggle input { display: none; }
.neod-slider {
  position: relative; width: 38px; height: 22px; background: #d1d5db; border-radius: 999px;
  transition: background-color .25s ease; box-shadow: inset 0 1px 2px rgba(0,0,0,.08);
}
.neod-slider::before {
  content: ""; position: absolute; left: 3px; top: 3px; width: 16px; height: 16px; background: #fff; border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .25s ease;
}
.neod-toggle input:checked + .neod-slider { background: #22c55e; }
.neod-toggle input:checked + .neod-slider::before { transform: translateX(16px); }
.neod-toggle-label { font-weight: 600; color: #111; font-size: 14px; }

/* ===== Quote calculating disabled UI (toggle fix) ===== */

/* 让 input / swap / 两个输入框灰掉且不可点 */
.neod-quote-lock #neod_start,
.neod-quote-lock #neod_end,
.neod-quote-lock #neod_swap {
  opacity: 0.45 !important;
  filter: grayscale(1) saturate(0.2);
  cursor: not-allowed !important;
  pointer-events: none !important;
}

/* ✅ Toggle：灰的是“可见的 label”而不是 input */
.neod-quote-lock .neod-toggle {
  opacity: 0.45 !important;
  filter: grayscale(1) saturate(0.2);
  cursor: not-allowed !important;
  pointer-events: none !important; /* 关键：整块都点不到 */
}

/* 让 Realtime Traffic 的文字也更灰 */
.neod-quote-lock .neod-toggle .neod-toggle-label {
  color: #6b7280 !important;
}

/* 可选：把 slider 也做成更“禁用”的样子 */
.neod-quote-lock .neod-toggle .neod-slider {
  box-shadow: none !important;
  opacity: 0.75 !important;
}

/* === 按钮 === */
.neod-btn {
  border: 1px solid #22c55e; background: #22c55e; color: #fff; font-weight: 800;
  font-size: 22px; padding: 14px 0; width: 100%; border-radius: 14px;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  cursor: pointer; transition: filter .12s ease, transform .12s ease, box-shadow .2s ease;
}
.neod-btn:hover { filter: brightness(.97); }
.neod-btn:active { transform: translateY(1px); }
.neod-btn:disabled { opacity: .7; cursor: not-allowed; }
.neod-btn.neod-primary { background: #111; border-color: #111; }
.neod-btn .neod-btn-label { font-size: inherit; font-weight: inherit; line-height: 1.1; }

.neod-btn.neod-stop{
  background:#fff;
  border:1px solid rgba(239,68,68,.35);
  color:#b91c1c;
}
.neod-btn.neod-stop:hover{
  border-color: rgba(239,68,68,.6);
}

/* 保护按钮 label 在 hover/active 下仍为白色 */
.neod-btn:hover .neod-btn-label,
.neod-btn:active .neod-btn-label { color: #fff; }

/* === 报价头部 === */
.neod-quote-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 18px;
  padding: 10px 6px 12px; border-bottom: 1px dashed #e5e7eb; margin-bottom: 12px;
}
.neod-locs { flex: 1.9; min-width: 0; }
.neod-loc-row { display: flex; align-items: center; gap: 10px; margin: 4px 0; line-height: 1.45; font-size: 15px; color: #111; }
.neod-loc-text { white-space: normal; word-break: break-word; overflow-wrap: anywhere; }
.neod-loc-row .neod-sub { font-weight: 400; font-size: 13px; color: #6b7280; margin-top: 2px; }

/* === Total Fare === */
.neod-fare-big { flex: 0.5; text-align: right; min-width: 140px; }
.neod-fare-label { font-size: 12px; color: #64748b; margin-bottom: 2px; }
.neod-fare-value { font-size: 26px; font-weight: 800; letter-spacing: .2px; color: #16a34a; }
@media (max-width: 560px) {
  .neod-quote-head { flex-direction: column; align-items: stretch; }
  .neod-fare-big { text-align: left; margin-top: 6px; min-width: 0; }
}

/* === 第二段折叠 === */
.neod-collapse {
  overflow: hidden; max-height: 0; opacity: 0; transform: translateY(-4px);
  transition: max-height .35s ease, opacity .25s ease, transform .25s ease, margin-top .25s ease;
  will-change: max-height, opacity, transform; margin-top: 0;
}
.neod-collapse.open { max-height: 2000px; opacity: 1; transform: translateY(0); margin-top: 12px; }

/* === 二段卡片 === */
.neod-card { border: 1px solid #e5e7eb; border-radius: 12px; padding: 10px; margin-top: 12px; background: #f9fafb; }
.neod-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 8px 0; }
.neod-row input { max-width: 200px; }
.neod-msg { margin-top: 10px; font-size: 13px; padding: 10px; border-radius: 12px; background: #ecfeff; border: 1px solid #a5f3fc; }

/* === Debug === */
.neod-debug { margin-top: 12px; padding: 10px; border: 1px dashed #cbd5e1; border-radius: 10px; background: #fff; }
.neod-debug-title { font-weight: 700; margin-bottom: 8px; }
.neod-debug-grid { display: grid; grid-template-columns: 180px 1fr; row-gap: 6px; column-gap: 12px; font-size: 13px; }
.neod-debug-grid > div:nth-child(2n) { white-space: normal; overflow-wrap: anywhere; word-break: break-word; line-height: 1.35; }

/* ---------------- Map Side ---------------- */
.neod-mapbox {
  position: relative; height: 540px; border: 1px solid #e5e7eb; border-radius: 14px;
  overflow: hidden; background: #fff;
}
#neod_map { position: absolute; inset: 0; }
.neod-info-bar {
  position: absolute; left: 0; right: 0; bottom: 0; background: #fff;
  display: flex; align-items: center; gap: 0;
  padding: 10px 14px; border-top: 1px solid #e5e7eb;
}
.neod-info-cell { flex: 1; }
.neod-info-title { font-size: 12px; color: #64748b; letter-spacing: .02em; }
.neod-info-value { font-size: 18px; font-weight: 700; color: #111; margin-top: 4px; }
.neod-divider { width: 1px; align-self: stretch; background: #e5e7eb; margin: 0 14px; }

/* ---------------- Alert ---------------- */
.neod-alert { margin-top: 10px; padding: 10px; border: 1px solid #fde68a; background: #fffbeb; border-radius: 10px; }

/* ---------------- Responsive ---------------- */
@media (max-width: 560px) {
  .neod-inputs { grid-template-columns: minmax(0, 1fr) 44px; column-gap: 10px; }
  .neod-swap-btn { width: 44px; height: 44px; }
  .neod-mapbox { height: 420px; }
}

/* =========================================================
   NEOD — Custom Address Dropdown (Google-like look)
   ========================================================= */

/* 父容器需要定位，确保下拉相对输入框对齐 */
.neod-field { position: relative; }

/* 外层浮层（新版，唯一保留） */
.neod-suggest{
  position: absolute;
  left: 0;
  top: calc(100% + 6px);
  width: 100%;
  max-width: 100%;
  display: none;
  z-index: 9999; /* 统一层级，盖过 panel 内元素 */
}
.neod-suggest.open{ display:block; }

/* 面板与列表 */
.neod-suggest__list{
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  box-shadow: 0 12px 28px rgba(0,0,0,.12);
  overflow: hidden;
  max-height: 360px;
  overflow-y: auto;
  scrollbar-gutter: stable;
}

/* 置顶：Use Current Location */
.neod-suggest__current{
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 10px;
  align-items: center;
  padding: 12px 14px;
  border-bottom: 1px solid #f1f5f9;
  cursor: pointer;
  background: #f8fbff;
}
.neod-suggest__current:hover{ background:#f1f7ff; }
.neod-suggest__current .title{ font-weight: 800; color:#111; line-height:1.15; }
.neod-suggest__current .sub{ font-size:12px; color:#64748b; margin-top:2px; }

/* 每一项 */
.neod-suggest__item{
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 10px;
  align-items: start;
  padding: 12px 14px;
  cursor: pointer;
}
.neod-suggest__item + .neod-suggest__item{ border-top:1px solid #f1f5f9; }
.neod-suggest__item:hover{ background:#f8fafc; }

/* 图标 */
.neod-ico-wrap{
  width: 28px; height: 28px;
  border-radius: 50%;
  display: grid; place-items: center;
  color:#334155;
}
.neod-ico{ display:block; }

/* 文本 */
.neod-suggest__text .title{
  font-size: 16px;
  font-weight: 800;
  color:#0f172a;
  line-height:1.2;
}
.neod-suggest__text .sub{
  margin-top: 4px;
  font-size: 13px;
  color:#64748b;
  line-height:1.25;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
}

/* 滚动条（可选） */
.neod-suggest__list::-webkit-scrollbar{ width: 10px; }
.neod-suggest__list::-webkit-scrollbar-thumb{
  background: #cbd5e1; border-radius: 8px; border: 2px solid #fff;
}
.neod-suggest__list::-webkit-scrollbar-track{ background: transparent; }

/* 小屏适配 */
@media (max-width: 560px){
  .neod-suggest{ top: calc(100% + 4px); }
  .neod-suggest__text .title{ font-size:15px; }
}

/* 消息提示 */
.neod-msg{ margin-top:8px; border-radius:10px; padding:10px 12px; border:1px solid transparent; line-height:1.25; font-size:14px; }
.neod-msg--info{ background:#ecfeff; border-color:#a5f3fc; color:#0c4a6e; }
.neod-msg--err { background:#fee2e2; border-color:#fecaca; color:#7f1d1d; }

/* ==== Mobile Anti-Zoom on Focus (iOS/Android) ==== */
@media (max-width: 560px) {
  .neod-field input,
  .neod-field select,
  .neod-field textarea { font-size: 17px; line-height: 1.25; }
  input, select, textarea { font-size: 17px; }
}

/* iOS Safari 细化处理（可选） */
@supports (-webkit-touch-callout: none) {
  .neod-field input,
  .neod-field select,
  .neod-field textarea { font-size: 16px; }
}

/* 防止系统“文字放大”导致的布局跳动 */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

/* ====== Font overrides (scoped) ====== */

/* 自定义地址下拉统一使用 Poppins */
.neod-suggest,
.neod-suggest__list,
.neod-suggest__item,
.neod-suggest__current,
.neod-suggest__text .title,
.neod-suggest__text .sub {
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif !important;
}

/* 仅让 Quote & Confirm 两个按钮使用 Open Sans */
#neod_get_quote.neod-btn,
#neod_book.neod-btn,
#neod_get_quote.neod-btn .neod-btn-label,
#neod_book.neod-btn .neod-btn-label {
  font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif !important;
  font-weight: 800; /* 保持你现在粗重的按钮风格 */
}

html, body {
  touch-action: pan-x pan-y;
}
#neod_map {
  touch-action: none;
}
