/* =========================================================
   CalcAtlas — Automotive
   Fuel Cost Calculator
   Scoped styles; used alongside main.css and calculator.css
   ========================================================= */

.fuel-cost-page {
    padding-bottom: 3rem;
}

.fuel-cost-intro {
    max-width: 820px;
    margin: 0 0 2rem;
}

.fuel-cost-intro h1 {
    margin-bottom: 0.75rem;
}

.fuel-cost-intro p {
    max-width: 760px;
    line-height: 1.7;
}

.fuel-cost-calculator {
    max-width: 920px;
    margin: 0 0 3rem;
}

.fuel-cost-card,
.fuel-cost-results {
    background: #fff;
    border: 1px solid #dfe7eb;
    border-radius: 14px;
    box-shadow: 0 8px 24px rgba(24, 55, 70, 0.06);
}

.fuel-cost-card {
    padding: 1.5rem;
}

.fuel-cost-card h2 {
    margin-top: 0;
    margin-bottom: 1.25rem;
}

.fuel-cost-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.15rem 1.25rem;
}

.fuel-cost-field {
    min-width: 0;
}

.fuel-cost-field label {
    display: block;
    margin-bottom: 0.45rem;
    font-weight: 700;
    line-height: 1.35;
}

.fuel-cost-field input,
.fuel-cost-field select {
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    padding: 0.78rem 0.85rem;
    border: 1px solid #bdcbd2;
    border-radius: 8px;
    background: #fff;
    color: #183746;
    font: inherit;
    line-height: 1.25;
}

.fuel-cost-field input:focus,
.fuel-cost-field select:focus {
    outline: 2px solid rgba(51, 123, 152, 0.22);
    outline-offset: 1px;
    border-color: #337b98;
}

.fuel-cost-help {
    margin: 0.4rem 0 0;
    color: #5c6f78;
    font-size: 0.9rem;
    line-height: 1.5;
}

.fuel-cost-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.fuel-cost-primary-btn,
.fuel-cost-secondary-btn {
    min-width: 130px;
    padding: 0.8rem 1.1rem;
    border-radius: 8px;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.fuel-cost-primary-btn {
    border: 1px solid #2d6e89;
    background: #337b98;
    color: #fff;
}

.fuel-cost-primary-btn:hover,
.fuel-cost-primary-btn:focus-visible {
    background: #2d6e89;
}

.fuel-cost-secondary-btn {
    border: 1px solid #bdcbd2;
    background: #fff;
    color: #294b5a;
}

.fuel-cost-secondary-btn:hover,
.fuel-cost-secondary-btn:focus-visible {
    background: #f3f6f7;
}

.fuel-cost-error {
    margin-top: 1rem;
    margin-bottom: 0;
    padding: 0.85rem 1rem;
    border: 1px solid #c77b7b;
    border-radius: 8px;
    background: #fff7f7;
    color: #7a2424;
    line-height: 1.5;
}

.fuel-cost-results {
    margin-top: 1.5rem;
    overflow: hidden;
}

.fuel-cost-result-hero {
    padding: 1.5rem;
    border-bottom: 1px solid #dfe7eb;
    text-align: center;
}

.fuel-cost-result-label {
    display: block;
    margin-bottom: 0.35rem;
    color: #526b76;
    font-size: 0.95rem;
    font-weight: 700;
}

.fuel-cost-result-hero strong {
    display: block;
    color: #245d75;
    font-size: clamp(2rem, 6vw, 3rem);
    line-height: 1.1;
}

.fuel-cost-result-hero > span:last-child {
    display: block;
    margin-top: 0.4rem;
    color: #5c6f78;
}

.fuel-cost-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    border-bottom: 1px solid #dfe7eb;
}

.fuel-cost-summary-card {
    padding: 1.1rem;
    border-right: 1px solid #dfe7eb;
    text-align: center;
}

.fuel-cost-summary-card:last-child {
    border-right: 0;
}

.fuel-cost-summary-card span {
    display: block;
    margin-bottom: 0.35rem;
    color: #5c6f78;
    font-size: 0.87rem;
}

.fuel-cost-summary-card strong {
    display: block;
    color: #183746;
    font-size: 1.08rem;
}

.fuel-cost-breakdown {
    padding: 1.5rem;
}

.fuel-cost-breakdown h3 {
    margin-top: 0;
}

.fuel-cost-table-wrap {
    position: relative;
    width: 100%;
    overflow-x: auto;
    padding-bottom: 10px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: auto;
    scrollbar-color: #7c929c #e3eaed;
}

.fuel-cost-table-wrap::-webkit-scrollbar {
    height: 10px;
}

.fuel-cost-table-wrap::-webkit-scrollbar-track {
    background: #e3eaed;
    border-radius: 10px;
}

.fuel-cost-table-wrap::-webkit-scrollbar-thumb {
    background: #7c929c;
    border-radius: 10px;
    border: 2px solid #e3eaed;
}

.fuel-cost-table-wrap::-webkit-scrollbar-thumb:hover {
    background: #5f7884;
}

.fuel-cost-table {
    width: 100%;
    min-width: 540px;
    border-collapse: collapse;
}

.fuel-cost-table th,
.fuel-cost-table td {
    padding: 0.8rem 0.75rem;
    border-bottom: 1px solid #e5ecef;
    text-align: left;
    vertical-align: top;
}

.fuel-cost-table th {
    width: 52%;
    color: #365461;
    font-weight: 700;
}

.fuel-cost-table td {
    color: #183746;
}

.fuel-cost-result-note {
    margin: 1rem 0 0;
    color: #5c6f78;
    line-height: 1.6;
}

.fuel-cost-content {
    max-width: 920px;
}

.fuel-cost-content h2 {
    margin-top: 2.25rem;
}

.fuel-cost-content p {
    line-height: 1.72;
}

.fuel-cost-formula-box {
    margin: 1.25rem 0 1.75rem;
    padding: 1rem 1.15rem;
    border-left: 4px solid #337b98;
    border-radius: 0 8px 8px 0;
    background: #f4f8fa;
}

.fuel-cost-formula-box p {
    margin: 0.25rem 0;
}

.fuel-cost-method-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.fuel-cost-info-card {
    padding: 1rem;
    border: 1px solid #dfe7eb;
    border-radius: 10px;
    background: #fff;
}

.fuel-cost-info-card h3 {
    margin-top: 0;
    margin-bottom: 0.55rem;
    font-size: 1.05rem;
}

.fuel-cost-info-card p {
    margin-bottom: 0;
}

.fuel-cost-faq article {
    padding: 1rem 0;
    border-bottom: 1px solid #e4ebee;
}

.fuel-cost-faq article:last-child {
    border-bottom: 0;
}

.fuel-cost-faq h3 {
    margin: 0 0 0.45rem;
    font-size: 1.05rem;
}

.fuel-cost-faq p {
    margin: 0;
}

@media (max-width: 800px) {
    .fuel-cost-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .fuel-cost-summary-card:nth-child(2) {
        border-right: 0;
    }

    .fuel-cost-summary-card:nth-child(-n+2) {
        border-bottom: 1px solid #dfe7eb;
    }

    .fuel-cost-method-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 620px) {
    .fuel-cost-card,
    .fuel-cost-breakdown,
    .fuel-cost-result-hero {
        padding: 1rem;
    }

    .fuel-cost-form-grid {
        grid-template-columns: 1fr;
    }

    .fuel-cost-actions {
        flex-direction: column;
    }

    .fuel-cost-primary-btn,
    .fuel-cost-secondary-btn {
        width: 100%;
    }

    .fuel-cost-table-wrap::after {
        content: "← Swipe table to see more →";
        display: block;
        margin-top: 8px;
        padding: 6px 10px;
        border-radius: 6px;
        background: #f3f7f8;
        color: #526b76;
        font-size: 0.82rem;
        font-weight: 600;
        text-align: center;
        white-space: nowrap;
    }
}

@media (max-width: 420px) {
    .fuel-cost-summary-grid {
        grid-template-columns: 1fr;
    }

    .fuel-cost-summary-card {
        border-right: 0;
        border-bottom: 1px solid #dfe7eb;
    }

    .fuel-cost-summary-card:last-child {
        border-bottom: 0;
    }
}
