/* Sports Hedging Calculator - Professional Styling */
/* Base styles are in calculator-base.css */

/* CSS Variables */
.sports-hedging-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 */
.sports-hedging-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 {
    display: none;
    color: #ef4444;
    font-size: 0.875rem;
    margin-top: 0.375rem;
    font-weight: 500;
}

.field-error.show {
    display: block !important;
}

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

/* ============================================================================
   CALCULATOR INPUTS - Clean 2-Section Layout (Stake | Odds)
   ============================================================================ */
.inputs-container {
    margin-bottom: var(--space-lg, 1.5rem);
}

.input-row {
    background: var(--bg-card, #1a1f2e);
    border: 2px solid var(--border-color, #2d3548);
    border-radius: 4px;
    padding: var(--space-lg, 1.5rem);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xl, 2rem);
}

.stake-section,
.odds-section {
    display: flex;
    flex-direction: column;
}

.section-label {
    color: var(--accent-primary, #3b82f6);
    font-size: 1.125rem;
    font-weight: 700;
    margin: 0 0 var(--space-md, 1rem) 0;
    text-align: center;
}

.odds-section .bet-input-group:not(:last-child) {
    margin-bottom: var(--space-md, 1rem);
}

.helper-text {
    display: block;
    font-size: 0.875rem;
    color: var(--text-tertiary, #64748b);
    margin-top: 0.375rem;
    line-height: 1.5;
}

/* ============================================================================
   ACTION BUTTONS - Calculate and Clear
   ============================================================================ */
.clear-btn {
    flex: 1;
    min-width: 150px;
    padding: var(--space-lg, 1.5rem);
    background: var(--bg-card, #1a1f2e);
    border: 2px solid var(--border-color, #2d3548);
    border-radius: 4px;
    color: var(--text-primary, #ffffff);
    font-size: 1.125rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    min-height: 48px;
}

.clear-btn:hover {
    border-color: var(--accent-primary, #3b82f6);
    background: rgba(59, 130, 246, 0.1);
    transform: translateY(-2px);
}

.clear-btn:active {
    transform: translateY(0);
}

.clear-icon {
    display: inline-block;
    margin-right: 0.5rem;
}

/* ============================================================================
   HEDGE STRATEGY SELECTOR - Unique to Hedging Calculator
   ============================================================================ */
.hedge-strategy-selector {
    background: var(--bg-card, #1a1f2e);
    border: 2px solid var(--border-color, #2d3548);
    border-radius: 4px;
    padding: var(--space-lg, 1.5rem);
    margin-bottom: var(--space-lg, 1.5rem);
}

.hedge-strategy-selector > label {
    display: block;
    font-weight: 600;
    color: var(--text-primary, #ffffff);
    margin-bottom: 0.75rem;
    font-size: 1rem;
}

.strategy-buttons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
}

.strategy-btn {
    padding: var(--space-md, 1rem) var(--space-lg, 1.5rem);
    background: var(--bg-surface, #232838);
    color: var(--text-secondary, #94a3b8);
    border: 2px solid var(--border-color, #2d3548);
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
    font-size: 0.9375rem;
    text-align: center;
}

.strategy-btn:hover {
    background: rgba(59, 130, 246, 0.1);
    border-color: var(--accent-primary, #3b82f6);
    color: var(--text-primary, #e2e8f0);
    transform: translateY(-1px);
}

.strategy-btn.active {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2) 0%, rgba(37, 99, 235, 0.15) 100%);
    border-color: var(--accent-primary, #3b82f6);
    color: var(--accent-primary, #3b82f6);
    font-weight: 700;
}

.strategy-btn:active {
    transform: translateY(0);
}

/* ============================================================================
   VALIDATION ERRORS - Error summary box
   ============================================================================ */
.validation-errors {
    background: rgba(239, 68, 68, 0.1);
    border: 2px solid #ef4444;
    border-radius: 8px;
    padding: 1.25rem 1.5rem;
    margin: var(--space-lg, 1.5rem) 0;
    display: none;
}

.validation-errors.show {
    display: block;
}

.validation-errors strong {
    color: #ef4444;
    font-weight: 700;
}

.validation-errors ul {
    margin: 0.75rem 0 0 0;
    padding-left: 1.5rem;
    color: var(--text-primary, #e2e8f0);
    line-height: 1.7;
}

.validation-errors li {
    margin: 0.375rem 0;
}

/* ============================================================================
   RESULTS DISPLAY - Single Row Layout (Professional Standard)
   ============================================================================ */
.results-container {
    display: none;
}

.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.positive {
    color: #22c55e;
}

.result-item .result-value.negative {
    color: #ef4444;
}

.result-item .result-value.neutral {
    color: #94a3b8;
}

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

/* ============================================================================
   COMPARISON TABLE SECTION
   ============================================================================ */
.comparison-section {
    display: none;
    background: var(--bg-card, #1a1f2e);
    border: 2px solid var(--border-color, #2d3548);
    border-radius: 8px;
    padding: var(--space-xl, 2rem);
    margin-bottom: var(--space-xl, 2rem);
}

.comparison-section h3 {
    font-size: 1.25rem;
    color: var(--text-primary, #e2e8f0);
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.comparison-table-container {
    overflow-x: auto;
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    color: var(--text-primary, #e2e8f0);
}

.comparison-table thead tr {
    border-bottom: 2px solid var(--border-color, #2d3548);
}

.comparison-table th {
    text-align: left;
    padding: 0.875rem;
    color: var(--text-secondary, #94a3b8);
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.comparison-table th:not(:first-child) {
    text-align: right;
}

.comparison-table tbody tr {
    border-bottom: 1px solid var(--border-color, #2d3548);
    transition: background 0.2s;
}

.comparison-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

.comparison-table td {
    padding: 0.875rem;
    color: var(--text-secondary, #94a3b8);
}

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

.profit-cell {
    text-align: right;
    font-weight: 600;
    font-size: 1rem;
}

.profit-cell.positive {
    color: #22c55e;
}

.profit-cell.negative {
    color: #ef4444;
}

.hedge-row {
    background: rgba(20, 184, 166, 0.05);
}

.let-ride-row {
    background: rgba(255, 255, 255, 0.02);
}

/* ============================================================================
   ANALYSIS SECTION
   ============================================================================ */
.analysis-section {
    display: none;
    background: var(--bg-card, #1a1f2e);
    border: 2px solid var(--border-color, #2d3548);
    border-radius: 8px;
    padding: var(--space-xl, 2rem);
    margin-bottom: var(--space-xl, 2rem);
}

.analysis-section h3 {
    font-size: 1.25rem;
    color: var(--text-primary, #e2e8f0);
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.analysis-content {
    display: grid;
    gap: 1.5rem;
}

.analysis-box {
    background: rgba(255, 255, 255, 0.03);
    padding: 1.5rem;
    border-radius: 6px;
}

.analysis-box h4 {
    color: var(--text-primary, #e2e8f0);
    margin-bottom: 1rem;
    font-size: 1.0625rem;
    font-weight: 600;
}

.analysis-stats {
    display: grid;
    gap: 0.75rem;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 4px;
}

.stat-label {
    color: var(--text-secondary, #94a3b8);
    font-size: 0.9375rem;
}

.stat-value {
    font-weight: 700;
    font-size: 1.125rem;
}

.stat-value.positive {
    color: #22c55e;
}

.stat-value.negative {
    color: #ef4444;
}

.stat-value.warning {
    color: #fbbf24;
}

.recommendation-box {
    background: rgba(59, 130, 246, 0.1);
    padding: 1.25rem 1.5rem;
    border-left: 4px solid var(--accent-primary, #3b82f6);
    border-radius: 4px;
}

.recommendation-box p {
    margin: 0;
    color: var(--text-secondary, #94a3b8);
    line-height: 1.7;
    font-size: 1rem;
}

.recommendation-box strong {
    color: var(--text-primary, #e2e8f0);
}

/* ============================================================================
   INFO SECTIONS - Steps, Scenarios, Tips
   ============================================================================ */

/* Steps Grid */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-lg, 1.5rem);
    margin-top: var(--space-lg, 1.5rem);
}

.step-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    padding: var(--space-lg, 1.5rem);
    transition: all 0.2s;
}

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

.step-number {
    width: 40px;
    height: 40px;
    background: var(--accent-primary, #3b82f6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 1.25rem;
    margin-bottom: var(--space-md, 1rem);
    color: white;
}

.step-card h4 {
    color: var(--text-primary, #e2e8f0);
    margin-bottom: var(--space-sm, 0.5rem);
    font-size: 1rem;
    font-weight: 600;
}

.step-card p {
    color: var(--text-secondary, #94a3b8);
    line-height: 1.7;
}

/* Risks Grid */
.risks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-lg, 1.5rem);
    margin-top: var(--space-lg, 1.5rem);
}

.risk-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    padding: var(--space-lg, 1.5rem);
    transition: all 0.2s;
}

.risk-item:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(59, 130, 246, 0.3);
}

.risk-item h4 {
    color: var(--text-primary, #e2e8f0);
    margin-bottom: var(--space-sm, 0.75rem);
    font-size: 1rem;
    font-weight: 600;
}

.risk-item p {
    color: var(--text-secondary, #94a3b8);
    line-height: 1.7;
}

/* Tips Grid */
.tip-icon {
    font-size: 2rem;
    margin-bottom: var(--space-sm, 0.5rem);
}

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

.sports-hedging-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;
}

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

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

/* Formula box */
.sports-hedging-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;
}

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

.sports-hedging-calculator-page .formula-box ul {
    list-style-position: inside;
    color: var(--text-secondary, #94a3b8);
    line-height: 1.8;
    margin: 0;
    padding: 0;
}

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

.sports-hedging-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;
}

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

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

.sports-hedging-calculator-page .info-card p {
    color: var(--text-secondary, #94a3b8);
    font-size: 0.9375rem;
    line-height: 1.7;
    margin: 0.375rem 0;
}

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

.sports-hedging-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;
}

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

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

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

/* Responsive Design */
@media (max-width: 768px) {
    /* Stack input sections vertically on mobile */
    .input-row {
        grid-template-columns: 1fr;
        gap: var(--space-lg, 1.5rem);
    }

    /* Stack strategy buttons vertically on mobile */
    .strategy-buttons {
        grid-template-columns: 1fr;
    }

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

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

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

    /* Simplify comparison table on mobile */
    .comparison-table th,
    .comparison-table td {
        padding: 0.5rem 0.375rem;
        font-size: 0.8125rem;
    }

    /* Stack stat rows */
    .stat-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.375rem;
    }

    .strategy-btn,
    .format-btn {
        min-height: 48px;
        padding: 1rem;
        font-size: 1rem;
    }

    .stake-input-group input {
        min-height: 48px;
        font-size: 16px; /* Prevents zoom on iOS */
    }

    .calculate-btn {
        min-height: 52px;
        font-size: 1.1rem;
    }

    .comparison-section,
    .analysis-section {
        padding: var(--space-lg, 1.5rem);
    }
}

@media (max-width: 480px) {
    .odds-format-selector label {
        font-size: 0.95rem;
    }

    .calculator-section h2 {
        font-size: 1.25rem;
    }

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

    .comparison-table {
        font-size: 0.75rem;
    }

    .comparison-section h3,
    .analysis-section h3 {
        font-size: 1.125rem;
    }

    .stat-value {
        font-size: 1rem;
    }
}

/* FAQ and Related Tools styles are in the base tools-calculators.css file */
