/* Fuel Calculator Styles */

.fuel-calculator-container {
    max-width: 1000px;
    margin: 2rem auto;
}

/* Tabs */
.calculator-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid #e3eaf2;
}

.tab-btn {
    flex: 1;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    padding: 1rem 1.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: #555;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.tab-btn:hover {
    color: #3d8a59;
    background: #f4f8fb;
}

.tab-btn.active {
    color: #3d8a59;
    border-bottom-color: #3d8a59;
    background: #f4f8fb;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Unit Toggle */
.unit-toggle {
    background: #f4f8fb;
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    border: 2px solid #ccdac9;
}

.unit-toggle label {
    display: block;
    font-weight: 600;
    color: #2d5a27;
    margin-bottom: 0.8rem;
}

.toggle-buttons {
    display: flex;
    gap: 0.5rem;
}

.unit-btn {
    flex: 1;
    padding: 0.8rem 1.5rem;
    background: white;
    border: 2px solid #ccdac9;
    border-radius: 8px;
    font-weight: 600;
    color: #555;
    cursor: pointer;
    transition: all 0.3s ease;
}

.unit-btn:hover {
    border-color: #3d8a59;
    color: #3d8a59;
}

.unit-btn.active {
    background: #3d8a59;
    border-color: #3d8a59;
    color: white;
}

/* Input Section */
.input-section {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    border: 2px solid #ccdac9;
    margin-bottom: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 600;
    color: #2d5a27;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-group label i {
    color: #3d8a59;
}

.input-with-unit {
    position: relative;
    display: flex;
    align-items: stretch;
}

.input-with-unit input {
    flex: 1;
    border: 2px solid #ccdac9;
    border-radius: 8px 0 0 8px;
    padding: 0.8rem 1rem;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.input-with-unit input:focus {
    border-color: #3d8a59;
    outline: none;
}

.unit-label {
    background: #f4f8fb;
    border: 2px solid #ccdac9;
    border-left: none;
    border-radius: 0 8px 8px 0;
    padding: 0.8rem 1rem;
    font-weight: 600;
    color: #555;
    min-width: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.form-group small {
    color: #777;
    font-size: 0.85rem;
    margin-top: 0.3rem;
}

/* Slider */
.slider-container {
    margin-top: 0.5rem;
}

.slider-container input[type="range"] {
    width: 100%;
    height: 8px;
    border-radius: 5px;
    background: linear-gradient(to right, #3d8a59 0%, #3d8a59 50%, #e3eaf2 50%, #e3eaf2 100%);
    outline: none;
    -webkit-appearance: none;
}

.slider-container input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #3d8a59;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(61, 138, 89, 0.4);
    transition: all 0.2s ease;
}

.slider-container input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 4px 12px rgba(61, 138, 89, 0.6);
}

.slider-container input[type="range"]::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #3d8a59;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 6px rgba(61, 138, 89, 0.4);
}

.slider-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: #777;
}

.slider-value {
    color: #3d8a59;
    font-weight: 700;
}

/* Results Section */
.results-section {
    background: linear-gradient(135deg, #f4f8fb 0%, #e8f4f0 100%);
    padding: 2rem;
    border-radius: 12px;
    border: 2px solid #ccdac9;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.results-section h3 {
    color: #2d5a27;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.result-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.result-card {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.result-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
    border-color: #3d8a59;
}

.result-card.primary {
    background: linear-gradient(135deg, #3d8a59 0%, #2d5a27 100%);
    color: white;
}

.result-card.primary .result-label {
    color: rgba(255, 255, 255, 0.9);
}

.result-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(61, 138, 89, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #3d8a59;
}

.result-card.primary .result-icon {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.result-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.result-label {
    font-size: 0.85rem;
    color: #777;
    margin-bottom: 0.3rem;
}

.result-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2d5a27;
}

.result-card.primary .result-value {
    color: white;
}

/* Detailed Breakdown */
.detailed-breakdown {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    margin-top: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.detailed-breakdown h4 {
    color: #2d5a27;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.breakdown-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.breakdown-item {
    display: flex;
    justify-content: space-between;
    padding: 0.8rem;
    background: #f4f8fb;
    border-radius: 6px;
}

.breakdown-item span {
    color: #555;
}

.breakdown-item strong {
    color: #2d5a27;
}

/* Compare Vehicles */
.compare-container {
    max-width: 900px;
    margin: 0 auto;
}

.compare-intro {
    text-align: center;
    color: #555;
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.comparison-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.vehicle-card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    border: 2px solid #ccdac9;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.vehicle-card h4 {
    color: #2d5a27;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.comparison-results {
    margin-top: 2rem;
    background: #f4f8fb;
    padding: 2rem;
    border-radius: 12px;
    border: 2px solid #ccdac9;
}

.comparison-results h3 {
    color: #2d5a27;
    margin-bottom: 1.5rem;
    text-align: center;
}

.comparison-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.comparison-card {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border: 2px solid #ccdac9;
}

.comparison-card.winner {
    border-color: #3d8a59;
    background: linear-gradient(135deg, #f4f8fb 0%, #e8f4f0 100%);
}

.comparison-card h4 {
    color: #2d5a27;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.comp-stat {
    display: flex;
    justify-content: space-between;
    padding: 0.8rem;
    margin-bottom: 0.5rem;
    background: #f4f8fb;
    border-radius: 6px;
}

.comp-stat span {
    color: #555;
}

.comp-stat strong {
    color: #2d5a27;
    font-size: 1.1rem;
}

.savings-info {
    background: linear-gradient(135deg, #3d8a59 0%, #2d5a27 100%);
    color: white;
    padding: 1.5rem;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.savings-info i {
    font-size: 2.5rem;
}

.savings-info strong {
    font-size: 1.3rem;
    display: block;
    margin-bottom: 0.3rem;
}

.savings-info p {
    margin: 0;
    opacity: 0.9;
}

/* Fuel Tips */
.fuel-tips {
    margin: 3rem 0;
}

.fuel-tips h3 {
    color: #2d5a27;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.tip-card {
    background: white;
    border: 2px solid #ccdac9;
    border-radius: 10px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.tip-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
    border-color: #3d8a59;
}

.tip-card i {
    font-size: 2.5rem;
    color: #3d8a59;
    margin-bottom: 1rem;
}

.tip-card h4 {
    color: #2d5a27;
    margin-bottom: 0.8rem;
    font-size: 1.1rem;
}

.tip-card p {
    color: #555;
    line-height: 1.6;
    margin: 0;
}

/* Dark Mode */
.dark-mode .tab-btn {
    color: #aaa;
}

.dark-mode .tab-btn:hover,
.dark-mode .tab-btn.active {
    color: #a8d5ba;
    background: #2d3748;
}

.dark-mode .unit-toggle {
    background: #1a1a1a;
    border-color: #4a5568;
}

.dark-mode .unit-btn {
    background: #2d3748;
    border-color: #4a5568;
    color: #aaa;
}

.dark-mode .unit-btn.active {
    background: #3d8a59;
    color: white;
}

.dark-mode .input-section {
    background: #1a1a1a;
    border-color: #4a5568;
}

.dark-mode .input-with-unit input {
    background: #2d3748;
    border-color: #4a5568;
    color: #fff;
}

.dark-mode .unit-label {
    background: #2d3748;
    border-color: #4a5568;
    color: #aaa;
}

.dark-mode .results-section {
    background: #1a1a1a;
    border-color: #4a5568;
}

.dark-mode .result-card {
    background: #2d3748;
    border-color: #4a5568;
}

.dark-mode .result-label {
    color: #aaa;
}

.dark-mode .result-value {
    color: #a8d5ba;
}

.dark-mode .detailed-breakdown {
    background: #2d3748;
}

.dark-mode .breakdown-item {
    background: #1a1a1a;
}

.dark-mode .vehicle-card {
    background: #2d3748;
    border-color: #4a5568;
}

.dark-mode .comparison-results {
    background: #1a1a1a;
    border-color: #4a5568;
}

.dark-mode .comparison-card {
    background: #2d3748;
    border-color: #4a5568;
}

.dark-mode .comparison-card.winner {
    border-color: #3d8a59;
    background: #2d3748;
}

.dark-mode .comp-stat {
    background: #1a1a1a;
}

.dark-mode .tip-card {
    background: #2d3748;
    border-color: #4a5568;
}

.dark-mode .tip-card:hover {
    border-color: #3d8a59;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .calculator-tabs {
        flex-direction: column;
        gap: 0.5rem;
    }

    .tab-btn {
        border-bottom: none;
        border-left: 3px solid transparent;
    }

    .tab-btn.active {
        border-left-color: #3d8a59;
        border-bottom-color: transparent;
    }

    .form-grid {
        grid-template-columns: 1fr;
        gap: 1.2rem;
    }

    .result-cards {
        grid-template-columns: 1fr;
    }

    .breakdown-grid {
        grid-template-columns: 1fr;
    }

    .comparison-grid {
        grid-template-columns: 1fr;
    }

    .comparison-cards {
        grid-template-columns: 1fr;
    }

    .tips-grid {
        grid-template-columns: 1fr;
    }

    .savings-info {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .input-section,
    .results-section {
        padding: 1.5rem;
    }

    .result-card {
        padding: 1rem;
    }

    .result-value {
        font-size: 1.3rem;
    }

    .result-icon {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
}
