/* bus_time_styles.css */

/* General container padding */
.container {
    padding: 2rem;
}

/* Page Header for Bus Time */
.bus-time-header {
    text-align: center;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background-color: #fff;
    border-radius: 1rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.bus-time-header .page-title {
    font-size: 2.2rem;
    color: #333;
    margin-bottom: 0.5rem;
    line-height: 1.2;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
}

.bus-time-header .page-icon {
    color: #3b82f6; /* Primary accent color */
    font-size: 2.5rem;
}

.bus-time-header .page-description {
    font-size: 1rem;
    color: #666;
    margin-bottom: 0;
}

/* Bus Search Form Section */
.bus-search-form-section {
    background-color: #fff;
    border-radius: 1rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    padding: 2rem;
    margin-bottom: 2rem;
}

.bus-search-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    align-items: flex-end; /* Align button to bottom of its grid cell */
}

.bus-search-form .form-group {
    margin-bottom: 0; /* Override default form-group margin */
}

.bus-search-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #555;
}

.bus-search-form select,
.bus-search-form button {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid #ccc;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-family: 'Inter', 'Noto Sans Sinhala', sans-serif;
}

.bus-search-form button {
    background-color: #007bff; /* Blue for search button */
    color: white;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-weight: 600;
}

.bus-search-form button:hover {
    background-color: #0056b3;
}

/* Bus Results Section */
.bus-results-section {
    background-color: #fff;
    border-radius: 1rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    padding: 2rem;
}

.bus-results-section .section-title {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    text-align: center;
    color: #333;
}

.current-time-display {
    text-align: center;
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    color: #555;
}

.bus-time-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.bus-time-item {
    display: flex;
    flex-wrap: wrap; /* Allow wrapping on small screens */
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.2rem;
    border-bottom: 1px solid #eee;
    font-size: 1.1rem;
    color: #444;
}

.bus-time-item:last-child {
    border-bottom: none;
}

.bus-time-item .time-info,
.bus-time-item .route-info {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 0.5rem; /* Space when wrapping */
}

.bus-time-item .departure-time {
    font-weight: 700;
    color: #3b82f6; /* Highlight departure time */
}

.bus-time-item .arrival-time {
    color: #666;
}

/* Using the new class name */
.bus-time-item .route-text {
    font-weight: 600;
    color: #333;
}

.bus-time-item .days-of-operation {
    font-size: 0.95rem;
    color: #777;
}

.bus-time-item i {
    color: #888; /* Icon color */
    margin-right: 0.2rem;
}

/* Highlight style for the next nearest bus times */
.bus-time-item.highlight-next-bus {
    background-color: #e6f7ff; /* Light blue background */
    border-left: 5px solid #007bff; /* Blue border */
    font-weight: 700;
    color: #0056b3;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.bus-time-item.highlight-next-bus .departure-time,
.bus-time-item.highlight-next-bus .route-text {
    color: #0056b3; /* Darker blue for highlighted text */
}

.bus-time-item.highlight-next-bus i {
    color: #007bff; /* Blue icons for highlighted items */
}

/* Green Back Button Styling (reused from other pages) */
.page-header-top {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem 1rem 0;
}

.btn-green {
    background-color: #2ecc71;
    color: white;
    padding: 0.6rem 1.2rem;
    font-size: 0.95rem;
    border-radius: 50px;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.btn-green:hover {
    background-color: #27ae60;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    .bus-time-header .page-title {
        font-size: 1.8rem;
        gap: 0.5rem;
    }
    .bus-time-header .page-icon {
        font-size: 2rem;
    }
    .bus-search-form {
        grid-template-columns: 1fr; /* Stack inputs on small screens */
    }
    .bus-time-item {
        flex-direction: column; /* Stack time and route info */
        align-items: flex-start;
    }
    .bus-time-item .time-info,
    .bus-time-item .route-info {
        width: 100%;
        margin-bottom: 0.8rem;
    }
}