/* Add Delivery dialog (#formDeliveryCreate.delivery-create). Every rule is scoped under .delivery-create.
   The panel itself is #delivery-crud (.delivery-crud in dashboard.css: absolute, top 50px, 5px border), reached via :has().
   The app sets html font-size to 12px, so Bootstrap's rem sizes shrink; sizes below are explicit px to match the approved mockup. */

/* The panel is fixed and centered on the window. */
#delivery-crud:has(.delivery-create) {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    width: 520px;
    padding: 16px;
    box-sizing: border-box;
    border-color: #999;
}

/* Panel max-height: 100vh - 50px top offset - 10px borders - 32px padding - 20px bottom margin; the body scrolls, the Save bar stays. */
.delivery-create { display: flex; flex-direction: column; min-height: 0; max-height: calc(100vh - 50px - 10px - 32px - 20px); font-size: 14px; }
.delivery-create .dlg-body { overflow-y: auto; min-height: 0; padding-right: 8px; }
.delivery-create .dlg-footer { border-top: 1px solid #ddd; padding-top: 12px; margin-top: 8px; }

.delivery-create .sec-toggle { width: 100%; text-align: left; background: none; border: 0; border-bottom: 1px solid #ddd; padding: 0 0 4px; margin-bottom: 12px; display: flex; justify-content: space-between; align-items: center; font-size: 20px; font-weight: 650; color: #000; }
.delivery-create .sec-toggle::after { content: "\25BE"; font-size: 16px; color: #666; transition: transform .15s; }
.delivery-create .sec-toggle.collapsed::after { transform: rotate(-90deg); }

.delivery-create .req::after { content: " *"; color: #dc3545; }

.delivery-create .btnClose { position: absolute; top: 6px; right: 8px; float: none; border: 0; background: none; font-size: 24px; line-height: 1; color: #666; padding: 0; }

/* Bootstrap rem sizes are relative to the app's 12px root; restore the 16px-root look inside the dialog. */
.delivery-create .form-control,
.delivery-create .form-select,
.delivery-create .col-form-label-sm,
.delivery-create .input-group-text,
.delivery-create .btn,
.delivery-create small,
.delivery-create .small,
.delivery-create .invalid-feedback { font-size: 14px; }
.delivery-create .form-control-sm,
.delivery-create .form-select-sm { padding: 4px 8px; min-height: 31px; border-radius: 4px; }
.delivery-create .form-select-sm { padding-right: 32px; }
.delivery-create .col-form-label-sm { padding-top: 4px; padding-bottom: 4px; margin-bottom: 0; }
.delivery-create .invalid-feedback { font-size: 12px; }
.delivery-create .btn { padding: 6px 12px; }
.delivery-create .row { --bs-gutter-x: 8px; --bs-gutter-y: 8px; }
