/* AutoDeals.md — listing form as a full page (owner's TZ 03.12, AUTO.RIA reference). Applies only to body.sell-page. */
:root{--sp-ink:#1d2433;--sp-muted:#5b6676;--sp-line:#e3e7ed;--sp-field:#c3ccd8;--sp-blue:#1a73e8;--sp-blue-soft:#e8f1fe;--sp-red:#d11a2a;--sp-bg:#fff}

/* page mode: the site's header stays, the home page content gives way to the form */
body.sell-page{background:#f4f6f9}
body.sell-page>*:not(header):not(#sellModal):not(#spSignin):not(#spNav):not(#spPreviewDialog):not(.m-bg):not(dialog):not(script):not(style):not(link):not(.marketplace-mobile-nav):not(.photo-viewer):not(#toast){display:none!important}
body.sell-page #sellModal.open{position:static;display:block;inset:auto;background:none;padding:0;overflow:visible;z-index:auto}
body.sell-page:has(#sellModal.open){overflow:auto}
body.sell-page #sellModal .modal{position:static;max-width:1040px!important;width:auto!important;max-height:none!important;min-height:0;
  margin:18px auto 60px;padding:6px 32px 28px!important;border-radius:10px;box-shadow:0 1px 3px rgba(16,24,40,.08);background:var(--sp-bg);overflow:visible}
body.sell-page.sell-open #spSignin{display:none}
.sp-signin{max-width:720px;margin:40px auto;padding:28px;background:#fff;border-radius:10px;box-shadow:0 1px 3px rgba(16,24,40,.08);text-align:center}
.sp-signin h1{font-size:26px;margin:0 0 10px;color:var(--sp-ink)}
.sp-signin p{color:var(--sp-muted);font-size:16px;line-height:1.5}

/* page title bar */
body.sell-page .sell-header{position:static;border:0;padding:14px 0 6px;flex-wrap:wrap}
body.sell-page #sellHeading{font-size:28px;font-weight:700;color:var(--sp-ink);margin:0}
body.sell-page #sellClose.sp-back{min-width:0;min-height:40px;font-size:15px;font-weight:600;padding:8px 14px;border:1px solid var(--sp-field);border-radius:6px;background:#fff;color:var(--sp-ink)}
body.sell-page #sellClose.sp-back:hover{border-color:var(--sp-blue);color:var(--sp-blue)}
body.sell-page .sell-autosave{margin:0 0 6px}

/* sections: grey round number, bold dark title, chevron, thin translucent divider */
body.sell-page #sellModal .sell-step.sp-section{display:block!important;border-top:1px solid rgba(160,172,189,.38);padding:4px 0 18px;margin:0}
body.sell-page #sellModal .sp-section:first-of-type{border-top:0}
.sp-head{display:flex;align-items:flex-start;gap:12px;width:100%;padding:18px 4px 12px;border:0;background:none;text-align:left;cursor:pointer;color:var(--sp-ink);border-radius:6px}
.sp-head:hover .sp-title{color:var(--sp-blue)}
.sp-head:focus-visible{outline:3px solid rgba(26,115,232,.35);outline-offset:2px}
.sp-num{flex:none;width:28px;height:28px;border-radius:50%;background:#a3adbb;color:#fff;font-weight:700;font-size:15px;display:inline-flex;align-items:center;justify-content:center;margin-top:1px}
.sp-titles{display:grid;gap:3px;flex:1;min-width:0}
.sp-title{font-size:20px;font-weight:700;line-height:1.3}
.sp-subtitle{font-size:14px;color:var(--sp-muted);font-weight:400}
.sp-chevron{flex:none;width:12px;height:12px;margin:8px 6px 0 0;border-right:2.5px solid #7b8798;border-bottom:2.5px solid #7b8798;transform:rotate(-135deg);transition:transform .15s}
.sp-collapsed .sp-chevron{transform:rotate(45deg);margin-top:2px}
.sp-collapsed .sp-body{display:none}
.sp-body{display:grid;gap:12px;padding:2px 0 0 40px;min-width:0}

/* labelled rows: label column + control (AUTO.RIA layout); one column on phones */
.sp-row{display:grid;grid-template-columns:220px minmax(0,440px);gap:6px 18px;align-items:start;min-width:0}
.sp-row[hidden],.sp-proxied,.sp-rest[hidden]{display:none!important}
.sp-label{padding-top:10px;font-size:15px;font-weight:600;color:#2b3443;line-height:1.3}
.sp-req{color:var(--sp-red);font-weight:800;margin-left:4px}
.sp-ctl{display:grid;gap:6px;min-width:0}
.sp-ctl>label.sell-field{display:block}
.sp-wide{grid-template-columns:1fr}
.sp-sub{margin-left:28px}
body.sell-page #sellModal .req-field::after{content:none}

/* fields: clear borders, blue outline on hover, strong focus, selected values dark */
body.sell-page #sellModal .fld,body.sell-page #sellModal input[type=text],body.sell-page #sellModal input[type=number],body.sell-page #sellModal input[type=tel],
body.sell-page #sellModal select,body.sell-page #sellModal textarea{min-height:42px;border:1.5px solid var(--sp-field)!important;border-radius:6px;background:#fff;
  color:var(--sp-ink);font-size:16px;padding:8px 12px;transition:border-color .12s,box-shadow .12s;width:100%;box-sizing:border-box}
body.sell-page #sellModal select{appearance:auto;cursor:pointer}
body.sell-page #sellModal .fld:hover,body.sell-page #sellModal select:hover,body.sell-page #sellModal textarea:hover,body.sell-page #sellModal input:hover:not([type=checkbox]),
body.sell-page #sellModal .phone-picker .phone-field:hover{border-color:var(--sp-blue)!important;box-shadow:0 0 0 2px rgba(26,115,232,.12)}
body.sell-page #sellModal .fld:focus,body.sell-page #sellModal select:focus,body.sell-page #sellModal textarea:focus,body.sell-page #sellModal input:focus:not([type=checkbox]){
  outline:0;border-color:var(--sp-blue)!important;box-shadow:0 0 0 3px rgba(26,115,232,.25)!important}
body.sell-page #sellModal ::placeholder{color:#8a95a5;opacity:1}
body.sell-page #sellModal .phone-picker .phone-field{border:1.5px solid var(--sp-field)}
body.sell-page #sellModal textarea#sDescription{min-height:170px;resize:vertical;line-height:1.5}
body.sell-page #sellModal .ad-ac-menu{z-index:30;border:1.5px solid var(--sp-blue);border-radius:6px;box-shadow:0 8px 24px rgba(16,24,40,.16);background:#fff}
body.sell-page #sellModal .ad-ac-menu [aria-selected="true"],body.sell-page #sellModal .ad-ac-menu .active,body.sell-page #sellModal .ad-ac-menu li:hover,
body.sell-page #sellModal .ad-ac-menu button:hover{background:var(--sp-blue-soft);color:var(--sp-ink)}
/* containers never clip an open list */
body.sell-page #sellModal .sp-body,body.sell-page #sellModal .sp-row,body.sell-page #sellModal .sp-ctl,body.sell-page #sellModal .modal{overflow:visible}

/* checkboxes: clear box, visible tick, whole line reacts */
.sp-check,body.sell-page #sellModal .sell-feature-options label{display:flex;align-items:center;gap:10px;min-height:36px;padding:4px 8px;margin-left:-8px;border-radius:6px;
  font-size:15px;color:var(--sp-ink);cursor:pointer;font-weight:500}
.sp-check:hover,body.sell-page #sellModal .sell-feature-options label:hover{background:var(--sp-blue-soft)}
body.sell-page #sellModal input[type=checkbox]{width:20px;height:20px;flex:none;accent-color:var(--sp-blue);cursor:pointer;margin:0}
.sp-check:has(input:checked),body.sell-page #sellModal .sell-feature-options label:has(input:checked){font-weight:650}
.sp-checks{display:grid;gap:2px;padding-left:238px}

/* information blocks */
.sp-info{font-size:15px;line-height:1.5;color:#2f3a4a}
.sp-lead{color:#2f3a4a}
.sp-note{background:#f3f6fa;border-left:3px solid #a3adbb;padding:10px 14px;border-radius:4px;font-size:14px}
.sp-howto{background:#eef4fb;border-radius:6px;padding:10px 14px;font-size:14.5px}
.sp-howto summary{cursor:pointer;color:var(--sp-blue);font-weight:600;text-decoration:underline;text-underline-offset:3px}
.sp-howto ul{margin:10px 0 2px;padding-left:20px;line-height:1.55}
.sp-howto p{margin:8px 0 0;line-height:1.5}
.sp-help{display:none}
.sp-quick{font-size:14px}
.sp-quick summary{cursor:pointer;color:var(--sp-blue)}
.sp-import{display:grid;grid-template-columns:220px minmax(0,440px);gap:18px;font-weight:600}

/* photos: square dashed drop area with a camera; blue on hover, press and drag */
.sp-drop{width:132px;height:132px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;border:2px dashed #93a0b2;border-radius:8px;
  color:#4d5a6b;background:#fafbfc;cursor:pointer;text-align:center;font-size:15px;font-weight:600;transition:all .12s;position:relative}
.sp-drop:hover,.sp-drop:focus-visible,.sp-drop.sp-dragging{border-color:var(--sp-blue);color:var(--sp-blue);background:var(--sp-blue-soft);box-shadow:0 0 0 3px rgba(26,115,232,.18);outline:0}
.sp-drop:active{transform:scale(.98)}
.sp-file{position:absolute!important;width:1px!important;height:1px!important;opacity:0;pointer-events:none;overflow:hidden}
.sp-photo-count{margin:0;font-size:14.5px;color:var(--sp-muted)}
body.sell-page #sPhotoPreview{grid-template-columns:repeat(auto-fill,minmax(150px,1fr))!important;gap:12px!important}
body.sell-page #sPhotoPreview .listing-photo-card{border:1px solid var(--sp-line);border-radius:8px;padding:6px;background:#fff;font-size:13px}
body.sell-page #sPhotoPreview .listing-photo-card img{width:100%;aspect-ratio:4/3;object-fit:cover;border-radius:5px}
body.sell-page #sPhotoPreview .listing-photo-card:first-child{border:2px solid var(--sp-blue)}
body.sell-page #sPhotoPreview .listing-photo-card button{min-width:34px;min-height:34px;margin:4px 4px 0 0;border:1px solid var(--sp-field);border-radius:6px;background:#fff;cursor:pointer;font-size:16px}
body.sell-page #sPhotoPreview .listing-photo-card button:hover{border-color:var(--sp-blue);color:var(--sp-blue)}
body.sell-page #ad60Box{margin-top:8px}

/* VIN block */
.sp-vin{background:#eef2f6;border-radius:8px;padding:16px 20px;display:grid;gap:10px}
.sp-vin h4{margin:0;font-size:17px;color:var(--sp-ink)}
.sp-vin .sp-row{grid-template-columns:200px minmax(0,440px)}
.sp-vin .sp-ctl{grid-template-columns:minmax(0,1fr) auto;align-items:center}
.sp-vin #sVinStatus{grid-column:1/-1;font-size:14px}
.sp-vin .sp-howto{background:#fff}
.sp-owner h5{margin:6px 0 2px;font-size:15.5px;color:var(--sp-ink)}
.sp-owner p{margin:0 0 4px;font-size:14px;color:var(--sp-muted)}

/* description */
.sp-rules{font-size:14.5px;color:#2f3a4a}
.sp-rules ul{margin:6px 0 0;padding-left:20px;line-height:1.55}
.sp-rules li::marker{color:var(--sp-red)}
.sp-counter{margin:-4px 0 0;font-size:13.5px;color:var(--sp-muted)}

/* options */
.sp-option-rows{display:grid;gap:12px;margin-bottom:8px}
body.sell-page #sFeatures{display:grid;gap:10px}
body.sell-page #sFeatures details.sp-group{border:1px solid var(--sp-line);border-radius:8px;padding:8px 14px}
body.sell-page #sFeatures details.sp-group>summary{cursor:pointer;font-weight:700;font-size:15.5px;padding:6px 0;color:var(--sp-ink)}
body.sell-page #sellModal .sell-feature-options{grid-template-columns:repeat(auto-fill,minmax(230px,1fr));gap:2px 18px;margin:4px 0 6px}

/* price: amount and currency together */
.sp-price-group{display:grid;grid-template-columns:minmax(0,1fr) 112px;gap:0}
.sp-price-group #sPrice{border-radius:6px 0 0 6px!important}
.sp-price-group #sPriceCurrency{border-radius:0 6px 6px 0!important;border-left-width:0!important;font-weight:650}
#sPricePreview{font-size:13.5px;color:var(--sp-muted)}

/* errors only after an attempt to send */
.sp-invalid .fld,.sp-invalid select,.sp-invalid input:not([type=checkbox]),.sp-invalid textarea,.sp-invalid .phone-field,.sp-drop.sp-invalid{border-color:var(--sp-red)!important;box-shadow:0 0 0 3px rgba(209,26,42,.14)!important}
.sp-error{margin:0;color:#b4121f;font-size:14px;font-weight:600}
body.sell-page #sellModal [aria-invalid="true"]{border-color:var(--sp-red)!important}

/* footer */
.sp-footer{border-top:1px solid rgba(160,172,189,.38);margin-top:6px;padding-top:18px;display:grid;gap:14px}
.sp-footer-main{display:grid;gap:12px}
.sp-legend{margin:0;font-size:14px;color:var(--sp-muted)}
.sp-buttons{display:flex;flex-wrap:wrap;gap:12px;align-items:center}
.sp-btn{min-height:46px;padding:10px 20px;border:1.5px solid var(--sp-field);border-radius:6px;background:#fff;color:var(--sp-ink);font-size:16px;font-weight:650;cursor:pointer;transition:all .12s}
.sp-btn:hover{border-color:var(--sp-blue);color:var(--sp-blue);box-shadow:0 0 0 2px rgba(26,115,232,.12)}
.sp-btn:active{transform:translateY(1px)}
.sp-btn.sp-done{border-color:#18794e;color:#18794e}
body.sell-page #sellPublish.sp-publish,.sp-btn.sp-publish{min-height:48px;padding:10px 28px;border:0;border-radius:6px;background:#e31e24;color:#fff;font-size:17px;font-weight:700;width:auto}
body.sell-page #sellPublish.sp-publish:hover,.sp-btn.sp-publish:hover{background:#c4161c;color:#fff;box-shadow:0 0 0 3px rgba(227,30,36,.2)}
body.sell-page #sTermsBox{font-size:14.5px!important}
body.sell-page #sTermsBox a{color:var(--sp-blue)}

/* phones and narrow screens: one column, same order, large touch targets, nothing wider than the screen */
@media (max-width:760px){
  body.sell-page{background:#fff}
  body.sell-page #sellModal .modal{margin:0 0 70px;padding:4px 14px 24px!important;border-radius:0;box-shadow:none}
  body.sell-page #sellHeading{font-size:22px}
  .sp-body{padding-left:0}
  .sp-row,.sp-vin .sp-row,.sp-import{grid-template-columns:1fr;gap:6px}
  .sp-label{padding-top:2px}
  .sp-checks{padding-left:0}
  .sp-title{font-size:18px}
  .sp-head{padding:16px 0 10px}
  .sp-vin{padding:14px}
  .sp-buttons>*{flex:1 1 100%}
  body.sell-page #sellPublish.sp-publish{width:100%}
  .sp-head:active{background:var(--sp-blue-soft)}
  .sp-drop:active,.sp-btn:active,.sp-check:active{background:var(--sp-blue-soft)}
  body.sell-page #sellModal .sell-feature-options{grid-template-columns:1fr}
}

/* the review / preview card fits every screen (it was wider than a phone) */
body.sell-page #listingReviewDialog{width:min(620px,94vw);max-width:94vw!important;max-height:90vh;overflow:auto;box-sizing:border-box;padding:18px!important}
body.sell-page #listingReviewDialog *{max-width:100%;box-sizing:border-box}
body.sell-page #listingReviewDialog .review-photos{display:flex;gap:8px;overflow-x:auto}
body.sell-page #listingReviewDialog .review-photos img{flex:0 0 78%;max-height:240px;object-fit:cover;border-radius:8px}
body.sell-page #listingReviewDialog .review-specs{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.3fr);gap:6px 12px;font-size:15px}
body.sell-page #listingReviewDialog .review-specs dd{margin:0;font-weight:650;overflow-wrap:anywhere}
body.sell-page #listingReviewDialog .review-description{overflow-wrap:anywhere;white-space:pre-wrap}
body.sell-page #listingReviewDialog button{min-height:46px;width:100%}
.sp-photo-count[hidden]{display:none}

/* 03.12 acceptance: the site's bottom menu on phones («Sell» active), nothing hidden under it; the quick engine-size list is not shown */
.sp-nav{display:none}
.sp-hint{margin:0;font-size:13.5px;color:var(--sp-muted)}
@media (max-width:760px){
  body.sell-page .marketplace-mobile-nav{display:none!important}
  body.sell-page .sp-nav{display:grid;grid-template-columns:repeat(5,1fr);position:fixed;left:0;right:0;bottom:0;z-index:40;background:#fff;border-top:1px solid #e5e7eb;
    height:calc(64px + env(safe-area-inset-bottom,0px));box-sizing:border-box;padding:6px 2px env(safe-area-inset-bottom,0px)}
  body.sell-page .sp-nav a{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;color:#374151;text-decoration:none;font-size:12px;font-weight:600;min-width:0}
  body.sell-page .sp-nav a svg{width:24px;height:24px}
  body.sell-page .sp-nav a.sell svg{width:34px;height:34px;margin-top:-4px}
  body.sell-page .sp-nav a.current{color:#d6262b}
  body.sell-page .sp-nav a:active{background:var(--sp-blue-soft)}
  body.sell-page{padding-bottom:calc(76px + env(safe-area-inset-bottom,0px))}
  body.sell-page #sellModal .modal{margin-bottom:0}
}

/* preview: the real listing page in a full-screen frame, with the form's actions on top */
.sp-preview{width:100vw;height:100vh;max-width:100vw;max-height:100vh;margin:0;padding:0;border:0;background:#fff;display:none;flex-direction:column}
.sp-preview[open]{display:flex}
.sp-preview::backdrop{background:rgba(15,23,42,.6)}
.sp-preview-bar{display:flex;flex-wrap:wrap;gap:10px;align-items:center;padding:10px max(16px,env(safe-area-inset-left,0px)) 10px max(16px,env(safe-area-inset-right,0px));
  padding-top:max(10px,env(safe-area-inset-top,0px));border-bottom:1px solid var(--sp-line);background:#fff}
.sp-preview-title{display:grid;gap:2px;flex:1 1 260px;min-width:0}
.sp-preview-title b{font-size:18px;color:var(--sp-ink)}
.sp-preview-title span{font-size:14px;color:var(--sp-muted)}
.sp-preview-frame{flex:1;width:100%;border:0;min-height:0}
@media (max-width:760px){.sp-preview-bar .sp-btn{flex:1 1 45%;min-height:44px;padding:8px 10px;font-size:15px}}
.sp-vin .sp-row[data-field=sPlate] .sp-ctl{grid-template-columns:minmax(0,220px)}
.sp-vin .sp-row[data-field=sPlate] .sp-hint{grid-column:1/-1}
