/**
 * WBTM Performance Optimization Styles
 */

/* Loading Spinner */
.wbtm-loading {
    text-align: center;
    padding: 40px 20px;
    background: #f9f9f9;
    border-radius: 8px;
    margin: 20px 0;
}

.wbtm-spinner {
    width: 40px;
    height: 40px;
    margin: 0 auto 20px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    animation: wbtm-spin 1s linear infinite;
}

@keyframes wbtm-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.wbtm-loading p {
    color: #666;
    font-size: 16px;
    margin: 0;
}

/* Error State */
.wbtm-error {
    text-align: center;
    padding: 30px 20px;
    background: #ffe6e6;
    border: 1px solid #ff9999;
    border-radius: 8px;
    margin: 20px 0;
}

.wbtm-error p {
    color: #cc0000;
    font-size: 16px;
    margin: 0;
}

/* No Results State */
.wbtm-no-results {
    text-align: center;
    padding: 40px 20px;
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
    margin: 20px 0;
}

.wbtm-no-results p {
    color: #856404;
    font-size: 16px;
    margin: 0;
}

/* Optimized Bus List Styles */
.wbtm-bus-list {
    display: flex;
    align-items: center;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 15px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.wbtm-bus-list:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.wbtm-bus-image {
    width: 80px;
    height: 60px;
    margin-right: 20px;
    border-radius: 6px;
    overflow: hidden;
    background: #f5f5f5;
}

.wbtm-bus-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.wbtm-bus-name {
    flex: 1;
    margin-right: 20px;
}

.wbtm-bus-name h5 {
    margin: 0 0 5px 0;
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
}

.wbtm-bus-name p {
    margin: 0;
    color: #7f8c8d;
    font-size: 14px;
}

.wbtm-bus-route {
    flex: 2;
    margin-right: 20px;
}

.wbtm-bus-route h6 {
    margin: 0 0 8px 0;
    font-size: 14px;
    color: #34495e;
    display: flex;
    align-items: center;
}

.wbtm-bus-route h6 i {
    margin-right: 8px;
    width: 16px;
    color: #3498db;
}

.wbtm-seat-info {
    flex: 1;
    text-align: center;
    margin-right: 20px;
}

.wbtm-seat-info h6 {
    margin: 0 0 5px 0;
    font-size: 20px;
    font-weight: 700;
    color: #27ae60;
}

.wbtm-seat-info span {
    font-size: 12px;
    color: #7f8c8d;
    text-transform: uppercase;
}

.wbtm-bus-price {
    flex: 1;
    text-align: center;
}

.wbtm-bus-price h4 {
    margin: 0 0 10px 0;
    font-size: 24px;
    font-weight: 700;
    color: #e74c3c;
}

.wbtm-book-now {
    background: #3498db;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
}

.wbtm-book-now:hover {
    background: #2980b9;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .wbtm-bus-list {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
    
    .wbtm-bus-image {
        width: 100%;
        height: 120px;
        margin: 0 0 15px 0;
    }
    
    .wbtm-bus-name,
    .wbtm-bus-route,
    .wbtm-seat-info,
    .wbtm-bus-price {
        margin: 0 0 15px 0;
    }
    
    .wbtm-bus-route h6 {
        justify-content: center;
    }
}

/* Performance indicator */
.wbtm-performance-badge {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #2ecc71;
    color: white;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.wbtm-performance-badge.show {
    opacity: 1;
}

.wbtm-performance-badge.fast {
    background: #2ecc71;
}

.wbtm-performance-badge.medium {
    background: #f39c12;
}

.wbtm-performance-badge.slow {
    background: #e74c3c;
} 