/* Web post form palette follows the app's light/dark input surfaces. */
html[data-theme="light"] {
  color-scheme: light;
  --bg: #f2f2f7;
  --surface: #ffffff;
  --ink: #1c1c1e;
  --muted: #6c6c70;
  --line: rgba(0,0,0,.08);
  --blue: #007aff;
  --post-field: #ffffff;
  --post-section: #f2f2f7;
  --post-label: rgba(0,0,0,.55);
  --post-placeholder: #8e8e93;
  --post-border: rgba(0,0,0,.08);
  --post-border-strong: rgba(0,0,0,.14);
  --post-focus: rgba(0,122,255,.28);
  --post-active: #1c1c1e;
  --post-active-text: #ffffff;
  --post-shadow: 0 12px 32px rgba(0,0,0,.06);
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #080808;
  --surface: #161616;
  --ink: #ffffff;
  --muted: #909090;
  --line: rgba(255,255,255,.08);
  --blue: #0a84ff;
  --post-field: #202020;
  --post-section: #161616;
  --post-label: #c8c8d2;
  --post-placeholder: #909098;
  --post-border: rgba(255,255,255,.08);
  --post-border-strong: rgba(255,255,255,.14);
  --post-focus: rgba(10,132,255,.45);
  --post-active: #2c2c2c;
  --post-active-text: #ffffff;
  --post-shadow: 0 12px 32px rgba(0,0,0,.28);
}

body { background: var(--bg); color: var(--ink); }
.top {
  background: rgba(242,242,247,.92);
  color: var(--ink);
  border-bottom: 1px solid var(--post-border);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
}
.top a.back { color: var(--ink); border-color: var(--post-border-strong); }
.top a.back:hover { background: rgba(0,0,0,.05); border-color: var(--post-border-strong); }
html[data-theme="dark"] .top { background: rgba(8,8,8,.92); }
html[data-theme="dark"] .top a.back:hover { background: rgba(255,255,255,.08); }
main { color: var(--ink); }
.panel {
  background: var(--surface);
  border-color: var(--post-border);
  box-shadow: var(--post-shadow);
}
.title { color: var(--ink); }
.sub,.hint { color: var(--muted); }
.eyebrow,.field label,.label { color: var(--post-label); }

.field input,.field select,.field textarea,
#phone-link-form input,#post-form input,#post-form select,#post-form textarea {
  min-height: 50px;
  border: 1px solid var(--post-border);
  border-radius: 12px;
  background: var(--post-field);
  color: var(--ink);
  padding: 0 16px;
  font: 400 16px/1.35 Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  box-shadow: none;
  transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}
.field textarea,#post-form textarea { min-height: 90px; padding: 12px 16px; }
.field input::placeholder,.field textarea::placeholder,
#post-form input::placeholder,#post-form textarea::placeholder { color: var(--post-placeholder); opacity: 1; }
.field input:focus,.field select:focus,.field textarea:focus,
#post-form input:focus,#post-form select:focus,#post-form textarea:focus {
  border-color: var(--blue);
  outline: 0;
  box-shadow: 0 0 0 3px var(--post-focus);
}
select option { background: var(--surface); color: var(--ink); }

.field { margin-bottom: 20px; }
.field label,.label { margin-bottom: 8px; font-size: 10px; font-weight: 600; letter-spacing: 1.15px; }
.form-grid { gap: 20px; }
.field.full { grid-column: 1/-1; }
.field input[type="time"],.field input[type="date"] { color-scheme: inherit; }

.field .choice-row {
  display: inline-flex;
  width: auto;
  max-width: 100%;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--post-border);
  border-radius: 14px;
  background: var(--post-section);
}
.field .choice-row .choice {
  min-height: 42px;
  padding: 9px 16px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: var(--muted);
  transition: background-color 160ms ease,color 160ms ease;
}
.field .choice-row .choice[aria-pressed="true"] {
  background: var(--post-active);
  color: var(--post-active-text);
  border-color: transparent;
}
.chips { gap: 8px; }
.chip {
  min-height: 40px;
  padding: 9px 14px;
  border-color: var(--post-border);
  border-radius: 12px;
  background: var(--post-field);
  color: var(--muted);
}
.chip[aria-pressed="true"] {
  background: var(--post-active);
  border-color: var(--post-active);
  color: var(--post-active-text);
}

.suggest-list {
  border-color: var(--post-border);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 12px 32px rgba(0,0,0,.14);
}
.suggest-option { color: var(--ink); }
.suggest-option:hover,.suggest-option[aria-selected="true"],.suggest-option:focus-visible {
  background: var(--post-section);
}
.suggest-primary { color: var(--ink); }
.suggest-secondary,.suggest-status { color: var(--muted); }

.btn {
  border-radius: 12px;
  background: var(--blue);
  color: #fff;
  box-shadow: none;
}
.btn:hover { filter: brightness(.94); }
.btn.secondary {
  border: 1px solid var(--post-border);
  background: var(--post-section);
  color: var(--ink);
}
.btn.secondary:hover { filter: brightness(.96); }
.error { color: #b42318; background: rgba(255,59,48,.08); border-color: rgba(255,59,48,.2); border-radius: 12px; }
.success { color: #14743c; background: rgba(48,209,88,.1); border-color: rgba(48,209,88,.2); border-radius: 12px; }
.modal-card { background: var(--surface); color: var(--ink); border: 1px solid var(--post-border); }
.modal-card h2,.modal-card ul { color: var(--ink); }
.modal-card p { color: var(--muted); }
.modal-check { color: var(--ink); }

@media (max-width:700px) {
  .panel { padding: 26px 20px; }
  .form-grid { gap: 20px; }
  .field { margin-bottom: 0; }
  .field .choice-row { width: 100%; }
  .field .choice-row .choice { flex: 1; }
}
@media (prefers-reduced-motion:reduce) {
  .field input,.field select,.field textarea,.field .choice-row .choice { transition: none; }
}

@font-face { font-family: RoutebookIonicons; src: url('/assets/Ionicons.ttf') format('truetype'); font-display: block; }
@font-face { font-family: RoutebookMCI; src: url('/assets/MaterialCommunityIcons.ttf') format('truetype'); font-display: block; }
.rb-icon { display:inline-grid; place-items:center; flex:none; width:16px; height:16px; font-size:14px; line-height:1; }
.rb-icon::before { content:var(--rb-glyph); font-family:RoutebookIonicons; }
.rb-icon[data-icon-font="mci"]::before { font-family:RoutebookMCI; }

/* Posting controls mirror the app's compact, rounded field and chip system. */
#post-stage > .title { font-size:28px; line-height:1.2; letter-spacing:-.7px; }
#post-description { margin:8px 0 24px; }
.form-grid { grid-template-columns:1fr; row-gap:20px; }
.field { margin:0; }
.field label { font-size:10px; font-weight:500; letter-spacing:1.2px; margin-bottom:8px; }
.field input,.field select { height:50px; padding:0 16px; border-radius:12px; }
.field input[type="time"],.field input[type="date"] { padding-right:12px; }
.app-control { display:flex; align-items:center; gap:9px; width:100%; min-height:50px; padding:0 14px; border:1px solid var(--post-border); border-radius:12px; background:var(--post-field); }
.app-control:focus-within { border-color:var(--blue); box-shadow:0 0 0 3px var(--post-focus); }
.app-control>.rb-icon { color:var(--post-placeholder); }
.app-control input,.app-control select { flex:1; min-width:0; height:48px; padding:0!important; border:0!important; border-radius:0!important; background:transparent!important; box-shadow:none!important; }
.app-control input:focus,.app-control select:focus { outline:0; box-shadow:none!important; }
.app-control select { appearance:none; }
.field .choice-row { display:flex; width:100%; padding:4px; gap:4px; border-radius:14px; }
.field .choice-row .choice { flex:1; display:flex; min-height:66px; flex-direction:column; align-items:center; justify-content:center; gap:3px; padding:10px 9px; border-radius:11px; font-size:14px; font-weight:600; }
.field .choice-row .choice small { color:var(--muted); font-size:11px; line-height:1.3; font-weight:400; }
.field .choice-row .choice[aria-pressed="true"] small { color:rgba(255,255,255,.72); }
html[data-theme="dark"] .field .choice-row .choice[aria-pressed="true"] small { color:#909098; }
#frequency-field select,#biweekly-field select,#month-day,#return-month-day,#seats { position:absolute!important; width:1px!important; height:1px!important; overflow:hidden!important; clip:rect(0,0,0,0)!important; white-space:nowrap!important; }
.visually-hidden-control { position:absolute!important; width:1px!important; height:1px!important; overflow:hidden!important; clip:rect(0,0,0,0)!important; white-space:nowrap!important; }
.app-segment { display:flex; width:100%; padding:4px; gap:4px; border-radius:14px; background:var(--post-section); }
.app-segment-option { flex:1; min-width:0; min-height:44px; padding:10px 8px; border:0; border-radius:11px; background:transparent; color:var(--muted); font-size:14px; font-weight:600; }
.app-segment-option[aria-pressed="true"] { background:var(--post-active); color:var(--post-active-text); }
#days,#return-days { display:flex; flex-wrap:nowrap; justify-content:space-between; gap:8px; }
.day-dots .chip { width:40px; min-width:40px; height:40px; min-height:40px; display:grid; place-items:center; padding:0; border-radius:50%; font-size:12px; font-weight:600; }
.day-dots .chip[aria-pressed="true"] { background:var(--post-active); color:var(--post-active-text); }
html[data-theme="dark"] .day-dots .chip[aria-pressed="true"],html[data-theme="dark"] .seat-dots .number-dot[aria-pressed="true"],html[data-theme="dark"] .month-dots .number-dot[aria-pressed="true"] { background:#fff; color:#0c0c0c; }
.seat-dots { display:flex; flex-wrap:wrap; gap:8px; }
.number-dot { display:grid; place-items:center; width:44px; height:44px; padding:0; border:1px solid var(--post-border); border-radius:12px; background:var(--post-field); color:var(--muted); font-size:15px; font-weight:600; }
.number-dot[aria-pressed="true"] { border-color:transparent; background:var(--post-active); color:var(--post-active-text); }
.month-dots { display:grid; grid-template-columns:repeat(7,44px); gap:6px; }
.month-dots .number-dot { width:44px; height:44px; border-radius:50%; font-size:14px; font-weight:500; }
.chips { gap:8px; }
#preferences .chip { display:inline-flex; align-items:center; justify-content:center; gap:6px; min-height:34px; padding:8px 12px; border-radius:8px; font-size:13px; font-weight:400; }
#preferences .chip .rb-icon { width:14px; height:14px; font-size:13px; }
#preferences .chip[aria-pressed="true"] { background:var(--post-active); color:var(--post-active-text); border-color:transparent; }
html[data-theme="dark"] #preferences .chip[aria-pressed="true"] { background:#fff; color:#0c0c0c; }
.custom-chip { display:inline-flex; align-items:center; gap:4px; }
.custom-chip .rb-icon { width:12px; height:12px; font-size:10px; color:var(--post-placeholder); }
.price-input-wrap,.custom-tag-wrap { display:flex; align-items:center; gap:8px; min-height:50px; padding:0 14px; border:1px solid var(--post-border); border-radius:12px; background:var(--post-field); }
.price-input-wrap:focus-within,.custom-tag-wrap:focus-within { border-color:var(--blue); box-shadow:0 0 0 3px var(--post-focus); }
.price-input-wrap>span { color:var(--post-placeholder); font-size:18px; font-weight:600; }
.price-input-wrap input,.custom-tag-wrap input { flex:1; min-width:0; border:0!important; padding:0!important; background:transparent!important; box-shadow:none!important; }
.custom-tag-add { display:grid; place-items:center; width:28px; height:28px; padding:0; border:1px solid var(--post-border-strong); border-radius:50%; background:var(--post-field); color:var(--muted); }
.custom-tag-add::before { content:"\f103"; font:16px RoutebookIonicons; }
.hint { font-size:11px; line-height:1.4; }
.actions { margin-top:24px; }

@media(max-width:700px) {
  .form-grid { gap:20px; }
  #days,#return-days { gap:4px; }
  .day-dots .chip { width:38px; min-width:38px; height:38px; min-height:38px; }
  .month-dots { grid-template-columns:repeat(7,minmax(36px,44px)); justify-content:space-between; }
  .month-dots .number-dot { width:40px; height:40px; }
}
.field-clear { display:grid; place-items:center; flex:none; width:24px; height:24px; padding:0; border:0; border-radius:50%; background:transparent; color:var(--post-placeholder); }
.field-clear[hidden] { display:none!important; }
.field-clear .rb-icon { width:17px; height:17px; font-size:17px; }
.app-control.model-control { padding-right:10px; }
.app-control.model-control input { padding-left:0!important; }
.field input[type="time"]::-webkit-calendar-picker-indicator,.field input[type="date"]::-webkit-calendar-picker-indicator { opacity:.72; }
.custom-preferences { display:contents; }
.custom-preferences .chip { display:inline-flex; align-items:center; gap:5px; border-radius:8px; background:var(--post-field); color:var(--ink); }

/* Keep onboarding choice and vehicle rows legible in both app themes. */
html[data-theme="light"] #choice-stage .sub { color:var(--muted); }
html[data-theme="dark"] #choice-stage .sub { color:rgba(255,255,255,.64); }
html[data-theme="light"] #choice-stage .post-choices { background:#e5e5ea; }
html[data-theme="dark"] #choice-stage .post-choices { background:#202020; }
html[data-theme="light"] #choice-stage .post-choices button { color:#1c1c1e; }
html[data-theme="dark"] #choice-stage .post-choices button { color:#fff; }
html[data-theme="light"] #choice-stage .post-choices button+button { border-top-color:rgba(0,0,0,.10); }
html[data-theme="dark"] #choice-stage .post-choices button+button { border-top-color:rgba(255,255,255,.08); }
html[data-theme="light"] #choice-stage .post-choices button:hover { background:rgba(0,0,0,.035); }
html[data-theme="dark"] #choice-stage .post-choices button:hover { background:rgba(255,255,255,.05); }
html[data-theme="dark"] #choice-stage .choice-skip { color:#909098; }
html[data-theme="dark"] body.choice-screen .top a.back { border-color:rgba(255,255,255,.16); }
html[data-theme="dark"] body.choice-screen .top a.back:hover { background:rgba(255,255,255,.08);border-color:rgba(255,255,255,.22); }

@media(max-width:700px) {
  #vehicle-stage .vehicle-grid { gap:8px; }
  #vehicle-stage .vehicle { min-height:80px; border-radius:18px; }
  #vehicle-stage .vehicle img { flex-basis:116px; width:116px; height:80px; border-radius:0 17px 17px 0; }
}
html[data-theme="light"] #vehicle-stage .vehicle { background:rgba(0,0,0,.04);border-color:rgba(0,0,0,.07); }
html[data-theme="light"] #vehicle-stage .vehicle span { color:#1c1c1e!important;-webkit-text-fill-color:#1c1c1e!important; }
html[data-theme="light"] #vehicle-stage .vehicle img { background:#f2f2f7; }
html[data-theme="dark"] #vehicle-stage .vehicle { background:rgba(255,255,255,.05);border-color:rgba(255,255,255,.07);box-shadow:none; }
html[data-theme="dark"] #vehicle-stage .vehicle span { color:#fff!important;-webkit-text-fill-color:#fff!important; }
html[data-theme="dark"] #vehicle-stage .vehicle img { background:#202024; }
#vehicle-stage .vehicle[aria-pressed="true"] { background:#fff;border-color:rgba(255,255,255,.9);box-shadow:0 0 0 1px rgba(255,255,255,.12); }
#vehicle-stage .vehicle[aria-pressed="true"] span { color:#0c0c0c!important;-webkit-text-fill-color:#0c0c0c!important; }
#vehicle-stage .vehicle[aria-pressed="true"] img { background:#ececec; }

/* A clear, restrained selected state for the vehicle picker. */
#vehicle-stage .vehicle {
  position:relative;
  border:1px solid var(--post-border-strong);
  transition:background-color 180ms ease,border-color 180ms ease,box-shadow 180ms ease,transform 180ms ease;
}
#vehicle-stage .vehicle[aria-pressed="true"] {
  border:2px solid var(--blue);
  box-shadow:0 0 0 3px var(--post-focus),0 8px 22px rgba(0,122,255,.14);
  transform:translateY(-1px);
}
html[data-theme="dark"] #vehicle-stage .vehicle[aria-pressed="true"] {
  background:#fff;
  box-shadow:0 0 0 3px rgba(10,132,255,.28),0 8px 24px rgba(10,132,255,.22);
}
html[data-theme="light"] #vehicle-stage .vehicle[aria-pressed="true"] {
  background:#f4f8ff;
  box-shadow:0 0 0 3px rgba(0,122,255,.14),0 8px 22px rgba(0,122,255,.12);
}
#vehicle-stage .vehicle[aria-pressed="true"] img { background:#ececec; }
@media(prefers-reduced-motion:reduce) {
  #vehicle-stage .vehicle { transition:none; }
  #vehicle-stage .vehicle[aria-pressed="true"] { transform:none; }
}
