/* tools/tneb-bill-calculator/tneb.css */

/* Styles for the TNEB Bill Calculator tool - Total Redesign */

/* --- Overall Tool Page Layout --- */
.tool-page-main {
    padding: 4rem 0 5rem; 
    background-color: var(--bg-main);
}

.tool-container {
    max-width: 960px; 
    margin: 0 auto;
}

/* --- Tool Header (Title & Description) --- */
.tool-header {
    text-align: center;
    margin-top: 4rem; /* Space from the calculator card above it */
    margin-bottom: 4rem; /* Space before the next section */
}

.tool-icon-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.85rem; 
    margin-bottom: 1.2rem; 
}

.tool-icon {
    font-size: 3.5rem; 
    color: var(--accent-color);
}

.tool-header h1 {
    font-size: clamp(2.5rem, 6vw, 4rem); 
    font-weight: 900; 
    color: var(--text-primary);
    line-height: 1.15;
    margin-bottom: 0;
    letter-spacing: -0.03em; 
}

.tool-description {
    font-size: clamp(1rem, 2.5vw, 1.25rem); 
    color: var(--text-secondary);
    line-height: 1.7;
    max-width: 700px;
    margin: 0.8rem auto 0 auto;
}

/* --- Error Message Container --- */
.error-message-container {
    background-color: #fef2f2; 
    border: 1px solid #ef4444; 
    color: #b91c1c; 
    padding: 1rem 1.5rem; 
    border-radius: 10px; 
    margin-bottom: 2rem; 
    display: flex;
    align-items: center;
    gap: 0.75rem; 
    font-size: var(--fs-base); 
    box-shadow: 0 4px 10px rgba(0,0,0,0.05); 
    text-align: left; 
}
html[data-theme="dark"] .error-message-container {
    background-color: #3f0f0f;
    border-color: #dc2626;
    color: #ef4444;
}
.error-message-container p { 
    margin: 0;
}


/* --- Main Calculator Card REDESIGN --- */
.tneb-calculator-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 24px; /* More rounded, softer feel */
    box-shadow: 0 15px 50px rgba(0,0,0,0.1); /* Deeper, more diffused shadow */
    
    height: 85vh; /* Fixed height for the card */
    display: flex; /* Main card is a flex container */
    flex-direction: column; /* Stack tabs and inner grid vertically */
    overflow: hidden; /* Hide scrollbars of the main card itself */

    margin-bottom: 4rem; 
    max-width: 850px; 
    margin-left: auto;
    margin-right: auto;
}
html[data-theme="dark"] .tneb-calculator-card {
    box-shadow: 0 15px 50px rgba(0,0,0,0.3);
}

/* NEW: Inner Grid for Calculator Content (below tabs) */
.calculator-inner-grid {
    flex-grow: 1; /* Allows this grid to fill remaining height after tabs */
    display: grid;
    grid-template-columns: 1.2fr 1fr; /* Custom split: input panel is bigger than result */
    gap: var(--space-xl); /* Gap between the two main panels */
    padding: var(--space-xl); /* Padding for the grid content area */
    overflow: hidden; /* Important for managing child scrolls */
}

/* NEW: Input Panel (left side/top) */
.input-panel {
    display: flex;
    flex-direction: column;
    height: 100%; /* Take full height of its grid cell */
    position: relative;
    padding-right: var(--space-lg); /* Padding from the divider */
    border-right: 1px solid var(--border-color); /* Visual divider */
    overflow-y: auto; /* Allow internal scrolling if content is too tall */
    padding-bottom: var(--space-lg); /* Ensure padding for scroll area */
}
html[data-theme="dark"] .input-panel {
    border-right-color: var(--border-grid-gray-dark);
}
.input-panel::-webkit-scrollbar {
    width: 6px; /* Narrower scrollbar for side panel */
}
.input-panel::-webkit-scrollbar-track {
    background: var(--bg-highlight);
    border-radius: 10px;
}
.input-panel::-webkit-scrollbar-thumb {
    background: var(--accent-color);
    border-radius: 10px;
}
.input-panel::-webkit-scrollbar-thumb:hover {
    background: var(--btn-primary-hover);
}


/* NEW: Result Display Panel (right side/bottom) */
.result-display-panel {
    display: flex;
    flex-direction: column;
    height: 100%; /* Take full height of its grid cell */
    position: relative;
    overflow-y: auto; /* Allow internal scrolling if content is too tall */
    padding-left: var(--space-lg); /* Padding from the divider */
    padding-bottom: var(--space-lg); /* Ensure padding for scroll area */
}
.result-display-panel::-webkit-scrollbar {
    width: 6px; /* Narrower scrollbar for side panel */
}
.result-display-panel::-webkit-scrollbar-track {
    background: var(--bg-highlight);
    border-radius: 10px;
}
.result-display-panel::-webkit-scrollbar-thumb {
    background: var(--accent-color);
    border-radius: 10px;
}
.result-display-panel::-webkit-scrollbar-thumb:hover {
    background: var(--btn-primary-hover);
}


/* --- Tabs Navigation (Integrated into Card) --- */
.tabs-container {
    display: flex;
    align-items: center;
    justify-content: space-between; 
    padding: 0.8rem 1.5rem; /* Adjusted padding for tabs container */
    border-bottom: 1px solid var(--border-color);
    background-color: var(--bg-highlight); 
    flex-shrink: 0; 
    border-radius: 24px 24px 0 0; 
    position: relative;
    z-index: 2; 
}
html[data-theme="dark"] .tabs-container {
    background-color: var(--bg-main); 
}

.m3-tabs {
    display: flex;
    flex-grow: 1;
    overflow-x: auto; 
    -webkit-overflow-scrolling: touch; 
    scrollbar-width: none; 
    -ms-overflow-style: none; 
    border-bottom: none; 
    padding-bottom: 0; 
    align-items: stretch; 
    gap: 0.5rem; 
}
.m3-tabs::-webkit-scrollbar { display: none; }

.m3-tab {
    flex-shrink: 0; 
    padding: 0.8rem 1.2rem; 
    background: transparent;
    border: none;
    font-size: var(--fs-sm); 
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    position: relative;
    transition: color 0.2s, background-color 0.2s, transform 0.1s;
    border-radius: 10px; 
    margin: 0.2rem; 
}

.m3-tab::after { 
    content: '';
    position: absolute;
    bottom: -0.5rem; 
    left: 50%;
    transform: translateX(-50%) scaleX(0); 
    width: calc(100% - 1rem); 
    height: 3px;
    background-color: var(--accent-color);
    border-radius: 2px;
    transition: transform 0.3s ease-out;
}

.m3-tab:hover {
    background-color: color-mix(in srgb, var(--accent-color) 8%, var(--bg-highlight) 92%); 
    color: var(--text-primary);
    transform: translateY(-2px); 
}
html[data-theme="dark"] .m3-tab:hover {
    background-color: color-mix(in srgb, var(--accent-color) 12%, var(--bg-main) 88%);
}

.m3-tab.active {
    color: var(--accent-color);
    font-weight: 600;
    background-color: var(--bg-main); /* Match background for a clearer tab */
    box-shadow: 0 2px 8px rgba(0,0,0,0.05); /* Subtle shadow for active tab */
}
.m3-tab.active::after { 
    transform: translateX(-50%) scaleX(1);
}
html[data-theme="dark"] .m3-tab.active {
    background-color: var(--bg-card); /* Darker background in dark mode */
}

.tab-scroll-button {
    background-color: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    width: 36px; 
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.4rem; 
    color: var(--text-secondary);
    transition: background-color 0.2s, color 0.2s, box-shadow 0.2s, transform 0.1s;
    flex-shrink: 0;
    z-index: 5; 
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}
.tab-scroll-button:hover {
    background-color: var(--bg-highlight);
    color: var(--text-primary);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transform: translateY(-1px);
}
.tab-scroll-button:disabled {
    opacity: 0.4; 
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}
.tab-scroll-button.prev { margin-right: 0.75rem; } 
.tab-scroll-button.next { margin-left: 0.75rem; } 


.m3-tab-panels {
    padding-top: 2rem; /* Initial padding, can be overridden by tab panels */
    flex-grow: 1; 
    overflow-y: hidden; /* Hide panel scroll here, content scrolls inside input-panel/result-panel */
    display: flex; /* Make this a flex container for panels */
    flex-direction: column; /* Stack sections */
}

.m3-tab-panel {
    display: none; 
    flex-grow: 1; /* Allow each panel to grow */
    overflow-y: hidden; /* Managed by parent .m3-tab-panels */
}
.m3-tab-panel.active {
    display: flex; /* Show as flex to correctly use inner layout */
    flex-direction: column; /* Stack content within panel */
    height: 100%; /* Occupy full height of parent .m3-tab-panels */
}

.section-title-within-tab {
    font-size: clamp(1.6rem, 3.5vw, 2.2rem); 
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    text-align: left; 
}

/* --- Calculator Layouts (Input/Quick Result/Full Result) --- */
.calculator-sub-layout {
    display: flex;
    flex-direction: column; /* Stack input and quick result vertically always within the panel */
    gap: var(--space-xl); /* Adjusted gap */
    align-items: stretch; /* Stretch items to fill width */
    flex-grow: 1; /* Allow this layout to grow */
}
.input-area-wrapper {
    flex-shrink: 0; /* Prevent form area from shrinking too much */
    margin-bottom: 0; /* No margin here, gap handles it */
}

/* --- Form Styles --- */
.form-group {
    margin-bottom: 1.5rem; 
}
.form-group label {
    font-size: var(--fs-md); 
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.75rem; 
}
.form-control {
    width: 100%;
    padding: 0.85rem 1.2rem; 
    font-size: var(--fs-base); 
    border: 1px solid var(--border-color);
    border-radius: 10px; 
    background-color: var(--bg-main);
    color: var(--text-primary);
    transition: border-color 0.2s, box-shadow 0.2s;
}
.form-control:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(76, 81, 191, 0.2); 
}
html[data-theme="dark"] .form-control {
    background-color: var(--bg-card);
}
html[data-theme="dark"] .form-control:focus {
    box-shadow: 0 0 0 3px rgba(129, 140, 248, 0.2);
}

.form-text {
    font-size: var(--fs-sm);
    color: var(--text-secondary);
    margin-top: 0.6rem; 
    display: block;
    line-height: 1.5;
}

.form-actions {
    display: flex;
    gap: 1rem; 
    margin-top: 2rem; 
    flex-wrap: wrap;
}
.form-actions .btn {
    flex-grow: 1;
    max-width: 250px; 
    font-size: var(--fs-base); 
    padding: 0.9rem 1.5rem; 
    border-radius: 10px; 
}

/* --- Quick Result Display --- */
.quick-result-display {
    padding: 2rem; 
    background-color: var(--bg-highlight); 
    border: 1px solid var(--border-color);
    border-radius: 16px; 
    font-size: var(--fs-lg);
    font-weight: 500;
    color: var(--text-primary);
    text-align: center;
    display: flex;
    flex-direction: column; 
    align-items: center;
    justify-content: center;
    height: fit-content; 
    box-shadow: inset 0 0 8px rgba(0,0,0,0.05); 
    min-width: 250px; 
}
.quick-result-display strong {
    font-size: 1.8em; 
    font-weight: 800;
    color: var(--accent-color);
    margin-top: 0.5rem; 
    white-space: nowrap;
}

/* --- Full Result Area --- */
.result-display-panel { /* This is the right side of the main calculator grid */
    display: flex;
    flex-direction: column;
    height: 100%; 
    position: relative;
    overflow-y: auto; /* Internal scrolling for the right result panel */
    padding-left: var(--space-lg); /* Padding from the divider */
    padding-bottom: var(--space-lg); /* Ensure padding for scroll area */
}
.result-display-panel::-webkit-scrollbar {
    width: 6px; 
}
.result-display-panel::-webkit-scrollbar-track {
    background: var(--bg-highlight);
    border-radius: 10px;
}
.result-display-panel::-webkit-scrollbar-thumb {
    background: var(--accent-color);
    border-radius: 10px;
}
.result-display-panel::-webkit-scrollbar-thumb:hover {
    background: var(--btn-primary-hover);
}


.result-area { /* Individual result sections within the panel */
    padding: var(--space-xl); /* Adjusted padding */
    border-radius: 16px; /* Adjusted rounding */
    margin-top: 0; /* Remove top margin, handled by panel padding/spacing */
    box-shadow: 0 4px 15px rgba(0,0,0,0.05); /* Softer shadow */
    margin-bottom: var(--space-lg); /* Space between multiple result areas */
}
.result-area:last-child {
    margin-bottom: 0;
}


.result-area .column-title {
    font-size: var(--fs-lg); 
    margin-bottom: 1.5rem;
    text-align: left;
}

.result-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); 
    gap: 1.2rem; 
    margin-bottom: 2rem; 
}

.result-item {
    background-color: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: 12px; 
    padding: 1rem 1.2rem; 
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.3rem; 
}
html[data-theme="dark"] .result-item {
    background-color: var(--bg-card); 
}

.result-label {
    font-size: var(--fs-sm);
    color: var(--text-secondary);
    font-weight: 500;
}

.result-value {
    font-size: var(--fs-base);
    color: var(--text-primary);
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.result-item.total-highlight {
    background-color: color-mix(in srgb, var(--accent-color) 10%, transparent); 
    border-color: var(--accent-color);
    box-shadow: 0 2px 8px rgba(76, 81, 191, 0.15); 
}
html[data-theme="dark"] .result-item.total-highlight {
    background-color: color-mix(in srgb, var(--accent-color) 15%, transparent);
    box-shadow: 0 2px 8px rgba(129, 140, 248, 0.15);
}
.result-item.total-highlight .result-label {
    color: var(--text-primary); 
}
.result-item.total-highlight .result-value {
    font-size: var(--fs-xl); 
    color: var(--accent-color); 
}

.subsidy-note {
    margin-top: 1.5rem; 
    padding: 0.8rem 1.2rem; 
    background-color: var(--bg-highlight);
    border: 1px solid var(--border-color);
    border-radius: 10px; 
    font-size: var(--fs-sm); 
}
html[data-theme="dark"] .subsidy-note {
    background-color: var(--bg-main); 
}

.breakdown-title {
    margin-top: 2.5rem; 
    margin-bottom: 0.8rem; 
    text-align: left;
}

.calculation-breakdown-box {
    background-color: var(--bg-main);
    border: 1px dashed var(--border-color);
    border-radius: 10px; 
    padding: 1.2rem; 
    font-family: 'Fira Code', monospace;
    font-size: var(--fs-sm);
    color: var(--text-primary);
    white-space: pre-wrap; 
    word-break: break-all; 
    overflow-x: auto; 
    max-height: 250px; 
}
html[data-theme="dark"] .calculation-breakdown-box {
    background-color: var(--bg-card);
}

.result-actions {
    margin-top: 2.5rem; 
    justify-content: flex-end; 
}


/* --- Processing Message for R2U --- */
.processing-message {
    padding: 1rem 1.5rem; 
    background-color: #fffbeb; 
    border: 1px solid #fcd34d; 
    color: #b45309; 
    border-radius: 10px; 
    text-align: center;
    margin-top: var(--space-xl); 
    box-shadow: 0 2px 8px rgba(0,0,0,0.05); 
}
html[data-theme="dark"] .processing-message {
    background-color: #4a320c;
    border-color: #d97706;
    color: #fcd34d;
}

.warning-note {
    background-color: #fef2f2; 
    border: 1px solid #ef4444; 
    color: #b91c1c; 
    padding: 1rem 1.5rem;
    margin-top: 2rem; 
    border-radius: 10px; 
    box-shadow: 0 2px 8px rgba(0,0,0,0.05); 
}
html[data-theme="dark"] .warning-note {
    background-color: #3f0f0f;
    border-color: #dc2626;
    color: #ef4444;
}

/* --- Tariff Info Section (using general .info-section, .card styles) --- */
.info-section { 
    padding: var(--space-xxl); 
    margin-top: 4rem;
    margin-bottom: 4rem;
    border-radius: 20px; 
    box-shadow: 0 10px 30px rgba(0,0,0,0.08); 
}

.info-section .column-title { 
    font-size: var(--fs-xl); 
    font-weight: 700;
    margin-bottom: 1rem; 
    text-align: left;
}
.info-section p { 
    font-size: var(--fs-base);
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 0.75rem; 
    padding: 0 0.5rem; 
}
.info-section p:last-of-type { 
    margin-bottom: 0;
}
.info-section .info-list {
    list-style: none;
    padding-left: 0;
    margin-bottom: 1.5rem;
}
.info-section .info-list li {
    font-size: var(--fs-base);
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    position: relative;
    padding-left: 1.5rem;
    padding-right: 0.5rem;
}
.info-section .info-list li::before {
    content: '•';
    color: var(--accent-color);
    position: absolute;
    left: 0;
    font-weight: bold;
}

.tariff-slabs-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1.5rem;
    margin-bottom: 2rem;
    font-size: var(--fs-base); 
    color: var(--text-primary);
    border-radius: 8px; 
    overflow: hidden; 
}
.tariff-slabs-table th, .tariff-slabs-table td {
    border: 1px solid var(--border-color);
    padding: 0.9rem 1.2rem; 
    text-align: left;
}
.tariff-slabs-table th {
    background-color: var(--bg-highlight);
    font-weight: 600;
    color: var(--text-primary);
}
html[data-theme="dark"] .tariff-slabs-table th {
    background-color: var(--bg-main);
}
.tariff-slabs-table tbody tr:nth-child(even) {
    background-color: var(--bg-main);
}
html[data-theme="dark"] .tariff-slabs-table tbody tr:nth-child(even) {
    background-color: var(--bg-card); 
}
.tariff-slabs-table td:last-child {
    font-weight: 500;
    white-space: nowrap;
}
.how-to-list { 
    list-style-type: decimal;
    padding-left: 1.5rem;
    margin-top: 1rem;
}
.how-to-list li {
    font-size: var(--fs-base);
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    line-height: 1.6;
    padding-right: 0.5rem;
}
.how-to-list li strong {
    color: var(--text-primary);
}


/* --- FAQ Section (Matching Homepage Style) --- */
/* These styles are intended to be inherited from components.css for .faq-section, .faq-item, etc. */


/* --- Support Tool CTA (on tool pages) --- */
.support-tool-cta { 
    padding: var(--space-xxl); 
    text-align: center;
    margin-top: 4rem; 
    margin-bottom: 4rem; 
    border-radius: 20px; 
    box-shadow: 0 10px 30px rgba(0,0,0,0.08); 
}
.support-tool-cta .support-tool-icon {
    font-size: 4rem; 
    color: var(--accent-color);
    margin-bottom: 1.5rem; 
}
.support-tool-cta h3 {
    font-size: var(--fs-xl);
    font-weight: 700;
    margin-bottom: 1rem;
}
.support-tool-cta p {
    font-size: var(--fs-base);
    color: var(--text-secondary);
    margin-bottom: 2rem; 
    line-height: 1.6;
}
.support-tool-cta .coffee-btn-small {
    font-size: var(--fs-base); 
    padding: 0.9rem 1.8rem; 
    border-radius: 10px; 
}

/* --- PDF Name Modal (specific to tneb tool) --- */
/* Uses .modal-overlay, .modal-content from ../../css/popup.css */
.modal-overlay { 
    display: none; 
}
.modal-overlay.visible {
    display: flex; 
}

.modal-content .modal-title {
    font-size: var(--fs-xl); 
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}
.modal-content .modal-description {
    font-size: var(--fs-base); 
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}
.modal-content .modal-close-btn { 
    width: 44px;
    height: 44px;
    font-size: 1.8rem;
}
.modal-content .form-control {
    text-align: center;
    font-size: var(--fs-base);
    padding: 0.85rem 1rem;
    border-radius: 10px;
}
.modal-content .modal-confirm-btn {
    width: 100%;
    font-size: var(--fs-base);
    padding: 0.9rem 1.5rem;
    border-radius: 10px;
}


/* --- Responsive Adjustments --- */
@media (max-width: 992px) { /* Tablets and larger mobiles */
    .tool-page-main {
        padding: 2.5rem 0 3.5rem;
    }
    .tool-header {
        margin-top: 2rem; 
        margin-bottom: 2.5rem;
    }
    .tool-icon {
        font-size: 2.5rem;
    }
    .tool-header h1 {
        font-size: clamp(1.8rem, 4.5vw, 2.5rem);
    }
    .tool-description {
        font-size: var(--fs-base);
        margin-top: 0.5rem;
    }

    .tneb-calculator-card {
        padding: 1.5rem;
        height: auto; /* Allow height to adjust on smaller screens */
        min-height: 70vh; /* Keep a minimum height */
    }

    /* NEW: Stack inner grid for mobile */
    .calculator-inner-grid {
        grid-template-columns: 1fr; /* Single column layout */
        gap: var(--space-xl); /* Adjusted gap */
        padding: var(--space-lg); /* Adjusted padding */
    }
    .input-panel {
        padding-right: 0;
        border-right: none; /* Remove divider */
        padding-bottom: var(--space-lg); /* Add bottom padding when stacked */
        border-bottom: 1px solid var(--border-color); /* Add a bottom border */
    }
    html[data-theme="dark"] .input-panel {
        border-bottom-color: var(--border-grid-gray-dark);
        border-right-color: transparent; /* Ensure right border is removed */
    }
    .result-display-panel {
        padding-left: 0;
        padding-top: var(--space-lg); /* Add top padding when stacked */
        margin-top: var(--space-lg); /* Space from input panel */
        border-top: 1px solid var(--border-color); /* Add a top border */
    }
    html[data-theme="dark"] .result-display-panel {
        border-top-color: var(--border-grid-gray-dark);
    }


    .m3-tab {
        padding: 0.8rem 1.2rem;
        font-size: var(--fs-sm);
    }
    .tab-scroll-button {
        width: 32px;
        height: 32px;
        font-size: 1.2rem;
    }
    .section-title-within-tab {
        font-size: 1.4rem;
        margin-bottom: 1rem;
    }

    .calculator-sub-layout {
        flex-direction: column; 
        gap: 1.5rem;
    }
    .input-area-wrapper {
        min-width: unset; 
        width: 100%;
    }
    .quick-result-display {
        width: 100%; 
        font-size: var(--fs-base);
        padding: 1rem;
    }
    .quick-result-display strong {
        font-size: 1.5em;
    }
    .form-actions {
        flex-direction: column;
        gap: 0.5rem;
        margin-top: 1rem;
    }
    .form-actions .btn {
        max-width: 100%;
        font-size: var(--fs-sm);
        padding: 0.7rem 1.2rem;
    }

    .result-area {
        padding: 1.5rem;
        margin-top: 0; /* Handled by result-display-panel padding-top */
    }
    .result-area .column-title {
        font-size: var(--fs-base);
        margin-bottom: 1rem;
    }
    .result-grid {
        grid-template-columns: 1fr; 
        gap: 0.75rem;
    }
    .result-item {
        padding: 0.6rem 0.8rem;
    }
    .result-label {
        font-size: var(--fs-xs);
    }
    .result-value {
        font-size: var(--fs-sm);
    }
    .result-item.total-highlight .result-value {
        font-size: var(--fs-base);
    }
    .subsidy-note, .warning-note {
        padding: 0.6rem 0.8rem;
        font-size: var(--fs-xs);
    }
    .breakdown-title {
        margin-top: 1.5rem;
    }
    .calculation-breakdown-box {
        padding: 0.8rem;
        font-size: 0.75rem;
    }
    .result-actions {
        margin-top: 1.5rem;
    }

    .info-section {
        padding: 2.5rem; 
        margin-top: 3rem;
        margin-bottom: 3rem;
        border-radius: 16px; 
        box-shadow: 0 5px 15px rgba(0,0,0,0.05); 
    }
    .info-section .column-title { 
        font-size: var(--fs-lg); 
        margin-bottom: 0.75rem; 
    }
    .info-section p {
        font-size: var(--fs-sm);
        margin-bottom: 0.5rem; 
        padding: 0; 
    }
    .info-list li,
    .how-to-list li {
        font-size: var(--fs-sm);
        padding-right: 0; 
    }
    .tariff-slabs-table {
        font-size: var(--fs-sm);
    }
    .tariff-slabs-table th, .tariff-slabs-table td {
        padding: 0.7rem;
    }
    .how-to-list li {
        font-size: var(--fs-sm);
    }

    .support-tool-cta {
        padding: 2.5rem;
        margin-top: 3rem;
        margin-bottom: 3rem;
    }
    .support-tool-cta .support-tool-icon {
        font-size: 3rem;
    }
    .support-tool-cta h3 {
        font-size: var(--fs-lg);
    }
    .support-tool-cta p {
        font-size: var(--fs-sm);
    }
    .support-tool-cta .coffee-btn-small {
        font-size: var(--fs-xs);
        padding: 0.6rem 1.2rem;
    }

    .modal-content {
        padding: 1.5rem;
    }
    .modal-content .modal-title {
        font-size: var(--fs-base);
    }
    .modal-content .modal-description {
        font-size: var(--fs-sm);
    }
    .modal-content .form-control {
        font-size: var(--fs-sm);
    }
    .modal-content .modal-confirm-btn {
        font-size: var(--fs-sm);
    }
    .modal-content .modal-close-btn {
        width: 36px;
        height: 36px;
        font-size: 1.3rem;
    }
}

@media (max-width: 576px) { /* Smaller mobiles */
    .tool-page-main {
        padding: 1.5rem 0 2rem;
    }
    .tool-header {
        margin-top: 1.5rem; 
        margin-bottom: 1.5rem;
    }
    .tool-icon {
        font-size: 2rem;
    }
    .tool-header h1 {
        font-size: clamp(1.5rem, 4vw, 2rem);
    }
    .tool-description {
        font-size: var(--fs-sm);
        margin-top: 0.4rem;
    }

    .tneb-calculator-card {
        padding: 1rem;
        height: auto; 
        min-height: 60vh; 
    }

    .m3-tabs {
        padding-bottom: 0.3rem;
        gap: 0.2rem;
    }
    .m3-tab {
        padding: 0.6rem 0.8rem;
        font-size: var(--fs-xs);
    }
    .tab-scroll-button {
        width: 24px;
        height: 24px;
        font-size: 0.9rem;
    }
    .section-title-within-tab {
        font-size: 1.2rem;
        margin-bottom: 0.8rem;
    }

    .quick-result-display {
        font-size: var(--fs-sm);
        padding: 0.8rem;
    }
    .quick-result-display strong {
        font-size: 1.2em;
    }

    .form-group label {
        font-size: var(--fs-sm);
    }
    .form-control {
        padding: 0.5rem 0.75rem;
        font-size: var(--fs-sm);
        col
    }
    .form-text {
        font-size: 0.7rem;
    }
    .form-actions {
        margin-top: 0.8rem;
    }
    .form-actions .btn {
        font-size: var(--fs-xs);
        padding: 0.5rem 0.8rem;
    }

    .result-area {
        padding: 1rem;
        margin-top: var(--space-xl);
    }
    .result-area .column-title {
        font-size: var(--fs-sm);
    }
    .result-item {
        padding: 0.5rem 0.6rem;
    }
    .result-label {
        font-size: 0.65rem;
    }
    .result-value {
        font-size: var(--fs-xs);
    }
    .result-item.total-highlight .result-value {
        font-size: var(--fs-sm);
    }
    .subsidy-note, .warning-note {
        padding: 0.5rem 0.6rem;
        font-size: 0.7rem;
    }
    .breakdown-title {
        margin-top: 1rem;
    }
    .calculation-breakdown-box {
        padding: 0.6rem;
        font-size: 0.7rem;
    }

    .info-section {
        padding: 1.5rem; 
        margin-top: 1.5rem;
        margin-bottom: 1.5rem;
    }
    .info-section .column-title {
        font-size: var(--fs-sm);
        margin-bottom: 0.5rem; 
    }
    .info-section p {
        font-size: var(--fs-xs);
        margin-bottom: 0.4rem; 
        padding: 0; 
    }
    .info-list li,
    .how-to-list li {
        font-size: var(--fs-xs);
        padding-right: 0;
        margin-bottom: 0.3rem; 
    }
    .tariff-slabs-table {
        font-size: 0.6rem; 
    }
    .tariff-slabs-table th, .tariff-slabs-table td {
        padding: 0.4rem;
    }
    .how-to-list li strong {
        font-size: var(--fs-xs);
    }


    .support-tool-cta {
        padding: 1.5rem;
        margin-top: 1.5rem;
        margin-bottom: 1.5rem;
    }
    .support-tool-cta .support-tool-icon {
        font-size: 2.2rem;
    }
    .support-tool-cta h3 {
        font-size: var(--fs-base);
    }
    .support-tool-cta p {
        font-size: var(--fs-xs);
    }
    .support-tool-cta .coffee-btn-small {
        font-size: var(--fs-xs);
        padding: 0.5rem 1rem;
    }

    .modal-content {
        padding: 1rem;
    }
    .modal-content .modal-title {
        font-size: var(--fs-sm);
    }
    .modal-content .modal-description {
        font-size: var(--fs-xs);
    }
    .modal-content .form-control {
        font-size: var(--fs-xs);
    }
    .modal-content .modal-confirm-btn {
        font-size: var(--fs-xs);
    }
    .modal-content .modal-close-btn {
        width: 32px;
        height: 32px;
        font-size: 1.2rem;
    }
}