/* TableBonWeb 1.0.5: public theme color contract.
 * The active WordPress theme, not the restaurant plugin, owns the palette.
 * Prefer WP theme.json presets without JavaScript, then adopt real computed
 * theme CSS colors through frontend-theme.js when available.
 */
:root {
  --tbw-front-primary: var(--wp--preset--color--primary, var(--wp--preset--color--accent, #292929));
  --tbw-front-text: var(--wp--preset--color--contrast, currentColor);
  --tbw-front-bg: var(--wp--preset--color--base, #ffffff);
  --tbw-front-surface: var(--wp--preset--color--base, #ffffff);
  --tbw-front-on-primary: #ffffff;
  --tbw-front-primary-hover: color-mix(in srgb, var(--tbw-front-primary) 84%, var(--tbw-front-text) 16%);
  --tbw-front-muted: color-mix(in srgb, var(--tbw-front-text) 67%, var(--tbw-front-surface) 33%);
  --tbw-front-faint: color-mix(in srgb, var(--tbw-front-text) 38%, var(--tbw-front-surface) 62%);
  --tbw-front-panel: color-mix(in srgb, var(--tbw-front-surface) 96%, var(--tbw-front-primary) 4%);
  --tbw-front-surface-soft: color-mix(in srgb, var(--tbw-front-surface) 98%, var(--tbw-front-primary) 2%);
  --tbw-front-border: color-mix(in srgb, var(--tbw-front-text) 18%, var(--tbw-front-surface) 82%);
  --tbw-front-focus: var(--tbw-front-primary);
  --tbw-front-error: #af3229;
  --tbw-front-error-bg: color-mix(in srgb, var(--tbw-front-surface) 91%, var(--tbw-front-error) 9%);
  --tbw-front-success-bg: color-mix(in srgb, var(--tbw-front-surface) 92%, #3a8c4b 8%);
  --tbw-front-success-border: #83aa82;
  --tbw-front-warning-bg: color-mix(in srgb, var(--tbw-front-surface) 90%, #d5a434 10%);
  --tbw-front-warning-border: #dbc185;
}
/* 1.3.20: common business/private checkout invoice address */
.tbw-billing{border:1px solid #d9d6d0;border-radius:9px;padding:14px;margin:17px 0;background:#faf9f7;min-width:0}
.tbw-billing legend{font-weight:700;padding:0 8px;color:#3e332a}
.tbw-billing label{display:block;margin:10px 0;font-size:14px}
.tbw-billing label input:not([type=checkbox]),.tbw-billing select{display:block;width:100%;box-sizing:border-box;max-width:100%;padding:10px;border:1px solid #b6b0a8;border-radius:6px;background:#fff;font-size:16px}
.tbw-billing .tbw-billing__optional{display:flex;align-items:center;gap:9px}
.tbw-billing .tbw-billing__optional input{flex:none}
.tbw-billing__row{display:grid;grid-template-columns:minmax(80px,1fr) minmax(110px,2fr);gap:12px}
.tbw-billing__hint{font-size:13px;line-height:1.5;color:#625950}
.tbw-billing [hidden]{display:none!important}

/* 1.3.21 – billing identity belongs first in the customer-details step.
   Scope the controls to TableBonWeb; WordPress themes may set width:100% on all inputs,
   including checkboxes, which previously created a huge empty billing panel. */
.tbw-event-checkout .tbw-billing-choice,
.tbw-shop-cart .tbw-billing-choice {
  display:block;
  width:100%;
  max-width:100%;
  min-width:0;
  box-sizing:border-box;
  padding:15px 16px;
  margin:8px 0 20px;
  border:1px solid var(--tbw-front-border, #d9d6d0);
  border-radius:9px;
  background:var(--tbw-front-panel, #faf9f7);
}
.tbw-event-checkout .tbw-billing-choice label,
.tbw-shop-cart .tbw-billing-choice label {
  display:block;
  margin:0 0 7px;
  font-size:14px;
  font-weight:650;
  line-height:1.4;
}
.tbw-event-checkout .tbw-billing-choice select,
.tbw-shop-cart .tbw-billing-choice select {
  display:block;
  width:100%;
  max-width:100%;
  min-width:0;
  box-sizing:border-box;
  font:inherit;
  font-size:16px;
  min-height:45px;
  padding:10px 12px;
  border-radius:7px;
  border:1px solid var(--tbw-front-border, #b6b0a8);
  background:var(--tbw-front-surface, #fff);
}
.tbw-event-checkout .tbw-billing,
.tbw-shop-cart .tbw-billing {
  width:100%;
  max-width:100%;
  height:auto;
  min-height:0;
  box-sizing:border-box;
  overflow-wrap:normal;
}
.tbw-event-checkout .tbw-billing .tbw-billing__optional,
.tbw-shop-cart .tbw-billing .tbw-billing__optional {
  display:flex;
  flex-direction:row;
  flex-wrap:nowrap;
  align-items:flex-start;
  justify-content:flex-start;
  gap:10px;
  width:100%;
  min-width:0;
  box-sizing:border-box;
  line-height:1.5;
  white-space:normal;
  overflow-wrap:break-word;
}
.tbw-event-checkout .tbw-billing input[type="checkbox"],
.tbw-shop-cart .tbw-billing input[type="checkbox"] {
  display:block;
  flex:0 0 18px;
  width:18px!important;
  max-width:18px!important;
  min-width:18px!important;
  height:18px;
  min-height:18px;
  margin:2px 0 0;
  padding:0;
  box-sizing:border-box;
}
.tbw-billing__row>label{min-width:0}
@media(max-width:480px){
  .tbw-billing__row{grid-template-columns:minmax(0,1fr)}
}
