/* End-of-match summary on the free racket boards (CR req_3rpSx88zEa8X):
   resources/views/scorekeeper/partials/shared/racket-match-summary.blade.php and
   public/js/score-keeper/shared/racket-match-summary.js. Score-keeper-v2 shell tokens
   (public/css/score-keeper-v2/base.css) with dark fallbacks; the player pair --sv2-p1 / --sv2-p2.
   Below the live share sheet (z-index 10000) so Share result opens over it. */
.rms { position: fixed; inset: 0; z-index: 9990; display: flex; align-items: center; justify-content: center; padding: 1rem; }
.rms[hidden] { display: none; }
.rms-backdrop { position: absolute; inset: 0; background: rgba(5, 9, 18, 0.7); }
.rms-card {
    position: relative; width: 100%; max-width: 28rem; max-height: calc(100vh - 2rem); overflow-y: auto;
    background: var(--sv2-bg-card, #1a1d27); color: var(--sv2-text, #e4e4e7);
    border: 1px solid var(--sv2-border, #2a2d3a); border-radius: 1rem;
    padding: 1.25rem 1.25rem 1.35rem; box-shadow: 0 24px 60px rgba(2, 6, 23, 0.55);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}
.rms-close {
    position: absolute; top: 0.6rem; right: 0.7rem; width: 2rem; height: 2rem; border: 0; border-radius: 50%;
    background: transparent; color: var(--sv2-text-muted, #a1a1aa); font-size: 1.35rem; line-height: 1; cursor: pointer;
}
.rms-close:hover { background: var(--sv2-bg-hover, #252836); color: var(--sv2-text, #e4e4e7); }
.rms-eyebrow { margin: 0; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--sv2-accent, #818cf8); }
.rms-title { margin: 0.2rem 0 0.1rem; font-size: 1.3rem; font-weight: 800; line-height: 1.25; }
.rms-final { margin: 0 0 0.8rem; font-size: 0.92rem; color: var(--sv2-text-muted, #a1a1aa); }
.rms-table-wrap { overflow-x: auto; }
.rms-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.rms-table th, .rms-table td { padding: 0.38rem 0.4rem; border-bottom: 1px solid var(--sv2-border, #2a2d3a); text-align: center; }
.rms-table th[scope="row"] { text-align: start; font-weight: 600; color: var(--sv2-text-muted, #a1a1aa); }
.rms-table thead th { font-weight: 800; }
.rms-table thead th:nth-child(2) { color: var(--sv2-p1, #06b6d4); }
.rms-table thead th:nth-child(3) { color: var(--sv2-p2, #f97316); }
.rms-row-period td { font-weight: 700; }
.rms-duration { margin: 0.6rem 0 0; font-size: 0.82rem; color: var(--sv2-text-muted, #a1a1aa); }
.rms-duration[hidden] { display: none; }
.rms-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0.9rem 0 0; }
.rms-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem; padding: 0.6rem 0.9rem; border-radius: 0.5rem;
    border: 1px solid var(--sv2-border, #2a2d3a); background: var(--sv2-bg, #0f1117); color: var(--sv2-text, #e4e4e7);
    font: inherit; font-size: 0.88rem; font-weight: 600; cursor: pointer; text-decoration: none;
}
.rms-btn:hover { border-color: var(--sv2-accent, #818cf8); color: var(--sv2-accent, #818cf8); }
.rms-btn[hidden] { display: none; }
.rms-btn:disabled { opacity: 0.6; cursor: wait; }
.rms-btn-primary { width: 100%; background: var(--sv2-accent, #818cf8); border-color: var(--sv2-accent, #818cf8); color: #fff; }
.rms-btn-primary:hover { filter: brightness(1.08); color: #fff; }
.rms-actions .rms-btn { flex: 1; }
.rms-keep { margin: 1rem 0 0; padding-top: 0.9rem; border-top: 1px solid var(--sv2-border, #2a2d3a); }
.rms-note { margin: 0.5rem 0 0; font-size: 0.8rem; line-height: 1.45; color: var(--sv2-text-muted, #a1a1aa); }
.rms-status { margin: 0.5rem 0 0; font-size: 0.84rem; font-weight: 600; }
.rms-status[hidden] { display: none; }
.rms-status a, .rms-pro a, .rms-signin a { color: #2ba8ff; font-weight: 600; text-decoration: none; }
.rms-status a:hover, .rms-pro a:hover, .rms-signin a:hover { text-decoration: underline; }
.rms-upsell { margin: 0.7rem 0 0; }
.rms-upsell[hidden] { display: none; }
.rms-upsell .skr-daypass { margin: 0.6rem 0; }
.rms-pro, .rms-signin { margin: 0.45rem 0 0; font-size: 0.86rem; }
.rms-reopen {
    position: fixed; right: 1rem; bottom: 1rem; z-index: 900; display: inline-flex; align-items: center; gap: 0.4rem;
    padding: 0.55rem 0.9rem; border-radius: 999px; border: 1px solid var(--sv2-border, #2a2d3a);
    background: var(--sv2-bg-card, #1a1d27); color: var(--sv2-text, #e4e4e7); font: inherit; font-size: 0.85rem; font-weight: 600; cursor: pointer;
    box-shadow: 0 8px 20px rgba(2, 6, 23, 0.4);
}
.rms-reopen[hidden] { display: none; }
@media (max-width: 480px) {
    .rms { padding: 0; align-items: flex-end; }
    .rms-card { max-height: 92vh; border-radius: 1rem 1rem 0 0; }
}
