/* Delivery entry, source selection, and the location picker. */
#dashboard-page[data-active-page="today"] {position:relative;}
.create-delivery-drawer {position:absolute;grid-area:2 / 2;left:0;right:auto;top:0;bottom:0;width:min(360px,100%);z-index:8;background:white;border:1px solid var(--line);border-radius:12px;box-shadow:0 8px 30px #10274a26;overflow:auto;scrollbar-gutter:stable;scrollbar-width:thin;padding:14px 20px 22px;}
.create-delivery-drawer[hidden] {display:none;}
.create-delivery-drawer header {display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 12px;padding:0;min-height:0;}
.create-delivery-drawer header h2 {font-size:19px;font-weight:700;margin:0;}
.create-delivery-drawer header p {font-size:13px;}
.create-delivery-drawer header [data-create-close] {background:transparent;color:#10274a;border:0;font-size:24px;min-height:32px;width:32px;padding:0;}
.create-delivery-drawer [data-create-close] {flex-shrink:0;}
.create-delivery-drawer .form-panel {padding:0;border:0;box-shadow:none;margin:0;}
.create-delivery-drawer form {margin:0;}
.create-delivery-drawer .delivery-inline-row {display:grid;grid-template-columns:94px minmax(0,1fr);align-items:center;gap:10px;margin:0 0 15px;font-size:13px;color:#10274a;}
[data-delivery-source-form] [data-collection-amount][hidden] {display:none;}
.create-delivery-drawer .delivery-inline-row > input,.create-delivery-drawer .delivery-inline-row > textarea {width:100%;min-width:0;border:0;border-bottom:1px solid #cbd5e1;border-radius:0;background:transparent;min-height:36px;padding:8px 4px;margin:0;font-size:13px;box-shadow:none;}
.create-delivery-drawer .delivery-inline-row > textarea {height:38px;min-height:38px;resize:vertical;}
.create-delivery-drawer .delivery-inline-row > span:first-child {font-weight:500;line-height:1.5;}
.create-delivery-drawer .delivery-inline-row .errorlist {grid-column:2;font-size:12px;margin:0;}
.delivery-type-options {display:flex;gap:0;flex-direction:row-reverse;}
.delivery-type-options button {flex:1;background:white;color:#10274a;border:1px solid #d7e0ec;padding:8px 4px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:7px;min-height:64px;border-radius:5px;font-size:10px;position:relative;}
.delivery-type-options button[aria-pressed="true"] {border-color:#155eef;color:#155eef;background:#f3f7ff;}
.delivery-type-options button[aria-pressed="true"]::after {content:'✓';position:absolute;top:4px;left:4px;background:#155eef;color:white;border-radius:50%;font-size:9px;width:12px;height:12px;line-height:12px;}
.create-delivery-drawer .delivery-type-options button {min-height:44px;gap:3px;padding:5px 4px;}
.create-delivery-drawer .delivery-type-options svg {width:15px;height:15px;}
.create-delivery-drawer .delivery-inline-row:has(.delivery-type-options) {margin-bottom:15px;}
.create-delivery-drawer fieldset[data-external-source] {border:0;padding:0;margin:0;min-width:0;}
.create-delivery-drawer .delivery-coordinates {margin:-6px 104px 16px 0;font-size:11px;text-align:center;}
.create-delivery-drawer .delivery-coordinates summary {cursor:pointer;color:#53637a;list-style:none;}
.create-delivery-drawer .delivery-coordinates summary::after {content:'⌄';margin-right:7px;}
.create-delivery-drawer .delivery-coordinates[open] {margin-right:0;}
.create-delivery-drawer .delivery-coordinates:not([open]) {display:none;}
.create-delivery-drawer [data-location-picker] {margin:0 108px 12px 0;padding:4px 8px;min-height:28px;font-size:11px;background:white;color:#155eef;border:1px solid #dce4ef;}
.create-delivery-drawer [data-branch-source] {font-size:12px;line-height:1.6;}
.create-delivery-drawer .form-actions {display:flex;gap:12px;position:sticky;bottom:-22px;background:white;padding:18px 0 0;border-top:1px solid #e2e8f0;margin-top:24px;}
.create-delivery-drawer .form-actions > * {flex:1;min-height:40px;padding:8px;font-size:12px;}
.a2-field {display:flex;align-items:center;min-width:0;border-bottom:1px solid #bcc8da;gap:6px;}
.create-delivery-drawer .a2-field input,.create-delivery-drawer .a2-field textarea {min-width:0;width:100%;border:0;border-radius:0;background:transparent;box-shadow:none;margin:0;padding:8px 2px;min-height:38px;font-size:13px;}
.create-delivery-drawer .a2-field textarea {height:38px;min-height:38px;resize:none;}
.a2-field input::placeholder,.a2-field textarea::placeholder {color:#8c96a8;opacity:1;}
.a2-field svg,.delivery-type-options svg {width:19px;height:19px;flex-shrink:0;fill:none;stroke:currentColor;stroke-width:1.5;}
.create-delivery-drawer .a2-address {border:0;}
.create-delivery-drawer .a2-address input {border-bottom:1px solid #bcc8da;}
.create-delivery-drawer .a2-address textarea {height:56px;min-height:56px;line-height:20px;white-space:pre-wrap;overflow-wrap:anywhere;border-bottom:1px solid #bcc8da;}
.create-delivery-drawer .a2-money {border:1px solid #d5deea;border-radius:4px;}
.a2-money > span {padding:8px;border-right:1px solid #d5deea;font-size:12px;}
.create-delivery-drawer .coordinate-actions {display:grid;grid-template-columns:94px minmax(0,1fr);gap:10px;align-items:center;margin:-8px 0 14px;font-size:12px;}
.coordinate-actions > div {display:flex;gap:8px;}
.create-delivery-drawer .coordinate-actions button {display:flex;align-items:center;justify-content:center;margin:0;padding:4px;width:32px;min-height:30px;background:white;color:#155eef;border:1px solid #ccd7e5;border-radius:4px;}
.coordinate-actions svg {width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.5;}
.coordinate-actions img {width:19px;height:24px;object-fit:contain;}
.create-delivery-drawer .entry-destination-coordinates {margin:8px 0 0;color:#536783;}
.shared-location-panel[hidden] {display:none;}
.shared-location-panel {display:flex;align-items:end;flex-wrap:wrap;gap:8px;margin:8px 0 12px;padding:10px;border:1px solid #dbe5f3;border-radius:8px;background:#f7faff;}
.shared-location-panel label {flex:1 1 190px;margin:0;}
.shared-location-panel input {margin-top:4px;}
.shared-location-panel button {min-height:40px;padding:8px 12px;border:1px solid #155eef;border-radius:6px;background:#fff;color:#155eef;font-size:12px;}
.shared-location-panel p {flex-basis:100%;margin:0;color:#536783;font-size:12px;}
.shared-location-panel p:empty {display:none;}
.main-location-picker {position:absolute;z-index:12;bottom:28px;right:16px;max-width:calc(100% - 390px);display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;align-content:start;padding:10px;border:1px solid #dbe5f3;border-radius:8px;background:#f7faff;box-shadow:none;font-size:13px;}
.main-location-picker > [role="status"] {font-size:12px;font-weight:600;color:#10274a;line-height:1.5;grid-column:1 / -1;}
.main-location-picker>.location-picker-icon{display:none;}
.main-location-picker>.location-picker-coordinates{grid-column:1 / -1;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));width:100%;min-width:0;gap:8px;}
.main-location-picker>.location-picker-coordinates label{display:flex;flex-direction:column;align-items:stretch;gap:3px;margin:0;font-size:10px;white-space:normal;}
.main-location-picker>.location-picker-coordinates input{display:block;height:32px;min-height:32px;margin:0;padding:5px;}
.location-picker-icon {display:flex;align-items:center;justify-content:center;flex-shrink:0;width:30px;height:30px;border:1px solid #155eef;border-radius:50%;color:#155eef;}
.location-picker-icon svg {width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.5;}
.location-picker-icon img {width:24px;height:30px;object-fit:contain;}
.location-picker-coordinates {display:flex;gap:6px;align-items:end;}
.location-picker-coordinates label {display:grid;gap:2px;color:#536783;font-size:10px;white-space:nowrap;}
.location-picker-coordinates input {width:82px;min-height:34px;padding:6px;border:1px solid #cbd7e6;border-radius:6px;background:white;color:#10274a;font-size:12px;direction:ltr;text-align:center;}
.main-location-picker button {min-height:32px;height:32px;margin:0;padding:4px 8px;font-size:12px;border-radius:6px;}
.main-location-picker .location-picker-confirm {background:#155eef;color:white;border:1px solid #155eef;}
.main-location-picker .location-picker-cancel {background:white;color:#155eef;border:1px solid #155eef;}
@media(max-width:700px){.main-location-picker {top:12px;bottom:auto;right:8px;max-width:calc(100% - 16px);gap:6px;padding:8px;flex-wrap:wrap;}}
.contact-selector {margin:10px 0 14px;font-size:12px;border-bottom:1px solid #e2e8f0;padding-bottom:8px;}
.contact-selector summary {color:#155eef;cursor:pointer;}
.contact-selector input {width:100%;font-size:12px;}
.contact-selector button {font-size:12px;padding:6px 8px;margin:4px 0;background:white;color:#155eef;border:1px solid #d4deec;}
.contact-selector [data-contact-results] button {display:block;width:100%;text-align:right;}
.contact-selector [data-contact-status] {line-height:1.5;font-size:12px;}

.branch-location-empty {margin:14px 0;padding:18px 14px;border:1px solid #d4deec;border-radius:10px;background:#f5f8ff;text-align:center;line-height:1.6;}
.branch-location-empty strong {display:block;color:#142c50;font-size:14px;}
.branch-location-empty p {margin:8px 0 14px;color:#526581;font-size:12px;}
.branch-location-empty .button {font-size:12px;min-height:38px;}

.delivery-entry-fields {border:0;padding:0;margin:0;min-width:0;}
.delivery-entry-fields[hidden] {display:none;}
/* Approved compact delivery panel. */
.create-delivery-drawer:has(.compact-entry) {width:min(440px,100%);padding:18px 20px 12px;padding-inline-end:10px;}
.compact-entry {color:#10274a;font-size:14px;}
.compact-entry header h2,.compact-entry .entry-heading {display:flex;align-items:center;gap:8px;}
.compact-entry img {width:20px;height:20px;flex:none;}
.compact-entry header h2 img {width:25px;height:25px;}
.compact-entry label {display:block;margin:0 0 5px;font-size:13px;color:#667792;}
.compact-entry input:not([type=checkbox]),.compact-entry select,.compact-entry textarea {width:100%;min-width:0;min-height:40px;padding:8px 10px;margin:4px 0 0;border:1px solid #cdd8e8;border-radius:6px;background:#fff;font-size:14px;color:#10274a;box-shadow:none;}
.compact-entry textarea {height:40px;min-height:40px;resize:vertical;}
.compact-entry .entry-heading {font-size:16px;font-weight:700;color:#10274a;margin:0 0 9px;}
.compact-entry small {display:block;color:#526783;font-size:11px;line-height:1.5;}
.compact-entry .entry-pickup,.compact-entry .entry-destination {padding:12px 0;border-bottom:1px solid #e4eaf3;}
.compact-entry .entry-caption {font-size:12px;margin-bottom:4px;}
.compact-entry .entry-destination > .contact-selector > summary {display:flex;align-items:center;justify-content:space-between;gap:10px;list-style:none;cursor:pointer;border:1px solid #cdd8e8;border-radius:6px;min-height:40px;padding:8px 10px;font-size:14px;color:#10274a;}
.compact-entry .entry-destination > .contact-selector > summary::after {content:'⌄';}
.compact-entry summary::-webkit-details-marker {display:none;}
.compact-entry .entry-pickup-meta {display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:4px;}
.compact-entry .entry-pickup-meta button {display:flex;align-items:center;gap:4px;background:none;border:0;color:#155eef;font-size:13px;min-height:28px;padding:0;}
.compact-entry .entry-pickup-meta img {width:15px;height:15px;}
.compact-entry .entry-pair {display:grid;grid-template-columns:1fr 1fr;gap:8px;}
.compact-entry .entry-address {display:flex;align-items:center;gap:8px;}
.compact-entry .entry-address textarea {flex:1;margin:0;}
.compact-entry .entry-address [data-location-picker] {flex:none;margin:0;padding:8px;width:40px;min-height:40px;border:1px solid #cdd8e8;border-radius:6px;background:white;}
.compact-entry .entry-destination > .contact-selector {border:0;margin:0 0 10px;padding:0;}
.compact-entry .entry-destination > .contact-selector > summary {color:#8b99b0;}
.compact-entry .entry-collection {padding:10px 0;}
.compact-entry .entry-collection-options {display:flex;gap:8px;}
.compact-entry .entry-collection-options button {flex:1;border:1px solid #cdd8e8;background:white;color:#10274a;border-radius:5px;font-size:13px;min-height:38px;padding:6px;}
.compact-entry .entry-collection-options button[aria-pressed=true] {color:#155eef;background:#eef3ff;border-color:#155eef;}
.compact-entry .entry-extra {margin-top:2px;}
.compact-entry .entry-extra > label {display:block;margin:8px 0;}
.compact-entry .entry-extra > label textarea {width:100%;min-height:38px;}
.compact-entry .entry-submit.form-actions {display:flex;align-items:center;gap:12px;margin-top:10px;padding:8px 0 0;bottom:-12px;border:0;}
.compact-entry .entry-submit.form-actions > button {flex:1;font-size:14px;min-height:42px;}

.compact-entry input[type=checkbox] {width:17px;height:17px;margin:0;accent-color:#155eef;}
.compact-entry .delivery-inline-row {display:block;margin:8px 0;}
.compact-entry .a2-field {border:0;}
.compact-entry .a2-field input,.compact-entry .a2-field textarea {border:1px solid #cdd8e8;border-radius:6px;padding:8px;}
.compact-entry .delivery-coordinates {margin:5px 0;}
.compact-entry .errorlist {font-size:12px;}
@media(max-width:600px){.create-delivery-drawer:has(.compact-entry){position:fixed;inset:0;width:100vw;height:100dvh;z-index:100;border-radius:0;padding:14px;padding-inline-end:5px;} .compact-entry .entry-submit.form-actions{bottom:-14px;} }
.compact-entry .entry-pickup,.compact-entry .entry-destination {padding:8px 0;}
.compact-entry .entry-heading {margin-bottom:6px;}
.compact-entry .entry-destination > .contact-selector {margin-bottom:6px;}
.compact-entry .entry-pickup-line {display:flex;align-items:center;gap:8px;}
.compact-entry .entry-heading img,.compact-entry header h2 img {filter:invert(30%) sepia(95%) saturate(3331%) hue-rotate(217deg) brightness(95%) contrast(96%);}
.compact-entry .entry-submit.form-actions {flex-wrap:nowrap;min-height:0;height:50px;}
.compact-entry .entry-submit.form-actions > button {height:42px;max-height:42px;margin:0;}

@media(min-height:800px){
.compact-entry .entry-pickup,.compact-entry .entry-destination {padding:5px 0;}
.compact-entry .entry-collection {padding:6px 0;}
.compact-entry .entry-heading {margin-bottom:4px;}
}

/* Aligned inline pickup controls. */
.compact-entry .entry-pickup-line {display:flex;align-items:center;gap:10px;margin:0;position:relative;}
.compact-entry .entry-pickup-line .entry-heading {flex:0 0 92px;margin:0;white-space:nowrap;font-size:15px;gap:6px;}
.compact-entry .entry-pickup {padding:0 0 12px;}
.compact-entry .entry-pickup-control {flex:1;min-width:0;position:relative;}
.compact-entry .entry-pickup-control > select {margin:0;height:42px;border-radius:7px;}
.compact-entry [data-new-pickup] img {filter:invert(30%) sepia(95%) saturate(3331%) hue-rotate(217deg) brightness(95%) contrast(96%);}
.compact-entry [data-new-pickup] {display:flex;align-items:center;gap:4px;flex:none;white-space:nowrap;background:#fff;border:1px solid #b8d0ff;border-radius:7px;color:#155eef;font-size:12px;min-height:42px;padding:7px;}
.compact-entry [data-new-pickup] img {width:15px;height:15px;}
@media(max-width:400px){.compact-entry .entry-pickup-line .entry-heading{flex-basis:80px;font-size:14px;} .compact-entry .entry-pickup-line{gap:6px;}}

.compact-entry .customer-suggestions [data-customer-results]:not(:empty) {max-height:180px;overflow-y:auto;border:1px solid #cdd8e8;border-radius:7px;margin:4px 0;}
.compact-entry .customer-suggestions button {display:block;width:100%;text-align:start;background:#fff;color:#10274a;border:0;border-bottom:1px solid #e4eaf3;border-radius:0;padding:10px;font-size:13px;}
.compact-entry .customer-suggestions button:hover,.compact-entry .customer-suggestions button:focus-visible {background:#eef3ff;}
 .compact-entry .entry-destination-heading {display:flex;align-items:center;gap:12px;height:26px;margin-bottom:4px;}
.compact-entry .entry-destination-heading .entry-heading {flex:none;margin:0;}
.compact-entry [data-customer-status] {min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px;color:#667792;}

.compact-entry .entry-submit.form-actions > .entry-create-another {background:#fff;color:#1557ff;border:1px solid #1557ff;}
.compact-entry .entry-submit.form-actions > .entry-create-another:hover {background:#eef3ff;}

.create-delivery-drawer .coordinate-cards{grid-template-columns:65px minmax(0,1fr);gap:8px;margin:14px 0 8px;}
.coordinate-cards>div{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:7px;}
.create-delivery-drawer .coordinate-cards>span{font-weight:600;color:#0b1f3a;}
.create-delivery-drawer .coordinate-cards button{width:100%;min-height:78px;padding:8px 3px;border:1px solid #155eef;border-radius:6px;flex-direction:column;gap:5px;color:#0b1f3a;font-size:12px;line-height:1.35;}
.coordinate-cards button img{width:23px;height:23px;}
.create-delivery-drawer .coordinate-cards button:hover,.create-delivery-drawer .coordinate-cards button[aria-expanded=true]{background:#edf3ff;}

.create-delivery-drawer [data-inline-location-picker][hidden]{display:none;}
.create-delivery-drawer .inline-location-picker,.create-delivery-drawer .shared-location-panel{position:static;inset:auto;box-sizing:border-box;width:100%;max-width:none;height:auto;min-height:0;margin:8px 0 12px;padding:10px;border:1px solid #dbe5f3;border-radius:8px;background:#f7faff;box-shadow:none;}
.create-delivery-drawer .inline-location-picker{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;align-content:start;}
.inline-location-picker>.location-picker-icon{display:none;}
.inline-location-picker>[role=status],.inline-location-picker>.location-picker-coordinates{grid-column:1 / -1;}
.inline-location-picker>[role=status]:empty{display:none;}
.create-delivery-drawer .inline-location-picker .location-picker-coordinates{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));width:100%;min-width:0;gap:8px;}
.create-delivery-drawer .inline-location-picker .location-picker-coordinates label,.create-delivery-drawer .inline-location-picker .location-picker-coordinates input{width:100%;min-width:0;box-sizing:border-box;}
.create-delivery-drawer .coordinate-cards button{height:78px;box-sizing:border-box;}

.create-delivery-drawer .inline-location-picker .location-picker-coordinates label{display:flex;flex-direction:column;align-items:stretch;gap:3px;margin:0;font-size:10px;white-space:normal;}
.create-delivery-drawer .inline-location-picker .location-picker-coordinates input{display:block;height:32px;min-height:32px;margin:0;padding:5px;}
.create-delivery-drawer .inline-location-picker>button{height:32px;min-height:32px;margin:0;padding:4px 8px;font-size:12px;}
.create-delivery-drawer .inline-location-picker>button.location-picker-confirm[disabled]{background:#9aa7bd;border-color:#9aa7bd;color:#fff;cursor:not-allowed;opacity:.8;}
.location-picker-search{grid-column:1 / -1;display:none;position:relative;}
.inline-location-picker.is-search-mode>.location-picker-search{display:flex;}
.location-picker-search input{width:100%;height:32px;padding:5px 8px;font-size:12px;}
.location-search-results{position:fixed;z-index:999999;background:#fff;border:1px solid #dbe5f3;border-radius:8px;box-shadow:0 8px 24px #10274a22;overflow:hidden auto;max-height:240px;}
.location-search-results[hidden]{display:none;}
.location-search-item{display:block;width:100%;text-align:start;background:#fff;color:#10274a;border:0;padding:8px 10px;font-size:13px;cursor:pointer;}
.location-search-item:hover{background:#eef4ff;color:#10274a;}
.create-delivery-drawer .inline-location-picker>[role=status]{font-size:11px;line-height:16px;font-weight:400;}
.create-delivery-drawer .shared-location-panel{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:end;gap:6px 8px;}
.create-delivery-drawer .shared-location-panel[hidden]{display:none;}
.create-delivery-drawer .shared-location-panel label{display:flex;flex-direction:column;gap:3px;min-width:0;margin:0;font-size:11px;}
.create-delivery-drawer .shared-location-panel input{width:100%;min-width:0;box-sizing:border-box;height:34px;min-height:34px;margin:0;}
.create-delivery-drawer .shared-location-panel button{height:34px;min-height:34px;margin:0;padding:4px 8px;}
.create-delivery-drawer .shared-location-panel>[role=status]{grid-column:1 / -1;white-space:normal;overflow-wrap:anywhere;}

.inline-location-picker.is-search-mode>.location-picker-coordinates,
.inline-location-picker.is-search-mode>.location-picker-confirm,
.inline-location-picker.is-search-mode>.location-picker-cancel{display:none;}
.inline-location-picker.is-search-mode{align-content:center;}

.create-delivery-drawer .coordinate-cards{display:block;margin:10px 0 8px;}
.create-delivery-drawer .coordinate-cards>div{gap:6px;}
.create-delivery-drawer .coordinate-cards button{height:38px;min-height:38px;flex-direction:row;gap:5px;padding:5px 3px;font-size:14px;white-space:nowrap;}
.create-delivery-drawer .coordinate-cards button img{width:18px;height:18px;flex-shrink:0;}
.create-delivery-drawer .inline-location-picker,.create-delivery-drawer .shared-location-panel{height:108px;min-height:108px;padding:8px;overflow-y:auto;}
.create-delivery-drawer .shared-location-panel{align-content:center;}

.compact-entry .entry-destination-heading{height:auto;min-height:26px;flex-wrap:wrap;gap:5px;}
.delivery-required{display:flex;gap:6px;align-items:center;margin-inline-start:auto;font-size:10px;white-space:nowrap;color:#536783;}
#new-pickup-fields>legend{display:inline;}
#new-pickup-fields>.delivery-required{float:left;margin:2px 0 6px;}
#new-pickup-fields>.entry-pair{clear:both;}
.delivery-required [data-delivery-required]{color:#b42318;}.delivery-required [data-complete=true]{color:#15803d;}
.compact-entry .entry-destination-heading [data-customer-status]:empty{display:none;}
