/* Bus Booking System - Frontend Styles */

.bbs-booking-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.bbs-section {
    background: #fff;
    padding: 30px;
    margin-bottom: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.bbs-title {
    color: #0066cc;
    font-size: 28px;
    margin-bottom: 20px;
    border-bottom: 2px solid #0066cc;
    padding-bottom: 10px;
}

.bbs-form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

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

.bbs-form-group label {
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
}

.bbs-form-group input,
.bbs-form-group select,
.bbs-form-group textarea {
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.bbs-form-group input:focus,
.bbs-form-group select:focus,
.bbs-form-group textarea:focus {
    outline: none;
    border-color: #0066cc;
}

.bbs-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
    display: inline-block;
}

.bbs-btn-primary {
    background: #0066cc;
    color: #fff;
}

.bbs-btn-primary:hover {
    background: #0052a3;
}

.bbs-btn-secondary {
    background: #6c757d;
    color: #fff;
}

.bbs-btn-secondary:hover {
    background: #545b62;
}

.bbs-message {
    padding: 12px;
    border-radius: 4px;
    margin: 15px 0;
    display: none;
}

.bbs-message.success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
    display: block;
}

.bbs-message.error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    display: block;
}

/* Bus List */
.bbs-bus-list {
    display: grid;
    gap: 20px;
}

.bbs-bus-card {
    display: grid;
    grid-template-columns: 150px 1fr auto;
    gap: 20px;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
    transition: box-shadow 0.3s;
}

.bbs-bus-card:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.bbs-bus-image {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: 8px;
}

.bbs-bus-image-placeholder {
    width: 150px;
    height: 150px;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    color: #999;
    font-size: 48px;
}

.bbs-bus-details h3 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 22px;
}

.bbs-bus-info {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-top: 10px;
}

.bbs-info-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
    color: #666;
}

.bbs-info-item strong {
    color: #333;
}

.bbs-seat-type-badge {
    display: inline-block;
    padding: 4px 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
}

.bbs-bus-actions {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.bbs-price {
    font-size: 24px;
    font-weight: bold;
    color: #0066cc;
}

.bbs-seats-available {
    font-size: 14px;
    color: #28a745;
    font-weight: 600;
}

/* Seat Map */
.bbs-bus-info-card {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.bbs-seat-map {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    max-width: 400px;
    margin: 20px auto;
}

.bbs-seat {
    width: 60px;
    height: 60px;
    border: 2px solid #ddd;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
}

.bbs-seat:before {
    content: '🪑';
    position: absolute;
    font-size: 24px;
    opacity: 0.3;
}

.bbs-seat-available {
    background: #fff;
    border-color: #28a745;
}

.bbs-seat-available:hover {
    background: #d4edda;
    border-color: #28a745;
}

.bbs-seat-booked {
    background: #f8d7da;
    border-color: #dc3545;
    cursor: not-allowed;
    opacity: 0.6;
}

.bbs-seat-selected {
    background: #0066cc;
    border-color: #0052a3;
    color: #fff;
}

.bbs-seat-legend {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin: 20px 0;
}

.bbs-legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.bbs-legend-item .bbs-seat {
    width: 30px;
    height: 30px;
    cursor: default;
    font-size: 10px;
}

#bbs-selected-seats-info {
    text-align: center;
    margin: 20px 0;
    font-size: 16px;
}

/* Booking Summary */
.bbs-booking-summary {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
}

.bbs-booking-summary h3 {
    margin-top: 0;
    color: #0066cc;
}

.bbs-summary-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #ddd;
}

.bbs-summary-item:last-child {
    border-bottom: none;
    font-size: 18px;
    font-weight: bold;
    color: #0066cc;
}

.bbs-form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
}

/* Success Message */
.bbs-success-message {
    text-align: center;
    padding: 40px;
}

.bbs-success-icon {
    width: 80px;
    height: 80px;
    background: #28a745;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    margin: 0 auto 20px;
}

.bbs-success-message h2 {
    color: #28a745;
    margin-bottom: 10px;
}

#bbs-booking-details {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
    text-align: left;
}

/* Responsive Design */
@media (max-width: 768px) {
    .bbs-bus-card {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .bbs-bus-image,
    .bbs-bus-image-placeholder {
        margin: 0 auto;
    }
    
    .bbs-seat-map {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .bbs-form-row {
        grid-template-columns: 1fr;
    }
}

/* Loading Spinner */
.bbs-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: bbs-spin 1s ease-in-out infinite;
}

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