.modal-backdrop:has(.condiment-picker-host) { padding: 16px; }
.dialog:has(.condiment-picker-host) { display: flex; flex-direction: column; box-sizing: border-box; width: min(1180px, 100%); max-width: calc(100vw - 32px); max-height: min(96dvh, calc(100dvh - 32px)); overflow: hidden; }
.dialog:has(.condiment-picker-host) .dialog-header { flex: 0 0 auto; }
.dialog:has(.condiment-picker-host) .dialog-body { min-height: 0; overflow-y: auto; padding: 14px; }
.dialog:has(.condiment-picker-host) .dialog-actions { position: sticky; bottom: -14px; z-index: 1; margin: 12px -14px -14px; padding: 12px 14px; background: #fffdfa; border-top: 1px solid #dce5dd; }
.condiment-picker { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 12px; min-width: 0; }
.condiment-picker-groups { display: grid; grid-auto-rows: minmax(62px, auto); align-content: start; gap: 7px; max-height: min(72dvh, 710px); overflow-y: auto; }
.condiment-picker-group { display: grid; gap: 5px; width: 100%; padding: 12px 10px; min-height: 62px; border: 1px solid #d8ded7; border-radius: 8px; background: #f3f4e9; color: #263c30; font: inherit; text-align: left; cursor: pointer; }
.condiment-picker-group span { font-weight: 700; overflow-wrap: anywhere; }
.condiment-picker-group small { color: #6a796d; line-height: 1.45; }
.condiment-picker-group.selected { background: #d9ece1; border-color: #137b70; box-shadow: inset 4px 0 #137b70; }
.condiment-picker-main { min-width: 0; }
.condiment-picker-parent-weight { grid-column: 1 / -1; display: grid; gap: 7px; padding: 14px; border: 1px solid #b9cbbf; border-radius: 10px; background: #eff8f2; color: #263c30; font-weight: 700; }
.condiment-picker-parent-weight input { box-sizing: border-box; width: 100%; min-width: 0; min-height: 52px; padding: 10px; border: 1px solid #b9cbbf; border-radius: 7px; background: #fff; font: inherit; font-size: 24px; }
.condiment-picker-parent-weight small { font-size: 12px; font-weight: 400; }
.condiment-picker-weight input:read-only { background: #e9eee9; color: #3b5142; }
.condiment-picker-weight-only { grid-template-columns: minmax(0, 1fr); }
.condiment-picker-weight-only .condiment-picker-groups, .condiment-picker-weight-only .condiment-picker-options, .condiment-picker-weight-only .condiment-picker-selections h3, .condiment-picker-weight-only .condiment-picker-selection-list, .condiment-picker-weight-only .condiment-picker-instructions { display: none; }
.condiment-picker-options { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); align-content: start; gap: 8px; min-height: 230px; max-height: 40dvh; overflow-y: auto; padding: 2px 3px 10px; }
.condiment-picker-option { display: flex; flex-direction: column; gap: 7px; justify-content: center; min-width: 0; min-height: 72px; padding: 10px 7px; border: 2px solid transparent; border-radius: 8px; background: var(--condiment-color, #137b70); color: #fff; text-shadow: 0 1px 3px #000b; box-shadow: inset 0 0 0 1000px #0002; font: inherit; cursor: pointer; }
.condiment-picker-option span { font-weight: 650; overflow-wrap: anywhere; line-height: 1.45; }
.condiment-picker-option small { opacity: .95; font-size: 11px; }
.condiment-picker-option.selected { border-color: #f5bc3c; outline: 1px solid #855d05; }
.condiment-picker-selections { border: 1px solid #dce5dd; border-radius: 10px; padding: 12px; background: #fafcf9; }
.condiment-picker-selections h3 { margin: 0 0 10px; font-size: 14px; }
.condiment-picker-selection-list { display: grid; gap: 7px; max-height: 24dvh; overflow-y: auto; margin-bottom: 10px; }
.condiment-picker-selected-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 8px; border: 1px solid #dce5dd; border-radius: 7px; background: #fff; }
.condiment-picker-selected-row.active { border-color: #137b70; background: #eff8f2; }
.condiment-picker-selected-name { flex: 1 1 170px; display: grid; gap: 5px; min-width: 0; padding: 5px 0; border: 0; background: transparent; color: #263c30; font: inherit; text-align: left; cursor: pointer; }
.condiment-picker-selected-name strong { font-size: 13px; overflow-wrap: anywhere; }
.condiment-picker-selected-name small { color: #647569; font-size: 11px; }
.condiment-picker-weight, .condiment-picker-custom { flex: 0 1 230px; display: grid; gap: 5px; font-size: 12px; color: #3b5142; }
.condiment-picker-weight input, .condiment-picker-custom input { min-width: 0; width: 100%; box-sizing: border-box; border: 1px solid #b9cbbf; border-radius: 5px; padding: 8px; font: inherit; background: white; }
.condiment-picker-weight small { font-size: 10px; color: #647569; }
.condiment-picker-remove { align-self: start; min-width: 36px; min-height: 36px; border: 1px solid #d1ddd4; border-radius: 5px; color: #8c3027; background: #fff; font-size: 22px; cursor: pointer; }
.condiment-picker-instructions { display: flex; flex-wrap: wrap; gap: 7px; }
.condiment-picker-instructions button { min-width: 64px; min-height: 44px; padding: 8px 12px; border: 1px solid #d1c485; border-radius: 6px; background: #f6eed2; color: #493d1c; font: inherit; cursor: pointer; }
.condiment-picker-instructions button.active { color: #fff; background: #137b70; border-color: #137b70; }
.condiment-picker-instructions button:disabled { opacity: .5; cursor: default; }
.condiment-picker-note { display: grid; gap: 7px; margin-top: 12px; font-size: 12px; color: #3b5142; }
.condiment-picker-note textarea { width: 100%; min-width: 0; box-sizing: border-box; resize: vertical; padding: 10px; border: 1px solid #c4d2c8; border-radius: 6px; font: inherit; background: #fff; }
.condiment-picker-error { margin: 10px 0 0; border-radius: 6px; padding: 10px; background: #fff0ed; color: #962a1e; overflow-wrap: anywhere; }
.condiment-picker [hidden] { display: none !important; }
@media (max-width: 1000px) { .condiment-picker-options { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 760px) { .condiment-picker { grid-template-columns: 115px minmax(0, 1fr); } .condiment-picker-options { grid-template-columns: repeat(3, minmax(0, 1fr)); } .condiment-picker-group { padding: 10px 7px; } }
@media (max-width: 520px) {
  .condiment-picker { grid-template-columns: 1fr; }
  .condiment-picker-groups { display: flex; overflow-x: auto; max-height: none; padding-bottom: 4px; }
  .condiment-picker-group { flex: 0 0 120px; min-height: 56px; }
  .condiment-picker-options { min-height: 160px; max-height: 31dvh; }
  .condiment-picker-option { min-height: 68px; }
  .condiment-picker-selected-row { gap: 7px; }
  .condiment-picker-weight, .condiment-picker-custom { flex: 1 1 160px; }
  .condiment-picker-selection-list { max-height: 22dvh; }
  .condiment-picker-instructions button { flex: 1 1 72px; }
}
@media (max-height: 580px) and (min-width: 521px) {
  .condiment-picker-options { min-height: 130px; max-height: 29dvh; }
  .condiment-picker-selection-list { max-height: 19dvh; }
  .condiment-picker-note textarea { min-height: 38px; }
}
