/* =========================================
   Pittsburgh Property Tax Calculator Styles
   ========================================= */

/* 1. Global Styling and Typography */
body { 
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; 
    margin: 0;
    padding: 40px 20px;
    background-color: #f4f6f8; 
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
}

/* 2. Calculator Container (The Card) */
.calculator { 
    border: none;
    padding: 30px;
    width: 100%; 
    max-width: 450px; 
    background-color: #ffffff; 
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

h2 {
    text-align: center;
    color: #1f375f; /* Deep Navy Blue */
    margin-top: 0;
    margin-bottom: 20px;
}

p {
    font-size: 0.9em;
    color: #666;
    line-height: 1.5;
    margin-bottom: 25px;
}

/* 3. Form Elements (Inputs & Labels) */
label { 
    font-weight: 600;
    color: #333;
    display: block; 
    margin-bottom: 8px;
}

input[type="number"] { 
    width: 100%; 
    padding: 12px; 
    margin-bottom: 20px; 
    box-sizing: border-box;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 1em;
    transition: border-color 0.3s;
}

input[type="number"]:focus {
    border-color: #ffb81c; /* Pittsburgh Gold */
    outline: none;
}

/* Checkbox Styling */
.checkbox-container {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    cursor: pointer;
}

.checkbox-container input[type="checkbox"] {
    margin-right: 12px;
    height: 18px;
    width: 18px;
    cursor: pointer;
}

.checkbox-container label {
    font-weight: normal;
    margin-bottom: 0;
    cursor: pointer;
}

/* 4. Button */
button { 
    width: 100%; 
    padding: 14px; 
    background-color: #1f375f; 
    color: white; 
    border: none; 
    cursor: pointer; 
    border-radius: 6px;
    font-size: 1.1em;
    font-weight: bold;
    margin-top: 10px;
    transition: background-color 0.2s;
}

button:hover {
    background-color: #0c1a33;
}

/* 5. Results Table Styling */
.results-container { 
    margin-top: 30px; 
    padding: 20px; 
    background-color: #e6eef5; 
    border: 1px solid #d0d7e0;
    border-radius: 8px; 
}

.results-container h3 {
    color: #1f375f;
    margin: 0 0 15px 0;
    border-bottom: 2px solid #ffb81c; /* Gold accent line */
    padding-bottom: 5px;
}

.results-container h4 {
    margin: 0 0 15px 0;
    font-size: 1em;
    color: #444;
}

.tax-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9em; /* Balanced size for readability and fit */
}

.tax-table th {
    color: #1f375f;
    padding-bottom: 10px;
    border-bottom: 1px solid #c0c8d1;
}

.tax-table td {
    padding: 10px 0;
    border-bottom: 1px solid #dce4ec;
}

/* Right-align columns 2, 3, and 4 (The currency numbers) */
.tax-table td:not(:first-child), 
.tax-table th:not(:first-child) {
    text-align: right;
    padding-right: 15px; /* Adds a little breathing room on the right */
}

/* Ensure the font looks clean for numbers */
.tax-table td {
    font-variant-numeric: tabular-nums; /* Keeps numbers aligned vertically */
}

/* Left-align the first column (The tax names) */
.tax-table tr > *:first-child {
    text-align: left;
    font-weight: 600;
}

.total-row td {
    border-top: 2px solid #1f375f;
    border-bottom: none;
    font-weight: normal !important;
    font-size: 1.0em;
    color: #1f375f;
    padding-top: 15px;
}

/* 6. Callouts and Errors */
.increase-callout {
    text-align: center;
    padding: 12px;
    border-radius: 6px;
    margin-top: 20px;
    font-weight: bold;
}

.increase-callout.positive {
    background-color: #ffe0e0; 
    color: #cc0000; 
}

.increase-callout.negative {
    background-color: #e0fff0; 
    color: #008000; 
}

.error { 
    color: #cc0000; 
    font-weight: bold; 
    text-align: center; 
    background-color: #fff0f0;
    padding: 10px;
    border-radius: 6px;
}

/* 7. Responsive Media Query for Mobile */
@media screen and (max-width: 480px) {
    .calculator {
        padding: 15px 10px; /* Reduce outer padding */
    }
    
    .tax-table {
        font-size: 0.75em; /* Slightly smaller for mobile */
    }

    .tax-table td, .tax-table th {
        padding: 8px 2px; /* Tighten the cell padding significantly */
    }

    .tax-table td:not(:first-child), 
    .tax-table th:not(:first-child) {
        padding-right: 2px; /* Remove the 15px gap on mobile */
    }
}