@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;600;700&display=swap');

.bus-booking-app-2795 {
    font-family: 'Cairo', sans-serif;
    max-width: 900px;
    margin: 0 auto;
    color: #333;
}

.bus-booking-app-2795 * {
    box-sizing: border-box;
}

/* Search Box */
.search-engine-box {
    background: #fff;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    margin-bottom: 30px;
}

.bus-search-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    align-items: end;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
    font-size: 14px;
}

.form-group select,
.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: inherit;
    font-size: 15px;
    transition: border-color 0.3s ease;
}

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

.btn-search {
    background: #0066cc;
    color: #fff;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-family: inherit;
    font-size: 16px;
    font-weight: 600;
    width: 100%;
    transition: background 0.3s, transform 0.1s;
}

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

.btn-search:active {
    transform: translateY(2px);
}

/* Results Area */
.results-area {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.trip-card {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid #eee;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.trip-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.trip-details {
    display: flex;
    gap: 30px;
}

.trip-time {
    font-weight: 700;
    font-size: 18px;
    color: #111;
}

.trip-info {
    font-size: 14px;
    color: #666;
}

.trip-action {
    text-align: left;
}

.trip-price {
    font-size: 22px;
    font-weight: 700;
    color: #0066cc;
    margin-bottom: 10px;
    display: block;
}

.btn-book {
    background: #28a745;
    color: #fff;
    border: none;
    padding: 10px 25px;
    border-radius: 6px;
    cursor: pointer;
    font-family: inherit;
    font-weight: 600;
    transition: background 0.2s;
}

.btn-book:hover {
    background: #218838;
}

/* Loader Skeleton */
.skeleton-card {
    background: #fff;
    border-radius: 12px;
    height: 100px;
    animation: pulse 1.5s infinite;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
}

@keyframes pulse {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Seat Map Container */
.seat-map-container {
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    margin-top: 30px;
    position: relative;
}

.seat-map-container.hidden {
    display: none;
}

.seat-map-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
}

.close-seat-map {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #999;
}

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

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

.box {
    width: 20px;
    height: 20px;
    border-radius: 4px;
}

.box.available { background: #e8f5e9; border: 2px solid #4caf50; }
.box.booked { background: #f5f5f5; border: 2px solid #bdbdbd; }
.box.selected { background: #e3f2fd; border: 2px solid #2196f3; }

/* Bus Layout grid */
.bus-layout {
    background: #fcfcfc;
    border: 2px solid #eee;
    border-radius: 40px 40px 10px 10px;
    padding: 40px 30px;
    max-width: 320px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
}

/* Aisle */
.seat-item.aisle {
    visibility: hidden;
}

.seat-item {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    user-select: none;
    transition: all 0.2s;
}

.seat-item.available {
    background: #e8f5e9;
    border: 2px solid #4caf50;
    color: #2e7d32;
}
.seat-item.available:hover {
    background: #c8e6c9;
}

.seat-item.booked {
    background: #f5f5f5;
    border: 2px solid #bdbdbd;
    color: #9e9e9e;
    cursor: not-allowed;
}

.seat-item.selected {
    background: #e3f2fd;
    border: 2px solid #2196f3;
    color: #1565c0;
}

/* Footer */
.seat-map-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.btn-confirm {
    background: #0066cc;
    color: #fff;
    border: none;
    padding: 10px 25px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
}
.btn-confirm:disabled {
    background: #ccc;
    cursor: not-allowed;
}

@media (max-width: 768px) {
    .trip-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    .trip-action {
        width: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
}
