/* Bankroll Calculator Styles */

.shadow-img-1 {
    position: absolute;
    width: 100%;
    left: 0;
    z-index: -1;
}

.calculator-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 100px 16px 60px;
}

body:has(.sidebar) .calculator-container,
.calculator-container.logged-in {
    padding-top: 60px;
}

.calculator-header {
    text-align: center;
    margin-bottom: 60px;
}

.calculator-header h1 {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 48px;
    line-height: 1.2;
    background: linear-gradient(107.9deg, #5499FF 5.16%, #0662ED 84.46%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-fill-color: transparent;
    margin-bottom: 16px;
    letter-spacing: 1px;
}

.calculator-header p {
    font-family: 'Poppins', sans-serif;
    font-weight: 400;
    font-size: 18px;
    line-height: 1.6;
    color: #9B9B9B;
}

.calculator-grid {
    display: flex;
    align-items: stretch;
    justify-content: center;
    gap: 32px;
    flex-wrap: wrap;
}

.calculator-card {
    flex: 1 1 380px;
    background: linear-gradient(135deg, #1A1A1A 0%, #222831 100%);
    border: 1px solid #393939;
    border-radius: 16px;
    padding: 36px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.45);
    color: #FFFFFF;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.calculator-card h2 {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 26px;
    margin: 0;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.form-group label,
.group-header {
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: #9B9B9B;
}

.form-input {
    width: 100%;
    padding: 14px 16px;
    background: #0A0A0A;
    border: 1px solid #393939;
    border-radius: 10px;
    color: #FFFFFF;
    font-size: 16px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: #5499FF;
    box-shadow: 0 0 0 3px rgba(84, 153, 255, 0.15);
}

.grouped {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 18px;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid #393939;
    border-radius: 12px;
}

.grouped-controls {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    align-items: stretch;
}

.radio-tile {
    position: relative;
    display: block;
    height: 100%;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
}

.radio-tile input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.radio-label {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 52px;
    padding: 14px 16px;
    text-align: center;
    border: 1px solid #393939;
    border-radius: 10px;
    background: #0A0A0A;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.radio-tile input:checked + .radio-label {
    background: linear-gradient(107.9deg, #5499FF 5.16%, #0662ED 84.46%);
    border-color: transparent;
    color: #FFFFFF;
}

.radio-label:hover {
    border-color: #5499FF;
}

.calculate-btn {
    width: 100%;
    padding: 16px 24px;
    background: linear-gradient(107.9deg, #5499FF 5.16%, #0662ED 84.46%);
    border: none;
    border-radius: 10px;
    color: #FFFFFF;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 18px;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.calculate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(84, 153, 255, 0.35);
}

.helper-text {
    margin-top: 12px;
    font-size: 13px;
    color: #717171;
    line-height: 1.5;
}

.hidden {
    display: none !important;
}

#error-container {
    margin-top: 16px;
    padding: 12px 16px;
    border-radius: 10px;
    background: rgba(255, 92, 92, 0.15);
    border: 1px solid rgba(255, 92, 92, 0.45);
    color: #ffb3b3;
    font-size: 14px;
}

.chart-wrapper {
    position: relative;
    min-height: 240px;
    background: #0A0A0A;
    border: 1px dashed #393939;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

#bankroll-chart {
    width: 100%;
    height: 100%;
    display: none;
}

.chart-fallback {
    font-size: 15px;
    color: #9B9B9B;
    text-align: center;
    padding: 0 24px;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 18px;
}

.summary-card {
    padding: 20px;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid #393939;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.summary-label {
    font-size: 14px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: #9B9B9B;
}

.summary-value {
    font-size: 22px;
    font-weight: 600;
    color: #FFFFFF;
}

.summary-card[data-variant="expected"] {
    border-color: rgba(96, 165, 250, 0.45);
    background: rgba(96, 165, 250, 0.12);
}

.summary-card[data-variant="expected"] .summary-label {
    color: #93C5FD;
}

.summary-card[data-variant="expected"] .summary-value {
    color: #E0F2FE;
}

.summary-card[data-variant="positive"] {
    border-color: rgba(34, 197, 94, 0.45);
    background: rgba(34, 197, 94, 0.08);
}

.summary-card[data-variant="negative"] {
    border-color: rgba(239, 68, 68, 0.45);
    background: rgba(239, 68, 68, 0.08);
}

.disclaimer {
    font-size: 13px;
    color: #747474;
    line-height: 1.6;
}

@media (max-width: 992px) {
    .calculator-header h1 {
        font-size: 40px;
    }
}

@media (max-width: 768px) {
    .calculator-container {
        padding-top: 40px;
        margin-left: -12px;
        margin-right: -12px;
        padding-left: 8px;
        padding-right: 8px;
    }

    .calculator-card {
        padding: 25px;
    }
}

@media (max-width: 576px) {
    .calculator-header h1 {
        font-size: 28px;
    }

    .calculator-grid {
        gap: 24px;
    }
}

@media (max-width: 767.98px) {
    body:has(.sidebar) .content:has(.calculator-container) {
        padding: 15px 0 !important;
    }

    body:has(.sidebar) .main-wrapper:has(.calculator-container) {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
}

/* Light mode adjustments */
html.light-mode .calculator-header p {
    color: #4A4A4A;
}

html.light-mode .calculator-card {
    background: #FFFFFF;
    border-color: #E3E3E3;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
    color: #111111;
}

html.light-mode .grouped {
    background: #F5F7FB;
    border-color: #E3E3E3;
}

html.light-mode .form-input {
    background: #FFFFFF;
    border-color: #D5D5D5;
    color: #1F2937;
}

html.light-mode .radio-label {
    background: #FFFFFF;
    border-color: #D6D6D6;
    color: #1F2937;
}

html.light-mode .radio-label:hover {
    border-color: #2563EB;
}

html.light-mode .helper-text {
    color: #6B7280;
}

html.light-mode #error-container {
    background: rgba(220, 38, 38, 0.08);
    border-color: rgba(220, 38, 38, 0.35);
    color: #991B1B;
}

html.light-mode .chart-wrapper {
    background: #F8FAFC;
    border-color: #E2E8F0;
}

html.light-mode .summary-card[data-variant="expected"] {
    background: rgba(59, 130, 246, 0.14);
    border-color: rgba(59, 130, 246, 0.35);
}

html.light-mode .summary-card[data-variant="expected"] .summary-label {
    color: #1D4ED8;
}

html.light-mode .summary-card[data-variant="expected"] .summary-value {
    color: #1E3A8A;
}

html.light-mode .chart-fallback {
    color: #4B5563;
}

html.light-mode .summary-card {
    background: #F8FAFC;
    border-color: #E2E8F0;
}

html.light-mode .summary-value {
    color: #0F172A;
}

html.light-mode .summary-card[data-variant="positive"] {
    background: rgba(34, 197, 94, 0.08);
    border-color: rgba(34, 197, 94, 0.25);
}

html.light-mode .summary-card[data-variant="negative"] {
    background: rgba(239, 68, 68, 0.08);
    border-color: rgba(239, 68, 68, 0.25);
}

html.light-mode .disclaimer {
    color: #4B5563;
}
