/**
 * Bankroll Management Calculator - Professional Styling
 * Matches Dyutam Neo-Brutal Theme
 */

.bankroll-calculator-page {
    padding: var(--space-2xl, 3rem) 0;
}

/* Header */
.calculator-header {
    text-align: center;
    margin-bottom: var(--space-3xl, 4rem);
    padding-bottom: var(--space-2xl, 3rem);
    border-bottom: 3px solid var(--accent-electric, #00ff88);
}

.calculator-title {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
    background: linear-gradient(135deg, #ffffff 0%, #10b981 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: var(--space-md, 1rem);
    letter-spacing: -0.02em;
}

.calculator-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary, #a0a0a0);
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Tabs */
.calculator-tabs {
    display: flex;
    gap: var(--space-sm, 0.5rem);
    margin-bottom: var(--space-2xl, 3rem);
    flex-wrap: wrap;
    justify-content: center;
    padding: 0 var(--space-md, 1rem);
}

.tab-button {
    padding: var(--space-md, 1rem) var(--space-lg, 1.5rem);
    background: var(--bg-surface, #1a1a1a);
    border: 2px solid var(--border-subtle, #333);
    border-radius: 8px;
    color: var(--text-secondary, #a0a0a0);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.tab-button:hover {
    background: var(--bg-elevated, #242424);
    border-color: var(--accent-electric, #00ff88);
    color: var(--text-primary, #ffffff);
    transform: translateY(-2px);
}

.tab-button.active {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-color: #10b981;
    color: #ffffff;
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.3);
}

@media (max-width: 768px) {
    .calculator-tabs {
        flex-direction: column;
    }

    .tab-button {
        width: 100%;
    }
}

/* Tab Content */
.tab-content-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--space-md, 1rem);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Calculator Grid Layout */
.calculator-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-2xl, 3rem);
    margin-bottom: var(--space-3xl, 4rem);
}

@media (max-width: 968px) {
    .calculator-grid {
        grid-template-columns: 1fr;
    }
}

/* Input Section */
.calculator-inputs,
.calculator-results {
    background: var(--bg-surface, #1a1a1a);
    border: 2px solid var(--border-subtle, #333);
    border-radius: 12px;
    padding: var(--space-2xl, 3rem);
}

.section-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary, #ffffff);
    margin-bottom: var(--space-md, 1rem);
}

.section-description {
    color: var(--text-secondary, #a0a0a0);
    line-height: 1.6;
    margin-bottom: var(--space-xl, 2rem);
}

/* Input Groups */
.input-group {
    margin-bottom: var(--space-lg, 1.5rem);
}

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

.calculator-input {
    width: 100%;
    padding: var(--space-md, 1rem);
    background: var(--bg-elevated, #242424);
    border: 2px solid var(--border-subtle, #333);
    border-radius: 8px;
    color: var(--text-primary, #ffffff);
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.calculator-input:focus {
    outline: none;
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.calculator-input:hover {
    border-color: var(--accent-electric, #00ff88);
}

.input-hint {
    display: block;
    margin-top: var(--space-xs, 0.25rem);
    color: var(--text-tertiary, #666);
    font-size: 0.85rem;
    font-style: italic;
}

/* Calculate Button */
.btn-calculate {
    width: 100%;
    padding: var(--space-md, 1rem) var(--space-lg, 1.5rem);
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border: none;
    border-radius: 8px;
    color: #ffffff;
    font-weight: 700;
    font-size: 1.05rem;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: var(--space-lg, 1.5rem);
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.3);
}

.btn-calculate:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(16, 185, 129, 0.4);
}

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

/* Results Section */
.results-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary, #ffffff);
    margin-bottom: var(--space-lg, 1.5rem);
    padding-bottom: var(--space-md, 1rem);
    border-bottom: 2px solid var(--border-subtle, #333);
}

.result-card {
    background: var(--bg-elevated, #242424);
    border: 2px solid var(--border-subtle, #333);
    border-radius: 8px;
    padding: var(--space-lg, 1.5rem);
    margin-bottom: var(--space-md, 1rem);
    transition: all 0.2s ease;
}

.result-card:hover {
    border-color: #10b981;
    transform: translateY(-2px);
}

.result-card.success-card {
    border-color: #10b981;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, transparent 100%);
}

.result-card.danger-card {
    border-color: #ef4444;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, transparent 100%);
}

.result-label {
    font-size: 0.9rem;
    color: var(--text-secondary, #a0a0a0);
    margin-bottom: var(--space-xs, 0.25rem);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.result-value {
    font-size: 1.75rem;
    font-weight: 800;
    color: #10b981;
    font-family: var(--font-heading, 'Montserrat', sans-serif);
}

.result-value.danger {
    color: #ef4444;
}

/* Betting Schedule */
.betting-schedule {
    margin-top: var(--space-xl, 2rem);
    padding-top: var(--space-lg, 1.5rem);
    border-top: 2px solid var(--border-subtle, #333);
}

.betting-schedule h4 {
    font-size: 1.1rem;
    color: var(--text-primary, #ffffff);
    margin-bottom: var(--space-md, 1rem);
}

.schedule-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs, 0.25rem);
    max-height: 300px;
    overflow-y: auto;
}

.schedule-item {
    display: flex;
    justify-content: space-between;
    padding: var(--space-sm, 0.5rem);
    background: var(--bg-elevated, #242424);
    border-radius: 4px;
    font-size: 0.9rem;
}

.schedule-item span:first-child {
    color: var(--text-secondary, #a0a0a0);
}

.schedule-item span:last-child {
    color: #10b981;
    font-weight: 600;
}

.schedule-note {
    padding: var(--space-sm, 0.5rem);
    color: var(--text-tertiary, #666);
    font-style: italic;
    text-align: center;
}

/* Kelly Warning/Info Boxes */
.kelly-warning {
    margin-top: var(--space-lg, 1.5rem);
}

.warning-box {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.1) 0%, transparent 100%);
    border: 2px solid #fbbf24;
    border-radius: 8px;
    padding: var(--space-lg, 1.5rem);
    color: var(--text-primary, #ffffff);
}

.warning-box strong {
    display: block;
    color: #fbbf24;
    margin-bottom: var(--space-sm, 0.5rem);
}

.success-box {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, transparent 100%);
    border: 2px solid #10b981;
    border-radius: 8px;
    padding: var(--space-lg, 1.5rem);
    color: var(--text-primary, #ffffff);
}

.success-box strong {
    display: block;
    color: #10b981;
    margin-bottom: var(--space-sm, 0.5rem);
}

.info-box {
    background: var(--bg-elevated, #242424);
    border: 2px solid var(--border-subtle, #333);
    border-radius: 8px;
    padding: var(--space-lg, 1.5rem);
    margin-top: var(--space-lg, 1.5rem);
}

.info-box strong {
    display: block;
    color: var(--text-primary, #ffffff);
    margin-bottom: var(--space-sm, 0.5rem);
}

.info-box p {
    color: var(--text-secondary, #a0a0a0);
    line-height: 1.6;
    margin-top: var(--space-sm, 0.5rem);
}

.info-box ul {
    margin-top: var(--space-sm, 0.5rem);
    padding-left: var(--space-lg, 1.5rem);
    color: var(--text-secondary, #a0a0a0);
    line-height: 1.8;
}

/* Unit Guide Table */
.unit-guide {
    margin-top: var(--space-xl, 2rem);
    padding-top: var(--space-lg, 1.5rem);
    border-top: 2px solid var(--border-subtle, #333);
}

.unit-guide h4 {
    font-size: 1.1rem;
    color: var(--text-primary, #ffffff);
    margin-bottom: var(--space-md, 1rem);
}

.unit-table {
    width: 100%;
    border-collapse: collapse;
}

.unit-table th {
    background: var(--bg-elevated, #242424);
    padding: var(--space-sm, 0.5rem);
    text-align: left;
    font-weight: 600;
    color: var(--text-primary, #ffffff);
    border: 1px solid var(--border-subtle, #333);
}

.unit-table td {
    padding: var(--space-sm, 0.5rem);
    border: 1px solid var(--border-subtle, #333);
    color: var(--text-secondary, #a0a0a0);
}

.unit-table tbody tr:hover {
    background: var(--bg-elevated, #242424);
}

/* Risk of Ruin Assessment */
.ror-assessment {
    margin-top: var(--space-lg, 1.5rem);
}

.assessment-box {
    padding: var(--space-lg, 1.5rem);
    border-radius: 8px;
    font-weight: 600;
    text-align: center;
    border: 2px solid;
}

.assessment-safe {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, transparent 100%);
    border-color: #10b981;
    color: #10b981;
}

.assessment-good {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.1) 0%, transparent 100%);
    border-color: #22c55e;
    color: #22c55e;
}

.assessment-moderate {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.1) 0%, transparent 100%);
    border-color: #fbbf24;
    color: #fbbf24;
}

.assessment-high {
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.1) 0%, transparent 100%);
    border-color: #f97316;
    color: #f97316;
}

.assessment-danger {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, transparent 100%);
    border-color: #ef4444;
    color: #ef4444;
}

/* Session Management */
.session-tips {
    margin-top: var(--space-xl, 2rem);
    padding-top: var(--space-lg, 1.5rem);
    border-top: 2px solid var(--border-subtle, #333);
}

.session-tips h4 {
    font-size: 1.1rem;
    color: var(--text-primary, #ffffff);
    margin-bottom: var(--space-md, 1rem);
}

.session-tips ul {
    padding-left: var(--space-lg, 1.5rem);
    color: var(--text-secondary, #a0a0a0);
    line-height: 1.8;
}

.session-tips strong {
    color: #10b981;
}

/* Educational Content */
.calculator-education {
    max-width: 1400px;
    margin: var(--space-4xl, 5rem) auto 0;
    padding: var(--space-3xl, 4rem) var(--space-md, 1rem);
    background: linear-gradient(135deg, var(--bg-surface, #1a1a1a) 0%, var(--bg-elevated, #242424) 100%);
    border: 3px solid var(--border-subtle, #333);
    border-radius: 16px;
}

.calculator-education .section-title {
    text-align: center;
    font-size: 2rem;
    margin-bottom: var(--space-2xl, 3rem);
    background: linear-gradient(135deg, #ffffff 0%, #10b981 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.education-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-xl, 2rem);
}

@media (max-width: 968px) {
    .education-grid {
        grid-template-columns: 1fr;
    }
}

.education-card {
    background: var(--bg-elevated, #242424);
    border: 2px solid var(--border-subtle, #333);
    border-radius: 12px;
    padding: var(--space-xl, 2rem);
    transition: all 0.3s ease;
}

.education-card:hover {
    border-color: #10b981;
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(16, 185, 129, 0.2);
}

.education-card h3 {
    font-size: 1.5rem;
    color: #10b981;
    margin-bottom: var(--space-md, 1rem);
    font-weight: 700;
}

.education-card p {
    color: var(--text-secondary, #a0a0a0);
    line-height: 1.7;
    margin-bottom: var(--space-md, 1rem);
}

.education-card p:last-child {
    margin-bottom: 0;
}

.education-card ul {
    padding-left: var(--space-lg, 1.5rem);
    color: var(--text-secondary, #a0a0a0);
    line-height: 1.8;
}

.education-card li {
    margin-bottom: var(--space-sm, 0.5rem);
}

.education-card strong {
    color: #10b981;
    font-weight: 600;
}

/* Responsive Design */
@media (max-width: 768px) {
    .bankroll-calculator-page {
        padding: var(--space-lg, 1.5rem) 0;
    }

    .calculator-header {
        margin-bottom: var(--space-xl, 2rem);
        padding-bottom: var(--space-lg, 1.5rem);
    }

    .calculator-title {
        font-size: 1.75rem;
    }

    .calculator-subtitle {
        font-size: 1rem;
    }

    .calculator-inputs,
    .calculator-results {
        padding: var(--space-lg, 1.5rem);
    }

    .section-title {
        font-size: 1.5rem;
    }

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

    .calculator-education {
        padding: var(--space-xl, 2rem) var(--space-md, 1rem);
        margin-top: var(--space-2xl, 3rem);
    }
}

/* Scrollbar Styling */
.schedule-list::-webkit-scrollbar {
    width: 6px;
}

.schedule-list::-webkit-scrollbar-track {
    background: var(--bg-elevated, #242424);
    border-radius: 3px;
}

.schedule-list::-webkit-scrollbar-thumb {
    background: #10b981;
    border-radius: 3px;
}

.schedule-list::-webkit-scrollbar-thumb:hover {
    background: #059669;
}
