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

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

/* ============================================================================
   SELECTIONS STRUCTURE
   ============================================================================ */
.bet-row {
    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);
}

.bet-header {
    margin-bottom: var(--space-md, 1rem);
}

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

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

.bet-input-group label {
    display: block;
    font-weight: 600;
    color: var(--text-primary, #ffffff);
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

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

/* ============================================================================
   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.negative {
    color: #ef4444;
}

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

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

/* ============================================================================
   WARNING BOX - For 0-1 winners
   ============================================================================ */
.warning-box {
    background: rgba(239, 68, 68, 0.1);
    border: 2px solid #ef4444;
    border-radius: 8px;
    padding: 1.5rem;
    margin-top: var(--space-xl, 2rem);
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

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

.warning-content h3 {
    color: #ef4444;
    font-size: 1.125rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
}

.warning-content p {
    color: var(--text-primary, #e2e8f0);
    font-size: 1rem;
    line-height: 1.6;
    margin: 0;
}

/* ============================================================================
   BET BREAKDOWN SECTIONS
   ============================================================================ */
.bet-breakdown-section {
    margin-top: var(--space-xl, 2rem);
}

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

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

.bet-item {
    background: var(--bg-card, #1a1f2e);
    border: 1px solid var(--border-color, #2d3548);
    border-radius: 6px;
    padding: 1rem 1.25rem;
    transition: all 0.2s;
}

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

.bet-item.bet-win {
    border-left: 3px solid #22c55e;
}

.bet-item.bet-loss {
    border-left: 3px solid #ef4444;
}

.bet-item.bet-pending {
    border-left: 3px solid #94a3b8;
}

.bet-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

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

.bet-status {
    font-weight: 700;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.bet-status.status-win {
    color: #22c55e;
}

.bet-status.status-loss {
    color: #ef4444;
}

.bet-status.status-pending {
    color: #94a3b8;
}

.bet-item-details {
    display: flex;
    justify-content: space-between;
    font-size: 0.9375rem;
    color: var(--text-secondary, #94a3b8);
}

.bet-item-details span {
    flex: 1;
}

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

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

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

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

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

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

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

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

.heinz-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 */
.heinz-calculator-page .info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 1.25rem;
}

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

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

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

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

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

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

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

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

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

/* Responsive Design */
@media (max-width: 768px) {
    .bet-inputs {
        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;
    }

    /* Warning box mobile */
    .warning-box {
        flex-direction: column;
        text-align: center;
    }

    /* Simplify bet breakdown on mobile */
    .bet-item-details {
        flex-direction: column;
        gap: 0.5rem;
    }
}

@media (max-width: 480px) {
    .result-item .result-value {
        font-size: 1.5rem;
    }
}
