/* ==========================================================================
   Fuel Cost Calculator - Styles
   ========================================================================== */

/* Container */
.fuel-calculator-wrapper {
    max-width: 600px;
    margin: 2rem auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.fuel-calculator-title {
    text-align: center;
    color: #1e293b;
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.fuel-calculator-container {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    padding: 2rem;
}

/* Form Groups */
.fuel-form-group {
    margin-bottom: 1.5rem;
}

.fuel-form-group label {
    display: block;
    color: #374151;
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.fuel-form-group input,
.fuel-form-group select {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.2s;
    background: #ffffff;
    color: #1f2937;
    box-sizing: border-box;
}

.fuel-form-group input:focus,
.fuel-form-group select:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.fuel-form-group input::placeholder {
    color: #9ca3af;
}

.fuel-form-group select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236b7280'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1.25rem;
    padding-right: 2.5rem;
}

.fuel-help-text {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.813rem;
    color: #6b7280;
    line-height: 1.4;
}

.fuel-price-display {
    color: #059669;
    font-weight: 600;
}

.current-fuel-price {
    font-weight: 700;
    color: #047857;
}

/* Buttons */
.fuel-form-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.fuel-btn {
    flex: 1;
    padding: 1rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.fuel-btn-primary {
    background: #2563eb;
    color: #ffffff;
    box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.3);
}

.fuel-btn-primary:hover:not(:disabled) {
    background: #1d4ed8;
    box-shadow: 0 6px 8px -1px rgba(37, 99, 235, 0.4);
    transform: translateY(-1px);
}

.fuel-btn-primary:disabled {
    background: #93c5fd;
    cursor: not-allowed;
    box-shadow: none;
}

.fuel-btn-secondary {
    background: #f3f4f6;
    color: #374151;
    border: 2px solid #e5e7eb;
}

.fuel-btn-secondary:hover {
    background: #e5e7eb;
    border-color: #d1d5db;
}

/* Button Loader */
.btn-loader {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Loading State */
.fuel-loading {
    text-align: center;
    padding: 3rem 2rem;
}

.loading-spinner {
    width: 48px;
    height: 48px;
    margin: 0 auto 1rem;
    border: 4px solid #e5e7eb;
    border-top-color: #2563eb;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.fuel-loading p {
    color: #6b7280;
    font-size: 0.938rem;
}

/* Error State */
.fuel-error {
    text-align: center;
    padding: 2rem;
    background: #fef2f2;
    border-radius: 8px;
    margin-top: 1.5rem;
}

.error-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.fuel-error h3 {
    color: #991b1b;
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
}

.error-message {
    color: #dc2626;
    margin-bottom: 1.5rem;
}

/* Results */
.fuel-results {
    margin-top: 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    padding: 2rem;
    color: #ffffff;
    box-shadow: 0 10px 15px -3px rgba(102, 126, 234, 0.3);
    animation: slideIn 0.3s ease-out;
}

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

.results-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
}

.results-title .icon {
    font-size: 2rem;
}

.results-content {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 1.5rem;
    backdrop-filter: blur(10px);
}

.result-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.result-row:last-child {
    border-bottom: none;
}

.result-label {
    font-size: 0.938rem;
    opacity: 0.9;
}

.result-value {
    font-size: 1rem;
    font-weight: 600;
}

.total-row {
    margin-top: 1rem;
    padding-top: 1.5rem;
    border-top: 2px solid rgba(255, 255, 255, 0.3);
    border-bottom: none;
}

.total-row .result-label {
    font-size: 1.125rem;
    font-weight: 600;
}

.total-row .result-value {
    font-size: 2rem;
    font-weight: 700;
    color: #fbbf24;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.results-footer {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    text-align: center;
}

.results-footer small {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    opacity: 0.8;
    font-size: 0.813rem;
}

.info-icon {
    font-size: 1rem;
}

/* Responsive */
@media (max-width: 640px) {
    .fuel-calculator-container {
        padding: 1.5rem;
    }
    
    .fuel-form-buttons {
        flex-direction: column;
    }
    
    .fuel-btn {
        width: 100%;
    }
    
    .results-title {
        font-size: 1.25rem;
    }
    
    .total-row .result-value {
        font-size: 1.75rem;
    }
}

/* Dark mode support (optional) */
@media (prefers-color-scheme: dark) {
    .fuel-calculator-container {
        background: #1f2937;
    }
    
    .fuel-calculator-title {
        color: #f9fafb;
    }
    
    .fuel-form-group label {
        color: #e5e7eb;
    }
    
    .fuel-form-group input,
    .fuel-form-group select {
        background: #374151;
        border-color: #4b5563;
        color: #f9fafb;
    }
    
    .fuel-btn-secondary {
        background: #374151;
        color: #f9fafb;
        border-color: #4b5563;
    }
}
