/* ============================================================
   Round-Robin Scheduler — tool-specific styles.
   Shared look from base.css (.spin-tool, .spin-btn, .spin-input,
   .spin-textarea, .spin-label). No :root / theme here.
   ============================================================ */

.rr-tool { background: var(--bg); transition: background 0.5s; }
.rr-tool .tool-instructions-wrapper { text-align: center; margin-bottom: 24px; }
.rr-tool .tool-section-title {
    font-family: var(--font-head); font-weight: 800;
    font-size: clamp(1.6rem, 4vw, 2.4rem); color: var(--text);
    margin: 0 0 12px; letter-spacing: -0.3px;
}
.rr-tool .text-primary-red { color: var(--accent-2); }
.rr-tool .tool-section-texte {
    color: var(--text-muted); font-size: 0.95rem; line-height: 1.7;
    max-width: 720px; margin: 0 auto;
}

/* ---------- Controls ---------- */
.rr-controls {
    background: var(--panel-bg); border: 1px solid var(--panel-border);
    border-radius: var(--radius); box-shadow: var(--shadow-soft);
    padding: 22px; margin-bottom: 18px;
}
.rr-controls-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
@media (max-width: 768px) { .rr-controls-grid { grid-template-columns: 1fr; } }

.rr-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.rr-field--players .spin-textarea { min-height: 200px; }

.rr-radio {
    display: flex; align-items: center; gap: 8px; color: var(--text);
    font-size: 0.92rem; font-weight: 600; padding: 8px 0; cursor: pointer;
}
.rr-radio input { width: 18px; height: 18px; accent-color: var(--purple); cursor: pointer; }
.rr-hint { font-size: 0.78rem; color: var(--text-muted); margin: 8px 0 0; line-height: 1.5; }

.rr-actions { display: flex; gap: 10px; margin-top: 10px; }
.rr-actions .spin-btn { margin: 0; }

/* ---------- Summary bar ---------- */
.rr-bar {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    margin-bottom: 18px; flex-wrap: wrap;
}
.rr-summary { font-size: 0.9rem; font-weight: 700; color: var(--text); }
.rr-export .spin-btn { margin: 0; }

/* ---------- Output: rounds ---------- */
.rr-output {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
}
.rr-round {
    background: var(--panel-bg); border: 1px solid var(--panel-border);
    border-radius: var(--radius); overflow: hidden;
}
.rr-round-title {
    background: var(--card-bg); color: var(--accent-2);
    font-size: 0.8rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em;
    padding: 10px 16px; border-bottom: 1px solid var(--panel-border);
}
.rr-matches { padding: 10px; display: flex; flex-direction: column; gap: 8px; }

.rr-match {
    display: flex; align-items: center; gap: 8px;
    background: var(--card-bg); border: 1px solid var(--border-color);
    border-radius: var(--radius-sm); padding: 10px 12px;
}
.rr-home, .rr-away { flex: 1; font-size: 0.9rem; font-weight: 600; color: var(--text); word-break: break-word; }
.rr-away { text-align: right; }
.rr-vs {
    flex: 0 0 auto; font-family: var(--font-mono); font-size: 0.72rem; font-weight: 700;
    color: #fff; background: var(--accent); padding: 2px 8px; border-radius: 6px;
}
.rr-match.rr-bye { justify-content: center; background: transparent; border-style: dashed; }
.rr-rest { font-size: 0.82rem; font-style: italic; color: var(--text-muted); }

/* ---------- Toast ---------- */
.rr-toast {
    position: fixed; bottom: 24px; left: 50%; transform: translate(-50%, 20px);
    background: var(--panel-bg); color: var(--text); border: 1px solid var(--border-color);
    border-left: 4px solid var(--success); padding: 12px 18px; border-radius: var(--radius-sm);
    font-size: 0.88rem; font-weight: 600; box-shadow: var(--shadow);
    opacity: 0; pointer-events: none; transition: all 0.3s ease; z-index: 9999; max-width: 90vw;
}
.rr-toast.show { opacity: 1; transform: translate(-50%, 0); }
.rr-toast.error { border-left-color: var(--accent); }

.rr-hidden { display: none !important; }

@media print {
    .rr-controls, .rr-toast, .tool-instructions-wrapper, .rr-export { display: none !important; }
    .rr-output { grid-template-columns: repeat(3, 1fr); }
}