/* ============================================
   HiWayGo - Component Styles
   ============================================ */

/* ============================================
   Pump Card Component
   ============================================ */

.pump-card {
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    cursor: pointer;
    transition: all var(--transition-base);
    position: relative;
}

.pump-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--primary-gradient);
    opacity: 0;
    transition: opacity var(--transition-base);
}

.pump-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--border-focus);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.pump-card:hover::before {
    opacity: 1;
}

.pump-card.in-direction {
    border-color: var(--accent-color);
    background: rgba(0, 242, 254, 0.05);
}

.pump-card.in-direction::before {
    background: var(--accent-gradient);
    opacity: 1;
}

.pump-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--spacing-md);
}

.pump-info {
    flex: 1;
}

.pump-name {
    font-size: var(--font-size-lg);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--spacing-xs);
}

.pump-brand {
    display: inline-block;
    padding: var(--spacing-xs) var(--spacing-sm);
    background: var(--primary-gradient);
    color: white;
    font-size: var(--font-size-xs);
    font-weight: 600;
    border-radius: var(--radius-sm);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.pump-distance {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: var(--spacing-xs);
}

.distance-value {
    font-size: var(--font-size-xl);
    font-weight: 700;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.distance-label {
    font-size: var(--font-size-xs);
    color: var(--text-muted);
    text-transform: uppercase;
}

.pump-details {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-md);
    margin-top: var(--spacing-md);
    padding-top: var(--spacing-md);
    border-top: 1px solid var(--border-color);
}

.pump-detail-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
}

.pump-detail-icon {
    font-size: var(--font-size-base);
    color: var(--accent-color);
}

.direction-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-xs) var(--spacing-sm);
    background: var(--accent-gradient);
    color: white;
    font-size: var(--font-size-xs);
    font-weight: 600;
    border-radius: var(--radius-sm);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }
}

/* ============================================
   Button Component
   ============================================ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-md) var(--spacing-lg);
    font-size: var(--font-size-base);
    font-weight: 600;
    border: none;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition-base);
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary {
    background: var(--primary-gradient);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg), var(--glow-primary);
}

.btn-secondary {
    background: var(--bg-glass);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--border-focus);
}

.btn-icon {
    width: 48px;
    height: 48px;
    padding: 0;
    background: var(--bg-tertiary);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-size: var(--font-size-xl);
}

.btn-icon:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--border-focus);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-icon.active {
    background: var(--primary-gradient);
    border-color: transparent;
    box-shadow: var(--glow-primary);
}

/* ============================================
   Loading Spinner
   ============================================ */

.loading-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid var(--bg-tertiary);
    border-top-color: var(--accent-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-md);
    padding: var(--spacing-2xl);
    color: var(--text-secondary);
}

/* ============================================
   Empty State
   ============================================ */

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-2xl);
    text-align: center;
    color: var(--text-secondary);
}

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: var(--spacing-lg);
    opacity: 0.3;
}

.empty-state-title {
    font-size: var(--font-size-xl);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--spacing-sm);
}

.empty-state-description {
    font-size: var(--font-size-base);
    max-width: 300px;
}

/* ============================================
   Info Card
   ============================================ */

.info-card {
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-md);
}

.info-card-header {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-md);
}

.info-card-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-gradient);
    border-radius: var(--radius-md);
    font-size: var(--font-size-xl);
    box-shadow: var(--glow-primary);
}

.info-card-title {
    font-size: var(--font-size-lg);
    font-weight: 700;
    margin: 0;
}

.info-card-content {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ============================================
   Stats Grid
   ============================================ */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}

.stat-card {
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    text-align: center;
    transition: all var(--transition-base);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.stat-value {
    font-size: var(--font-size-3xl);
    font-weight: 700;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: var(--spacing-xs);
}

.stat-label {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ============================================
   Filter Chips
   ============================================ */

.filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-lg);
}

.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-sm) var(--spacing-md);
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-base);
}

.filter-chip:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--border-focus);
}

.filter-chip.active {
    background: var(--primary-gradient);
    border-color: transparent;
    color: white;
    box-shadow: var(--glow-primary);
}

.filter-chip-icon {
    font-size: var(--font-size-base);
}

/* ============================================
   Toast Notification
   ============================================ */

.toast {
    position: fixed;
    bottom: var(--spacing-xl);
    right: var(--spacing-xl);
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-xl);
    z-index: var(--z-tooltip);
    animation: slideInUp 0.3s ease-out;
    max-width: 400px;
}

@keyframes slideInUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.toast-success {
    border-left: 4px solid var(--success-color);
}

.toast-error {
    border-left: 4px solid var(--danger-color);
}

.toast-warning {
    border-left: 4px solid var(--warning-color);
}

.toast-content {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-md);
}

.toast-icon {
    font-size: var(--font-size-xl);
    flex-shrink: 0;
}

.toast-message {
    flex: 1;
}

.toast-title {
    font-weight: 700;
    margin-bottom: var(--spacing-xs);
}

.toast-description {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
}

/* ============================================
   Leaflet Map Customization
   ============================================ */

.leaflet-container {
    background: var(--bg-primary);
    font-family: var(--font-family);
}

.leaflet-popup-content-wrapper {
    background: var(--bg-primary);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    color: var(--text-primary);
    box-shadow: var(--shadow-xl);
}

.leaflet-popup-tip {
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
}

.leaflet-popup-content {
    margin: var(--spacing-md);
    font-size: var(--font-size-sm);
}

.popup-title {
    font-size: var(--font-size-lg);
    font-weight: 700;
    margin-bottom: var(--spacing-sm);
}

.popup-details {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
    color: var(--text-secondary);
}

/* ============================================
   Animations
   ============================================ */

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideIn {
    from {
        transform: translateX(-20px);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.fade-in {
    animation: fadeIn var(--transition-base);
}

.slide-in {
    animation: slideIn var(--transition-base);
}

/* Stagger animation for list items */
.pump-card:nth-child(1) {
    animation-delay: 0ms;
}

.pump-card:nth-child(2) {
    animation-delay: 50ms;
}

.pump-card:nth-child(3) {
    animation-delay: 100ms;
}

.pump-card:nth-child(4) {
    animation-delay: 150ms;
}

.pump-card:nth-child(5) {
    animation-delay: 200ms;
}