.tables-dialog{box-sizing:border-box;width:min(680px,calc(100vw - 20px));max-width:calc(100vw - 20px);max-height:calc(100dvh - 20px);margin:auto;padding:0;overflow:auto;overscroll-behavior:contain;border:1px solid var(--line,#bbcec4);border-radius:16px;background:var(--surface,#fff);color:var(--text,#15372d)}
.tables-dialog::backdrop{background:#00140fb8}.tables-dialog *{box-sizing:border-box;min-width:0}.tables-dialog header{position:sticky;top:0;z-index:2;display:flex;justify-content:space-between;align-items:center;gap:12px;padding:12px;background:var(--surface,#fff);border-bottom:1px solid var(--line,#bbcec4)}.tables-dialog h2{font-size:1.15rem;margin:0}.tables-content{padding:12px;display:grid;gap:12px}.tables-dialog button{padding:10px 12px;min-height:44px;border-radius:10px;border:1px solid var(--line,#bbcec4);background:var(--surface-strong,#eaf3ef);color:inherit;font:inherit;font-weight:700;white-space:normal;cursor:pointer}.tables-dialog button[type=submit]{background:#08745e;color:#fff}.tables-dialog button:disabled{opacity:.55;cursor:wait}.tables-dialog form,.tables-dialog label{display:grid;gap:8px}.tables-dialog input,.tables-dialog select{font:inherit;font-size:16px;width:100%;min-height:44px;padding:10px;border:1px solid var(--line,#bbcec4);border-radius:9px;background:var(--surface-strong,#f0f6f3);color:inherit}.tables-dialog fieldset{border:1px solid var(--line,#bbcec4);border-radius:10px;display:grid;gap:8px}.tables-dialog .tables-check{display:flex;align-items:center;gap:10px;min-height:44px}.tables-check input{flex:0 0 22px;width:22px;min-height:22px;height:22px}.tables-list{display:grid;gap:8px}.tables-list article{padding:12px;border:1px solid var(--line,#bbcec4);border-radius:10px;display:grid;gap:6px;overflow-wrap:anywhere}.tables-list article[hidden]{display:none}.tables-list article>div:not(.tables-actions){display:flex;justify-content:space-between;gap:8px;flex-wrap:wrap}.tables-actions{display:flex;flex-wrap:wrap;gap:6px}.tables-actions button{flex:1 1 100px}.tables-total{font-size:1.3rem}.tables-error{color:#a22626;padding:0 12px;overflow-wrap:anywhere}.tables-error:empty{display:none}.table-context-extras{display:flex;gap:6px;align-items:center;flex-wrap:wrap;padding:5px 10px;font-size:.8rem;color:var(--text);background:var(--surface)}.table-context-extras button{font:inherit;color:inherit;background:var(--surface-strong);border:1px solid var(--line);border-radius:8px;padding:7px;min-height:36px}.service-table-tools{display:flex;flex:none;gap:6px}.service-table-tools button{height:50px;min-width:50px;max-width:98px;white-space:normal;background:#183e32;color:#fff;border:1px solid #719c88;border-radius:12px;font:inherit;font-size:.75rem;font-weight:700;padding:5px}.service-table-switch .table-owner{position:absolute;bottom:3px;right:4px;font-size:9px;line-height:1;color:inherit}.service-table-switch.foreign{border-style:dashed!important}.service-table-switch.helping{outline:1px dashed #9bdbce}.mobile-seat-button.takeaway-seat{flex:0 0 auto!important;min-width:90px!important;max-width:170px!important;width:auto!important;padding:4px 10px!important}.takeaway-seat span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:150px}
html[data-display-mode=dark] .tables-dialog{--surface:#192d26;--surface-strong:#243c32;--text:#f1f8f4;--line:#4a685b}html[data-display-mode=dark] .tables-error{color:#ffaaa0}
.tables-actions button{flex-basis:125px;overflow-wrap:normal;word-break:normal}.mobile-seat-button.takeaway-seat{flex-basis:140px!important;min-width:140px!important}.takeaway-seat span{display:block}
.table-room-filter{display:grid;gap:6px;margin:12px 0;color:inherit}.table-room-filter select{min-width:0;width:100%;font:inherit;font-size:16px;min-height:44px;background:var(--surface-strong);color:inherit;border:1px solid var(--line);border-radius:10px;padding:8px}
.service-table-group{display:flex;flex:none;align-items:stretch;gap:6px;position:relative;padding:0 3px 5px;border-bottom:3px solid #91b1a5;border-radius:0 0 10px 10px;box-sizing:border-box}
.service-table-group::before,.service-table-group::after{content:'';position:absolute;bottom:0;width:3px;height:10px;background:#91b1a5}.service-table-group::before{left:0}.service-table-group::after{right:0}
.service-table-group.selected-group{border-bottom-color:#f5ce56;background:#ffffff12}.service-table-group.selected-group::before,.service-table-group.selected-group::after{background:#f5ce56}
.service-table-group .service-table-switch.group-member{border-top:4px solid var(--table-origin)!important}
.service-table-group .service-table-switch.group-member.selected{background:var(--table-origin)!important;color:#10261d!important;border-color:var(--table-origin)!important;box-shadow:inset 0 -4px 0 #173e36!important}
.service-table-group .service-table-switch.group-member.selected .service-table-select{background:transparent!important;color:#10261d!important}
#mobileSeatStrip .mobile-seat-button.group-seat{background:var(--table-origin)!important;color:#10261d!important;display:flex!important;flex-direction:column;justify-content:center;gap:0;position:relative}
#mobileSeatStrip .group-seat .seat-origin{font-size:11px!important;line-height:12px!important;color:#10261d!important;background:transparent!important;font-weight:800;position:static!important;padding:0!important;margin:0!important;border:0!important;width:auto!important;height:auto!important;min-width:0!important;box-shadow:none!important}
#mobileSeatStrip .group-seat>span{line-height:20px}#mobileSeatStrip .mobile-seat-button.group-seat.selected{box-shadow:inset 0 -5px 0 #173e36!important;outline:2px solid white;outline-offset:-2px}
.tables-dialog header.table-group-editor-header{display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:8px;align-items:center}
.table-group-editor-header h2{grid-column:1/-1}.table-group-editor-header button{padding:8px;font-size:.85rem;min-height:44px}
.table-group-editor-header .table-group-close{grid-column:3;background:#fce6e3;color:#9d2525;border-color:#d6958d;font-size:1.4rem;min-width:44px;line-height:1}
.table-group-editor-header button[type=submit]{grid-column:1}.table-group-editor-header [data-tables-action=dissolve]{grid-column:2}

/* Keep pickup and delivery actions reachable above and below long order lists. */
.service-table-pickup.travelling { background:#7044a2; }
.service-pickup-dialog > header,
.service-pickup-dialog > .service-pickup-actions,
.service-pickup-dialog > footer { flex-shrink:0; }
.service-pickup-actions { display:flex; flex-wrap:wrap; gap:6px; }
.service-pickup-actions .primary-action { flex:1 1 160px; min-width:0; min-height:44px; padding:8px; white-space:normal; overflow-wrap:anywhere; }
.service-pickup-actions:empty,
.service-pickup-error:empty { display:none; }
.service-pickup-error { margin:0; font-size:.85rem; color:#a22626; overflow-wrap:anywhere; }
html[data-display-mode=dark] .service-pickup-error { color:#ffaaa0; }

/* iOS has a separate touch callout; keep our table/guest hold menu in control. */
#serviceTableStrip,
#serviceTableStrip *,
#mobileSeatStrip,
#mobileSeatStrip *,
#seatPicker .seat-choice,
#seatPicker .seat-choice *,
#floorPlan [data-table-id],
#floorPlan [data-table-id] * {
  -webkit-user-select:none;
  user-select:none;
  -webkit-touch-callout:none;
}

/* An unselected order target must look inactive across the whole product row. */
/* Gold plus and stripe identify extra chairs without hiding guest/group colours. */
html body.state-account.state-staff #mobileSeatStrip .mobile-seat-button.temporary-seat,
html body .seat-choice.temporary-seat,
html body .seat-chair.temporary-seat { border:2px dashed #bb7b07 !important; background-image:linear-gradient(to top,rgba(255,190,49,.65) 0 7px,transparent 7px) !important; }
html body #mobileSeatStrip .mobile-seat-button.temporary-seat { position:relative; }
html body #mobileSeatStrip .extra-seat-badge { position:absolute; top:2px; right:3px; width:13px; height:13px; border-radius:50%; background:#ffe4a1 !important; color:#583800 !important; font-size:12px !important; line-height:13px; font-weight:950; pointer-events:none; }
html[data-display-mode=dark] body .temporary-seat { border-color:#ffd166 !important; }
html body.state-account.state-staff[data-active-view=service] #productGrid .service-product-row[aria-disabled=true] { opacity:.38; filter:grayscale(.75); }
html body.state-account.state-staff[data-active-view=service] #productGrid .seat-target-hint { box-sizing:border-box; display:block; width:100%; margin:6px 0 !important; padding:14px 16px !important; border:2px solid #ce9b32 !important; border-radius:10px; background:#fff0c4 !important; color:#49330c !important; font-size:1.05rem !important; font-weight:950 !important; line-height:1.45; }
html body.state-account.state-staff[data-active-view=service] #productGrid .seat-target-hint strong { display:block; font:inherit; color:inherit !important; }
html body.state-account.state-staff[data-active-view=service] #productGrid .seat-target-hint button { display:block; min-height:44px; max-width:100%; margin-top:10px; padding:8px 16px; white-space:normal; overflow-wrap:anywhere; }
html[data-display-mode=dark] body.state-account.state-staff[data-active-view=service] #productGrid .seat-target-hint { background:#493b1c !important; color:#fff0bd !important; border-color:#cca34c !important; }
.draft-submit-toolbar { display:flex; flex:0 0 auto; align-items:center; justify-content:space-between; gap:10px; width:100%; box-sizing:border-box; padding:8px; border:1px solid var(--line,#bdcec5); border-radius:10px; background:var(--surface,#fff); color:var(--text,#143b2d); }
.draft-submit-toolbar>div { display:grid; min-width:0; gap:3px; }
.draft-submit-toolbar span { font-size:.8rem; }
.draft-submit-toolbar .primary-action { min-height:44px; white-space:normal; }
.service-person-group { display:grid; align-content:start; gap:6px; min-width:0; padding:8px; border:1px solid var(--line,#bdcec5); border-radius:10px; background:var(--surface,#fff); color:var(--text,#143b2d); }
.service-person-group.current-person { border:2px solid var(--theme-accent,#19c59b); }
.service-person-heading { display:flex; align-items:center; justify-content:space-between; gap:8px; min-width:0; padding-bottom:6px; border-bottom:1px solid var(--line,#bdcec5); }
.service-person-heading>div { display:flex; flex-wrap:wrap; align-items:center; gap:7px; min-width:0; }
.service-person-heading strong { overflow-wrap:anywhere; }
.service-person-heading small { font-weight:850; color:var(--muted,#52675d); }
.service-person-heading button { flex:0 0 auto; min-height:40px; padding:7px 10px; }
.service-person-empty { margin:3px 0; color:var(--muted,#52675d); font-size:.85rem; }
.mobile-cart-drawer>.order-submit-error { flex:0 0 auto; }
html body.state-account.state-staff[data-active-view=service] #serviceView :is(.service-person-heading,.draft-submit-toolbar) strong { color:inherit !important; font-weight:900; }

/* The sent-item editor keeps both send buttons visible while its fields scroll. */
#productDialog { z-index:650; }
.modifier-dialog.sent-item-editor { display:flex; flex-direction:column; gap:12px; max-height:calc(100dvh - 32px); overflow:hidden; }
.sent-item-editor > .dialog-title-row,
.sent-item-editor > .sent-item-submit,
.sent-item-editor > .dialog-actions { flex-shrink:0; }
.sent-item-submit .primary-action { width:100%; min-height:44px; padding:10px; white-space:normal; overflow-wrap:anywhere; }
.sent-item-fields { display:grid; gap:16px; min-height:0; overflow-y:auto; overscroll-behavior:contain; }
.sent-item-fields > * { min-width:0; }
.sent-item-editor > .dialog-actions .primary-action { flex:1 0 100%; min-height:44px; white-space:normal; overflow-wrap:anywhere; }
.product-draft-error:empty { display:none; }
@media(max-width:640px) {
  .modifier-dialog.sent-item-editor { padding:12px; gap:8px; }
  .sent-item-editor .dialog-title-row h3 { font-size:21px; }
  .sent-item-editor > .dialog-actions { display:grid; grid-template-columns:1fr 1fr; gap:6px; }
  .sent-item-editor > .dialog-actions .primary-action { grid-column:1/-1; grid-row:1; }
  .sent-item-editor > .dialog-actions button { padding:8px; min-width:0; white-space:normal; }
}
