/* AVTOTRIP V154 — booking/header, monthly entry and owner form corrections. */

/* The legacy handover pair is replaced by the compact V154 selectors. */
#hostForm .av49-handover,
#ownerQuickForm .av49-handover{display:none!important}

/* Car page: a 20% wider booking column and a calendar that fills it exactly. */
@media(min-width:1000px){
 html body #carPage.av102-car-page{grid-template-columns:minmax(0,1fr) 456px!important;max-width:1360px!important}
 html body #carPage.av102-car-page>.booking{width:456px!important;max-width:456px!important}
}
html body #carPage .booking .av102-inline-calendar,
html body #carPage .booking .av102-inline-calendar .ds-picker,
html body #carPage .booking .ds-picker-backdrop,
html body #carPage .booking .ds-picker{inline-size:100%!important;width:100%!important;max-inline-size:none!important;max-width:none!important;min-inline-size:0!important;box-sizing:border-box!important}
html body #carPage .av153-booking-sticky{display:contents!important;position:static!important;padding:0!important;margin:0!important;border:0!important;box-shadow:none!important;background:transparent!important}

/* Keep the title bar visible. The cloned CTA appears there only after the
   permanent button has been passed while scrolling. */
body:has(#carPage) header.top{position:sticky!important;top:0!important;z-index:1200!important}
body:has(#carPage){padding-bottom:0!important}
body:has(#carPage) #av109-book-dock{position:absolute!important;inset:auto 118px auto auto!important;top:50%!important;transform:translateY(-50%)!important;width:250px!important;max-width:28vw!important;padding:5px!important;border-radius:13px!important;z-index:5!important;box-sizing:border-box!important}
body:has(#carPage) #av109-book-dock .btn{min-height:42px!important;padding:8px 13px!important;margin:0!important;font-size:14px!important}
html:not(.av154-book-dock-visible) body:has(#carPage) #av109-book-dock{display:none!important}
html.av154-book-dock-visible body:has(#carPage) #av109-book-dock[hidden]{display:block!important}

/* Owner form: controls have equal columns, equal heights and aligned bottoms. */
.av154-aligned-form .av153-owner-row{align-items:end!important;gap:10px!important}
.av154-aligned-form .av153-row-1{grid-template-columns:repeat(8,minmax(0,1fr))!important}
.av154-aligned-form .av153-row-2{grid-template-columns:repeat(6,minmax(0,1fr))!important}
.av154-aligned-form .av153-row-1>label,
.av154-aligned-form .av153-row-2>label{display:grid!important;grid-template-rows:minmax(34px,auto) 42px;align-content:end;min-width:0!important;height:auto!important}
.av154-aligned-form .av153-row-1>label>.av102-field-title,
.av154-aligned-form .av153-row-2>label>.av102-field-title,
.av154-aligned-form .av153-row-1>label>span:first-child,
.av154-aligned-form .av153-row-2>label>span:first-child{align-self:end;line-height:1.2;margin:0 0 5px!important;font-size:13px!important}
.av154-aligned-form .av153-row-1 input,
.av154-aligned-form .av153-row-1 select,
.av154-aligned-form .av153-row-1 button,
.av154-aligned-form .av153-row-2 input,
.av154-aligned-form .av153-row-2 select,
.av154-aligned-form .av153-row-2 button{width:100%!important;min-width:0!important;max-width:none!important;height:42px!important;min-height:42px!important;padding:0 11px!important;box-sizing:border-box!important;font-size:14px!important}
.av154-aligned-form .av153-row-1 .av100-native-select,
.av154-aligned-form .av153-row-2 .av100-native-select{width:100%!important;min-width:0!important;height:42px!important}

/* Deposit explanation is available only from the help icon. */
.av154-deposit{position:relative!important}
.av154-deposit .av102-deposit-hint{display:none!important}
.av154-deposit-help{position:absolute!important;top:0!important;right:2px!important;display:grid!important;place-items:center!important;width:20px!important;min-width:20px!important;height:20px!important;min-height:20px!important;padding:0!important;border:1px solid #2489d7!important;border-radius:50%!important;background:#fff!important;color:#1476bd!important;font-size:12px!important;font-weight:900!important;line-height:1!important;cursor:help!important;overflow:visible!important;z-index:8}
.av154-deposit-tip{position:absolute;right:-4px;top:27px;width:250px;padding:9px 11px;border:1px solid #c8d9e7;border-radius:10px;background:#fff;color:#17324d;font-size:12px;font-weight:600;line-height:1.4;box-shadow:0 10px 28px #10283a2b;opacity:0;visibility:hidden;pointer-events:none;transform:translateY(-3px);transition:.14s ease;white-space:normal;text-align:left}
.av154-deposit-help:hover .av154-deposit-tip,
.av154-deposit-help:focus-visible .av154-deposit-tip{opacity:1;visibility:visible;transform:none}

/* Pickup/return lists: garage first and mutually exclusive with paid places. */
.av153-row-4{grid-template-columns:repeat(2,minmax(0,1fr))!important;align-items:start!important}
.av154-handover-field{min-width:0;margin:0!important;border:1px solid var(--line,#cbd8e5);border-radius:14px;padding:12px;background:var(--panel,#fff)}
.av154-handover-field legend{padding:0 6px;font-weight:800}
.av154-handover-dropdown{position:relative}
.av154-handover-dropdown>summary{list-style:none;cursor:pointer;min-height:44px;display:flex;align-items:center;justify-content:space-between;padding:0 13px;border:1px solid var(--line,#cbd8e5);border-radius:11px;font-weight:700}
.av154-handover-dropdown>summary::-webkit-details-marker{display:none}
.av154-handover-dropdown>summary:after{content:'⌄';font-size:18px}
.av154-handover-options{display:grid;gap:7px;margin-top:8px;padding:8px;border:1px solid var(--line,#cbd8e5);border-radius:11px;background:var(--panel,#fff);max-height:310px;overflow:auto}
.av154-handover-option{display:grid!important;grid-template-columns:auto minmax(120px,1fr) minmax(128px,.7fr);gap:9px;align-items:center;padding:7px;border-radius:9px;margin:0!important}
.av154-handover-option:hover{background:rgba(43,143,223,.08)}
.av154-handover-option>input[type=checkbox]{width:19px!important;height:19px!important;margin:0!important}
.av154-service-price{display:grid;grid-template-columns:auto minmax(70px,1fr);gap:6px;align-items:center}
.av154-service-price small{white-space:nowrap;font-size:11px}
.av154-service-price input{min-width:0!important;width:100%!important;height:40px!important;box-sizing:border-box!important}
.av154-service-price input:disabled{opacity:.55}

/* Long-term price occupies one quarter; both upload boxes share the row. */
.av154-assets-row{display:grid!important;grid-template-columns:minmax(190px,1fr) repeat(2,minmax(0,1.5fr));gap:14px;align-items:stretch;width:100%;margin:16px 0}
.av154-assets-row>.quick-wide{grid-column:auto!important}
.av154-assets-row>.av51-monthly,
.av154-assets-row>.upload,
.av154-assets-row>.file-upload,
.av154-assets-row>.avto-upload{width:auto!important;min-width:0!important;min-height:190px!important;height:100%!important;margin:0!important;box-sizing:border-box!important}
.av154-assets-row>.upload,
.av154-assets-row>.file-upload,
.av154-assets-row>.avto-upload{display:flex!important;flex-direction:column!important;justify-content:flex-start!important}
.av154-assets-row .file-ui{margin-top:auto}
.av154-monthly-quarter.av153-monthly-editor{padding:14px!important}
.av154-monthly-quarter h3{font-size:17px!important;line-height:1.25;margin:0 0 8px!important}
.av154-monthly-quarter p{font-size:12px!important;line-height:1.4;margin:0 0 12px!important}
.av154-monthly-quarter .av51-rate-grid{display:grid!important;grid-template-columns:1fr!important;gap:8px!important}
.av154-monthly-quarter input{width:100%!important;box-sizing:border-box!important}

/* Premium/dark-theme readability. */
html[data-theme="premium"] .av154-handover-field,
html[data-theme="premium"] .av154-handover-options,
html[data-theme="dark"] .av154-handover-field,
html[data-theme="dark"] .av154-handover-options,
body.dark .av154-handover-field,
body.dark .av154-handover-options{background:#10283a!important;color:#f5f9ff!important;border-color:#4e7189!important}
html[data-theme="premium"] .av154-handover-dropdown>summary,
html[data-theme="dark"] .av154-handover-dropdown>summary,
body.dark .av154-handover-dropdown>summary{color:#fff!important;border-color:#5f8199!important;background:#17364b!important}
html[data-theme="premium"] .av154-deposit-help,
html[data-theme="dark"] .av154-deposit-help,
body.dark .av154-deposit-help{background:#1e425a!important;color:#fff!important;border-color:#70bdf4!important}
html[data-theme="premium"] .av154-deposit-tip,
html[data-theme="dark"] .av154-deposit-tip,
body.dark .av154-deposit-tip{background:#17364b!important;color:#fff!important;border-color:#5f8199!important}

@media(max-width:1100px) and (min-width:851px){
 .av154-aligned-form .av153-row-1{grid-template-columns:repeat(4,minmax(0,1fr))!important}
 .av154-aligned-form .av153-row-2{grid-template-columns:repeat(3,minmax(0,1fr))!important}
}
@media(max-width:999px){
 body:has(#carPage) #av109-book-dock{right:92px!important;width:190px!important;max-width:35vw!important}
}
@media(max-width:850px){
 .av153-row-4{grid-template-columns:1fr!important}
 .av154-assets-row{grid-template-columns:1fr!important}
 .av154-assets-row>.av51-monthly,.av154-assets-row>.upload,.av154-assets-row>.file-upload,.av154-assets-row>.avto-upload{min-height:0!important}
 .av154-handover-option{grid-template-columns:auto 1fr}.av154-service-price{grid-column:2}
}
@media(max-width:620px){
 body:has(#carPage) #av109-book-dock{right:76px!important;width:140px!important;max-width:42vw!important;padding:3px!important;border-radius:10px!important}
 body:has(#carPage) #av109-book-dock .btn{min-height:36px!important;padding:6px 8px!important;font-size:12px!important}
}
