/* Publishing-only layout. Original font, artwork and shared header remain intact. */
.publication-dialog{width:min(680px,calc(100% - 24px));max-height:calc(100dvh - 24px);padding:20px 24px;border:0;border-radius:22px;background:#f7f9fc;color:#17344e;overflow:auto;box-sizing:border-box}
.publication-dialog .dialog-head{margin-bottom:8px}.publication-dialog .dialog-head h2{font-size:14px}.publication-dialog .dialog-head::before{content:'';width:112px;height:58px;background:url('/account-assets/assets/himoola-logo-120.webp') center/contain no-repeat;background-image:image-set(url('/account-assets/assets/himoola-logo-120.webp') 1x,url('/account-assets/assets/himoola-logo-240.webp') 2x,url('/account-assets/assets/himoola-logo-360.webp') 3x);display:block;margin-inline:auto}
.publication-flow{--flow-primary:#25577f;--flow-ink:#fff;--flow-selected:#edf5fc;font-family:'Himoola Arabic',sans-serif;line-height:1.65}.publication-flow[data-kind=load]{--flow-primary:#f2bc91;--flow-ink:#4c2b18;--flow-selected:#fff0e4}.publication-dialog:has([data-kind=load]){background:#fffaf6}
.publication-flow [hidden]{display:none!important}.publication-flow h2.publish-heading{font-size:27px;line-height:1.45;margin:14px 0 5px}.publish-intro,.publish-note{font-size:14px;color:#607080;margin:8px 0 16px}.publish-progress{display:flex;list-style:none;padding:0;margin:20px 0 28px;gap:8px}.publish-progress li{flex:1;display:flex;align-items:center;gap:7px;font-size:12px;font-weight:700;color:#697989}.publish-progress b{display:grid;place-items:center;width:29px;height:29px;flex-shrink:0;border-radius:50%;background:#e7ebef}.publish-progress [aria-current] b,.publish-progress [data-complete=true] b{background:var(--flow-primary);color:var(--flow-ink)}.publish-progress [aria-current]{color:#17344e}
.publication-flow .fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.publication-flow label{font-size:14px;font-weight:700;display:block}.publication-flow input:not([type=checkbox]),.publication-flow select,.publication-flow textarea{width:100%;min-height:46px;padding:10px 12px;border:1px solid #c9d3dc;border-radius:10px;background:white;color:#17344e;font:inherit;font-size:16px;box-sizing:border-box}.publication-flow input[type=checkbox]{width:22px;height:22px;flex-shrink:0;accent-color:#25577f}.publication-flow .field.full,.publish-vehicles{grid-column:1/-1}.publication-flow button,.publication-flow a{font-family:inherit}.publication-flow button{cursor:pointer}.publication-flow button:disabled{cursor:not-allowed;opacity:.55}.publication-flow :focus-visible{outline:3px solid #366f9d;outline-offset:3px}
.publish-primary,.publish-secondary{min-height:48px;border-radius:12px;padding:10px 18px;font-size:17px;font-weight:700;border:1px solid #becbd6}.publish-primary{background:var(--flow-primary);color:var(--flow-ink);border-color:transparent}.publish-secondary{background:#fff;color:#17344e}.publish-controls{position:sticky;bottom:-20px;display:flex;gap:12px;padding:16px 0 max(16px,env(safe-area-inset-bottom));background:#f7f9fc;z-index:2;border-top:1px solid #dce3e8;margin-top:20px}.publication-flow[data-kind=load] .publish-controls{background:#fffaf6}.publish-controls .publish-primary{flex:1}.publish-tabs{display:flex;gap:10px;margin:8px 0}.publish-tabs button{flex:1}.publish-tabs [aria-pressed=true]{background:var(--flow-selected);border-color:var(--flow-primary)}.publish-category-strip{display:flex;gap:10px;overflow-x:auto;padding:8px 3px 18px;scroll-snap-type:x proximity}.publish-category{min-width:108px;width:108px;flex-shrink:0;border:1px solid #d5dee5;border-radius:14px;padding:8px;background:#fff;color:#17344e;scroll-snap-align:start}.publish-category svg{width:94px;height:58px}.publish-category strong{font-size:12px;display:block}.publish-category[aria-pressed=true],.publish-saved-card[aria-pressed=true]{border:2px solid var(--flow-primary);background:var(--flow-selected)}.publish-private-fields{display:grid;grid-template-columns:1fr 1fr;gap:12px}.publish-private-fields label:has([type=checkbox]){display:flex;align-items:center;gap:8px;grid-column:1/-1}.publish-unit{font-size:12px;color:#607080}.publish-saved-card{width:100%;display:grid;grid-template-columns:100px 1fr;align-items:center;text-align:start;border:1px solid #cad7e0;border-radius:14px;margin:10px 0;padding:12px;background:white;color:#17344e}.publish-saved-card svg{width:94px;height:58px;grid-row:span 3}.publish-saved-card small{grid-column:2}.publish-consent-label{display:flex!important;gap:12px;align-items:start;padding:16px;background:white;border:1px solid #ced9e3;border-radius:12px;margin:20px 0}.publication-flow .visual-review{border:1px solid #d5dfe6;border-radius:16px;padding:18px;background:white}.publication-flow .visual-review svg{max-height:110px;width:160px}.publication-flow .visual-review p{border-bottom:1px solid #e8edf1;padding:10px 0;margin:0;overflow-wrap:anywhere}.publication-flow .visual-review button{float:left;min-height:40px}.publication-flow details{background:white;border:1px solid #d8e0e7;border-radius:12px;padding:14px;margin:18px 0}.publication-flow details label{margin-top:10px}.publication-flow .visual-choice-grid{gap:8px}.publication-flow .visual-choice{border-radius:12px;min-height:48px}.publication-flow .visual-choice[aria-pressed=true]{background:var(--flow-selected);border-color:var(--flow-primary)}.publication-flow .local-photo{background:white;border:1px dashed #b7c7d4;border-radius:16px;padding:18px}.publication-flow .form-error{scroll-margin:24px}
@media(max-width:520px){.publication-dialog{width:100%;max-width:100%;max-height:100dvh;height:100dvh;margin:0;padding:16px;border-radius:0}.publication-flow .fields,.publish-private-fields{grid-template-columns:minmax(0,1fr)}.publish-controls{bottom:-16px}.publish-progress{gap:4px}.publish-progress li{gap:4px;font-size:11px}.publication-flow .visual-review button{float:none;display:block;margin-top:6px}}
@media(prefers-reduced-motion:reduce){.publication-flow *{scroll-behavior:auto}}
body #editor.publication-dialog{background:#f7f9fc;border:0;border-radius:22px;max-width:680px;max-height:calc(100dvh - 24px);padding:20px 24px}
body #editor.publication-dialog:has([data-kind=load]){background:#fffaf6}
#editor.publication-dialog .dialog-head{position:relative;height:68px;display:block;margin:0}
#editor.publication-dialog .dialog-head::before{position:absolute;top:0;left:50%;transform:translateX(-50%);margin:0;width:112px;height:58px}
#editor.publication-dialog .dialog-head h2{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
#editor.publication-dialog .close-button{position:absolute;left:0;top:7px}
#editor.publication-dialog .publication-flow{background:transparent}
#editor.publication-dialog .publish-primary{background:var(--flow-primary);color:var(--flow-ink);border-radius:12px}
@media(max-width:520px){body #editor.publication-dialog{width:100%;max-width:100%;max-height:100dvh;height:100dvh;margin:0;padding:16px;border-radius:0}}
/* Outrank the older glass-dialog theme only for this new publishing dialog. */
body dialog#editor.publication-dialog[open]{background:#f7f9fc;backdrop-filter:none;-webkit-backdrop-filter:none;border-radius:22px}
body dialog#editor.publication-dialog[open]:has([data-kind=load]){background:#fffaf6}
@media(max-width:520px){body dialog#editor.publication-dialog[open]{border-radius:0;max-width:100%;max-height:100dvh}}

/* Container-sized publication layout shared by load and vehicle entry points. */
body:has(>dialog#editor.publication-dialog[open]){overflow:hidden}
body dialog#editor.publication-dialog{
 width:min(920px,calc(100% - 48px));max-width:920px;
 max-height:calc(100dvh - 48px);padding:24px 32px;
 scroll-padding-block:24px 100px;overscroll-behavior:contain;
}
body #editor.publication-dialog .publication-flow .fields{
 grid-template-columns:repeat(2,minmax(0,1fr));align-items:start;gap:24px;
}
body #editor.publication-dialog :is(.field,fieldset,.publish-vehicles,.publish-private-fields,label){min-width:0;max-width:100%;box-sizing:border-box}
body #editor.publication-dialog .field:has(>[name=cargo],>[name=category],>[name=categoryOther],>[name=truck]){grid-column:1/-1}
body #editor.publication-dialog .visual-packaging{margin:0}
body #editor.publication-dialog .visual-choice-grid{margin-block:4px 0;gap:10px}
body #editor.publication-dialog .visual-choice-grid:has(>.visual-choice>svg){
 display:grid;grid-template-columns:repeat(4,minmax(0,1fr));align-items:stretch;
}
body #editor.publication-dialog .visual-choice-grid>.visual-choice:has(svg){
 grid-template-rows:72px minmax(3.2em,auto);min-height:0;padding:12px;gap:8px;
}
body #editor.publication-dialog .visual-choice-grid>.visual-choice>svg{height:72px;width:100%;max-width:132px}
body #editor.publication-dialog .visual-choice-grid>.visual-choice>span:not(.visual-choice-check){align-self:center}
body #editor.publication-dialog .publication-flow .publish-heading{margin-top:8px}
body #editor.publication-dialog .publish-heading:focus{outline:none}
body #editor.publication-dialog .publish-progress{padding-bottom:20px;border-bottom:1px solid #dce3e8;margin-bottom:24px}
body #editor.publication-dialog .publish-controls{bottom:-24px;padding-block:16px 24px;margin-top:24px;flex-wrap:wrap}
body #editor.publication-dialog .publish-controls>button{min-width:0;white-space:normal}
body #editor.publication-dialog .publication-flow :is(input:not([type=checkbox]):not(.visual-native-choice),select:not(.visual-native-choice),textarea){min-width:0;max-width:100%;box-sizing:border-box}
body #editor.publication-dialog .visual-number>input{flex:1 1 0;width:0}
body #editor.publication-dialog .visual-number>button{width:46px;min-width:46px;padding:0}
body #editor.publication-dialog .visual-review p{display:flow-root}
body #editor.publication-dialog .visual-review button{max-width:100%;white-space:normal;margin-inline-start:12px}
@media(min-width:761px){
 body #editor.publication-dialog .publish-category-strip{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));overflow:visible;scroll-snap-type:none}
 body #editor.publication-dialog .publish-category{width:100%;min-width:0}
 body #editor.publication-dialog .publish-category svg{max-width:100%}
}
@media(max-width:760px){
 body dialog#editor.publication-dialog{width:calc(100% - 24px);max-height:calc(100dvh - 24px);padding:20px}
 body #editor.publication-dialog .publication-flow .fields{grid-template-columns:minmax(0,1fr);gap:20px}
 body #editor.publication-dialog .visual-choice-grid:has(>.visual-choice>svg){grid-template-columns:repeat(2,minmax(0,1fr))}
 body #editor.publication-dialog .publish-controls{bottom:-20px;padding-bottom:20px}
}
@media(max-width:520px){
 body dialog#editor.publication-dialog{width:100%;max-width:100%;height:100dvh;max-height:100dvh;padding:16px;margin:0}
 body #editor.publication-dialog .publish-controls{bottom:-16px;padding-bottom:max(16px,env(safe-area-inset-bottom))}
 body #editor.publication-dialog .publish-progress{padding-bottom:16px}
}


/* Desktop stage context only; retain the shipped responsive sizes and choices. */
@media(min-width:900px){
 body dialog#editor.publication-dialog[open]:has(.publication-flow){display:flex;flex-direction:column;height:min(900px,calc(100dvh - 48px));overflow:hidden}
 #editor.publication-dialog:has(.publication-flow) .dialog-head{flex:none}
 #editor.publication-dialog:has(.publication-flow) #editor-content{flex:1;min-height:0;display:flex;flex-direction:column}
 #editor.publication-dialog:has(.publication-flow) .publication-flow{flex:1;min-height:0;display:flex;flex-direction:column}
 #editor.publication-dialog:has(.publication-flow) :is(.publish-heading,.publish-intro,.publish-progress){flex:none}
 #editor.publication-dialog:has(.publication-flow) [data-publish-step]{position:relative;flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:4px 8px 16px;scroll-padding:12px;scrollbar-gutter:stable}
 body #editor.publication-dialog:has(.publication-flow) .publish-controls{position:static;flex:none;margin:8px 0 0;padding:12px 0 0}
 #editor.publication-dialog:has(.publication-flow) .publication-flow>.form-error:empty,#editor.publication-dialog:has(.publication-flow) [data-publication-progress]:empty{display:none}
 #editor.publication-dialog:has(.publication-flow) .publication-flow>.form-error,#editor.publication-dialog:has(.publication-flow) [data-publication-progress]{flex:none;margin:6px 0}
 body #editor.publication-dialog:has(.publication-flow) .visual-review p:has(button){display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:12px}
 body #editor.publication-dialog:has(.publication-flow) .visual-review button{float:none;margin:0;min-height:44px}
}

/* One bounded surface at every viewport. Only .stage-scroll scrolls vertically. */
body:has(#editor.publication-dialog[open]:has(.publication-flow)){overflow:hidden}
body dialog#editor.publication-dialog[open]:has(.publication-flow){
 display:flex;flex-direction:column;position:fixed;inset:auto;
 top:calc(var(--publish-offset,0px) + 8px);left:50%;transform:translateX(-50%);
 width:min(720px,calc(100% - 16px));max-width:calc(100% - 16px);
 height:calc(var(--publish-viewport,100dvh) - 16px);max-height:calc(var(--publish-viewport,100dvh) - 16px);
 margin:0;padding:12px 20px;border-radius:20px;overflow:hidden;
}
#editor.publication-dialog:has(.publication-flow) .dialog-head{height:36px;flex:none}
#editor.publication-dialog:has(.publication-flow) .dialog-head::before{height:32px;width:76px}
#editor.publication-dialog:has(.publication-flow) .close-button{top:0;min-height:36px;min-width:36px}
#editor.publication-dialog:has(.publication-flow) #editor-content{display:flex;flex:1;min-height:0;overflow:hidden}
#editor.publication-dialog .publication-flow{display:grid!important;grid-template-rows:auto auto minmax(0,1fr) auto;width:100%;min-width:0;min-height:0;flex:1}
body #editor.publication-dialog .publication-flow .publish-heading{font-size:clamp(1.1rem,3vw,1.5rem);margin:4px 0;line-height:1.4}
body #editor.publication-dialog .publication-flow .publish-progress{display:block;font-size:.875rem;margin:0;padding:0 0 8px;border-bottom:1px solid #dce3e8}
.stage-scroll{min-height:0;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;scrollbar-gutter:stable;scroll-padding-block:16px;padding:16px 6px;overflow-wrap:anywhere}
body #editor.publication-dialog .publication-flow [data-publish-step]{overflow:visible;min-height:0;padding:0;scrollbar-gutter:auto}
body #editor.publication-dialog .publication-flow .fields{display:block}
[data-field-group]{display:grid;grid-template-columns:minmax(0,1fr);gap:16px}
[data-field-group]>.field,[data-field-group]>section{min-width:0}
body #editor.publication-dialog .publication-flow .publish-controls{position:static;flex:none;display:flex;align-items:stretch;flex-wrap:wrap;gap:8px;margin:0;padding:10px 0 max(8px,env(safe-area-inset-bottom));border-top:1px solid #dce3e8}
body #editor.publication-dialog .publish-controls>button{font-size:1rem;line-height:1.4;min-height:44px;padding:10px 12px;min-width:0;overflow-wrap:anywhere}
body #editor.publication-dialog .publish-controls>button[data-publish-next]{flex:1}
body #editor.publication-dialog :is(.publish-category-strip,.visual-choice-grid:has(svg)){
 display:flex;gap:10px;overflow-x:auto;overflow-y:hidden;scroll-snap-type:x proximity;padding:6px 4px 12px;scrollbar-width:thin;
}
body #editor.publication-dialog :is(.publish-category-strip,.visual-choice-grid:has(svg))>button{flex:0 0 132px;min-width:0;width:132px;scroll-snap-align:center;white-space:normal}
body #editor.publication-dialog .visual-choice-grid>.visual-choice>svg{height:64px}
.publish-swipe-hint{font-size:.8rem;color:#607080;margin:4px 0}
body #editor.publication-dialog .publish-confirmation{position:static;display:block;box-shadow:none;border:0;padding:12px 0;background:transparent;max-width:100%;width:auto}
body #editor.publication-dialog .publish-confirmation h3{font-size:1.25rem}
@media(min-width:761px){body dialog#editor.publication-dialog[open]:has(.publication-flow){top:calc(var(--publish-offset,0px) + 16px);height:min(820px,calc(var(--publish-viewport,100dvh) - 32px))}[data-field-group=route]{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-height:480px){#editor.publication-dialog:has(.publication-flow) .dialog-head{height:28px}#editor.publication-dialog:has(.publication-flow) .dialog-head::before{height:24px}body #editor.publication-dialog .publication-flow .publish-heading{font-size:1rem}body #editor.publication-dialog .publication-flow .publish-controls{padding-block:4px}}
@media(prefers-reduced-motion:reduce){.publication-flow *{scroll-behavior:auto!important;animation:none!important;transition:none!important}}
/* Same surface primitive for the private add/edit vehicle and equipment path. */
.stage-surface{display:grid;grid-template-rows:auto auto minmax(0,1fr) auto;min-height:0;min-width:0}
body:has(.private-stage[open]){overflow:hidden}
.private-stage[open]{display:flex;flex-direction:column;position:fixed;inset:8px auto auto 50%;transform:translateX(-50%);width:min(720px,calc(100% - 16px));max-width:calc(100% - 16px);height:calc(var(--publish-viewport,100dvh) - 16px);max-height:calc(var(--publish-viewport,100dvh) - 16px);padding:16px;margin:0;border:0;border-radius:20px;box-sizing:border-box;overflow:hidden;background:#f7f9fc;color:#17344e}
.private-stage::backdrop{background:#132b4580}
.private-stage>h2{font-size:1rem;margin:0}.private-stage .stage-surface{flex:1}.private-stage .stage-surface>h3{font-size:1.25rem;margin:8px 0}.private-stage .publish-progress{display:block;margin:0;padding:4px 0;font-size:.875rem}.private-stage .publish-controls{position:static;margin:0;padding:8px 0;flex-wrap:wrap}.private-stage>.publish-controls{flex:none}.private-stage>button{flex:none;min-height:36px}.private-stage fieldset{min-width:0;max-width:100%;border:0;padding:0}.private-stage [hidden]{display:none!important}.private-stage .vehicle-editor{margin:12px 0}.private-stage label{display:block;margin:12px 0}.private-stage input,.private-stage select{max-width:100%;box-sizing:border-box}.private-stage .vehicle-family-grid,.private-stage .visual-choice-grid:has(svg){display:flex;overflow-x:auto;scroll-snap-type:x proximity;gap:10px;padding:6px 4px 12px}.private-stage .vehicle-family-grid>button,.private-stage .visual-choice-grid:has(svg)>button{flex:0 0 132px;min-width:0;scroll-snap-align:center}.private-stage .vehicle-family-grid svg,.private-stage .visual-choice-grid svg{width:100%;height:64px}.private-stage :focus-visible{outline:3px solid #366f9d;outline-offset:2px}
body #editor.publication-dialog .publication-flow .visual-choice-grid:has(>.visual-choice>svg){display:flex;flex-wrap:nowrap;justify-content:start}
body #editor.publication-dialog .publication-flow .visual-choice-grid>.visual-choice:has(svg){flex:0 0 132px;width:132px;min-height:0;grid-template-rows:64px minmax(3.2em,auto)}
body .private-stage .vehicle-family-grid,body .private-stage .visual-choice-grid:has(>.visual-choice>svg){display:flex;flex-wrap:nowrap;justify-content:start}
body #editor.publication-dialog .publication-flow .publish-controls{min-height:90px;box-sizing:border-box;align-items:center}
body #editor.publication-dialog .publication-flow .publish-controls>button{min-height:66px}
body #editor.publication-dialog .publication-flow .publish-controls>.publish-secondary{flex:0 1 auto;max-width:32%}
.private-stage-head{display:flex;justify-content:space-between;align-items:center;gap:12px;font-size:1rem;flex:none}.private-stage-head h2{font-size:1rem;margin:0}.private-stage-head button{min-height:44px;padding:8px 12px}.private-stage .stage-scroll>button{font-size:1rem;margin-block:12px}.private-stage .publish-controls{min-height:90px;box-sizing:border-box;align-items:center}.private-stage .publish-controls button{white-space:normal;min-width:0;max-width:100%;flex:1}.private-stage .publish-confirmation{position:static;max-width:100%;width:auto;padding:0;background:transparent;box-shadow:none;border:0}
@media(max-width:760px){body dialog#editor.publication-dialog[open]:has(.publication-flow){top:calc(var(--publish-offset,0px) + max(8px,env(safe-area-inset-top)));height:calc(var(--publish-viewport,100dvh) - max(8px,env(safe-area-inset-top)) - 8px);max-height:calc(var(--publish-viewport,100dvh) - max(8px,env(safe-area-inset-top)) - 8px)}}
.private-stage[open]{top:max(8px,env(safe-area-inset-top));height:calc(var(--publish-viewport,100dvh) - max(8px,env(safe-area-inset-top)) - 8px);max-height:calc(var(--publish-viewport,100dvh) - max(8px,env(safe-area-inset-top)) - 8px)}
.publish-review-links{display:flex;flex-wrap:wrap;gap:8px;margin-block:12px}.publish-review-links button{font-size:.875rem;min-height:44px;flex:1 1 140px}
/* Compact rails share one explicit selector, including text-only categories/cities. */
body #editor.publication-dialog .stage-surface :is([data-choice-for=category],.visual-chip-grid),
body #driver-profile .private-stage .stage-surface :is(.visual-choice-grid,.vehicle-family-grid){
 display:flex;flex-wrap:nowrap;justify-content:flex-start;gap:8px;overflow-x:auto;overflow-y:hidden;scroll-snap-type:x proximity;padding:4px 2px 8px;min-width:0;max-width:100%;scrollbar-width:thin;
}
body #editor.publication-dialog .stage-surface :is([data-choice-for=category],.visual-chip-grid)>button,
body #driver-profile .private-stage .stage-surface :is(.visual-choice-grid,.vehicle-family-grid)>button{
 flex:0 0 auto;width:auto;min-width:88px;max-width:100%;min-height:44px;margin:0;padding:8px 24px;scroll-snap-align:center;white-space:normal;word-break:normal;overflow-wrap:normal;
}
body #driver-profile .private-stage .stage-surface .visual-choice-grid>button:has(svg),
body #driver-profile .private-stage .stage-surface .vehicle-family-grid>button{flex:0 0 124px;width:124px;padding:8px;grid-template-rows:48px auto;min-height:104px}
body #driver-profile .private-stage .stage-surface :is(.visual-choice-grid,.vehicle-family-grid) svg{height:48px}
body #driver-profile .private-stage .stage-scroll fieldset{border:0;padding:0;margin:0;min-width:0}
body #driver-profile .private-stage .stage-scroll .vehicle-editor>legend{display:none}
body #driver-profile .private-stage .vehicle-variant-fields{gap:8px;min-width:0}
body #driver-profile .private-stage label{margin:8px 0}
body #driver-profile .private-stage .publish-controls{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,8em),1fr));gap:8px}
body #driver-profile .private-stage .publish-controls>button{margin:0;padding:8px 12px;min-height:44px;white-space:normal;word-break:normal;overflow-wrap:normal;hyphens:none;line-height:1.4}
body #editor.publication-dialog .stage-surface .publish-controls>button{word-break:normal;overflow-wrap:normal;hyphens:none}
body #editor.publication-dialog .stage-surface .visual-packaging .visual-choice-grid>button:has(svg){flex-basis:112px;width:112px;grid-template-rows:40px auto;padding:8px;gap:4px}
body #editor.publication-dialog .stage-surface .visual-packaging .visual-choice-grid>button>svg{height:40px}
body #editor.publication-dialog .stage-surface [data-field-group=cargo]{gap:10px}
body #editor.publication-dialog .stage-surface [data-field-group=cargo] .fine{margin-block:6px;font-size:.8rem}
body #editor.publication-dialog .stage-surface [data-field-group=route]{gap:12px}
body :is(#editor.publication-dialog,#driver-profile .private-stage) .publish-swipe-hint{font-size:.75rem;line-height:1.4;margin:2px 0 4px}
.swipe-touch{display:none}
@media(pointer:coarse),(max-width:760px){.swipe-touch{display:inline}.swipe-keyboard{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}}
/* Review summaries are grouped; edit actions do not repeat for every value. */
body #editor.publication-dialog .stage-surface .visual-review{padding:12px;margin-block:0}
body #editor.publication-dialog .stage-surface .visual-review>h3{margin:0 0 6px;font-size:1rem}
body #editor.publication-dialog .stage-surface .visual-review>div:has(svg){text-align:center}
body #editor.publication-dialog .stage-surface .visual-review svg{max-height:64px}
.publish-review-group{border-top:1px solid #dce3e8;padding-block:6px}.publish-review-group-head{display:flex;align-items:center;justify-content:space-between;gap:8px}.publish-review-group-head h4{margin:0;font-size:.9rem}
body #editor.publication-dialog .stage-surface .publish-review-group-head button{float:none;min-height:44px;font-size:.875rem;margin:0;padding:6px 10px}
.publish-review-group dl{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.5fr);gap:3px 10px;margin:0;font-size:.875rem;line-height:1.5}.publish-review-group dt{color:#607080}.publish-review-group dd{margin:0}
/* Keep the actual file input keyboard-accessible inside an Arabic picker label. */
.stage-surface .local-photo label:has(>[data-gallery]){position:relative;display:flex;align-items:center;justify-content:center;min-height:48px;padding:8px 12px;border:1px solid #a4b0bd;border-radius:10px;background:#fff;cursor:pointer;box-sizing:border-box}
body #editor.publication-dialog .stage-surface .local-photo [data-gallery],body #driver-profile .private-stage .local-photo [data-gallery]{position:absolute;inset:0;width:100%;height:100%;min-height:0;margin:0;padding:0;opacity:0;cursor:pointer}
.stage-surface .local-photo label:has(>[data-gallery]):focus-within{outline:3px solid #366f9d;outline-offset:2px}.stage-surface .local-photo label:has(>[data-gallery]:disabled){opacity:.55;cursor:not-allowed}
.publication-flow [data-publication-photo] [data-photo-skip]{display:none!important}
@media(max-width:520px){body #editor.publication-dialog .stage-surface .publish-controls>.publish-secondary{max-width:none;flex:0 1 auto;min-width:max-content}body #editor.publication-dialog .stage-surface .publish-controls>.publish-primary{flex:1 1 8em;min-width:min(100%,8em)}}
body #driver-profile .private-stage .vehicle-variant-fields{gap:0}
body #driver-profile .private-stage .vehicle-variant-fields label{gap:4px;margin:4px 0}
body #driver-profile .private-stage .vehicle-variant-fields .visual-choice-grid>button:has(svg){grid-template-rows:32px auto;gap:4px;min-height:88px;font-size:1rem;line-height:1.4}
body #driver-profile .private-stage .vehicle-variant-fields .visual-choice-grid>button>svg{height:32px}
body #driver-profile .private-stage .publish-controls:has(>button[value=submit]:not([hidden]))>button[value=save_draft]{grid-column:1/-1;order:-1;background:#25577f;color:white}
.publication-flow [data-publication-photo]>h4{display:none}
.publication-flow [data-publication-photo][data-upload-available=false]>.fine,.publication-flow [data-publication-photo][data-upload-available=false]>label:has([data-gallery]){display:none}
body #editor.publication-dialog .stage-surface [data-field-group=route]{gap:8px}
body #editor.publication-dialog .stage-surface [data-field-group=route] .visual-chip-grid{margin-block:2px}
body #driver-profile .private-stage .vehicle-variant-fields .visual-choice-grid{margin-block:2px;padding-block:2px 4px}
body #driver-profile .private-stage .vehicle-variant-fields label{margin-block:2px}
@media(min-width:761px){.publish-review-groups{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px 20px;align-items:start}}
body #editor.publication-dialog .stage-scroll:has([data-publish-step="1"]:not([hidden]) [data-field-group=route]:not([hidden])){padding-block:6px}
/* Trip route includes availability: keep its extra choices on a compact rail. */
body #editor.publication-dialog .stage-surface [data-choice-for=vehicleAvailability]{display:flex;flex-wrap:nowrap;gap:8px;overflow-x:auto;overflow-y:hidden;scroll-snap-type:x proximity;margin-block:4px 0;padding:2px;min-width:0;max-width:100%}
body #editor.publication-dialog .stage-surface [data-choice-for=vehicleAvailability]>button{flex:0 0 auto;width:auto;min-width:80px;min-height:44px;padding:8px;white-space:normal;word-break:normal;overflow-wrap:normal;scroll-snap-align:center}
body #editor.publication-dialog .stage-surface[data-kind=trip] [data-field-group=route]>.field:has([name=date]){display:grid;grid-template-columns:minmax(0,1.15fr) minmax(0,1fr);gap:4px 8px;align-items:center}
body #editor.publication-dialog .stage-surface[data-kind=trip] .field:has([name=date])>label{grid-column:1/-1}
body #editor.publication-dialog .stage-surface[data-kind=trip] .field:has([name=date])>.publish-swipe-hint{grid-column:1/-1;grid-row:3}
body #editor.publication-dialog .stage-surface[data-kind=trip] .field:has([name=date])>.visual-chip-grid{margin:0;padding-block:2px}
body #editor.publication-dialog .stage-surface[data-kind=trip] .field:has([name=date])>.visual-chip-grid>button{min-width:64px;padding:8px}
@media(max-width:340px){body #editor.publication-dialog .stage-surface[data-kind=trip] [data-field-group=route]>.field:has([name=date]){grid-template-columns:minmax(0,1fr)}body #editor.publication-dialog .stage-surface[data-kind=trip] .field:has([name=date])>.publish-swipe-hint{grid-row:auto}}
body #editor.publication-dialog .stage-surface .visual-choice-grid[data-choice-for$=Party]{display:flex;flex-wrap:wrap;gap:8px}
body #editor.publication-dialog .stage-surface .visual-choice-grid[data-choice-for$=Party]>button{flex:1 1 9em;width:auto;min-width:0;min-height:44px;word-break:normal;overflow-wrap:normal;hyphens:none;padding:8px 16px}
@media(min-width:361px) and (max-width:760px){
 body #editor.publication-dialog .stage-surface[data-kind=trip] .field:has(>[name=from],>[name=to]){position:relative}
 body #editor.publication-dialog .stage-surface[data-kind=trip] .field:has(>[name=from],>[name=to])>.publish-swipe-hint{position:absolute;top:3px;inset-inline-end:0;margin:0}
 body #editor.publication-dialog .stage-surface[data-kind=trip] .field:has(>[name=from],>[name=to])>label{padding-inline-end:88px}
}
body #editor.publication-dialog .stage-surface [data-choice-for=vehicleAvailability]>button{padding-inline-start:24px}
/* Four actual screens for freight; three for equipment, with relevant fields grouped. */
body #editor.publication-dialog .stage-surface .publish-unified-types{display:flex;flex-wrap:nowrap;gap:8px;overflow-x:auto;overflow-y:hidden;scroll-snap-type:x proximity;padding:4px 2px 8px;max-width:100%;min-width:0}
body #editor.publication-dialog .stage-surface .publish-unified-types>button{flex:0 0 100px;width:100px;min-width:0;min-height:100px;padding:6px;display:flex;flex-direction:column;justify-content:center;gap:4px;font-size:.875rem;line-height:1.4;white-space:normal;overflow-wrap:normal;scroll-snap-align:center}
body #editor.publication-dialog .stage-surface .publish-unified-types :is(svg,img){height:44px;width:84px;max-width:100%;object-fit:contain}
body #editor.publication-dialog .stage-surface [data-field-group]{gap:10px}
body #editor.publication-dialog .stage-surface [data-field-group] label{font-size:.875rem;line-height:1.5}
body #editor.publication-dialog .stage-surface [data-field-group] :is(input,select){min-height:44px;padding:8px}
body #editor.publication-dialog .stage-surface [data-field-group] details{grid-column:1/-1;border:1px solid #dce3e8;border-radius:10px;padding:10px;background:#fff}
body #editor.publication-dialog .stage-surface [data-field-group] summary{cursor:pointer;min-height:24px;font-size:.875rem}
body #editor.publication-dialog .stage-surface [data-field-group] details[open]>:not(summary){margin-block:10px}
body #editor.publication-dialog .stage-surface .publish-controls{min-height:74px}
body #editor.publication-dialog .stage-surface .publish-controls>button{min-height:44px}
body #editor.publication-dialog .stage-surface .visual-choice-grid[data-choice-for$=Party]>button{flex:1 1 6em;font-size:.875rem}
body #editor.publication-dialog .stage-surface [data-field-group=vehicle]>.publish-vehicles{grid-column:1/-1}
body #editor.publication-dialog .stage-surface .publish-vehicles{padding:0;border:0;margin:0}
body #editor.publication-dialog .stage-surface .publish-saved-card svg{max-height:48px}
@media(min-width:761px){body #editor.publication-dialog .stage-surface [data-field-group=vehicle]{grid-template-columns:repeat(2,minmax(0,1fr))}body #editor.publication-dialog .stage-surface [data-field-group=vehicle]>.field:has([name=truck]),body #editor.publication-dialog .stage-surface [data-field-group=vehicle]>.publish-unified-types{grid-column:1/-1}}
body #editor.publication-dialog .stage-surface .publish-saved-card{grid-template-columns:56px minmax(0,1fr);padding:8px;gap:2px 8px;font-size:.875rem}
body #editor.publication-dialog .stage-surface .publish-saved-card svg{width:52px;height:40px}
/* Browse search vocabulary, positioned within the publication dialog's viewport. */
body #editor .publication-picker{position:absolute;z-index:50;box-sizing:border-box;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;direction:rtl;background:#fff;border:1px solid #d5e0ea;border-radius:12px;box-shadow:0 10px 22px #132b4524;color:#132b45;font-family:inherit;font-size:.875rem;padding:4px}
body #editor .publication-picker[hidden]{display:none}
body #editor .publication-picker .route-city-option{display:block;width:100%;text-align:start;padding:10px 12px;min-height:44px;line-height:24px;cursor:pointer;border:0;border-bottom:1px solid #132b450b;border-radius:6px;background:transparent;color:inherit;font:inherit}
body #editor .publication-picker .route-city-option:hover,body #editor .publication-picker .route-city-option[aria-selected=true],body #editor .publication-picker button:focus-visible{background:#e8eef5;color:#132b45;outline:2px solid #285b82;outline-offset:-2px}
body #editor .publication-picker .route-city-empty{padding:12px;font-size:.875rem}
body #editor .publication-picker .picker-date-quick{display:flex;gap:4px;border-bottom:1px solid #d5e0ea}
body #editor .publication-picker .picker-date-quick button{text-align:center;padding:8px 4px}
.picker-calendar-head{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:6px}.picker-month{min-width:44px;min-height:36px;background:white;border:1px solid #d5e0ea;border-radius:8px}.picker-calendar{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:2px;padding:4px;text-align:center}.picker-calendar>span{font-size:.7rem;padding:4px 0}.picker-day{min-width:0;min-height:36px;padding:4px 0;white-space:nowrap;border:0;border-radius:8px;background:white;color:#17344e;font:inherit}.picker-day[aria-pressed=true]{background:#e8eef5;outline:2px solid #285b82}.picker-day:disabled{opacity:.35}.picker-native{display:block;font-size:.75rem;padding:8px}.picker-native input{display:block;width:100%;min-height:44px;box-sizing:border-box;border:1px solid #c3d0dc;border-radius:8px;margin-top:4px;padding:6px;color:#17344e;background:white;font:inherit}
body #editor .publication-flow[data-kind=trip] [data-field-group=route]>.field:has([name=date]){display:block}
body #editor .publication-flow [data-anchored-picker][aria-expanded=true]{border-color:#285b82;box-shadow:0 0 0 2px #285b821a}

body #editor:has(.publication-flow[data-kind=load]) .publication-picker .picker-day[aria-pressed=true],body #editor:has(.publication-flow[data-kind=load]) .publication-picker button:focus-visible,body #editor:has(.publication-flow[data-kind=load]) .publication-picker .route-city-option[aria-selected=true]{background:#fff0e4;outline-color:#ad4a08}

/* Compact only while an open picker has limited keyboard/reflow space; retain title, progress and Close. */
body #editor.publication-dialog[data-picker-compact] .dialog-head{height:0}
body #editor.publication-dialog[data-picker-compact] .dialog-head::before{display:none}
body #editor.publication-dialog[data-picker-compact] .publication-flow{grid-template-columns:minmax(0,1fr) auto;grid-template-rows:auto minmax(0,1fr) auto}
body #editor.publication-dialog[data-picker-compact] .publish-heading{grid-row:1;grid-column:1;font-size:.875rem;margin:4px 0}
body #editor.publication-dialog[data-picker-compact] .publish-progress{grid-row:1;grid-column:2;padding:4px 0 6px;padding-inline-end:44px;font-size:.75rem;align-self:center}
body #editor.publication-dialog[data-picker-compact] .stage-scroll{grid-row:2;grid-column:1/-1}
body #editor.publication-dialog[data-picker-compact] .publish-controls{grid-row:3;grid-column:1/-1;min-height:56px}

@media(max-width:620px){
 body #editor.publication-dialog[data-picker-compact] .publication-flow{grid-template-columns:minmax(0,1fr);grid-template-rows:auto auto minmax(0,1fr) auto}
 body #editor.publication-dialog[data-picker-compact] .publish-heading{padding-inline-end:44px}
 body #editor.publication-dialog[data-picker-compact] .publish-progress{grid-row:2;grid-column:1;padding:0 0 4px}
 body #editor.publication-dialog[data-picker-compact] .stage-scroll{grid-row:3}
 body #editor.publication-dialog[data-picker-compact] .publish-controls{grid-row:4}
}
body #editor.publication-dialog[data-picker-compact] .publication-flow .publish-controls{flex-wrap:nowrap}
body #editor.publication-dialog[data-picker-compact] .publication-flow .publish-controls>.publish-primary{min-width:0;flex:1 1 0}

/* Keep the paired responsibilities together after the route/date fields. */
body #editor.publication-dialog .stage-surface[data-kind=load] [data-field-group=route]>.field:has([name=date]),
body #editor.publication-dialog .stage-surface .publish-responsibilities{grid-column:1/-1}
body #editor.publication-dialog .stage-surface .publish-responsibilities{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;align-items:start;min-width:0}
@media(max-width:760px){body #editor.publication-dialog .stage-surface .publish-responsibilities{grid-template-columns:minmax(0,1fr)}}

/* Keep the private choice area stable; all cards remain reachable by native scroll/focus. */
body #editor.publication-dialog .publish-vehicle-list{block-size:10rem;overflow:auto;overflow-wrap:anywhere}
/* The existing 1.9-line-height status wraps to two lines on narrow phones. */
@media(max-width:350px){body #editor.publication-dialog .publish-vehicle-list{block-size:13rem}body #editor.publication-dialog .publish-vehicles>.publish-note{min-block-size:3.8em}}
