/* Available Trucks (browse + post). Loaded after kc-clean.css; reuses the fc-/cp- clean system. */

/* Tabs: Carriers | Available trucks */
.at-tabs { display: inline-flex; gap: 2px; padding: 3px; margin: 0 0 14px; border: 1px solid var(--kc-line); border-radius: 9px; background: #fff; box-shadow: var(--kc-shadow-1); }
.at-tabs a { display: inline-flex; align-items: center; height: 28px; padding: 0 12px; border-radius: 6px; font: 600 12.5px/1 var(--kc-font); color: var(--kc-muted); text-decoration: none; }
.at-tabs a:hover { color: var(--kc-ink); background: var(--kc-bg); }
.at-tabs a[aria-current="page"] { background: var(--kc-ink); color: #fff; }

/* Segmented controls */
.at-seg { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 3px; border-radius: 9px; background: var(--kc-bg-2); border: 1px solid var(--kc-line); }
.at-seg button { height: 28px; padding: 0 11px; border: 0; border-radius: 6px; background: transparent; font: 600 12.5px/1 var(--kc-font); color: var(--kc-muted); cursor: pointer; white-space: nowrap; }
.at-seg button:hover { color: var(--kc-ink); }
.at-seg button[aria-pressed="true"] { background: #fff; color: var(--kc-ink); box-shadow: 0 1px 2px rgba(15, 23, 42, .1), 0 0 0 1px var(--kc-line); }
.at-seg.is-rig { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); width: 100%; }
.at-seg.is-rig button { height: auto; min-height: 50px; padding: 8px 10px; text-align: left; white-space: normal; }
.at-seg-2 { display: flex; flex-direction: column; gap: 3px; }
.at-seg-2 b { font-weight: 600; font-size: 13px; color: inherit; }
.at-seg-2 small { font-weight: 500; font-size: 11.5px; color: var(--kc-muted); }
.at-seg.is-sm { margin-top: 8px; }
.at-seg + .at-seg { margin-left: 0; }
.fc-tools .at-when-seg { margin-right: 4px; }

/* Cards */
.at-results.is-busy { opacity: .55; transition: opacity .15s; }
.at-results, .at-body .fc-detail-body { -webkit-user-select: none; user-select: none; }
.at-body .fc-detail-body .fc-d-val { -webkit-user-select: text; user-select: text; }
.at-card { display: flex; flex-direction: column; gap: 9px; }
.at-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.at-route { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; min-width: 0; font: 600 14.5px/1.3 var(--kc-font); color: var(--kc-ink); letter-spacing: -.01em; }
.at-city { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.at-city.is-open { color: var(--kc-green); }
.at-route-i { width: 14px; height: 14px; color: var(--kc-accent); flex: none; }
.at-when { display: inline-flex; align-items: center; gap: 5px; flex: none; height: 22px; padding: 0 8px; border-radius: 999px; background: var(--kc-bg-2); color: var(--kc-ink-2); font: 600 11.5px/1 var(--kc-font); white-space: nowrap; }
.at-when .kc-i { width: 12px; height: 12px; }
.at-when.is-now { background: var(--kc-green-soft); color: #047857; }
.at-live { width: 7px; height: 7px; border-radius: 50%; background: var(--kc-green); box-shadow: 0 0 0 3px rgba(5, 150, 105, .18); }
.at-co { display: flex; align-items: center; gap: 5px; margin: 0; font-size: 12.5px; color: var(--kc-muted); }
.at-co > span:first-child { font-weight: 600; color: var(--kc-ink-2); }
.at-photo-n { display: inline-flex; align-items: center; gap: 3px; margin-left: auto; padding: 0 6px; height: 20px; border-radius: 6px; background: var(--kc-bg-2); color: var(--kc-ink-2); font: 600 11px/1 var(--kc-font); }
.at-photo-n .kc-i { width: 12px; height: 12px; }
.at-pill-space { background: var(--kc-blue-soft) !important; color: #1d4ed8 !important; border-color: #bfdbfe !important; font-weight: 600; }
.at-pill-space.is-partial { background: var(--kc-violet-soft) !important; color: #6d28d9 !important; border-color: #ddd6fe !important; }
.at-card .fc-card-foot { margin-top: auto; }

/* Space bar */
.at-bar { display: flex; align-items: center; gap: 0; height: 8px; margin: 2px 0 0; }
.at-bar-tr { position: relative; height: 8px; border-radius: 3px; background: var(--kc-bg-2); box-shadow: inset 0 0 0 1px var(--kc-line); overflow: hidden; min-width: 18px; }
.at-bar-tr i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 3px; background: linear-gradient(90deg, #60a5fa, #2563eb); }
.at-bar-hitch { width: 6px; height: 2px; flex: none; background: var(--kc-line-2); }

/* Filters drawer bits */
.at-chiprow { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 10px; }
.at-ft-custom { max-width: 200px; margin-bottom: 12px; }
.at-more[hidden] { display: none; }
.at-more { display: flex; justify-content: center; margin: 14px 0 6px; }

/* Detail drawer */
.at-d-route { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.at-d-route .at-route-i { width: 18px; height: 18px; }
.at-gal { margin: 4px 0 14px; }
.at-gal-main { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; background: var(--kc-bg-2); border: 1px solid var(--kc-line); cursor: zoom-in; -webkit-user-drag: none; }
.at-gal-thumbs { display: flex; gap: 6px; margin-top: 6px; }
.at-gal-thumb { width: 64px; height: 48px; padding: 0; border-radius: 7px; overflow: hidden; border: 2px solid transparent; background: var(--kc-bg-2); cursor: pointer; }
.at-gal-thumb.is-on { border-color: var(--kc-accent); }
.at-gal-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; -webkit-user-drag: none; }
.at-dl { display: grid; grid-template-columns: 130px 1fr; gap: 7px 12px; margin: 0; font-size: 13px; }
.at-dl dt { color: var(--kc-muted); font-weight: 500; }
.at-dl dd { margin: 0; color: var(--kc-ink); font-weight: 500; }
.at-tr-list { display: grid; gap: 4px; margin-top: 10px; }
.at-tr { display: grid; grid-template-columns: 1fr auto auto; gap: 12px; align-items: center; padding: 7px 10px; border-radius: 8px; background: var(--kc-bg); border: 1px solid var(--kc-line); font-size: 12.5px; }
.at-tr-n { font-weight: 600; color: var(--kc-ink); }
.at-tr-len { color: var(--kc-muted); }
.at-tr-open { font-weight: 600; color: #1d4ed8; }
.at-notes { margin: 0; font-size: 13px; white-space: pre-line; color: var(--kc-ink-2); }
.at-posted { margin-top: 12px; }
.at-lightbox { position: fixed; inset: 0; z-index: 3000; display: flex; align-items: center; justify-content: center; padding: 24px; background: rgba(15, 23, 42, .82); }
.at-lightbox[hidden] { display: none; }
.at-lightbox img { max-width: min(1200px, 100%); max-height: 100%; border-radius: 10px; box-shadow: var(--kc-shadow-3); -webkit-user-drag: none; }
.at-lb-x { position: absolute; top: 14px; right: 14px; background: #fff; }

/* ---------- Posting form ---------- */
.at-post-body .cp-card .cp-label { display: block; margin: 16px 0 8px; font: 600 12px/1.2 var(--kc-font); color: var(--kc-muted); letter-spacing: 0; }
.at-post-body .cp-f > span { font: 600 12px/1.2 var(--kc-font); color: var(--kc-muted); letter-spacing: 0; }
.at-post-body .cp-f { display: flex; flex-direction: column; gap: 5px; }
.at-post-body .cp-in { width: 100%; }
.at-post-body .cp-f.is-1 { grid-column: span 1; }
.at-post-body .cp-f.is-3 { grid-column: span 3; }
.at-opt { font: 500 12px/1 var(--kc-font); color: var(--kc-muted); margin-left: 4px; }
.at-lane { display: grid; grid-template-columns: 1fr auto 1fr; align-items: end; gap: 10px; }
.at-lane-arrow { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 36px; color: var(--kc-accent); }
.at-lane-arrow .kc-i { width: 18px; height: 18px; }
.at-post-body .fc-toggle { display: inline-flex; margin-top: 12px; padding: 0; border: 0; background: none; font: 500 13px/1.3 var(--kc-font); color: var(--kc-ink-2); }
.at-post-body .fc-toggle:has(input:checked) { background: none; color: var(--kc-ink); }
.at-later { margin-top: 12px; max-width: 520px; }
.at-quick { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.at-post-body .fc-qchip { height: 28px; padding: 0 10px; border-radius: 7px; border: 1px solid var(--kc-line); background: #fff; font: 500 12.5px/1 var(--kc-font); color: var(--kc-ink-2); box-shadow: none; }
.at-post-body .fc-qchip:hover { transform: none; border-color: var(--kc-line-2); }
.at-post-body .fc-qchip.is-on { background: var(--kc-accent-soft); border-color: #fdba74; color: var(--kc-accent-ink); font-weight: 600; }
.at-eqsel .kc-picker { border: 1px solid var(--kc-line); border-radius: 10px; padding: 10px; background: #fff; }
.at-eq-groups { max-height: 340px; overflow: auto; margin-top: 8px; }
.at-eq-items { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; padding: 4px 8px 10px; }
.at-eq-opt { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--kc-line); background: #fff; text-align: left; cursor: pointer; font-family: var(--kc-font); }
.at-eq-opt:hover { border-color: var(--kc-line-2); background: var(--kc-bg); }
.at-eq-opt.is-on { border-color: #fdba74; background: var(--kc-accent-soft); }
.at-eq-opt[hidden] { display: none; }
.at-eq-name { font-weight: 600; font-size: 13px; color: var(--kc-ink); }
.at-eq-note { font-size: 11.5px; color: var(--kc-muted); line-height: 1.35; }
.at-eq-picked { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; border: 1px solid #fdba74; background: var(--kc-accent-soft); }
.at-eq-picked > .kc-i { width: 22px; height: 22px; color: var(--kc-accent); flex: none; }
.at-eq-picked > div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.at-eq-picked strong { font-size: 13.5px; font-weight: 600; color: var(--kc-ink); }
.at-eq-picked small { font-size: 12px; color: var(--kc-muted); }
.at-eq-picked .cp-x { width: 32px; height: 32px; }
.at-cfgs { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 6px; }
.at-cfg { display: flex; flex-direction: column; gap: 3px; padding: 10px 12px; border-radius: 9px; border: 1px solid var(--kc-line); background: #fff; text-align: left; cursor: pointer; font-family: var(--kc-font); }
.at-cfg b { font-size: 13px; font-weight: 600; color: var(--kc-ink); }
.at-cfg small { font-size: 11.5px; color: var(--kc-muted); }
.at-cfg:hover { border-color: var(--kc-line-2); }
.at-cfg.is-on { border-color: var(--kc-accent); background: var(--kc-accent-soft); box-shadow: var(--kc-ring); }
.at-trs { display: grid; gap: 8px; margin-top: 12px; }
.at-tr-row { padding: 12px; border-radius: 10px; border: 1px solid var(--kc-line); background: var(--kc-bg); }
.at-tr-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.at-tr-head strong { font-size: 13px; font-weight: 600; }
.at-len { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--kc-muted); }
.at-post-body .at-num { width: 82px !important; height: 32px !important; min-height: 32px !important; text-align: right; }
.at-slide { display: flex; align-items: center; gap: 12px; margin-top: 10px; }
.at-range { flex: 1; accent-color: var(--kc-accent); height: 4px; }
.at-tr-row .at-chiprow { margin: 8px 0 0; }
.at-sum { display: flex; align-items: center; gap: 7px; margin: 12px 0 4px; padding: 9px 12px; border-radius: 9px; background: var(--kc-blue-soft); color: #1d4ed8; font: 600 13px/1.3 var(--kc-font); }
.at-sum .kc-i { width: 15px; height: 15px; flex: none; }
.at-sum.is-bad { background: var(--kc-red-soft); color: var(--kc-red); }
.at-photos { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.at-photo, .at-photo-add { position: relative; aspect-ratio: 4 / 3; border-radius: 10px; overflow: hidden; }
.at-photo { background: var(--kc-bg-2); border: 1px solid var(--kc-line); }
.at-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.at-photo.is-busy img { opacity: .5; }
.at-photo-busy { position: absolute; left: 8px; bottom: 8px; padding: 3px 7px; border-radius: 6px; background: rgba(15, 23, 42, .75); color: #fff; font: 600 11px/1.2 var(--kc-font); }
.at-photo-x { position: absolute; top: 6px; right: 6px; width: 26px; height: 26px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; border: 0; background: rgba(15, 23, 42, .7); color: #fff; cursor: pointer; }
.at-photo-x .kc-i { width: 13px; height: 13px; }
.at-photo-add { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; border: 1.5px dashed var(--kc-line-2); background: #fff; color: var(--kc-ink-2); cursor: pointer; font: 600 12.5px/1.2 var(--kc-font); }
.at-photo-add:hover { border-color: var(--kc-accent); color: var(--kc-accent-ink); background: var(--kc-accent-soft); }
.at-photo-add .kc-i { width: 22px; height: 22px; }
.at-photo-add small { font-weight: 500; font-size: 11px; color: var(--kc-muted); }
.at-mine { margin-bottom: 14px; padding: 0 !important; }
.at-mine > summary { display: flex; align-items: center; gap: 8px; padding: 14px 18px; cursor: pointer; list-style: none; font-size: 13.5px; }
.at-mine > summary::-webkit-details-marker { display: none; }
.at-mine > summary .kc-chev { margin-left: auto; width: 16px; height: 16px; transition: transform .15s; }
.at-mine[open] > summary .kc-chev { transform: rotate(180deg); }
.at-mine-list { border-top: 1px solid var(--kc-line); }
.at-mine-row { display: flex; align-items: center; gap: 10px; padding: 10px 18px; border-bottom: 1px solid var(--kc-line); }
.at-mine-row:last-child { border-bottom: 0; }
.at-mine-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.at-mine-main strong { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.at-mine-main small { font-size: 12px; color: var(--kc-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.at-state { height: 20px; padding: 0 8px; border-radius: 999px; display: inline-flex; align-items: center; font: 600 11px/1 var(--kc-font); background: var(--kc-bg-2); color: var(--kc-muted); }
.at-state.is-live { background: var(--kc-green-soft); color: #047857; }
.at-state.is-expired, .at-state.is-closed { background: var(--kc-red-soft); color: var(--kc-red); }
.at-done { text-align: center; padding: 36px 20px !important; }
.at-done h2 { font-size: 18px !important; margin: 10px 0 6px !important; }
.at-done p { margin: 0 auto 16px; max-width: 460px; }
.at-done .fc-empty-actions { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }
.at-done-i { display: inline-flex; width: 44px; height: 44px; align-items: center; justify-content: center; border-radius: 50%; background: var(--kc-green-soft); color: var(--kc-green); }
.at-done-i .kc-i { width: 22px; height: 22px; }

/* Admin + dashboard truck detail */
.kc-unit-gal { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin: 8px 0 10px; }
.kc-unit-gal a { display: block; aspect-ratio: 4 / 3; border-radius: 8px; overflow: hidden; border: 1px solid var(--kc-line, #e2e8f0); background: #f1f5f9; }
.kc-unit-gal img { width: 100%; height: 100%; object-fit: cover; display: block; }

@media (max-width: 720px) {
  .fc-tools .at-when-seg { order: 10; width: 100%; }
  .at-seg.is-rig { grid-template-columns: 1fr; }
  .at-lane { grid-template-columns: 1fr; }
  .at-lane-arrow { display: none; }
  .at-eq-items { grid-template-columns: 1fr; }
  .at-photos { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .at-post-body .cp-f.is-3, .at-post-body .cp-f.is-1 { grid-column: 1 / -1; }
  .at-mine-row { flex-wrap: wrap; }
  .at-dl { grid-template-columns: 110px 1fr; }
}

@media (max-width: 720px) {
  body .fc-toolbar .fc-tools { width: 100%; flex: 1 1 100%; flex-wrap: wrap; }
  .fc-tools .at-when-seg { flex: 0 0 100%; order: -1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); width: 100%; margin: 0; }
  .fc-tools .at-when-seg button { padding: 0 4px; }
  .fc-tools .fc-sort { flex: 1 1 auto; min-width: 0; }
  .fc-tools .fc-sort select { width: 100%; }
}
@media (min-width: 721px) {
  .at-lane > :nth-child(1) { grid-column: 1; grid-row: 1; }
  .at-lane > :nth-child(2) { grid-column: 2; grid-row: 1; margin-bottom: 2px; }
  .at-lane > :nth-child(3) { grid-column: 3; grid-row: 1; }
}
