/* Saved flow — saved cars, compare picker, comparison table, saved searches (account overlay views
   saved / compare-pick / compare / searches). Tokens follow the prototype: sand page, white cards,
   lime = better value, amber = to check, asphalt = cannot import. Every control is ≥ 44 px tall. */
.account-page-body[data-view="saved"], .account-page-body[data-view="searches"],
.account-page-body[data-view="compare-pick"], .account-page-body[data-view="compare"] {
  --sf-orange: #FF5400; --sf-asphalt: #0B0F14; --sf-sand: #F5F3EE; --sf-amber: #FFBD00; --sf-lime: #40FF00; --sf-muted: #5B5F66; --sf-line: #E6E2DA;
  --sf-d: "Sora", "Manrope", system-ui, sans-serif; --sf-b: "Manrope", system-ui, sans-serif;
  color: var(--sf-asphalt); font-family: var(--sf-b);
}
.account-page:has([data-view="compare-pick"]), .account-page:has([data-view="compare"]) { background: #f6f5f2; padding-top: 22px; }
.account-page:has([data-view="compare-pick"]) .account-page-header h1, .account-page:has([data-view="compare"]) .account-page-header h1 { font-size: 18px; letter-spacing: -.5px; }
.account-page-body[data-view="compare-pick"], .account-page-body[data-view="compare"] { padding-bottom: 110px; }
.account-page-body .sf-list button, .account-page-body .sf-list a, .account-page-body .sf-empty button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
.account-page-body .sf-list a { text-decoration: none; }
.sf-list ph-icon, .sf-empty ph-icon { display: inline-flex; flex: none; }

/* Header: segmented control under the title */
.sf-head { display: flex; flex-direction: column; gap: 12px; padding: 0 0 12px; }
.sf-seg { display: grid; grid-template-columns: 1fr 1fr; background: #E9E6DF; border-radius: 13px; padding: 3px; gap: 3px; }
.sf-seg button { min-height: 44px; border: 0; border-radius: 10px; background: transparent; font: 700 14px/1.2 var(--sf-b); color: var(--sf-muted); text-align: center; cursor: pointer; }
.sf-seg button[aria-selected="true"] { background: #FFF; color: var(--sf-asphalt); box-shadow: 0 1px 2px rgba(11, 15, 20, .06); }

.sf-list { display: flex; flex-direction: column; gap: 10px; }
.sf-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 44px; padding: 0 2px; }
.sf-bar > b { font-weight: 700; font-size: 14px; color: var(--sf-muted); }
.sf-cmpb { min-height: 40px; padding: 0 13px; border-radius: 12px; background: #FFF !important; font-weight: 800 !important; font-size: 14px; display: inline-flex; align-items: center; gap: 6px; box-shadow: 0 1px 2px rgba(11, 15, 20, .05); }
.sf-sec { font-weight: 800; font-size: 13px; color: var(--sf-muted); margin: 6px 2px -2px; }
.sf-pick-hint { margin: 0; min-height: 44px; display: flex; align-items: center; font-weight: 700; font-size: 14px; color: var(--sf-muted); padding: 0 2px; }

/* Car row (saved list and picker) */
.sf-row { position: relative; display: flex; background: #FFF; border-radius: 16px; overflow: hidden; min-height: 112px; width: 100%; }
.sf-open, .sf-pickrow { display: flex; flex: 1; min-width: 0; width: 100%; text-align: start; padding: 0 !important; }
.sf-pickrow { cursor: pointer; }
.sf-pickrow input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }
.sf-pickrow.is-on::after { content: ""; position: absolute; inset: 0; border-radius: 16px; box-shadow: inset 0 0 0 2.5px var(--sf-asphalt); pointer-events: none; z-index: 2; }
.sf-pickrow.is-full { opacity: .55; cursor: not-allowed; }
.sf-pickrow:focus-within { outline: 2px solid var(--sf-orange); outline-offset: 2px; }
.sf-pic { width: 112px; flex: none; background: #E7E3DB; position: relative; display: flex; align-items: center; justify-content: center; color: var(--sf-muted); overflow: hidden; }
.sf-pic img, .sf-so-pic img, .sf-cp img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.sf-noimg { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; color: var(--sf-muted); }
.sf-txt { padding: 9px 42px 9px 12px; flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; justify-content: center; }
[dir="rtl"] .sf-txt { padding: 9px 12px 9px 42px; }
.sf-name { font-weight: 800; font-size: 14px; line-height: 1.2; display: block; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.sf-price { font-family: var(--sf-d); font-weight: 800; font-size: 16px; display: block; }
.sf-sm { font-size: 12.5px; font-weight: 600; color: var(--sf-muted); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.sf-where { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.sf-where .tm-flag, .sf-sm .tm-flag { display: inline-flex; vertical-align: middle; }
.sf-tag { display: inline-block; align-self: flex-start; border-radius: 6px; padding: 2px 7px; font-size: 11.5px; font-weight: 800; margin-top: 2px; }
.sf-tag.ok { background: var(--sf-lime); }
.sf-tag.am { background: var(--sf-amber); }
.sf-tag.no { background: var(--sf-asphalt); color: #FFF; }
.sf-kind { display: inline-block; background: var(--sf-sand); border-radius: 6px; padding: 2px 7px; font-size: 12px; font-weight: 800; font-family: var(--sf-b); color: var(--sf-asphalt); }
.sf-mark, .sf-mk { position: absolute; inset-inline-end: 0; top: 0; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; color: var(--sf-orange) !important; z-index: 3; padding: 0 !important; }
.sf-check { position: absolute; inset-inline-end: 10px; top: 10px; width: 28px; height: 28px; border-radius: 14px; box-shadow: inset 0 0 0 2px var(--sf-muted); background: #FFF; display: flex; align-items: center; justify-content: center; color: #FFF; z-index: 3; }
.sf-check ph-icon { opacity: 0; }
.sf-pickrow.is-on .sf-check { background: var(--sf-asphalt); box-shadow: none; }
.sf-pickrow.is-on .sf-check ph-icon { opacity: 1; }

/* Empty states */
.sf-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 10px; padding: 48px 24px; }
.sf-empty-ico { width: 68px; height: 68px; border-radius: 34px; background: #FFF; display: flex; align-items: center; justify-content: center; color: var(--sf-orange); }
.sf-empty h3 { margin: 0; font-family: var(--sf-d); font-weight: 800; font-size: 19px; color: var(--sf-asphalt); }
.sf-empty p { margin: 0; font-weight: 600; color: var(--sf-muted); font-size: 14px; line-height: 1.4; max-width: 320px; }
.sf-btn-dark, .account-page-body .sf-empty .sf-btn-dark { margin-top: 6px; min-height: 48px; padding: 0 18px; border-radius: 13px; background: var(--sf-asphalt); color: #FFF; font-weight: 800; text-align: center; }

/* Bottom action (picker, compare) — fixed above the safe area; the dock is hidden on these views */
.sf-bottom { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: #FFF; padding: 10px 16px calc(16px + env(safe-area-inset-bottom)); box-shadow: 0 -1px 0 var(--sf-line); }
.sf-go { min-height: 54px; width: 100%; border: 0; border-radius: 15px; background: var(--sf-orange); color: var(--sf-asphalt); font: 800 15px/1.2 var(--sf-d); text-align: center; cursor: pointer; }
.sf-go[disabled] { background: var(--sf-line); color: var(--sf-muted); cursor: default; }
@media (min-width: 761px) { .sf-bottom { left: 50%; right: auto; transform: translateX(-50%); width: min(560px, 100%); border-radius: 18px 18px 0 0; } }

/* Comparison */
.sf-verdict { background: var(--sf-asphalt); color: #FFF; border-radius: 16px; padding: 12px 14px; }
.sf-verdict span { font-size: 13px; font-weight: 600; color: #C8CBD0; display: block; }
.sf-verdict b { font-family: var(--sf-d); font-weight: 800; font-size: 17px; line-height: 1.2; display: block; margin-top: 2px; }
.sf-cg { display: grid; gap: 6px; }
.sf-hc { position: relative; background: #FFF; border-radius: 13px; overflow: hidden; min-width: 0; }
.sf-hc-open { display: block; width: 100%; text-align: start; padding: 0 !important; }
.sf-cp { height: 70px; background: #E7E3DB; display: flex; align-items: center; justify-content: center; color: var(--sf-muted); position: relative; }
.sf-cn { padding: 6px 7px 8px; font-weight: 800; font-size: 12.5px; line-height: 1.2; display: block; overflow-wrap: anywhere; }
.is-4 .sf-cn { font-size: 11.5px; padding: 6px 5px 8px; }
.is-4 .sf-tv > span { font-size: 12.5px; padding: 3px 2px; }
.is-4 .sf-tv.big > span { font-size: 12px; }
.sf-rm { position: absolute; inset-inline-end: 2px; top: 2px; width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; padding: 0 !important; }
.sf-rm i { width: 24px; height: 24px; border-radius: 12px; background: rgba(11, 15, 20, .72); color: #FFF; display: flex; align-items: center; justify-content: center; }
.sf-legend { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13px; font-weight: 600; color: var(--sf-muted); width: 100%; min-height: 44px; text-align: start; padding: 0 2px !important; }
.sf-legend em { font-style: normal; display: flex; align-items: center; gap: 6px; }
.sf-legend em i { width: 14px; height: 14px; border-radius: 4px; background: var(--sf-lime); display: block; }
.sf-sw-wrap { display: flex; align-items: center; gap: 7px; color: var(--sf-asphalt); font-weight: 700; }
.sf-sw { width: 46px; height: 28px; border-radius: 14px; background: var(--sf-line); position: relative; flex: none; display: block; }
.sf-sw::after { content: ""; position: absolute; top: 3px; inset-inline-start: 3px; width: 22px; height: 22px; border-radius: 11px; background: #FFF; transition: inset-inline-start .15s; }
.sf-legend[aria-checked="true"] .sf-sw { background: var(--sf-asphalt); }
.sf-legend[aria-checked="true"] .sf-sw::after { inset-inline-start: 21px; background: var(--sf-lime); }
.sf-tb { background: #FFF; border-radius: 16px; padding: 0 8px; }
.sf-tr { padding: 9px 0; }
.sf-tr + .sf-tr { border-top: 1px solid var(--sf-line); }
.sf-tl { font-size: 12.5px; font-weight: 700; color: var(--sf-muted); margin: 0 2px 5px; }
.sf-tv { display: grid; gap: 6px; }
.sf-tv > span { font-weight: 700; font-size: 13.5px; display: flex; justify-content: center; align-items: center; gap: 4px; text-align: center; border-radius: 9px; min-height: 32px; padding: 3px; overflow-wrap: anywhere; }
.sf-tv > span .tm-flag { display: inline-flex; }
.sf-tv .best { background: var(--sf-lime); font-weight: 800; }
.sf-tv.big > span { font-family: var(--sf-d); font-weight: 800; font-size: 13px; }

/* Saved search cards (From Europe) */
.sf-sc { background: #FFF; border-radius: 16px; overflow: hidden; position: relative; }
.sf-so { display: flex; gap: 11px; padding: 10px 46px 10px 10px !important; width: 100%; align-items: center; text-align: start; }
[dir="rtl"] .sf-so { padding: 10px 10px 10px 46px !important; }
.sf-so.is-busy { opacity: .6; }
.sf-so-pic { width: 96px; height: 72px; border-radius: 12px; overflow: hidden; background: #E7E3DB; flex: none; position: relative; display: flex; }
.sf-so-x { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.sf-so-title { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.sf-so-title b { font-family: var(--sf-d); font-weight: 800; font-size: 15px; }
.sf-so-line { font-weight: 800; font-size: 13.5px; min-height: 17px; }
.sf-skel { display: block; width: 60%; height: 12px; border-radius: 6px; background: linear-gradient(90deg, #eee 25%, #f7f7f7 50%, #eee 75%); background-size: 200% 100%; animation: acc-skel-shimmer 1.2s linear infinite; }
.sf-gain { background: var(--sf-lime); border-radius: 6px; padding: 2px 7px; font-size: 12px; font-weight: 800; align-self: flex-start; }
.sf-ft { display: flex; align-items: center; justify-content: space-between; gap: 8px; border-top: 1px solid var(--sf-line); padding: 0 12px; min-height: 46px; font-size: 13px; font-weight: 600; color: var(--sf-muted); }
.sf-ft.old { color: var(--sf-asphalt); font-weight: 700; }
.sf-dot { width: 8px; height: 8px; border-radius: 4px; background: var(--sf-amber); display: inline-block; margin-inline-end: 6px; }
.sf-again { min-height: 46px; font-weight: 800 !important; font-size: 14px; color: var(--sf-asphalt) !important; display: inline-flex; align-items: center; gap: 6px; flex: none; }
.sf-again[disabled] { color: var(--sf-muted) !important; cursor: default; }
.sf-utd { font-weight: 800; color: var(--sf-asphalt); }

/* In Algeria rows */
.sf-rows { background: #FFF; border-radius: 16px; overflow: hidden; }
.sf-lrow { display: flex; align-items: center; width: 100%; min-height: 66px; padding: 0 2px 0 12px; }
[dir="rtl"] .sf-lrow { padding: 0 12px 0 2px; }
.sf-lrow + .sf-lrow { border-top: 1px solid var(--sf-line); }
.sf-lrow-main { display: flex; align-items: center; gap: 11px; flex: 1; min-width: 0; min-height: 60px; color: inherit; }
.sf-ri { width: 40px; height: 40px; border-radius: 12px; background: var(--sf-sand); display: flex; align-items: center; justify-content: center; flex: none; }
.sf-rt { min-width: 0; }
.sf-rt b { display: block; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sf-rt span { font-size: 13px; font-weight: 600; color: var(--sf-muted); }
.sf-more { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; color: var(--sf-muted) !important; flex: none; padding: 0 !important; }
.sf-recents-link { margin: 18px 0 0; text-align: center; }
.sf-rename { width: 100%; min-height: 48px; border: 1.5px solid var(--sf-line, #E6E2DA); border-radius: 13px; padding: 0 14px; font: 600 16px/1.2 "Manrope", system-ui, sans-serif; margin: 0 0 14px; box-sizing: border-box; }
.acc-action-sheet .acc-secondary-btn + .acc-secondary-btn { margin-top: 8px; }
.acc-action-sheet .acc-secondary-btn.is-danger { color: #c62828; }

/* Loading skeleton: the same cards as the real views, grey bones instead of text (saved-flow.js skeletonMarkup). */
.sf-loading { pointer-events: none; }
.sf-bone { display: block; flex: none; height: 12px; max-width: 100%; border-radius: 6px; background: linear-gradient(90deg, #ECE9E3 25%, #F6F4F0 50%, #ECE9E3 75%); background-size: 200% 100%; animation: acc-skel-shimmer 1.2s ease-in-out infinite; }
.sf-bone-fill { position: absolute; inset: 0; width: auto; height: auto; border-radius: 0; }
.sf-bone-lg { height: 16px; }
.sf-bone-tag { width: 76px; height: 18px; margin-top: 2px; }
.sf-loading .sf-txt, .sf-loading .sf-so-x { gap: 8px; }
.sf-loading .sf-so-pic, .sf-loading .sf-cp { position: relative; }
.sf-seg-bones span { min-height: 44px; border-radius: 10px; }
.sf-seg-bones span:first-child { background: #FFF; }
.sf-bone-sec { width: 120px; height: 13px; margin: 6px 2px 0; }
.sf-bone-verdict { height: 66px; border-radius: 16px; }
.sf-bone-legend { width: 58%; height: 16px; margin: 14px 2px; }
.sf-bone-label { width: 32%; height: 10px; margin: 2px 2px 8px; }
.sf-loading .sf-tv > span { min-height: 32px; }
.sf-loading .sf-cn { padding: 9px 7px 10px; }
@media (prefers-reduced-motion: reduce) { .sf-bone { animation: none; } }

@media (min-width: 761px) {
  .sf-list { max-width: 640px; }
  .sf-head { max-width: 640px; }
}
