/* Round Robin Calculator - Professional Styling */
/* Base styles are in calculator-base.css */

/* CSS Variables */
.round-robin-calculator-page {
    --pf-primary: #00ff88;
    --pf-electric: #00bfff;
    --pf-accent: #8b5cf6;
    --tools-border: rgba(255, 255, 255, 0.08);
    --tools-muted: rgba(255, 255, 255, 0.65);
    --tools-text: #f8fafc;
    --tools-danger: #f87171;
    padding: var(--space-lg, 1.5rem) 0;
}

/* Title Styling - Matching Homepage Gradient */
.round-robin-calculator-page .calculator-title {
    font-family: var(--font-heading, 'Montserrat', sans-serif);
    font-size: clamp(1.8rem, 4vw, 3rem);
    font-weight: 900;
    line-height: 1.1;
    background: linear-gradient(135deg, var(--pf-primary) 0%, var(--pf-electric) 50%, var(--pf-accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: var(--space-lg, 1.5rem);
    letter-spacing: -0.02em;
}

/* Input Shake Animation */
@keyframes shakeInput {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-4px); }
    20%, 40%, 60%, 80% { transform: translateX(4px); }
}

.shake-error {
    animation: shakeInput 0.5s ease-in-out;
}

/* ============================================================================
   ERROR DISPLAY - Field-level validation errors
   ============================================================================ */
.field-error.show {
    display: block !important;
}

.input-error {
    border-color: #ef4444 !important;
    background: rgba(239, 68, 68, 0.1) !important;
}

/* ============================================================================
   CONSTRAINT INFO - Shows selection limits
   ============================================================================ */
.constraint-info {
    text-align: center;
    margin-top: 0.75rem;
    color: var(--text-secondary, #94a3b8);
    font-size: 0.875rem;
}

.selection-count {
    display: inline-block;
    margin-left: 0.375rem;
    font-size: 0.8125rem;
    color: var(--text-tertiary, #64748b);
    font-weight: 600;
}

.optional-label {
    color: var(--text-tertiary, #64748b);
    font-size: 0.8125rem;
    font-weight: 400;
}

/* ============================================================================
   SELECTION ROWS - Multi-selection structure
   ============================================================================ */
.bets-container {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg, 1.5rem);
    margin-bottom: var(--space-xl, 2rem);
}

.bet-row {
    background: var(--bg-card, #1a1f2e);
    border: 2px solid var(--border-color, #2d3548);
    border-radius: 4px;
    padding: var(--space-lg, 1.5rem);
}

.bet-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-md, 1rem);
}

.bet-label {
    font-weight: 700;
    color: var(--accent-primary, #3b82f6);
    font-size: 1.125rem;
}

.remove-bet-btn {
    width: 32px;
    height: 32px;
    background: #dc3545;
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}

.remove-bet-btn:hover {
    transform: scale(1.1);
}

.bet-inputs {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: var(--space-md, 1rem);
}

.add-bet-btn {
    flex: 1;
    min-width: 200px;
    padding: var(--space-md, 1rem);
    background: var(--bg-card, #1a1f2e);
    border: 2px dashed var(--border-color, #2d3548);
    border-radius: 4px;
    color: var(--text-secondary, #94a3b8);
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    min-height: 48px;
}

.add-bet-btn:hover {
    border-color: var(--accent-primary, #3b82f6);
    color: var(--accent-primary, #3b82f6);
    background: rgba(59, 130, 246, 0.1);
}

/* ============================================================================
   PARLAY SIZE CHECKBOXES - Custom styling
   ============================================================================ */
.parlay-size-selector {
    margin-bottom: var(--space-xl, 2rem);
}

.parlay-size-selector label {
    display: block;
    font-weight: 700;
    color: var(--text-primary, #ffffff);
    margin-bottom: var(--space-md, 1rem);
    font-size: 1.125rem;
}

.checkbox-buttons {
    display: flex;
    gap: var(--space-md, 1rem);
    flex-wrap: wrap;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: var(--space-md, 1rem) var(--space-lg, 1.5rem);
    background: var(--bg-card, #1a1f2e);
    border: 2px solid var(--border-color, #2d3548);
    border-radius: 4px;
    color: var(--text-secondary, #94a3b8);
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.2s;
    min-height: 48px;
}

.checkbox-label:hover {
    border-color: var(--accent-primary, #3b82f6);
    background: rgba(59, 130, 246, 0.05);
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--accent-primary, #3b82f6);
}

.checkbox-label.checked {
    background: rgba(59, 130, 246, 0.15);
    border-color: var(--accent-primary, #3b82f6);
    color: var(--accent-primary, #3b82f6);
}

/* ============================================================================
   RESULTS DISPLAY - Single Row Layout
   ============================================================================ */
.results-summary {
    display: flex;
    align-items: stretch;
    background: var(--bg-card, #1a1f2e);
    border: 2px solid var(--border-color, #2d3548);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: var(--space-xl, 2rem);
}

.result-item {
    flex: 1;
    padding: 1.5rem 1rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.5rem;
}

.result-item.primary {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(37, 99, 235, 0.1) 100%);
}

.result-divider {
    width: 2px;
    background: var(--border-color, #2d3548);
    flex-shrink: 0;
}

.result-item .result-label {
    font-size: 0.9375rem;
    color: var(--text-secondary, #94a3b8);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.result-item .result-value {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--text-primary, #e2e8f0);
    line-height: 1.2;
}

.result-item .result-value.highlight {
    color: #10b981;
}

.result-item .result-value.profit {
    color: #22c55e;
}

.result-item .result-value.total-stake {
    color: #fbbf24;
}

.result-item .result-subtext {
    font-size: 0.875rem;
    color: var(--text-tertiary, #64748b);
}

/* ============================================================================
   PARLAY BREAKDOWN SECTIONS - By Size
   ============================================================================ */
.parlay-breakdown-section {
    margin-top: var(--space-xl, 2rem);
}

.parlay-breakdown-section h3 {
    font-size: 1.125rem;
    color: var(--text-primary, #e2e8f0);
    margin-bottom: 1rem;
    font-weight: 600;
}

.parlay-size-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: rgba(59, 130, 246, 0.2);
    border: 1px solid rgba(59, 130, 246, 0.4);
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--accent-primary, #3b82f6);
    margin-left: 0.5rem;
}

.parlay-breakdown {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.parlay-item {
    display: grid;
    grid-template-columns: 3fr 1fr 1fr 1fr;
    gap: 1rem;
    align-items: center;
    background: var(--bg-card, #1a1f2e);
    border: 1px solid var(--border-color, #2d3548);
    border-radius: 6px;
    padding: 0.875rem 1.125rem;
    transition: all 0.2s;
}

.parlay-item:hover {
    border-color: var(--accent-primary, #3b82f6);
    transform: translateX(2px);
}

.parlay-selections {
    color: var(--text-primary, #e2e8f0);
    font-weight: 600;
    font-size: 0.9375rem;
}

.parlay-odds-display {
    color: var(--accent-primary, #3b82f6);
    font-weight: 600;
    text-align: center;
    font-size: 0.9375rem;
}

.parlay-stake-display {
    color: var(--text-secondary, #94a3b8);
    text-align: center;
    font-size: 0.875rem;
    font-weight: 500;
}

.parlay-profit-display {
    color: #10b981;
    text-align: right;
    font-size: 0.875rem;
    font-weight: 600;
}

/* ============================================================================
   RISK INDICATOR INFO BOXES
   ============================================================================ */
.info-box.risk-extreme {
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.2) 0%, rgba(185, 28, 28, 0.15) 100%);
    border-color: rgba(220, 38, 38, 0.6);
}

.info-box.risk-high {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.2) 0%, rgba(245, 158, 11, 0.15) 100%);
    border-color: rgba(251, 191, 36, 0.6);
}

.info-box.risk-moderate {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2) 0%, rgba(37, 99, 235, 0.15) 100%);
    border-color: rgba(59, 130, 246, 0.6);
}

.info-box.risk-reasonable {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.2) 0%, rgba(22, 163, 74, 0.15) 100%);
    border-color: rgba(34, 197, 94, 0.6);
}

/* ============================================================================
   CLEANER, PROFESSIONAL INFO SECTIONS
   ============================================================================ */

/* Override flashy base styles with cleaner professional look */
.round-robin-calculator-page .calculator-section h2,
.round-robin-calculator-page .info-section h2 {
    font-size: 1.75rem;
    color: var(--text-primary, #e2e8f0);
    font-weight: 600;
    margin-bottom: 1.25rem;
}

.round-robin-calculator-page .info-section {
    background: var(--bg-surface, #232838);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.round-robin-calculator-page .info-section p {
    font-size: 1.0625rem;
    line-height: 1.7;
}

.round-robin-calculator-page .info-section h2 {
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

/* Cleaner formula box */
.round-robin-calculator-page .formula-box {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    padding: 1.5rem;
    margin-top: 1.25rem;
}

.round-robin-calculator-page .formula-box h3 {
    color: var(--text-primary, #e2e8f0);
    font-size: 1.0625rem;
    font-weight: 600;
    margin-bottom: 0.875rem;
}

.round-robin-calculator-page .formula-box p {
    font-size: 1rem;
    line-height: 1.7;
}

.round-robin-calculator-page .formula-box .example {
    color: var(--text-tertiary, #64748b);
    font-size: 0.9375rem;
    font-family: 'Courier New', monospace;
    margin-top: 0.5rem;
}

/* Info cards grid */
.round-robin-calculator-page .info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 1.25rem;
}

.round-robin-calculator-page .info-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    padding: 1.5rem;
    transition: all 0.2s;
}

.round-robin-calculator-page .info-card:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(59, 130, 246, 0.3);
}

.round-robin-calculator-page .info-card h3 {
    color: var(--text-primary, #e2e8f0);
    font-size: 1.0625rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.round-robin-calculator-page .info-card p {
    color: var(--text-secondary, #94a3b8);
    font-size: 1rem;
    line-height: 1.7;
}

/* Tips grid */
.round-robin-calculator-page .tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 1.25rem;
}

.round-robin-calculator-page .tip-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    padding: 1.5rem;
    transition: all 0.2s;
}

.round-robin-calculator-page .tip-card:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(59, 130, 246, 0.3);
}

.round-robin-calculator-page .tip-card h4 {
    color: var(--text-primary, #e2e8f0);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.round-robin-calculator-page .tip-card p {
    font-size: 1rem;
    line-height: 1.7;
}

/* Responsive */
@media (max-width: 768px) {
    .bet-inputs {
        grid-template-columns: 1fr;
    }

    .add-bet-btn {
        min-width: unset;
    }

    .checkbox-buttons {
        flex-direction: column;
    }

    .checkbox-label {
        width: 100%;
    }

    /* Stack results vertically on mobile */
    .results-summary {
        flex-direction: column;
    }

    .result-divider {
        height: 2px;
        width: 100%;
    }

    .result-item .result-value {
        font-size: 1.75rem;
    }

    /* Stack parlay breakdown on mobile */
    .parlay-item {
        grid-template-columns: 1fr;
        gap: 0.5rem;
        text-align: left;
    }

    .parlay-odds-display,
    .parlay-stake-display,
    .parlay-profit-display {
        text-align: left;
    }
}

/* ============================================================================
   FAQ SECTION STYLES
   ============================================================================ */
.round-robin-calculator-page .faq-section {
    margin-top: 3rem;
}

.round-robin-calculator-page .faq-section h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--tools-text);
    margin-bottom: 1.5rem;
}

.round-robin-calculator-page .faq-container {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.round-robin-calculator-page .faq-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--tools-border);
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.2s ease;
}

.round-robin-calculator-page .faq-item:hover {
    border-color: rgba(255, 255, 255, 0.15);
}

.round-robin-calculator-page .faq-item[open] {
    background: rgba(255, 255, 255, 0.04);
}

.round-robin-calculator-page .faq-question {
    padding: 1.25rem 1.5rem;
    font-weight: 600;
    color: var(--tools-text);
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.round-robin-calculator-page .faq-question::-webkit-details-marker {
    display: none;
}

.round-robin-calculator-page .faq-question::after {
    content: '+';
    font-size: 1.5rem;
    font-weight: 300;
    color: var(--tools-muted);
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.round-robin-calculator-page .faq-item[open] .faq-question::after {
    content: '−';
}

.round-robin-calculator-page .faq-answer {
    padding: 0 1.5rem 1.25rem 1.5rem;
    color: var(--tools-muted);
    line-height: 1.7;
}

.round-robin-calculator-page .faq-answer p {
    margin: 0;
}

/* ============================================================================
   RELATED TOOLS SECTION
   ============================================================================ */
.round-robin-calculator-page .related-tools-section {
    margin-top: 3rem;
}

.round-robin-calculator-page .related-tools-section h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--tools-text);
    margin-bottom: 1.5rem;
}

.round-robin-calculator-page .related-tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
}

.round-robin-calculator-page .related-tool-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--tools-border);
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.round-robin-calculator-page .related-tool-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--pf-electric);
    transform: translateY(-2px);
}

.round-robin-calculator-page .related-tool-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.1), rgba(0, 191, 255, 0.1));
    border-radius: 10px;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.round-robin-calculator-page .related-tool-content {
    flex: 1;
    min-width: 0;
}

.round-robin-calculator-page .related-tool-name {
    font-weight: 600;
    color: var(--tools-text);
    margin-bottom: 0.25rem;
    font-size: 1rem;
}

.round-robin-calculator-page .related-tool-desc {
    font-size: 0.875rem;
    color: var(--tools-muted);
    line-height: 1.4;
}
