/* Cabinet-only B4: owns generic control spacing and the confirmed conflicting layouts.
   Legacy declarations are removed in the cabinet copies by build-clean.cjs. */
body[data-workspace] { --cab-control:32px; --cab-pad:3px 9px; }
html body[data-workspace] :is(button,.button,input[type=submit],.command-overflow>summary) {
 box-sizing:border-box;min-height:var(--cab-control);height:auto;padding:var(--cab-pad);
 line-height:20px;word-break:normal;overflow-wrap:normal;
}
html body[data-workspace] :is(input:not([type=checkbox]):not([type=radio]),select,textarea) {box-sizing:border-box;min-height:var(--cab-control);padding:4px 7px;line-height:20px}
html body[data-workspace] #business-workspace .booking-header-actions {display:flex;flex-wrap:wrap;width:100%;gap:6px;justify-content:flex-end;align-items:center}
html body[data-workspace] #business-workspace .booking-heading {display:block;padding:0 0 6px;margin:0}
html body[data-workspace] #business-workspace .booking-back {display:block;width:auto;margin:0 0 2px auto;min-height:var(--cab-control);padding:3px 8px}
html body[data-workspace] #business-workspace .booking-title-row {display:flex;flex-direction:column;align-items:stretch;gap:4px;width:100%;min-width:0}
html body[data-workspace] #business-workspace .booking-header-actions button {flex:0 1 auto;min-height:var(--cab-control);padding:3px 8px;white-space:normal;line-height:20px}
html body[data-workspace] #business-workspace .workflow-tabs {display:flex;flex-wrap:wrap;gap:4px;margin:0 0 8px;padding:2px;align-items:center}
html body[data-workspace] #business-workspace .workflow-tabs button {flex:1 0 auto;min-width:0;min-height:var(--cab-control);padding:3px 5px;white-space:nowrap;word-break:normal;overflow-wrap:normal;line-height:20px}
html body[data-workspace] #web-topbar #new {min-height:var(--cab-control);padding:3px 9px;line-height:20px}
html body[data-workspace] .document-desk .doc-heading {display:flex;flex-wrap:wrap;align-items:center;gap:4px 8px;padding:2px 0;margin:0 0 4px;min-height:0}
html body[data-workspace] .document-desk .doc-heading h3 {margin:0;line-height:22px}
html body[data-workspace] .document-desk .doc-heading [data-add-quick] {flex:0 1 auto;margin:0 0 0 auto;width:auto;padding:3px 8px;min-height:var(--cab-control);line-height:20px}
html body[data-workspace] .document-desk .doc-heading [data-count] {flex:0 0 100%;margin:0;line-height:16px;font-size:12px}
@media(max-width:760px),(pointer:coarse) {
 body[data-workspace] {--cab-control:40px;--cab-pad:3px 8px}
}
@media(max-width:760px) {
 html body[data-workspace] #web-topbar #new {display:inline-flex;align-items:center;justify-content:center;flex:0 0 40px;width:40px;min-width:40px;height:40px;min-height:40px;padding:0;line-height:1}
 html body[data-workspace] #web-topbar #new::after {line-height:1}
}

/* Guest request timing: each service occupies one row. Existing labels remain
   accessible; the redundant time caption is visually suppressed beside its service. */
html[data-theme] body[data-workspace][data-cabinet=guest] .request-special-timing {
 display:grid;grid-template-columns:minmax(0,1fr) auto;gap:2px 8px;margin:6px 0;padding:4px 8px;
}
html[data-theme] body[data-workspace][data-cabinet=guest] .request-special-timing>label {
 display:flex;align-items:center;gap:6px;margin:0;min-height:40px;font-size:13px;line-height:18px;min-width:0;
}
html[data-theme] body[data-workspace][data-cabinet=guest] .request-special-timing>label:nth-of-type(1){grid-row:1;grid-column:1}
html[data-theme] body[data-workspace][data-cabinet=guest] .request-special-timing>label:nth-of-type(2){grid-row:1;grid-column:2}
html[data-theme] body[data-workspace][data-cabinet=guest] .request-special-timing>label:nth-of-type(3){grid-row:2;grid-column:1}
html[data-theme] body[data-workspace][data-cabinet=guest] .request-special-timing>label:nth-of-type(4){grid-row:2;grid-column:2}
html[data-theme] body[data-workspace][data-cabinet=guest] .request-special-timing>label[data-time-field]{gap:0}
html[data-theme] body[data-workspace][data-cabinet=guest] .request-special-timing input[type=time]{width:108px;min-width:0;min-height:40px;margin:0;padding:4px 6px;font-size:13px;line-height:20px}
html[data-theme] body[data-workspace][data-cabinet=guest] .request-special-timing input[type=checkbox]{flex:none;margin:0;width:18px;height:18px}
html[data-theme] body[data-workspace][data-cabinet=guest] .request-special-timing>small{grid-column:1/-1;display:block;margin:2px 0 0;font-size:11px;line-height:15px}

html body[data-workspace] .request-special-timing .timing-time-caption{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}

/* Requested arrival/departure: title, time and surcharge stay together.
   Price controls wrap as a single compact row on narrow apartment cards. */
html body[data-workspace] .compact-offer-dialog .offer-special-timing{container-type:inline-size;container-name:b4timing;display:grid;grid-column:1/-1;gap:4px;margin:3px 0 0;padding:6px}
html body[data-workspace] .compact-offer-dialog .offer-timing-service{display:grid;grid-template-columns:minmax(0,1fr) 62px 14px auto;align-items:center;gap:2px 5px;min-width:0}
html body[data-workspace] .compact-offer-dialog .offer-timing-service>label{grid-column:1/4;grid-row:1;display:flex;align-items:center;gap:5px;margin:0;min-height:40px;min-width:0}
html body[data-workspace] .compact-offer-dialog .offer-timing-service input[type=checkbox]{width:18px;height:18px;min-height:18px;margin:0;flex:none}
html body[data-workspace] .compact-offer-dialog .offer-timing-price{display:contents}
html body[data-workspace] .compact-offer-dialog .offer-timing-price[hidden]{display:none}
html body[data-workspace] .compact-offer-dialog [data-timing-pricing]{grid-row:2;grid-column:1;min-width:0;width:100%;min-height:36px;padding:3px 5px}
html body[data-workspace] .compact-offer-dialog [data-timing-value]{grid-row:2;grid-column:2;width:62px;min-width:0;min-height:36px;padding:3px 5px;text-align:right}
html body[data-workspace] .compact-offer-dialog [data-timing-unit]{grid-row:2;grid-column:3}
html body[data-workspace] .compact-offer-dialog [data-timing-amount]{grid-row:1;grid-column:4;text-align:right;white-space:nowrap}
html body[data-workspace] .compact-offer-dialog .offer-timing-service>small{grid-row:3;grid-column:1/-1;margin:0;line-height:14px}
html body[data-workspace] .compact-offer-dialog .offer-timing-service:not(:last-child)>small{display:none}
@container b4timing (min-width:500px){
 html body[data-workspace] .compact-offer-dialog .offer-timing-service{grid-template-columns:minmax(145px,1fr) 158px 62px 14px auto}
 html body[data-workspace] .compact-offer-dialog .offer-timing-service>label{grid-column:1}
 html body[data-workspace] .compact-offer-dialog [data-timing-pricing]{grid-row:1;grid-column:2}
 html body[data-workspace] .compact-offer-dialog [data-timing-value]{grid-row:1;grid-column:3}
 html body[data-workspace] .compact-offer-dialog [data-timing-unit]{grid-row:1;grid-column:4}
 html body[data-workspace] .compact-offer-dialog [data-timing-amount]{grid-column:5}
 html body[data-workspace] .compact-offer-dialog .offer-timing-service>small{grid-row:2}
}
