/* Calculator Specific Styles */
.calculator-container {
    background-color: #ffffff;
    max-width: 32rem; /* Reduced */
    margin-left: auto;
    margin-right: auto;
    padding: 1.5rem; /* Reduced */
    border-radius: 0.6rem; /* Reduced */
    box-shadow: 0 6px 20px rgba(0,0,0,0.07);
}

.calculator-input-field, .calculator-select-field {
    background-color: var(--card-bg-color) !important;
    border: 1px solid var(--apple-gray-medium);
    color: #092b49;
    padding: 0.6rem;
    border-radius: 0.4rem;
    width: 100%;
    font-size: 0.9rem;
    /* For select elements, to ensure consistent appearance: */
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    /* Add a background image for the dropdown arrow if you use appearance: none */
    background-image: url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23007AFF%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.4-5.4-13z%22/%3E%3C/svg%3E'); /* Basic blue arrow, you can customize color or use your own SVG */
    background-repeat: no-repeat;
    background-position: right 0.7em top 50%, 0 0;
    background-size: 0.65em auto, 100%;
    padding-right: 2em; /* Make space for the arrow */
}

.calculator-input-field:focus, .calculator-select-field:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--primary-color) 20%, transparent); /* Reduced shadow spread */
}

.form-label {
    color: #092b49;
    font-weight: 600; /* Made bolder to stand out */
    display: block;
    margin-bottom: 0.25rem; /* Adjusted for spacing */
    font-size: 0.9rem;   /* Made slightly larger to stand out */
}

.results-area {
    background-color: #fff;
    border: 1.5px solid var(--primary-color); /* Optional: slightly thinner border */
    padding: 0.75rem; /* Reduced */
    border-radius: 0.4rem; /* Reduced */
    text-align: center;
}

#savingsAmount_calculator {
    color: #092b49;
    font-size: 1.6rem; /* Reduced */
    font-weight: bold;
}

#errorMessage_calculator {
    background-color: var(--apple-error-bg);
    color: var(--apple-error-text);
    padding: 0.6rem; /* Reduced */
    border-radius: 0.4rem; /* Reduced */
    text-align: center;
    font-weight: 500;
    font-size: 0.85rem; /* Scaled text */
}

/* For general helper text like "Avg CA ~$10-13" */
.product-note {
    color: var(--apple-gray-medium);
    font-size: 0.7rem;  /* Adjusted for field notes */
    margin-top: 0.15rem; /* Adjusted for new font size */
}

/* Class for the main disclaimer text at the bottom */
.calculator-main-disclaimer {
    color: var(--apple-gray-medium);
    font-size: 0.5rem; /* Made this specific disclaimer text the smallest */
    margin-top: 0.75rem; /* Give it some space from the button */
    text-align: center; /* Assuming you want it centered */
}

.hidden {
    display: none !important;
}

/* Button Styles */
.btn {
    padding: 1rem 1.75rem; /* Reduced */
    border-radius: 0.4rem; /* Reduced */
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: all 0.2s ease;
    text-align: center;
    cursor: pointer;
    font-size: 0.9rem; /* Scaled button text */
    margin-top: 1.5rem; /* Added margin-top to move button down */
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--card-bg-color) !important;
}

html.dark .btn-primary {
    color: var(--text-color) !important;
}

.btn-primary:hover {
    filter: brightness(115%);
    transform: translateY(-1px); /* Slightly reduced hover effect */
}

/* Add these variables to your main stylesheet for theme compatibility.
Ensure these are defined, as the calculator CSS relies on them.
*/
/*
:root {
    --color-primary-light: #002039;
    --color-secondary-light: #FF9500;
    --color-text-light: #1c1c1e;
    --color-bg-light: #f2f2f7;
    --color-card-bg-light: #ffffff;
    --apple-gray-medium: #86868b; /* Used for product-note, main-disclaimer, field borders */
    --apple-error-text: #bf0a28;
    --apple-error-bg: #fdecea;

    --color-primary-dark: #0A84FF; /* Used for primary color in dark mode */
    --color-text-dark: #E5E5EA;    /* Used for text color in dark mode */
    --color-bg-dark: #0d1b2a;
    --color-card-bg-dark: #1b263b; /* Used for field backgrounds in dark mode */
    --apple-gray-medium-dark: #8e8e93; /* Used for product-note, etc. in dark mode */
    --apple-error-text-dark: #ff8a80;
    --apple-error-bg-dark: #4d2323;
}

html.light {
    --primary-color: var(--color-primary-light);
    --text-color: var(--color-text-light);
    --bg-color: var(--color-bg-light);
    --card-bg-color: var(--color-card-bg-light);
    /* Ensure apple-gray variables are correctly assigned for light mode */
    --apple-gray-medium: var(--apple-gray-medium); 
    --apple-error-text: var(--apple-error-text);
    --apple-error-bg: var(--apple-error-bg);
}

html.dark {
    --primary-color: var(--color-primary-dark);
    --text-color: var(--color-text-dark);
    --bg-color: var(--color-bg-dark);
    --card-bg-color: var(--color-card-bg-dark);
    /* Ensure apple-gray variables are correctly assigned for dark mode */
    --apple-gray-medium: var(--apple-gray-medium-dark); 
    --apple-error-text: var(--apple-error-text-dark);
    --apple-error-bg: var(--apple-error-bg-dark);
}
*/