/* Fruit and topping portions keep their own recipe limit and ordering. */
.recipe-choice-picker { min-width: 0; }
.recipe-choice-bar { display: flex; gap: 8px; align-items: flex-start; justify-content: space-between; margin: 5px 0 12px; }
.recipe-portions { display: flex; flex: 1; flex-wrap: wrap; gap: 5px; }
.portion { display: inline-flex; align-items: center; justify-content: center; padding: 4px 8px; min-height: 27px; border-radius: 7px; font: 550 11px/1.3 var(--sans); }
.portion.filled { gap: 6px; background: var(--blush); border: 1px solid #dcc1cb; color: var(--wine); cursor: pointer; }
.portion b { font-size: 15px; line-height: 1; }
.portion.vacant { color: #75666b; border: 1px dashed #d9c9cc; }
.recipe-choice-counter { flex: none; font: 600 11px/1.4 var(--sans); padding: 6px 0 5px 4px; color: var(--muted); font-variant-numeric: tabular-nums; }
.recipe-choice-counter.complete { color: var(--wine); }
.recipe-family { margin: 13px 0 6px; color: #69555d; font: 650 11px/1.4 var(--sans); }
.recipe-choice-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 6px; }
.recipe-choice-card { position: relative; min-width: 0; }
.recipe-choice-tile { position: relative; display: flex; align-items: center; gap: 7px; height: 100%; width: 100%; min-height: 49px; padding: 8px 9px; background: var(--surface); color: var(--ink); border: 1px solid var(--rule); border-radius: 9px; font: 500 12px/1.25 var(--sans); text-align: left; }
.recipe-choice-tile[aria-pressed="true"] { border-color: var(--wine); background: var(--blush); color: var(--wine); box-shadow: inset 0 0 0 .5px var(--wine); }
.recipe-choice-check { width: 15px; height: 15px; flex: none; display: grid; place-items: center; border-radius: 5px; border: 1px solid #c7b9bd; background: white; color: transparent; }
.recipe-choice-tile[aria-pressed="true"] .recipe-choice-check { background: var(--wine); color: white; border-color: var(--wine); }
.recipe-choice-text { overflow-wrap: anywhere; }
.recipe-choice-card:has(.recipe-choice-repeat:not([hidden])) .recipe-choice-tile { padding-bottom: 24px; }
.recipe-choice-multiple { position: absolute; right: 3px; bottom: 1px; padding: 1px 3px; font-size: 10px; font-weight: 700; }
.recipe-choice-tile:disabled { opacity: 1; background: #faf8f7; color: #756d70; cursor: default; }
.recipe-choice-tile:not(:disabled):hover { border-color: #ac798e; }
.recipe-choice-repeat { position: absolute; bottom: 1px; right: 1px; width: 31px; height: 27px; border-radius: 7px; background: white; color: var(--wine); border: 1px solid #d8b9c5; font: 600 16px/1 var(--sans); }
.recipe-choice-repeat[hidden],.recipe-choice-multiple[hidden] { display: none !important; }
.recipe-choice-tile:focus-visible,.recipe-choice-repeat:focus-visible,.portion:focus-visible { outline: 2px solid var(--wine); outline-offset: 2px; }
.recipe-choice-help { font: 400 11px/1.5 var(--sans); color: var(--muted); margin: 8px 0 0; }
.recipe-choice-invalid .recipe-choice-help,.recipe-choice-invalid .recipe-choice-counter { color: #98333f; font-weight: 600; }
@media(max-width: 460px) { .recipe-choice-grid { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media(prefers-reduced-motion: no-preference) {
  .recipe-choice-tile { transition: background-color .15s ease, border-color .15s ease; }
  .recipe-choice-tile:active:not(:disabled) { transform: scale(.985); }
  .recipe-choice-tile[aria-pressed="true"] .recipe-choice-check svg { animation: recipe-check .18s ease-out; }
  @keyframes recipe-check { from { opacity: .4; transform: scale(.72); } to { opacity: 1; transform: none; } }
}

.recipe-optional .recipe-choice-help{display:flex;justify-content:space-between;gap:10px;margin:2px 0 10px}
.recipe-optional-card{position:relative;display:block;cursor:pointer}
.recipe-optional-card>input{position:absolute;opacity:0;width:1px;height:1px}
.recipe-optional-card input:checked+.recipe-choice-tile{border-color:var(--wine);background:var(--blush);color:var(--wine)}
.recipe-optional-card input:checked+.recipe-choice-tile .recipe-choice-check{color:white;background:var(--wine);border-color:var(--wine)}
.recipe-optional-card input:focus-visible+.recipe-choice-tile{outline:2px solid var(--wine);outline-offset:2px}
