/* Parlay Calculator - Specific Styles Only */
/* Base styles are now in calculator-base.css */

/* CSS Variables */
.parlay-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 */
.parlay-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); }
}

.parlay-calculator-page .shake-error {
    animation: shakeInput 0.5s ease;
}

/* ============================================================================
   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;
}

/* ============================================================================
   WARNING BOX - Prominent alert for parlay risk
   ============================================================================ */
.parlay-warning-box {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.15) 0%, rgba(245, 158, 11, 0.1) 100%);
    border: 2px solid rgba(251, 191, 36, 0.5);
    border-radius: 8px;
    padding: 1rem 1.25rem;
    margin-bottom: var(--space-xl, 2rem);
    box-shadow: 0 2px 8px rgba(251, 191, 36, 0.2);
}

.warning-icon {
    font-size: 2rem;
    line-height: 1;
    flex-shrink: 0;
}

.warning-content {
    color: var(--text-primary, #e2e8f0);
    font-size: 0.9375rem;
    line-height: 1.5;
}

.warning-content strong {
    color: #fbbf24;
    font-weight: 700;
}

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

.leg-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;
}

/* Bets Container - Parlay specific multi-bet 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);
}

/* ============================================================================
   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.875rem;
    color: var(--text-secondary, #94a3b8);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.result-item .result-value {
    font-size: 1.75rem;
    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.probability {
    color: #fbbf24;
}

/* Leg Breakdown Section */
.leg-breakdown-section {
    margin-top: var(--space-xl, 2rem);
}

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

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

.leg-item {
    display: grid;
    grid-template-columns: 2fr 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;
}

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

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

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

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

.leg-prob {
    color: var(--text-secondary, #94a3b8);
    text-align: right;
    font-size: 0.875rem;
    font-weight: 500;
}

/* ============================================================================
   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 */
.parlay-calculator-page .calculator-section h2,
.parlay-calculator-page .info-section h2 {
    font-size: 1.75rem;
    color: var(--text-primary, #e2e8f0);
    font-weight: 600;
    margin-bottom: 1.25rem;
}

.parlay-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;
}

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

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

/* Tone down warning section */
.parlay-calculator-page .warning-section {
    background: var(--bg-surface, #232838);
    border: 1px solid rgba(251, 191, 36, 0.25);
    border-left: 4px solid rgba(251, 191, 36, 0.6);
}

.parlay-calculator-page .warning-section h2 {
    border-bottom: 1px solid rgba(251, 191, 36, 0.15);
}

/* Cleaner formula box */
.parlay-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;
}

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

/* Cleaner info cards */
.parlay-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;
}

.parlay-calculator-page .info-card:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.12);
}

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

.parlay-calculator-page .info-card p {
    color: var(--text-secondary, #94a3b8);
    font-size: 0.9375rem;
    line-height: 1.6;
}

.parlay-calculator-page .info-card .note {
    color: var(--text-tertiary, #64748b);
    font-size: 0.8125rem;
}

/* Cleaner risk cards */
.parlay-calculator-page .risk-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(251, 191, 36, 0.2);
    border-left: 3px solid rgba(251, 191, 36, 0.5);
    border-radius: 6px;
    padding: 1.5rem;
}

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

.parlay-calculator-page .risk-card p {
    font-size: 0.9375rem;
}

/* Cleaner strategy boxes */
.parlay-calculator-page .strategy {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    padding: 1.5rem;
}

.parlay-calculator-page .strategy.good {
    border-left: 3px solid rgba(34, 197, 94, 0.6);
}

.parlay-calculator-page .strategy.bad {
    border-left: 3px solid rgba(239, 68, 68, 0.6);
}

.parlay-calculator-page .strategy h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.875rem;
}

.parlay-calculator-page .strategy.good h4 {
    color: var(--text-primary, #e2e8f0);
}

.parlay-calculator-page .strategy.bad h4 {
    color: var(--text-primary, #e2e8f0);
}

.parlay-calculator-page .strategy ul {
    margin: 0;
    padding-left: 1.25rem;
}

.parlay-calculator-page .strategy li {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    line-height: 1.7;
}

/* Cleaner math examples */
.parlay-calculator-page .math-example {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    padding: 1.5rem;
}

.parlay-calculator-page .math-example h4 {
    color: var(--text-primary, #e2e8f0);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.875rem;
}

.parlay-calculator-page .math-example p {
    font-size: 1rem;
    line-height: 1.7;
}

/* Cleaner tip cards */
.parlay-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;
}

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

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

.parlay-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;
    }

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

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

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

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

    .leg-odds,
    .leg-prob {
        text-align: left;
    }

    .parlay-warning-box {
        flex-direction: column;
        text-align: center;
    }

    .parlay-calculator-page .calculator-title {
        font-size: 1.6rem;
    }
}

/* ============================================================================
   FAQ SECTION
   ============================================================================ */
.parlay-calculator-page .faq-section {
    margin-top: 4rem;
}

.parlay-calculator-page .faq-section .section-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.parlay-calculator-page .faq-section .section-title {
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    font-weight: 800;
    color: var(--tools-text);
    margin: 0;
}

.parlay-calculator-page .pf-accordion {
    max-width: 900px;
    margin: 0 auto;
}

.parlay-calculator-page .pf-accordion-item {
    border-bottom: 1px solid var(--tools-border);
}

.parlay-calculator-page .pf-accordion-item:first-child {
    border-top: 1px solid var(--tools-border);
}

.parlay-calculator-page .pf-accordion-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 0;
    cursor: pointer;
    list-style: none;
    user-select: none;
    transition: all 0.2s ease;
}

.parlay-calculator-page .pf-accordion-summary::-webkit-details-marker {
    display: none;
}

.parlay-calculator-page .pf-accordion-summary:hover {
    color: var(--pf-primary);
}

.parlay-calculator-page .pf-accordion-summary:hover .pf-accordion-icon {
    stroke: var(--pf-primary);
}

.parlay-calculator-page .pf-accordion-question {
    flex: 1;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--tools-text);
    line-height: 1.4;
}

.parlay-calculator-page .pf-accordion-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    stroke: var(--tools-muted);
    transition: all 0.3s ease;
}

.parlay-calculator-page .pf-accordion-item[open] .pf-accordion-icon {
    transform: rotate(45deg);
}

.parlay-calculator-page .pf-accordion-content {
    padding: 0 0 1.5rem 0;
    color: var(--tools-muted);
    line-height: 1.7;
}

.parlay-calculator-page .pf-accordion-content p {
    margin: 0 0 1rem;
    font-size: 1rem;
}

.parlay-calculator-page .pf-accordion-content p:last-child {
    margin-bottom: 0;
}

/* ============================================================================
   RELATED TOOLS SECTION
   ============================================================================ */
.parlay-calculator-page .related-tools-section {
    margin-top: 4rem;
    padding: 3rem 0;
}

.parlay-calculator-page .related-tools-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.parlay-calculator-page .related-tools-header h2 {
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    font-weight: 800;
    color: var(--tools-text);
    margin: 0 0 0.75rem;
}

.parlay-calculator-page .related-tools-header p {
    color: var(--tools-muted);
    font-size: 1.05rem;
    margin: 0;
}

.parlay-calculator-page .related-tools-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
}

.parlay-calculator-page .related-tool-card {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    background: linear-gradient(145deg, rgba(13, 17, 26, 0.8) 0%, rgba(15, 21, 32, 0.8) 100%);
    border: 1px solid rgba(255, 255, 255, 0.06);
    padding: 1.5rem 1.75rem;
    border-radius: 16px;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.parlay-calculator-page .related-tool-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: linear-gradient(180deg, var(--pf-primary) 0%, var(--pf-electric) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.parlay-calculator-page .related-tool-card:hover {
    background: linear-gradient(145deg, rgba(13, 17, 26, 1) 0%, rgba(15, 21, 32, 1) 100%);
    border-color: rgba(56, 189, 248, 0.25);
    transform: translateX(6px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.parlay-calculator-page .related-tool-card:hover::before {
    opacity: 1;
}

.parlay-calculator-page .tool-card-icon {
    flex-shrink: 0;
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.1) 0%, rgba(0, 191, 255, 0.1) 100%);
    border: 1px solid rgba(0, 255, 136, 0.2);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.parlay-calculator-page .tool-card-icon svg {
    stroke: var(--pf-primary);
    transition: all 0.3s ease;
}

.parlay-calculator-page .related-tool-card:hover .tool-card-icon {
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.2) 0%, rgba(0, 191, 255, 0.2) 100%);
    border-color: rgba(0, 255, 136, 0.4);
    transform: scale(1.05);
}

.parlay-calculator-page .related-tool-card:hover .tool-card-icon svg {
    stroke: var(--pf-electric);
}

.parlay-calculator-page .tool-card-content {
    flex: 1;
    min-width: 0;
}

.parlay-calculator-page .tool-card-content h3 {
    color: var(--tools-text);
    margin: 0 0 0.4rem;
    font-size: 1.1rem;
    font-weight: 700;
    transition: color 0.3s ease;
}

.parlay-calculator-page .related-tool-card:hover .tool-card-content h3 {
    color: var(--pf-primary);
}

.parlay-calculator-page .tool-card-content p {
    color: var(--tools-muted);
    font-size: 0.92rem;
    margin: 0;
    line-height: 1.5;
    opacity: 0.85;
}

.parlay-calculator-page .tool-card-arrow {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.parlay-calculator-page .tool-card-arrow svg {
    stroke: var(--tools-muted);
    transition: all 0.3s ease;
    opacity: 0.5;
}

.parlay-calculator-page .related-tool-card:hover .tool-card-arrow {
    background: rgba(0, 255, 136, 0.15);
    transform: translateX(4px);
}

.parlay-calculator-page .related-tool-card:hover .tool-card-arrow svg {
    stroke: var(--pf-primary);
    opacity: 1;
}

@media (max-width: 768px) {
    .parlay-calculator-page .related-tools-grid {
        grid-template-columns: 1fr;
    }

    .parlay-calculator-page .related-tool-card {
        padding: 1.25rem 1.5rem;
    }

    .parlay-calculator-page .tool-card-icon {
        width: 46px;
        height: 46px;
    }

    .parlay-calculator-page .tool-card-arrow {
        display: none;
    }

    .parlay-calculator-page .pf-accordion-question {
        font-size: 1rem;
    }
}
