/* =====================================================================
   recipe-plan.css (2026-11-03): Recipes — the ♡ favorite on each card, the Plan button and the Add to plan dialog.
   ===================================================================== */
.rp-card { position: relative; }
.rp-fav-form { position: absolute; top: 8px; right: 8px; z-index: 2; margin: 0; }
.rp-fav { width: 36px; height: 36px; border: 0; border-radius: 999px; background: rgba(255, 255, 255, .92); color: #64717d;
          display: inline-flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: 0 1px 3px rgba(16, 47, 86, .18); font-size: 1rem; }
.rp-fav:hover { color: #b42318; }
.rp-fav.is-on { color: #b42318; }
.rp-fav:focus-visible { outline: 2px solid #c88a22; outline-offset: 2px; }
.rp-fav-form.is-busy .rp-fav { opacity: .6; }
.rp-plan-btn { display: inline-flex; align-items: center; gap: 5px; }
/* ─────────────────────────────────────────────────────────────────────────────────────────────────
   ADD TO PLAN DIALOG (2026-11-03 restyle) — Recipes → Plan on a card → #rpPlanDialog
   Markup: Pages/Recipes/Index.cshtml (search "rpPlanDialog"); behaviour: wwwroot/js/recipe-plan.js.
   The dialog's frame, header, footer and buttons come from components/aks-dialog.css (.aks-dlg-*);
   this block only shapes what's inside it.
   Keep in step with the planner's own dialogs (wwwroot/css/plans.css, PLANNER DIALOGS): the --rp-* values here
   match the --pd-* values there, so both look the same.

   TO CHANGE THE LOOK, edit the variables just below — everything in this block reads from them:
     --rp-field-h       height of every box (Plan, Day, Slot, Servings), so they line up
     --rp-radius        corner rounding of the boxes
     --rp-line          box border;  --rp-line-hover: border on hover
     --rp-focus         border + ring colour when a box is active
     --rp-label         label colour;  --rp-muted: small grey text
     --rp-accent        the recipe name in the title ("Add Chili to a plan")
     --rp-serv-w        width of the Servings box
     --rp-day-share     Day's share of the row against Slot's 1fr (1.4fr = 40% wider), so "Today, Tue Nov 3" fits
   Layout: the Day / Slot / Servings row is a 3-column grid (.rp-row). Under 520px wide it becomes
   Day on its own row, then Slot + Servings side by side (see the @media rule at the end of this block).
   ───────────────────────────────────────────────────────────────────────────────────────────────── */
.rp-dlg {
    --rp-field-h: 44px;
    --rp-radius: 10px;
    --rp-line: #cbd4dc;
    --rp-line-hover: #9aa8b5;
    --rp-focus: #173f66;
    --rp-label: #172f49;
    --rp-muted: #64717d;
    --rp-accent: #c7632b;
    --rp-serv-w: 100px;
    --rp-day-share: 1.4fr;   /* keep the "fr": it's a grid share, not a plain number */
}
/* The dialog's width. "dialog.aks-dlg" in aks-dialog.css sets 460px; this needs the same "dialog." to win */
dialog.aks-dlg.rp-dlg { width: min(560px, calc(100vw - 24px)); }

/* Title: the recipe name stands out */
.rp-dlg .aks-dlg-title [data-rp-title] { color: var(--rp-accent); }

/* Body: even spacing between the Plan box and the row below */
.rp-dlg .aks-dlg-body { display: flex; flex-direction: column; gap: 16px; }

/* Labels */
.rp-dlg .aks-dlg-field { gap: 6px; }
.rp-dlg .aks-dlg-field label { font-size: .82rem; font-weight: 600; letter-spacing: .01em; color: var(--rp-label); }

/* Every box — the three dropdowns and Servings — the same height, border and rounding.
   Dropdowns lose the browser's own look (square, grey arrow) and get a chevron drawn here. */
.rp-dlg select,
.rp-dlg input[type="number"] {
    box-sizing: border-box;
    width: 100%;
    height: var(--rp-field-h);
    min-height: var(--rp-field-h);
    padding: 0 12px;
    border: 1px solid var(--rp-line);
    border-radius: var(--rp-radius);
    background-color: #fff;
    color: var(--rp-label);
    font: inherit;
    font-size: .95rem;
    line-height: 1.2;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.rp-dlg select {
    -webkit-appearance: none;
    appearance: none;
    padding-right: 38px;
    cursor: pointer;
    text-overflow: ellipsis;
    /* the chevron: change the stroke colour in the svg (%2364717d = #64717d) to recolour it */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2364717d' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 14px 14px;
}
.rp-dlg input[type="number"] { text-align: center; font-variant-numeric: tabular-nums; }
.rp-dlg select:hover,
.rp-dlg input[type="number"]:hover { border-color: var(--rp-line-hover); }
.rp-dlg select:focus,
.rp-dlg input[type="number"]:focus {
    outline: none;
    border-color: var(--rp-focus);
    box-shadow: 0 0 0 3px rgba(23, 63, 102, .15);   /* the ring: same colour as --rp-focus, see-through */
}

/* Day · Slot · Servings in one row, bottoms lined up */
.rp-row {
    display: grid;
    grid-template-columns: minmax(0, var(--rp-day-share)) minmax(0, 1fr) var(--rp-serv-w);
    gap: 12px;
    align-items: end;
}
.rp-row > .aks-dlg-field { min-width: 0; }

/* Notes inside the dialog */
.rp-warn { margin: 0; padding: 10px 12px; border-radius: var(--rp-radius); background: #fdf3dc; color: #8a5a00; font-size: .86rem; line-height: 1.4; }
.rp-none { margin: 0; color: var(--rp-label); line-height: 1.5; }

/* Phones: Day across the full width (its label is the longest), then Slot and Servings side by side */
@media (max-width: 520px) {
    .rp-row { grid-template-columns: minmax(0, 1fr) var(--rp-serv-w); }
    .rp-row > .aks-dlg-field:first-child { grid-column: 1 / -1; }
}
/* ── end of ADD TO PLAN DIALOG ─────────────────────────────────────────────────────────────────── */

@media print { .rp-fav-form, .rp-plan-btn { display: none !important; } }
