/* Ratings (stars, review cards, the "rate your game" form) and the small pieces that
   go with them. Loaded by: booking.php, venue.php, find.php, owner/reviews.php,
   owner/coupons.php, owner/venue.php. */

/* ---- stars ---- */
.stars { display: inline-flex; gap: 2px; font-size: 15px; line-height: 1; white-space: nowrap; }
.stars i { font-style: normal; color: rgba(var(--ink), 0.18); }
.stars i.on { color: var(--gold); }

/* ---- score block ---- */
.rv-score { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.rv-score b { font-family: var(--font-display); font-size: 2.4rem; font-weight: 700; line-height: 1; letter-spacing: -0.02em; }
.rv-score .stars { font-size: 20px; }
.rv-score span:last-child { color: var(--muted); font-size: 13px; }
.rv-score-inline { margin-bottom: 16px; }
.rv-score-inline b { font-size: 1.9rem; }

/* ---- one review ---- */
.rv-head { display: flex; align-items: center; gap: 12px; }
.rv-head > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.rv-head strong { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rv-meta { color: var(--dim); font-size: 12.5px; }
.rv-avatar { flex: none; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-grad-soft); color: var(--brand-blue); font-family: var(--font-display); font-size: 13px; font-weight: 600; }
.rv-stars { flex: none; }
.rv-text { margin: 12px 0 0; font-size: 14.5px; line-height: 1.65; color: var(--text); overflow-wrap: anywhere; }
.rv-text.dim { color: var(--dim); font-style: italic; }
.rate-reply { margin-top: 12px; padding: 10px 14px; border-inline-start: 2px solid var(--blue); background: rgba(var(--ink), 0.03); border-radius: 0 6px 6px 0; }
[dir="rtl"] .rate-reply { border-radius: 6px 0 0 6px; }
.rate-reply strong { display: block; font-size: 12px; color: var(--blue); letter-spacing: 0.04em; }
.rate-reply p { margin: 4px 0 0; font-size: 14px; line-height: 1.6; color: var(--muted); }

/* ---- venue page ---- */
.rv-public { display: grid; gap: 12px; }
.rv-card { padding: 16px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg-1); }
.rv-how { margin: 14px 0 0; font-size: 13px; }
.vn-tag-rating { color: var(--gold); border-color: rgba(79, 140, 255, 0.5); text-decoration: none; }
.vn-tag-rating:hover { background: var(--gold-soft); }
/* sits on a photo: dark glass with pale gold at night, light glass with deep gold by day */
.vcard-rating { position: absolute; bottom: 10px; inset-inline-start: 10px; display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; border-radius: 3px; background: var(--glass); color: var(--gold); font-size: 12.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
.vcard-rating small { color: var(--muted); font-weight: 400; }

/* ---- "rate your game" on the booking page ---- */
.rate-card { border-color: rgba(79, 140, 255, 0.35); scroll-margin-top: 100px; }
.rate-card:target { box-shadow: 0 0 0 2px rgba(79, 140, 255, 0.35); }
.rate-card .dash-h3 svg { color: var(--gold); }
.rate-form { margin-top: 12px; }
.star-input { display: flex; flex-direction: row-reverse; justify-content: flex-end; gap: 4px; margin: 0 0 12px; padding: 0; border: 0; }
.star-input input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.star-input label { cursor: pointer; font-size: 34px; line-height: 1; color: rgba(var(--ink), 0.2); transition: color 0.15s, transform 0.15s; }
.star-input label:hover, .star-input label:hover ~ label,
.star-input input:checked ~ label { color: var(--gold); }
.star-input label:active { transform: scale(0.9); }
.star-input input:focus-visible + label { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 4px; }
.rate-done .stars { font-size: 22px; }
.rate-done p { margin: 10px 0 0; font-size: 14px; line-height: 1.6; color: var(--muted); }
.rate-edit { margin-top: 12px; }
.rate-edit summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--blue); }
.ticket-saved { color: #7be3b9; }
.ticket-saved b { display: inline-grid; place-items: center; width: 20px; height: 20px; margin-inline-end: 6px; border-radius: 50%; border: 1px solid currentColor; font-size: 10px; }
.bk-rate svg { width: 14px; height: 14px; }
.bk-rated { display: inline-flex; align-items: center; padding: 0 8px; color: var(--gold); font-size: 13px; font-weight: 600; white-space: nowrap; }

/* ---- owner: ratings page ---- */
.rv-summary { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 18px 32px; align-items: center; }
.rv-summary .rv-score { flex-direction: column; align-items: flex-start; gap: 8px; }
.rv-bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.rv-bars li { display: grid; grid-template-columns: 34px minmax(0, 1fr) 30px; align-items: center; gap: 10px; font-size: 12.5px; color: var(--muted); }
.rv-bars i { display: block; height: 6px; border-radius: 3px; background: rgba(var(--ink), 0.08); overflow: hidden; }
.rv-bars em { display: block; height: 100%; background: var(--gold); border-radius: 3px; }
.rv-bars b { text-align: end; font-variant-numeric: tabular-nums; color: var(--text); }
.rv-tip { grid-column: 1 / -1; display: flex; gap: 10px; margin: 0; padding-top: 14px; border-top: 1px solid var(--line); font-size: 13px; line-height: 1.6; color: var(--muted); }
.rv-tip svg { flex: none; width: 18px; height: 18px; color: #25d366; margin-top: 2px; }
.rv-list { display: grid; gap: 12px; }
.rv-item { scroll-margin-top: 90px; }
.rv-item:target { border-color: var(--blue); }
.rv-reply { margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--line-2); display: grid; gap: 8px; justify-items: start; }
.rv-reply .textarea { min-height: 64px; width: 100%; }

@media (max-width: 640px) {
  .rv-summary { grid-template-columns: minmax(0, 1fr); }
  .rv-head { flex-wrap: wrap; }
  .rv-stars { order: 3; flex-basis: 100%; }
  .star-input label { font-size: 40px; }
}

/* ---- who signs in on the login page ---- */
.auth-roles { list-style: none; margin: 22px 0 0; padding: 16px 0 0; border-top: 1px solid var(--line); display: grid; gap: 12px; }
.auth-roles li { display: flex; gap: 12px; align-items: flex-start; }
.auth-roles svg { flex: none; width: 18px; height: 18px; margin-top: 2px; color: var(--blue); }
.auth-roles div { display: flex; flex-direction: column; gap: 2px; font-size: 13px; line-height: 1.5; }
.auth-roles strong { font-size: 13.5px; }
.auth-roles span { color: var(--muted); }
.hp-roles { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin: 0 0 28px; padding: 0; list-style: none; }
.hp-roles li { padding: 16px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg-1); display: flex; flex-direction: column; gap: 6px; }
.hp-roles svg { width: 20px; height: 20px; color: var(--blue); }
.hp-roles strong { font-size: 15px; }
.hp-roles span { font-size: 13.5px; line-height: 1.6; color: var(--muted); }
.hp-roles a { font-size: 13px; font-weight: 600; color: var(--blue); margin-top: auto; }

/* ---- by day ---- */
:root[data-theme="light"] .ticket-saved { color: var(--green); }
:root[data-theme="light"] .rv-tip svg { color: #128c4a; }
