/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
:root {
    
    --radius-sm: 4px;
    --radius-md: 6px;
    --radius-lg: 8px;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}
body {
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
/* Container and layout */
.ci-container {
    max-width: 1170px;
    margin: 2rem auto 4rem auto;
    padding: 0 2rem;
    background: transparent;
    box-sizing: border-box;
}
/* Two-column layout for desktop */
.ci-calculator-layout {
    display: grid;
    grid-template-columns: 48% 52%;
    gap: 1.5rem;
    width: 100%;
    max-width: 100%;
    overflow: visible !important;
    align-items: start;
}
.ci-form-column {
    /* Form takes up left column */
    background: #f7fafc;
    border: 2px solid #f3f4f6;
    border-radius: var(--radius-lg);
    padding: 24px;
    min-width: 0;
    max-width: 100%;
    overflow: visible;
}
.ci-results-column {
    /* Results take up right column */
    position: -webkit-sticky !important;
    position: sticky !important;
    top: 0 !important;
    align-self: start !important;
    min-width: 0;
    max-width: 100%;
    overflow: visible;
    width: 100%;
    box-sizing: border-box;
    height: fit-content;
}
.ci-results-column * {
    max-width: 100%;
    box-sizing: border-box;
}
/* Placeholder content styles */
.ci-chart-section .ci-placeholder-content {
    padding: 0;
    text-align: left;
}

.ci-chart-section .ci-placeholder-content p {
    line-height: 1.6;
    margin: 0;
}
.ci-placeholder-header {
    margin-bottom: 2rem !important;
    margin-top: -24px !important;
    padding-top: 24px !important;
    text-align: center;
}
.ci-placeholder-header h2 {
    margin-bottom: 0.5rem;
}
.ci-placeholder-header p {
    line-height: 1.6;
}
.ci-placeholder-features {
    margin-bottom: 2rem;
}
.ci-feature-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    border-radius: var(--radius-md);
    background: #f3f4f6;
    transition: all 0.2s ease;
}
.ci-feature-item:hover {
    background: #e5e7eb;
}
.ci-feature-icon {
    flex-shrink: 0;
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    border-radius: var(--radius-sm);
    border: 1px solid #e5e7eb;
}
.ci-feature-text h4 {
    margin-bottom: 0.25rem;
}
.ci-feature-text p {
    line-height: 1.5;
    margin: 0;
}
.ci-placeholder-cta {
    text-align: center;
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.02), rgba(16, 185, 129, 0.05));
    border: 1px solid rgba(16, 185, 129, 0.1);
    border-radius: var(--radius-md);
}
.ci-placeholder-cta p {
    line-height: 1.6;
    margin: 0;
}
.ci-placeholder-cta strong {
    font-weight: 600;
}
/* Header */
.ci-header {
    text-align: center;
    margin-bottom: 32px;
    padding-bottom: 0;
}
/* Comparison grid */
.ci-comparison-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-bottom: 0;
    min-width: 0;
    overflow: visible;
}
.ci-investment-option {
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
    min-width: 0;
    overflow: visible;
    margin-bottom: 0.75rem;
}
.ci-shared-settings {
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
    max-width: none;
    margin-bottom: 0.5rem;
}
/* Form sections */
.ci-input-section {
    margin-bottom: 0.75rem;
    padding: 0;
    background: transparent;
    border: none;
}
.ci-input-section h2 {
    margin-top: 0;
    margin-bottom: 28px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f3f4f6;
    text-align: center;
    font-weight: 500;
    letter-spacing: -0.01em;
}
/* Input groups */
.ci-input-group {
    margin-bottom: 16px;
}
.ci-input-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    position: relative;
    cursor: default !important;
}
/* Input wrapper for currency and percent symbols */
.ci-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}
.ci-currency {
    position: absolute !important;
    left: 12px !important;
    transform: translateY(-10%) !important;
    font-weight: 400 !important;
    z-index: 1 !important;
    font-size: 1rem !important;
    line-height: 1 !important;
    font-family: inherit !important;
    pointer-events: none !important;
}
.ci-unit {
    position: absolute;
    right: 45px;
    top: 45%;
    transform: translateY(-50%);
    font-weight: 500;
    font-size: 0.875rem;
    pointer-events: none;
    z-index: 2;
}
/* Input styles */
input[type="text"],
input[type="number"] {
    width: 100%;
    padding: 14px 12px;
    border: 1px solid #e5e7eb;
    border-radius: var(--radius-md);
    font-size: 1rem;
    transition: all 0.2s ease;
    background: #ffffff;
    font-family: inherit;
    font-weight: 400;
}
/* Currency inputs need extra left padding */
.ci-input-wrapper .ci-currency + input {
    padding-left: 32px !important;
}
/* Specific inputs with currency symbols */
input#ci-initial-investment-a,
input#ci-annual-contribution-a,
input#ci-initial-investment-b,
input#ci-annual-contribution-b {
    padding-left: 32px !important;
}
/* Additional specificity for currency inputs */
.ci-input-wrapper input#ci-initial-investment-a,
.ci-input-wrapper input#ci-annual-contribution-a,
.ci-input-wrapper input#ci-initial-investment-b,
.ci-input-wrapper input#ci-annual-contribution-b {
    padding-left: 40px !important;
}

input[type="text"]:focus,
input[type="number"]:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgb(16 185 129 / 0.08);
}
input[type="text"]:hover,
input[type="number"]:hover {
    border-color: #9ca3af;
}

/* Placeholder text styling */
input[type="text"]::placeholder,
input[type="number"]::placeholder {
    color: #d1d5db;
}

/* Currency inputs need left padding for $ symbol */
#current-savings,
#annual-contribution,
#current-college-cost,
#initial-investment-a,
#annual-contribution-a,
#initial-investment-b,
#annual-contribution-b {
    padding-left: 36px;
}
/* Percentage inputs need right padding for % symbol */
#rate-of-return,
#college-inflation-rate {
    padding-right: 32px;
}
/* Error messages */
.ci-error-message {
    font-size: 0.875rem;
    margin-top: 4px;
    font-weight: 400;
    display: none;
}

.ci-error-message.show {
    display: block;
}

/* Visual alert for capped values */
.ci-input-group.value-capped {
    animation: valueCappedPulse 1s ease-in-out;
}

@keyframes valueCappedPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

.ci-input-group.value-capped input {
    box-shadow: 0 0 0 2px #ffc107;
}
.ci-input-group.error input {
    box-shadow: 0 0 0 3px rgb(239 68 68 / 0.1);
}
/* Button styles */
.ci-button-group {
    display: flex;
    gap: 12px;
    margin-top: 1rem;
    align-items: flex-start;
}

.ci-calculate-btn {
    flex: 1;
}

.ci-reset-btn {
    flex: 0 0 auto;
}


/* Enabled state - only when not disabled */
.c-btn.ci-calculate-btn:not(:disabled) {
    opacity: 1 !important;
    cursor: pointer !important;
}

/* Disabled state - prevent all hover effects including background changes */
.c-btn.ci-calculate-btn:disabled,
.c-btn.ci-calculate-btn:disabled:hover,
.c-btn.ci-calculate-btn:disabled:focus,
.c-btn.ci-calculate-btn:disabled:active {
    opacity: 0.5 !important;
    cursor: not-allowed !important;
    transform: none !important;
    box-shadow: none !important;
    background: #cccccc !important;
    background-color: #cccccc !important;
    background-image: none !important;
    color: #666666 !important;
    border-color: #cccccc !important;
}

/* Results section */
.ci-results-section {
    background: #f7fafc;
    border: 2px solid #f3f4f6;
    border-radius: var(--radius-lg);
    padding: 0 24px 24px 24px;
    margin-top: 0;
    max-width: 100%;
    overflow: hidden;
    box-shadow: none;
}
.ci-results-section h2 {
    text-align: center;
    margin-bottom: 32px !important;
    margin-top: -24px !important;
    padding-top: 24px !important;
}
.ci-main-result {
    background: #f8fafc;
    padding: 32px 24px;
    border-radius: 12px;
    text-align: center;
    margin-bottom: 24px;
    border: 1px solid #e2e8f0;
    display: none;
}

.ci-main-result h2 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 16px;
    text-align: center;
}

.ci-main-value {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.ci-breakdown {
    background: #f8fafc;
    padding: 24px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    margin-bottom: 32px;
    display: none;
}

.ci-breakdown-header {
    text-align: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e2e8f0;
}

.ci-breakdown-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
}

.ci-breakdown-items {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.ci-breakdown-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
}
.ci-breakdown-label {
    font-size: 0.95rem;
    font-weight: 400;
}
.ci-breakdown-value {
    font-size: 1.2rem;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.ci-breakdown-value.ci-difference {
    color: #059669;
}


/* Status card colors */
.status-card.surplus {
    border-left: 3px solid #10b981;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.02), rgba(16, 185, 129, 0.05));
}
.status-card.surplus .ci-result-value {
}
.status-card.shortfall {
    border-left: 3px solid #ef4444;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.02), rgba(239, 68, 68, 0.05));
}
.status-card.shortfall .ci-result-value {
}
/* Investment comparison cards */
.ci-option-a-card {
    border-left: 3px solid #3b82f6;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.02), rgba(59, 130, 246, 0.05));
}
.ci-option-b-card {
    border-left: 3px solid #8b5cf6;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.02), rgba(139, 92, 246, 0.05));
}
.ci-comparison-card.better-a {
    border-left: 3px solid #3b82f6;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.02), rgba(59, 130, 246, 0.05));
}
.ci-comparison-card.better-a .ci-result-value {
}
.ci-comparison-card.better-b {
    border-left: 3px solid #8b5cf6;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.02), rgba(139, 92, 246, 0.05));
}
.ci-comparison-card.better-b .ci-result-value {
}

/* Chart section */
.ci-chart-section {
    background: #f7fafc;
    padding: 16px 12px;
    border-radius: var(--radius-lg);
    margin: 0 0 20px 0;
    box-shadow: var(--shadow-sm);
    border: 1px solid #f3f4f6;
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
}
.ci-chart-section h2 {
    text-align: center;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f3f4f6;
    letter-spacing: -0.01em;
}
.ci-chart-container h2 {
    text-align: center;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f3f4f6;
    letter-spacing: -0.01em;
}
.ci-chart-container {
    position: relative;
    height: 380px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}
.ci-chart-container canvas {
    max-width: 100%;
    height: 380px !important;
    width: 100% !important;
}
/* Explanation text */
.ci-explanation-text {
    background: #ffffff;
    padding: 16px;
    border-radius: var(--radius-lg);
    margin: 16px 0;
    border-left: 3px solid #10b981;
    font-size: 0.8125rem;
    line-height: 1.4;
    box-shadow: var(--shadow-sm);
    border: 1px solid #e5e7eb;
    max-width: 100%;
    overflow-wrap: break-word;
    word-wrap: break-word;
    width: 100%;
    box-sizing: border-box;
}
/* CMS Testing Styles */

.c-matter__meta {
    display: none;
}

.c-matter--article .c-matter__body {
    max-width: 1170px;
}
@media (max-width: 950px) {
    .c-matter--article .c-matter__body {
        max-width: 750px;
        padding: 1.5rem;
    }
}

@media (max-width: 750px) {
    .c-matter--article .c-matter__body {
        max-width: 100%;
        margin: 10px;
        padding: 1rem;
        border-radius: 8px;
    }
}

/* Standard Breakpoints */
@media (max-width: 950px) {
    .ci-container {
        max-width: 750px;
        padding: 0 1.5rem;
        margin: 1.5rem auto 3rem auto;
    }
}

@media (max-width: 750px) {
    .ci-container {
        max-width: 100%;
        margin: 0.5rem auto 1rem auto;
        padding: 0 0.5rem;
    }
    /* Stack vertically on mobile */
    .ci-calculator-layout {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    .ci-results-column {
        position: static;
    }
    
    .ci-button-group {
        flex-direction: column;
        gap: 8px;
    }
    
    .ci-calculate-btn,
    .ci-reset-btn {
        width: 100%;
    }
    
    .ci-form-column {
        padding: 16px;
    }
    .ci-placeholder-content, 
    .ci-results-section {
        padding: 16px;
    }
    .ci-input-section h2 {
    }
    .ci-calculate-btn,
    .ci-reset-btn {
        width: 100%;
    }
    .ci-comparison-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    .ci-shared-settings {
        padding: 12px 0;
        max-width: none;
        margin-bottom: 0.5rem;
    }
    .ci-input-group {
        margin-bottom: 16px;
    }
    .ci-results-grid {
        grid-template-columns: 1fr;
    }
    .ci-result-value {
        font-size: 1.5rem;
    }
    .ci-print-btn,
    .ci-download-btn {
        width: 100%;
    }
}
@media (max-width: 480px) {
    .ci-form-column {
        padding: 12px;
    }
    .ci-placeholder-content, 
    .ci-results-section {
        padding: 12px;
    }
    .ci-main-result {
        padding: 24px 16px;
    }
    
    .ci-main-value {
        font-size: 2rem;
    }
    
    .ci-breakdown {
        padding: 20px 16px;
    }
    
    .ci-breakdown-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    .ci-chart-section {
        padding: 16px;
        margin: 16px 0;
    }
    .ci-chart-container h2 {
        margin-bottom: 16px;
    }
    .ci-chart-container {
        height: 300px;
    }
    .ci-explanation-text {
        padding: 16px;
        font-size: 1rem;
    }
}

/* Print styles */
@media print {
    body {
        background: white;
    }
    .ci-container {
        box-shadow: none;
        margin: 0;
        padding: 0;
    }
    .calculator-form {
        display: none;
    }
    .ci-results-section {
        background: white;
        border: 1px solid #333;
        padding: 30px;
    }
    .ci-result-card {
        box-shadow: none;
        border: 1px solid #333;
    }
}
