/* Redesign phase 4a (plans): three-way rating, the group note, "N of M free"
   and "Show 3 more" on options, the length pills and "already booked" on the
   fill-it-in-yourself form. Uses the tokens of r.css. */

/* Rating: loved it / it was fine / not again */
.r-rate-btns.r-rate-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.r-rate-btns.r-rate-3 button { padding: 0 6px; line-height: 1.15; }
.r-rate-btns button[aria-pressed="true"] { box-shadow: inset 0 0 0 2px var(--text); }

/* The organizer's note on a plan */
.r-groupnote p { margin: 0; font-size: 15px; line-height: 1.45; overflow-wrap: anywhere; }

/* Options */
.r-opt-free { margin-left: auto; margin-right: 10px; font-size: 13px; font-weight: 700; white-space: nowrap; }
.r-opt-more { margin-top: 4px; }
.r-opt-more button { width: 100%; }

/* Length pills: 1 h, 2 h, 3 h, Other (radios, no script) */
.r-lenpick { border: 0; padding: 0; margin: 0; min-width: 0; }
.r-lenpick legend { font-size: 14px; font-weight: 700; padding: 0; margin-bottom: 6px; }
.r-lenpick-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.r-lenpick-row > input[type="radio"] { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }
.r-lenpick-row > label:not(.r-len-min) {
  display: flex; align-items: center; justify-content: center; min-height: 44px; border-radius: 22px;
  border: 1px solid var(--border); background: var(--surface); font-size: 14px; font-weight: 600; cursor: pointer;
}
.r-lenpick-row > input:checked + label { background: var(--text); color: var(--bg); border-color: var(--text); font-weight: 700; }
.r-lenpick-row > input:focus-visible + label { outline: 3px solid var(--focus); outline-offset: 2px; }
.r-len-min { display: none; grid-column: 1 / -1; }
#len-other:checked ~ .r-len-min { display: flex; }

/* "Already booked": the vote fields no longer matter */
.r-form:has(#own-booked:checked) .r-votefields .r-field:first-child { opacity: 0.45; }
.r-save-booked { display: none; }
.r-form:has(#own-booked:checked) .r-save-booked { display: inline; }
.r-form:has(#own-booked:checked) .r-save-draft { display: none; }
.r-check { display: flex; align-items: center; gap: 12px; font-size: 15px; font-weight: 600; }
.r-check input { width: 20px; height: 20px; accent-color: var(--brand); flex-shrink: 0; }
/* Sheets that open in place: "Make it on now", "Give people more time", "Can't make it anymore" (details, no script). */
.rv-sheet { display: flex; flex-direction: column; gap: 10px; padding: 16px 0 4px; }
.rv-sheet-d > summary { display: flex; align-items: center; justify-content: space-between; list-style: none; cursor: pointer; border-top: 1px solid var(--line); }
.rv-sheet-d > summary::-webkit-details-marker { display: none; }
.rv-sheet-d:first-child > summary { border-top: 0; }
.rv-sheet-d[open] > summary { border-bottom: 0; }
.rv-sheet form, .rv-custom { display: flex; flex-direction: column; gap: 8px; }
.rv-actions .rv-sheet-d + form .r-row-btn, .rv-actions form + .rv-sheet-d > summary { border-top: 1px solid var(--line); }
.rv-actions form + form .r-row-btn { border-top: 1px solid var(--line); }
.r-changes .rv-sheet-d + form .r-row-btn, .r-changes form + .rv-sheet-d > summary { border-top: 1px solid var(--line); }
.rv-sheet-d > summary:hover { text-decoration: underline; }
.r-card.r-dupnote { flex-direction: row; order: 5; display: flex; align-items: center; justify-content: space-between; gap: 12px; text-decoration: none; color: var(--text); }
.r-dupnote-text { display: flex; flex-direction: column; gap: 2px; font-size: 15px; }
