/*
 * RecLite Headless — Registration & Enrollment styles
 *
 * Depends on tokens defined in reclite-headless.css
 * (--reclite-color-primary, --color-text, --color-primary-white).
 * WCAG 2.1 AA:
 *   - 3:1 non-text contrast on borders and disabled controls
 *   - 4.5:1 text contrast
 *   - Focus rings inherited from reclite-headless.css
 *   - Reduced-motion respected globally
 */

/* ============================================================
 * Cart — redesigned surface
 * ============================================================ */
.rl-reg-cart { --rl-line: #e7e9f0; --rl-ink: #1d2637; --rl-muted: #5b6472; }
.rl-cart-head { margin-bottom: 22px; }
.rl-cart-head h1 { margin: 0 0 6px; font-size: 26px; }
.rl-cart-subhead { margin: 0; font-size: 15px; }

.rl-cart-loading {
  display: inline-flex; gap: 10px; align-items: center;
  padding: 28px; color: var(--rl-muted);
}

.rl-cart-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 24px;
  align-items: start;
}
@media (max-width: 860px) {
  .rl-cart-grid { grid-template-columns: 1fr; }
}
.rl-cart-main { display: grid; gap: 18px; min-width: 0; }

/* Cards */
.rl-cart-card {
  border: 1px solid var(--rl-line); border-radius: 14px;
  padding: 20px 22px; background: #fff;
  box-shadow: 0 1px 2px rgba(20, 30, 60, 0.04);
}
.rl-cart-card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.rl-cart-card-head h2 { margin: 0; font-size: 16px; }
.rl-cart-card-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 8px;
  background: #eef2fb; color: var(--reclite-color-primary, #243b80);
}
.rl-cart-count {
  margin-left: auto; font-size: 12px; font-weight: 700; line-height: 1;
  min-width: 22px; height: 22px; padding: 0 7px; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
  background: #eef2fb; color: var(--reclite-color-primary, #243b80);
}
.rl-cart-count:empty { display: none; }
.rl-cart-card-note { margin: -4px 0 14px; font-size: 13.5px; }

/* Item rows */
.rl-cart-items { list-style: none; padding: 0; margin: 0; }
.rl-cart-item {
  display: flex; gap: 16px; align-items: flex-start;
  border-top: 1px solid var(--rl-line);
  padding: 16px 0;
}
.rl-cart-item:first-child { border-top: 0; padding-top: 2px; }
.rl-cart-item:last-child { padding-bottom: 2px; }
.rl-cart-item-main { flex: 1; min-width: 0; }
.rl-cart-item-title { font-weight: 600; font-size: 15.5px; color: var(--rl-ink); overflow-wrap: anywhere; }
.rl-cart-item-member { display: flex; align-items: baseline; gap: 6px; margin-top: 5px; flex-wrap: wrap; }
.rl-cart-item-member-label { font-size: 12px; text-transform: uppercase; letter-spacing: 0.4px; color: var(--rl-muted); }
.rl-cart-item-member-static { font-size: 14px; color: #2c3444; font-weight: 500; }
.rl-cart-item-actions {
  display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex: 0 0 auto;
}
.rl-cart-item-price { font-variant-numeric: tabular-nums; font-weight: 700; font-size: 16px; white-space: nowrap; color: var(--rl-ink); }
.rl-cart-remove-btn {
  appearance: none; background: none; border: 0; padding: 0; cursor: pointer;
  font-size: 13px; color: #a5384a; text-decoration: underline; text-underline-offset: 2px;
}
.rl-cart-remove-btn:hover { color: #7a1414; }
.rl-cart-empty-inline { padding: 10px 0; color: var(--rl-muted); }

/* Requirements */
.rl-req-row {
  border: 1px solid var(--rl-line);
  border-radius: 10px;
  margin-bottom: 10px;
  padding: 12px 14px;
  background: #fafbfe;
}
.rl-req-row:last-child { margin-bottom: 0; }
.rl-req-head { display: flex; align-items: center; gap: 10px; font-weight: 500; }
.rl-req-label { flex: 1; }
.rl-req-label em { font-style: normal; color: #a5384a; font-size: 12px; }
.rl-req-state {
  font-size: 12px; padding: 2px 9px; border-radius: 999px;
  background: #eef0f4; color: #46516a; font-weight: 600;
}
.rl-req-state.is-done { background: #d9f3df; color: #14602b; }
.rl-req-body { margin-top: 10px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.rl-req-body select,
.rl-req-body input[type="file"],
.rl-req-body textarea {
  padding: 8px 10px; border: 1px solid #c3c7d1; border-radius: 8px; background: #fff;
}
.rl-req-body textarea { width: 100%; resize: vertical; }
.rl-req-uploaded { font-size: 13px; color: #14602b; }
.rl-req-paper { margin: 4px 0 0; }

/* Payment stub note (still used by waitlist-accept) */
.rl-cart-stub-note {
  display: flex; gap: 10px; align-items: flex-start;
  background: #fff8dd; border: 1px solid #f0d675; border-radius: 8px;
  padding: 10px 14px; margin: 4px 0 14px; color: #5a4200;
}
.rl-stub-badge {
  font-size: 12px; font-weight: 700; letter-spacing: 0.5px; text-transform: uppercase;
  padding: 3px 8px; border-radius: 4px; background: #f0d675; color: #4a3600; flex: 0 0 auto;
}

/* Tenders — payment-method cards */
.rl-tender-fs { border: 0; padding: 0; margin: 0; }
.rl-tender-list { display: grid; gap: 10px; margin-bottom: 12px; }
.rl-tender-card {
  border: 1px solid var(--rl-line); border-radius: 12px; background: #fafbfe; padding: 13px 14px;
}
.rl-tender-card-top { display: flex; align-items: center; gap: 10px; }
.rl-tender-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 9px; flex: 0 0 auto;
  background: #eef2fb; color: var(--reclite-color-primary, #243b80);
}
.rl-tender-type { flex: 1; min-width: 0; margin: 0; }
.rl-tender-type select {
  width: 100%; padding: 10px 12px; border: 1px solid #c3c7d1; border-radius: 8px; background: #fff;
  font-weight: 600; color: var(--rl-ink); font-size: 14.5px;
}
.rl-tender-remove {
  flex: 0 0 auto; width: 36px; height: 36px; border-radius: 9px;
  background: #fff; border: 1px solid #d8dae2; color: #8a94a6; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
}
.rl-tender-remove:hover { color: #7a1414; border-color: #e0b6b6; background: #fdf3f3; }
.rl-tender-hint { margin: 9px 0 0; font-size: 12.5px; color: var(--rl-muted); }
.rl-tender-fields {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 11px;
  padding-top: 11px; border-top: 1px dashed var(--rl-line);
}
.rl-tender-fields label > span { display: block; font-size: 12px; color: var(--rl-muted); margin-bottom: 4px; }
.rl-tender-fields input {
  width: 100%; padding: 9px 10px; border: 1px solid #c3c7d1; border-radius: 8px; background: #fff;
  font-variant-numeric: tabular-nums;
}
@media (max-width: 480px) { .rl-tender-fields { grid-template-columns: 1fr; } }
.rl-tender-add-btn { margin-top: 2px; }
.rl-btn-ghost {
  background: none; border: 1px dashed #c3c7d1; color: var(--reclite-color-primary, #243b80);
  border-radius: 8px; padding: 10px 14px; font-weight: 600; cursor: pointer;
}
.rl-btn-ghost:hover { background: #f4f7ff; border-color: var(--reclite-color-primary, #243b80); }

@media (forced-colors: active) {
  .rl-tender-card, .rl-tender-remove, .rl-tender-icon { border: 1px solid CanvasText; }
}

/* Summary sidebar */
.rl-cart-summary {
  position: sticky; top: 20px;
  border: 1px solid var(--rl-line); border-radius: 14px; padding: 20px 22px; background: #fff;
  box-shadow: 0 4px 16px rgba(20, 30, 60, 0.06);
}
.rl-cart-summary h2 { margin: 0 0 14px; font-size: 16px; }
.rl-summary-lines { margin: 0 0 14px; display: grid; gap: 9px; }
.rl-summary-lines .rl-summary-line { display: flex; justify-content: space-between; gap: 12px; margin: 0; align-items: baseline; }
.rl-summary-lines dt { margin: 0; font-size: 13.5px; color: #38414f; min-width: 0; overflow-wrap: anywhere; }
.rl-summary-lines dd { margin: 0; font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
.rl-summary-total {
  display: flex; justify-content: space-between; align-items: baseline;
  border-top: 1px solid var(--rl-line); padding-top: 14px; margin: 0 0 16px;
  font-size: 15px; color: var(--rl-muted);
}
.rl-summary-total strong { font-size: 24px; font-weight: 700; color: var(--rl-ink); font-variant-numeric: tabular-nums; }
.rl-btn-block { display: block; width: 100%; text-align: center; }
.rl-cart-summary .rl-btn-primary { padding-top: 12px; padding-bottom: 12px; font-size: 15px; }
.rl-summary-reassure {
  display: flex; gap: 7px; align-items: flex-start;
  margin: 12px 0 4px; font-size: 12.5px; color: var(--rl-muted); line-height: 1.45;
}
.rl-summary-reassure-icon { color: #2c6b3f; flex: 0 0 auto; margin-top: 1px; }
.rl-cart-empty-link {
  display: block; width: 100%; text-align: center; margin-top: 10px;
  background: none; border: 0; padding: 6px; cursor: pointer;
  font-size: 13px; color: var(--rl-muted); text-decoration: underline; text-underline-offset: 2px;
}
.rl-cart-empty-link:hover { color: #7a1414; }

/* Empty + result states */
.rl-cart-empty-card, .rl-cart-result-card { text-align: center; padding: 36px 24px; border-radius: 14px; }
.rl-cart-empty-icon, .rl-cart-result-icon { display: inline-flex; color: var(--reclite-color-primary, #243b80); margin-bottom: 6px; }
.rl-cart-result-icon { color: #1d9e6b; }
.rl-cart-empty-card h2, .rl-cart-result-card h2 { margin: 8px 0 6px; }
.rl-cart-empty-card p { margin: 0 auto 16px; max-width: 380px; }
.rl-cart-result-summary { margin: 0 auto 16px; max-width: 440px; color: #38414f; }
.rl-cart-result-actions { justify-content: center; flex-wrap: wrap; }

/* Commit result item roll-up */
.rl-commit-items { list-style: none; padding: 0; margin: 12px auto 18px; max-width: 460px; display: grid; gap: 8px; text-align: left; }
.rl-commit-item { padding: 10px 14px; border-radius: 10px; background: #f4f5f7; }
.rl-commit-seated,
.rl-commit-partially_seated { background: #e5f5e9; }
.rl-commit-waitlisted   { background: #f0e7fb; }
.rl-commit-duplicate,
.rl-commit-ineligible,
.rl-commit-full         { background: #fbe6e6; }

@media (forced-colors: active) {
  .rl-cart-card, .rl-cart-summary, .rl-tender-row, .rl-req-row { border-color: CanvasText; }
  .rl-cart-card-icon, .rl-cart-count { border: 1px solid CanvasText; }
}

/* Shared surface tokens across the whole registration surface */
.rl-my-registrations, .rl-my-waitlist, .rl-coach-roster,
[data-rl-reg] { --rl-line: #e7e9f0; --rl-ink: #1d2637; --rl-muted: #5b6472; }

/* ---------- My registrations (flat rows inside the panel card) ---------- */
.rl-mreg-list { display: grid; }
.rl-mreg-row {
  display: flex; gap: 16px; padding: 16px 10px;
  align-items: flex-start; flex-wrap: wrap;
  border-top: 1px solid var(--rl-line);
  transition: background 0.15s ease;
}
.rl-mreg-row:first-child { border-top: 0; padding-top: 4px; }
.rl-mreg-row:hover { background: #f8f9fc; }
.rl-mreg-row-main { flex: 1 1 260px; min-width: 0; }
.rl-mreg-row-title {
  margin: 0 0 6px; font-size: 16px; color: var(--rl-ink);
  overflow-wrap: anywhere;
}
.rl-mreg-row-meta { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 4px; }
.rl-mreg-row-guidance { margin: 4px 0 0; color: var(--rl-muted); font-size: 14px; overflow-wrap: anywhere; }
.rl-mreg-row-actions { display: flex; flex-wrap: wrap; gap: 8px; align-content: flex-start; }
.rl-mreg-detail { border-left: 4px solid var(--reclite-color-primary, #243b80); }
.rl-mreg-detail-head {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  flex-wrap: wrap;
}
.rl-mreg-detail-head h4 { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.rl-mreg-pagination {
  display: flex; gap: 12px; align-items: center; justify-content: center;
  padding: 14px 0 0; margin-top: 14px; border-top: 1px solid var(--rl-line);
  flex-wrap: wrap; color: var(--rl-muted); font-size: 14px;
}

/* Badges */
.rl-badge {
  display: inline-block; padding: 3px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 600; letter-spacing: 0.2px;
  background: #eee; color: #333;
}
.rl-badge-seated,
.rl-badge-confirmed_with_balance { background: #d9f3df; color: #14602b; }
.rl-badge-partially_seated       { background: #e6f0d9; color: #40611b; }
.rl-badge-waitlisted             { background: #ece0fb; color: #4b1494; }
.rl-badge-offered                { background: #fff2c9; color: #705000; }
.rl-badge-cancelled,
.rl-badge-withdrawn              { background: #f2d7d7; color: #7a1414; }
.rl-badge-balance                { background: #fbe1a5; color: #7a4a00; }

.rl-btn-danger-outline {
  background: #fff; color: #7a1414; border: 1px solid #7a1414;
}
.rl-btn-danger-outline:hover { background: #fbe6e6; }

/* ---------- Waitlist (flat rows inside the panel card) ---------- */
.rl-wl-list { display: grid; }
.rl-wl-row {
  display: flex; gap: 16px; padding: 16px 10px;
  align-items: flex-start; flex-wrap: wrap;
  border-top: 1px solid var(--rl-line);
  transition: background 0.15s ease;
}
.rl-wl-row:first-child { border-top: 0; padding-top: 4px; }
.rl-wl-row:hover { background: #f8f9fc; }
.rl-wl-row[data-state="offered"] {
  background: #fffdf3; border-left: 3px solid #f0d675; padding-left: 12px;
}
.rl-wl-row-main { flex: 1 1 260px; min-width: 0; }
.rl-wl-row-title { margin: 0 0 6px; font-size: 16px; color: var(--rl-ink); overflow-wrap: anywhere; }
.rl-wl-row-meta { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.rl-wl-row-guidance { margin: 6px 0 0; color: var(--rl-muted); font-size: 14px; overflow-wrap: anywhere; }
.rl-wl-row-actions { display: flex; align-items: center; }
.rl-wl-countdown {
  margin: 8px 0 0; padding: 4px 10px; display: inline-block;
  background: #fff2c9; color: #705000; border-radius: 999px; font-weight: 600;
  font-variant-numeric: tabular-nums; font-size: 13px;
}

/* ---------- My-account integration tiles ---------- */
.rl-account-tile-list { display: grid; gap: 10px; margin: 10px 0; }
.rl-account-tile {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border: 1px solid #e3e3e3; border-radius: 6px; background: #fff;
}
.rl-account-tile-body { flex: 1; min-width: 0; }
.rl-account-tile-title { font-weight: 600; color: var(--reclite-color-primary, #243b80); }
.rl-account-tile-sub { color: #555; font-size: 13px; }

/* Registration "add to cart" from activity detail */
.rl-register-block { margin-top: 12px; }
.rl-register-block .rl-btn { min-width: 180px; }

/* ---------- Coach roster ---------- */
.rl-coach-roster .rl-cart-head { margin-bottom: 14px; }
.rl-coach-roster-card {
  border: 1px solid var(--rl-line); border-radius: 14px; padding: 18px 20px; background: #fff;
  box-shadow: 0 1px 2px rgba(20, 30, 60, 0.04);
}
.rl-cr-picker { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; max-width: 460px; }
.rl-cr-picker span { font-size: 13px; color: var(--rl-muted); }
.rl-cr-picker input { padding: 9px 12px; border: 1px solid #c3c7d1; border-radius: 8px; font-family: monospace; }
.rl-cr-meta { font-size: 13px; margin-bottom: 14px; display: flex; gap: 8px; flex-wrap: wrap; }
.rl-cr-meta span {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 11px; border-radius: 999px; background: #f1f3f7; color: #46516a;
}
.rl-cr-meta strong { color: var(--reclite-color-primary, #243b80); }

/* Segmented pill tabs (matches the period filter) */
.rl-cr-tabs {
  display: inline-flex; gap: 2px; padding: 3px; margin-bottom: 16px;
  background: #eef1f5; border-radius: 999px; border: 0;
}
.rl-cr-tabs .rl-tab {
  padding: 7px 18px; border: 0; background: transparent; cursor: pointer;
  border-radius: 999px; color: #46516a; font-weight: 600; font-size: 13px;
  transition: background 0.15s ease, color 0.15s ease;
}
.rl-cr-tabs .rl-tab:hover  { color: #1d2637; }
.rl-cr-tabs .rl-tab.is-active {
  background: #fff; color: var(--reclite-color-primary, #243b80);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.14);
}

.rl-cr-table-wrap { overflow-x: auto; border: 1px solid var(--rl-line); border-radius: 12px; }
.rl-cr-table { width: 100%; border-collapse: collapse; }
.rl-cr-table th, .rl-cr-table td {
  padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--rl-line); vertical-align: middle;
}
.rl-cr-table thead th {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.4px;
  font-weight: 700; color: #6a7280; background: #f7f8fb; white-space: nowrap;
}
.rl-cr-table tbody tr:last-child td { border-bottom: 0; }
.rl-cr-table tbody tr:hover td { background: #f8f9fc; }

.rl-badge-info { background: #e8f1f8; color: var(--color-tertiary, #1b6ca8); }

@media (forced-colors: active) {
  .rl-coach-roster-card, .rl-cr-table-wrap { border-color: CanvasText; }
  .rl-mreg-row, .rl-wl-row { border-top-color: CanvasText; }
  .rl-cr-tabs .rl-tab.is-active { outline: 2px solid Highlight; }
}

/* ---------- Eligibility list (activity detail) ---------- */
.rl-eligibility h3 { margin-top: 0; }
.rl-elig-lede { margin: 0 0 12px; }
.rl-elig-list { list-style: none; padding: 0; margin: 0; }
.rl-elig-row {
  display: flex; gap: 12px; align-items: center; justify-content: space-between;
  padding: 10px 12px; border: 1px solid #e3e3e3; border-radius: 6px;
  background: #fff; margin-bottom: 8px;
  flex-wrap: wrap;
}
.rl-elig-row.is-eligible { border-color: #b3ddc0; background: #f6fbf7; }
.rl-elig-row.is-blocked  { border-color: #e6c8c8; background: #fdf6f6; }
.rl-elig-row-main { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; flex: 1; min-width: 0; }
.rl-elig-row-name { font-weight: 600; color: #222; }
.rl-elig-row-status { display: inline-flex; gap: 6px; align-items: center; }
.rl-elig-price { font-variant-numeric: tabular-nums; font-weight: 600; color: #14602b; margin-left: 4px; }
.rl-elig-reason { display: block; margin-top: 2px; max-width: 340px; }
.rl-elig-row-action { display: flex; align-items: center; }
.rl-elig-select {
  display: inline-flex; gap: 6px; align-items: center;
  padding: 4px 10px; border-radius: 4px; cursor: pointer;
  border: 1px solid #b6b6b6; background: #fff;
}
.rl-elig-select:hover { background: #f4f4f4; }
.rl-elig-select input { margin: 0; }

.rl-badge-eligible { background: #d9f3df; color: #14602b; }
.rl-badge-blocked  { background: #f2d7d7; color: #7a1414; }

.rl-elig-footer {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  margin-top: 12px; padding-top: 10px; border-top: 1px solid #e3e3e3; flex-wrap: wrap;
}
.rl-elig-selected-summary { color: #444; font-size: 14px; }

/* Seat-assignment picker (RL-984/985) — shown inside the Register card when a
   household selects more members for one activity/session than seats remain and
   must pick seated vs waitlisted per member. */
.rl-seat-assign { margin-top: 12px; }
.rl-seat-assign-panel {
  border: 1px solid #e0c58a; background: #fdf8ee; border-radius: 8px; padding: 14px 16px;
}
.rl-seat-assign-title { margin: 0 0 6px; font-size: 15px; color: #6a4a00; }
.rl-seat-assign-title:focus-visible { outline: 2px solid var(--reclite-color-primary, #243b80); outline-offset: 2px; }
.rl-seat-assign-msg { margin: 0 0 12px; color: #333; font-size: 14px; }
.rl-seat-list { list-style: none; padding: 0; margin: 0 0 10px; display: flex; flex-direction: column; gap: 8px; }
.rl-seat-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 8px 10px; border: 1px solid #ecdcb8; border-radius: 6px; background: #fff;
}
.rl-seat-row-name { font-weight: 600; color: #222; min-width: 0; overflow-wrap: anywhere; }
.rl-seat-row-opts { display: inline-flex; gap: 6px; }
.rl-seat-opt {
  display: inline-flex; align-items: center; gap: 5px; cursor: pointer;
  padding: 5px 10px; border: 1px solid #cfd6e2; border-radius: 999px;
  font-size: 13px; color: #1d2637; background: #fff; user-select: none;
}
.rl-seat-opt input { margin: 0; }
.rl-seat-opt.is-on { border-color: var(--reclite-color-primary, #243b80); background: #eef1fb; font-weight: 600; }
.rl-seat-opt.is-disabled { opacity: 0.5; cursor: not-allowed; }
.rl-seat-opt:focus-within { outline: 2px solid var(--reclite-color-primary, #243b80); outline-offset: 1px; }
.rl-seat-counter { margin: 0 0 12px; font-size: 13px; color: #555; font-variant-numeric: tabular-nums; }
.rl-seat-counter.is-over { color: #7a1414; font-weight: 600; }
.rl-seat-assign-actions { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
@media (max-width: 480px) {
  .rl-seat-row { flex-direction: column; align-items: stretch; }
  .rl-seat-row-opts { justify-content: stretch; }
  .rl-seat-opt { flex: 1; justify-content: center; }
}
@media (forced-colors: active) {
  .rl-seat-assign-panel, .rl-seat-row { border-color: ButtonText; }
  .rl-seat-opt { border-color: ButtonText; }
  .rl-seat-opt.is-on { border-color: Highlight; outline: 1px solid Highlight; }
}

/* Universal sign-in modal styles live in reclite-headless.css so any
   plugin surface (present or future modules) can trigger the modal
   without also enqueuing this stylesheet. */

/* Cart line item — read-only member row */
.rl-cart-item-member-static {
  display: inline-block; margin-top: 4px;
  padding: 4px 8px; border-radius: 4px;
  background: #f0f2f8; color: #333; font-weight: 500;
}
.rl-cart-item-actions { display: flex; align-items: center; gap: 8px; }
.rl-cart-remove-btn {
  background: #fff; border: 1px solid #c94a4a; color: #7a1414;
  padding: 6px 10px; border-radius: 4px; cursor: pointer; font-size: 13px;
}
.rl-cart-remove-btn:hover { background: #fbe6e6; }

/* ---------- Mobile responsive for my-account tabs ---------------- */

/* Under ~640px the my-registrations and waitlist rows must stack the
   actions BELOW the main content — otherwise 3+ buttons crammed next
   to a squeezed main block overflow the tab hub. */
@media (max-width: 640px) {
  .rl-mreg-row,
  .rl-wl-row {
    flex-direction: column;
    gap: 10px;
  }
  .rl-mreg-row-main,
  .rl-wl-row-main {
    flex: 1 1 auto;
    width: 100%;
  }
  .rl-mreg-row-actions {
    width: 100%;
    justify-content: flex-start;
  }
  .rl-mreg-row-actions .rl-btn,
  .rl-mreg-row-actions .rl-btn-danger-outline {
    /* Two-column button grid within actions — each button >= min tap
       target (44×44 per WCAG 2.5.5) without hogging the whole row. */
    flex: 1 1 calc(50% - 6px);
    min-height: 44px;
    text-align: center;
  }
  .rl-mreg-detail-head {
    align-items: flex-start;
  }
  .rl-mreg-detail-head h4 {
    flex: 1 1 100%;
  }
  .rl-mreg-pagination {
    justify-content: space-between;
  }
  .rl-mreg-pagination .rl-btn {
    flex: 1 1 auto;
  }
}

@media (max-width: 400px) {
  .rl-mreg-row,
  .rl-wl-row {
    padding: 12px;
  }
  .rl-mreg-row-actions .rl-btn,
  .rl-mreg-row-actions .rl-btn-danger-outline {
    flex: 1 1 100%;
  }
}

/* ============================================================
 * EPIC-RL-034 refresh — contract card, period picker, coverage,
 * receipt/detail money, coach safety.
 * ============================================================ */

/* ---------- Contract card (Flow A2) ---------- */
.rl-contract-avail {
  display: flex; gap: 10px; flex-wrap: wrap; align-items: baseline;
  margin: 4px 0 12px; font-size: 15px;
}
.rl-contract-price {
  font-variant-numeric: tabular-nums; font-weight: 700; color: #14602b; font-size: 17px;
}
.rl-contract-seats { color: #555; }
.rl-contract-signin { margin-top: 10px; }

/* ---------- Period / session picker (per_occurrence) ---------- */
.rl-contract-periods { margin: 6px 0 16px; }
.rl-period-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap; margin-bottom: 10px;
}
.rl-period-title { margin: 0; font-size: 15px; font-weight: 700; color: #222; }

/* Segmented unit filter (session / week / month) */
.rl-period-filter {
  display: inline-flex; gap: 2px; padding: 3px;
  background: #eef1f5; border-radius: 999px;
}
.rl-period-filter-pill {
  appearance: none; border: 0; cursor: pointer;
  padding: 6px 14px; border-radius: 999px;
  font-size: 13px; font-weight: 600; color: #46516a; background: transparent;
  transition: background 0.15s ease, color 0.15s ease;
}
.rl-period-filter-pill:hover { color: #1d2637; }
.rl-period-filter-pill.is-active {
  background: #fff; color: var(--reclite-color-primary, #243b80);
  box-shadow: 0 1px 3px rgba(0,0,0,0.14);
}
.rl-period-filter-pill:focus-visible { outline: 2px solid var(--reclite-color-primary, #243b80); outline-offset: 2px; }

/* Toolbar: bulk actions + live count */
.rl-period-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap; margin-bottom: 10px;
}
.rl-period-bulk { display: inline-flex; gap: 14px; }
.rl-period-linkbtn {
  appearance: none; background: none; border: 0; padding: 0; cursor: pointer;
  font-size: 13px; font-weight: 600; color: var(--reclite-color-primary, #243b80);
  text-decoration: underline; text-underline-offset: 2px;
}
.rl-period-linkbtn:hover { color: #16234f; }
.rl-period-count { font-size: 13px; color: #444; font-variant-numeric: tabular-nums; }
.rl-period-count.is-empty { color: #777; }

/* Selectable session cards */
.rl-period-grid {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 10px;
  /* Fluid columns: each card wants at least ~240px, so the browser fits as
     many as comfortably fit and drops to a single column once they'd get too
     narrow. This means modern phones (390–430px wide) show ONE column instead
     of the old fixed 2-column tier that only relaxed below 380px and crammed
     each card (38px check indent + title + dates + "N sessions" + status pill)
     into ~180px. `min(100%, 240px)` keeps a single card from ever overflowing
     a very narrow viewport. */
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr));
}
.rl-period-cell { margin: 0; }
.rl-period-card {
  position: relative; display: flex; gap: 8px; align-items: flex-start;
  height: 100%; padding: 12px 12px 12px 38px;
  border: 1.5px solid #dde1e8; border-radius: 10px; background: #fff;
  cursor: pointer; transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.rl-period-card:hover { border-color: #b7c0d4; box-shadow: 0 2px 8px rgba(20,30,60,0.08); }
.rl-period-card-input {
  position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0;
}
/* Custom check indicator (top-left) */
.rl-period-card-check {
  position: absolute; top: 12px; left: 12px;
  width: 18px; height: 18px; border-radius: 5px;
  border: 1.5px solid #b7becb; background: #fff;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.rl-period-card-check::after {
  content: ""; position: absolute; left: 5px; top: 1px;
  width: 5px; height: 10px; border: solid #fff; border-width: 0 2px 2px 0;
  transform: rotate(45deg) scale(0); transform-origin: center; transition: transform 0.12s ease;
}
.rl-period-card.is-selected {
  border-color: var(--reclite-color-primary, #243b80);
  background: #f4f7ff;
  box-shadow: 0 0 0 1px var(--reclite-color-primary, #243b80) inset;
}
.rl-period-card.is-selected .rl-period-card-check {
  background: var(--reclite-color-primary, #243b80);
  border-color: var(--reclite-color-primary, #243b80);
}
.rl-period-card.is-selected .rl-period-card-check::after { transform: rotate(45deg) scale(1); }
.rl-period-card-input:focus-visible + .rl-period-card-check {
  outline: 2px solid var(--reclite-color-primary, #243b80); outline-offset: 2px;
}
.rl-period-card.is-disabled {
  cursor: not-allowed; background: #f6f7f9; border-style: dashed; opacity: 0.85;
}
.rl-period-card.is-disabled:hover { box-shadow: none; border-color: #dde1e8; }
.rl-period-card.is-waitlist { border-color: #d9c9f2; }
.rl-period-card.is-waitlist.is-selected { border-color: #6b34b8; box-shadow: 0 0 0 1px #6b34b8 inset; }

.rl-period-card-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.rl-period-card-title { font-weight: 700; color: #1d2637; font-size: 14px; overflow-wrap: anywhere; }
.rl-period-card-dates { font-size: 12.5px; color: #4a5568; font-variant-numeric: tabular-nums; }
.rl-period-card-meta { font-size: 12px; color: #6a7280; }
.rl-period-card-note { font-size: 11.5px; color: #8a5a00; margin-top: 2px; }
.rl-period-card-status-wrap { margin-left: auto; }
.rl-period-card-status {
  display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: 0.2px;
  padding: 2px 8px; border-radius: 999px; white-space: nowrap;
  background: #e4ebe6; color: #2c6b3f;
}
.rl-period-card-status.is-low     { background: #fbe8cf; color: #8a4b00; }
.rl-period-card-status.is-waitlist{ background: #ece0fb; color: #4b1494; }
.rl-period-card-status.is-full    { background: #eceef1; color: #6a7280; }

/* Past (elapsed) periods — folded into an accordion the shopper can't select. */
.rl-period-none { margin: 4px 0 0; }
.rl-period-past { margin-top: 12px; border-top: 1px solid #e3e3e3; padding-top: 8px; }
.rl-period-past-summary {
  cursor: pointer; list-style: none; padding: 6px 0;
  font-size: 13px; font-weight: 600; color: #555;
}
.rl-period-past-summary::-webkit-details-marker { display: none; }
.rl-period-past-summary::before {
  content: '\25B8'; display: inline-block; margin-right: 8px; transition: transform 0.15s ease;
}
.rl-period-past[open] > .rl-period-past-summary::before { transform: rotate(90deg); }
.rl-period-past-summary:focus-visible { outline: 2px solid var(--reclite-color-primary, #243b80); outline-offset: 2px; }
.rl-period-grid-past { margin-top: 8px; }
.rl-period-grid-past .rl-period-card { opacity: 0.75; }
@media (forced-colors: active) {
  .rl-period-past { border-color: ButtonText; }
  .rl-period-past-summary::before { content: '\25B8'; }
}

/* ---------- Cart line coverage ---------- */
.rl-cart-item-coverage {
  margin-top: 6px; font-size: 13px; color: #555;
  display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center;
}
.rl-cart-coverage-label { font-weight: 600; color: #444; }
.rl-cart-chips { display: inline-flex; flex-wrap: wrap; gap: 5px; }
.rl-cart-chip {
  display: inline-block; font-size: 12px; font-weight: 600; line-height: 1.4;
  padding: 2px 9px; border-radius: 999px;
  background: #eef2fb; color: var(--reclite-color-primary, #243b80);
  border: 1px solid #dbe3f5;
}
@media (forced-colors: active) {
  .rl-cart-chip { border-color: CanvasText; }
}

/* ---------- Commit result coverage roll-up ---------- */
.rl-commit-item-head { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.rl-commit-coverage { margin-top: 3px; font-size: 13px; }
.rl-commit-partially_seated { border-left: 3px solid #7fae3a; padding-left: 8px; }

/* ---------- My-registration row coverage ---------- */
.rl-mreg-row-coverage { margin: 4px 0 0; font-size: 13px; }

/* ---------- Detail + receipt money / coverage ---------- */
.rl-dv-conf { font-variant-numeric: tabular-nums; font-weight: 700; letter-spacing: 0.3px; }

/* Hero: prominent status + coverage line at the top of the detail popup */
.rl-dv-hero {
  display: flex; flex-direction: column; gap: 8px; align-items: flex-start;
  margin: 0 0 16px;
}
.rl-dv-hero-pill { font-size: 13px; padding: 5px 14px; }
.rl-dv-hero-cov { margin: 0; font-size: 15px; color: #2c3444; font-weight: 500; }

/* Money stat tiles */
.rl-dv-stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px; margin: 0 0 16px;
}
.rl-dv-stat {
  border: 1px solid #e7e9f0; border-radius: 12px; background: #fafbfe;
  padding: 12px 14px; display: flex; flex-direction: column; gap: 4px;
}
.rl-dv-stat-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.4px; color: #6a7280; font-weight: 700; }
.rl-dv-stat-value { font-size: 20px; font-weight: 700; color: #1d2637; font-variant-numeric: tabular-nums; }
.rl-dv-stat.is-due   { background: #fdf6ea; border-color: #f0dcb4; }
.rl-dv-stat.is-due .rl-dv-stat-value   { color: #8a4b00; }
.rl-dv-stat.is-paid  { background: #eef7f0; border-color: #cfe8d5; }
.rl-dv-stat.is-paid .rl-dv-stat-value  { color: #14602b; }
.rl-dv-stat.is-refund { background: #eef3fb; border-color: #cfe0f4; }
.rl-dv-stat.is-refund .rl-dv-stat-value { color: #244a73; }
.rl-dv-nextpay {
  margin: -6px 0 16px; font-size: 13px; color: #705000;
  background: #fff8e6; border: 1px solid #f0dcb4; border-radius: 8px; padding: 8px 12px;
}

/* Coverage rows as tidy cards */
.rl-dv-cov { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.rl-dv-cov-row {
  display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
  padding: 11px 13px; border: 1px solid #e7e9f0; border-radius: 10px; background: #fafbfe;
}
.rl-dv-cov-label { font-weight: 600; color: #1d2637; }
.rl-dv-cov-dates, .rl-dv-cov-desc, .rl-dv-cov-note { font-size: 12px; flex-basis: 100%; color: #6a7280; }
.rl-dv-cov-price { margin-left: auto; font-variant-numeric: tabular-nums; font-weight: 700; color: #1d2637; }

/* Session calendar — one mini-month per month with a booked session; booked
   days are highlighted. */
.rl-cal-wrap {
  display: flex; flex-wrap: wrap; gap: 14px; margin-top: 10px;
}
.rl-cal {
  border: 1px solid #e7e9f0; border-radius: 10px; background: #fafbfe;
  padding: 10px 12px 12px; min-width: 232px;
}
.rl-cal-head {
  font-weight: 700; color: #1d2637; font-size: 13.5px; text-align: center; margin-bottom: 8px;
}
.rl-cal-grid {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px;
}
.rl-cal-dow {
  text-align: center; font-size: 10.5px; font-weight: 700; letter-spacing: 0.02em;
  color: #8a90a2; text-transform: uppercase; padding-bottom: 2px;
}
.rl-cal-day {
  display: flex; align-items: center; justify-content: center;
  aspect-ratio: 1 / 1; font-size: 12px; color: #4a5266;
  border-radius: 7px; font-variant-numeric: tabular-nums;
}
.rl-cal-day.is-empty { visibility: hidden; }
.rl-cal-day.is-on {
  background: var(--reclite-color-primary, #243b80); color: #fff; font-weight: 700;
}
.rl-cal-legend {
  display: flex; align-items: center; gap: 7px; margin: 8px 0 0; font-size: 12px;
}
.rl-cal-swatch {
  display: inline-block; width: 13px; height: 13px; border-radius: 4px;
  background: var(--reclite-color-primary, #243b80);
}

/* Guidance callout */
.rl-dv-callout {
  display: flex; gap: 10px; align-items: flex-start;
  margin: 4px 0 0; padding: 12px 14px; border-radius: 10px;
  background: #eef2fb; color: #274066; font-size: 13.5px; line-height: 1.5;
}
.rl-dv-callout-icon {
  flex: 0 0 auto; width: 20px; height: 20px; border-radius: 50%;
  background: var(--reclite-color-primary, #243b80); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; font-style: italic;
}
.rl-dv-feelist { margin: 0; display: grid; gap: 4px; }
.rl-dv-fee { display: flex; justify-content: space-between; gap: 12px; }
.rl-dv-fee > dt { color: #444; }
.rl-dv-fee > dd { margin: 0; font-variant-numeric: tabular-nums; }
.rl-dv-fee-total { border-top: 1px solid #ddd; margin-top: 4px; padding-top: 6px; font-weight: 700; }

/* Registration status pills (reused by detail/receipt/coverage). */
.rl-pill-status-seated,
.rl-pill-status-booked,
.rl-pill-status-confirmed_with_balance { background: #d9f3df; color: #14602b; }
.rl-pill-status-partially_seated       { background: #e6f0d9; color: #40611b; }
.rl-pill-status-waitlisted             { background: #ece0fb; color: #4b1494; }
.rl-pill-status-offered                { background: #fff2c9; color: #705000; }
.rl-pill-status-transferred            { background: #e8f1f8; color: var(--color-tertiary, #1b6ca8); }
.rl-pill-status-cancelled,
.rl-pill-status-withdrawn              { background: #f2d7d7; color: #7a1414; }

/* ---------- Coach roster safety (unmasked, RL-645) ---------- */
.rl-cr-safety { font-size: 13px; line-height: 1.35; }
.rl-cr-safety-allergy { color: #8a1f1f; font-weight: 600; }
.rl-cr-safety-med { color: #333; }

@media (forced-colors: active) {
  .rl-period-card { border-color: CanvasText; }
  .rl-period-card.is-selected { outline: 2px solid Highlight; }
  .rl-period-card.is-selected .rl-period-card-check { background: Highlight; border-color: Highlight; }
  .rl-period-filter-pill.is-active { outline: 2px solid Highlight; }
  .rl-dv-cov-row, .rl-dv-stat, .rl-dv-nextpay { border-color: CanvasText; }
  .rl-cr-safety-allergy { color: CanvasText; }
  .rl-cal, .rl-cal-day.is-on { border: 1px solid CanvasText; }
  .rl-cal-day.is-on { background: Highlight; color: HighlightText; }
  .rl-cal-swatch { background: Highlight; }
}
@media (prefers-reduced-motion: reduce) {
  .rl-period-card, .rl-period-card-check, .rl-period-card-check::after,
  .rl-period-filter-pill { transition: none; }
}
