.selector-section {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.selector-section label {
    display: block;
    font-weight: 600;
    margin-top: 3em;
    margin-bottom: 10px;
    color: #000;
}

#busStopDropdown {
    display: block;
    width: 100%;
    padding: 0.775rem 2.5rem 0.775rem 1.75rem;
    margin-top: 5px;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: #000;
    appearance: none;
    background-color: #ffffff;
    background-image: url('data:image/svg+xml;charset=UTF-8,%3Csvg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%23607d96" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"%3E%3Cpolyline points="6 9 12 15 18 9"%3E%3C/polyline%3E%3C/svg%3E');
    background-position: right 0.75rem center;
    background-repeat: no-repeat;
    background-size: 1.2rem;
    background-clip: padding-box;
    border-radius: 25px;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
    border: 1px solid #2b2b2b33;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 4px 12px rgba(0, 0, 0, 0.1);
}

#busStopDropdown:hover {
    border-color: #607d96;
}

.content-section {
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    min-height: 400px;
    display: none;
}

.content-section.active {
    display: block;
}

.bus-stop-title {
    font-size: 1.8rem;
    color: #333;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.bus-stop-code {
    display: inline-flex;
    align-items: center;
    background-color: #94d40b;
    color: #000;
    font-weight: bold;
    font-size: 20px;
    padding: 5px 4px;
    border-radius: 5px;
    gap: 10px;
    cursor: default;
}

body.dark-mode .bus-stop-code {
    display: inline-flex;
    align-items: center;
    background-color: #7db603;
    color: #000;
    font-weight: bold;
    font-size: 20px;
    padding: 5px 4px;
    border-radius: 5px;
    gap: 10px;
    cursor: default;
}

.bus-stop-code img {
    width: 35px;
    height: auto;
    cursor: default;
}

.bus-stop-code-text,
body.dark-mode .bus-stop-code-text {
    font-size: 20px;
    font-weight: bold;
    color: #000;
    background-color: #fff;
    border-top-right-radius: 5px;
    border-bottom-right-radius: 5px;
    padding: 2px 6px;
    cursor: default;
}

.bus-stop-description {
    font-size: 30px;
    font-weight: bold;
    margin-left: 12px;
    cursor: default;
    color: #000;
}

body.dark-mode .bus-stop-description {
    font-size: 35px;
    font-weight: bold;
    margin-left: 12px;
    cursor: default;
    color: #fff;
}

.bus-stop-info {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.bus-stop-subtitle {
    color: #888;
    margin-bottom: 30px;
    font-size: 0.9rem;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.service-header {
    background-color: #94d40b;
    border-radius: 5px;
    color: #000 !important;
    font-weight: bold;
    padding: 5px 10px;
    display: inline-block;
    white-space: nowrap;
    font-size: 20px;
    width: fit-content;
    margin-bottom: 7px;
    padding-bottom: 5px;
}

a.service-header:hover {
    transform: translateY(-2px);
    transition-duration: 500ms;
    background-color: #c7e3fb;
    font-weight: bold;
}

.service-route {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 15px;
    font-weight: bold;
    padding-bottom: 5px;
    border-bottom: 2px solid #607d96;
}

.service-card {
    border: 1px solid #ddd;
    border-radius: 25px;
    padding: 1rem;
    background-color: #f5f5f5;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.3s;
    margin-bottom: 1em;
    margin-top: 1em;
    scroll-margin-top: 140px;
    scroll-margin-bottom: 140px;
}

.service-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

.service-card.highlighted {
    background-color: #caf3ff;
    border: 2px solid #1c748f;
    box-shadow: 0 0 15px #1c748f, 0 2px 4px #0000004d;
    animation: highlight-pulse 1.5s ease-in-out;
}

@keyframes highlight-pulse {
    0% {
        box-shadow: 0 0 20px #5b6674, 0 2px 4px rgba(0, 0, 0, 0.1);
    }

    100% {
        box-shadow: 0 0 15px #5b6674, 0 2px 4px rgba(0, 0, 0, 0.1);
    }
}

body.dark-mode .service-card.highlighted {
    background-color: #0e3f4e;
    border: 2px solid #1c748f;
    box-shadow: 0 0 15px #1c748f, 0 2px 4px #0000004d;
}

.time-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
    margin-bottom: 12px;
    padding-bottom: 10px;
}

.time-row:last-child {
    margin-bottom: 0;
    border-bottom: none;
}

.day-label {
    font-size: 0.85rem;
    color: #666;
    font-weight: 500;
}

.time-value {
    background: #fff;
    padding: 5px 8px;
    border-radius: 4px;
    text-align: center;
    font-weight: 600;
}

.time-value.first-bus {
    color: #27ae60;
}

.time-value.last-bus {
    color: #e74c3c;
}

.no-data {
    text-align: center;
    color: #999;
    padding: 40px 20px;
}

.loading {
    text-align: center;
    color: #607d96;
    padding: 40px 20px;
}

.spinner {
    display: inline-block;
    width: 42px;
    height: 42px;
    color: #1f84a2;
    box-sizing: border-box;
    padding: 3px;
    overflow: visible;
}

.spinner circle {
    fill: none;
    stroke: currentColor;
    cx: 50%;
    cy: 50%;
    r: 50%;
    stroke-width: 11;
    stroke-linecap: round;
    transform-origin: center;
}

.search-container {
    position: relative;
    margin-bottom: 15px;
    height: 40px;
}

.search-input-wrapper {
    position: relative;
    height: 100%;
}

.search-input {
    display: block;
    width: 100%;
    padding: 0.6rem 1.75rem 0.6rem 35px;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: #d3d3d3;
    appearance: none;
    background-color: #ffffff;
    background-clip: padding-box;
    border-radius: 25px;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
    border: 1px solid #2b2b2b33;
    box-sizing: border-box;
    height: 50px;
}

.search-input:focus {
    outline: none;
    border-color: #607d96;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #cccccc;
    pointer-events: none;
    z-index: 1;
    font-size: 1rem;
}

.clear-search {
    position: absolute;
    right: 12px;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    font-size: 35px;
    top: 26px;
    padding: 0;
    display: none;
    z-index: 10;
}

.clear-search:hover {
    color: #607d96;
}

.clear-search.visible {
    display: block;
}

.search-results-count {
    font-size: 0.85rem;
    color: #999;
    margin-top: 1em;
    display: block;
    margin-left: 0;
}

body.dark-mode .selector-section {
    background: #1c1f2b;
    border: 1px solid #2b2b2b33;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.233), 0 4px 12px rgba(0, 0, 0, 0.1);
}

body.dark-mode .selector-section label {
    color: #fff;
}

body.dark-mode #busStopDropdown {
    display: block;
    width: 100%;
    padding: 0.775rem 2.5rem 0.775rem 1.75rem;
    color: #fff;
    appearance: none;
    background-color: #393e53;
    background-image: url('data:image/svg+xml;charset=UTF-8,%3Csvg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%2391a5be" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"%3E%3Cpolyline points="6 9 12 15 18 9"%3E%3C/polyline%3E%3C/svg%3E');
    background-position: right 0.75rem center;
    background-repeat: no-repeat;
    background-size: 1.2rem;
    background-clip: padding-box;
    border-radius: 25px;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
    border: 1px solid #2b2b2b33;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.233), 0 4px 12px rgba(0, 0, 0, 0.1);
}

body.dark-mode #busStopDropdown:hover {
    border-color: #91a5be;
}

body.dark-mode #busStopDropdown:focus {
    border-color: #91a5be;
    box-shadow: 0 0 0 3px rgba(136, 153, 255, 0.1);
}

body.dark-mode .content-section {
    background: #1c1f2b;
    border: 1px solid #2b2b2b33;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.233), 0 4px 12px rgba(0, 0, 0, 0.1);
}

body.dark-mode .bus-stop-title {
    color: #fff;
}

body.dark-mode .bus-stop-subtitle {
    color: #bbb;
}

body.dark-mode .service-card {
    background: #292d3d;
    border: 1px solid #2b2b2b33;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.233), 0 4px 12px rgba(0, 0, 0, 0.1);
}


body.dark-mode .service-header {
    color: #000;
    border-bottom-color: #91a5be;
}

body.dark-mode a.service-header:hover {
    background-color: #52718d;
    color: #fff !important;
}

body.dark-mode .service-route {
    color: #bbb;
    border-bottom: 2px solid #91a5be;
}

body.dark-mode .day-label {
    color: #ccc;
}

body.dark-mode .no-data {
    color: #777;
}

body.dark-mode .loading {
    color: #91a5be;
}

body.dark-mode .search-input {
    display: block;
    width: 100%;
    color: #fff;
    appearance: none;
    background: #1c1f2b;
    background-clip: padding-box;
    border-radius: 25px;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
    border: 2px solid #393e53;
}

body.dark-mode .search-input::placeholder {
    color: #bbbbbb;
}

body.dark-mode .search-input:focus {
    border-color: #91a5be;
    box-shadow: 0 0 0 3px rgba(136, 153, 255, 0.1);
}

body.dark-mode .clear-search {
    color: #bbb;
}

body.dark-mode .clear-search:hover {
    color: #91a5be;
}

body.dark-mode .search-results-count {
    color: #e4e4e4;
}



body.dark-mode .time-value {
    background: #1c1f2b;
    border-radius: 15px;
}

@media (max-width: 768px) {
    .header h1 {
        font-size: 1.8rem;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .service-card {
        scroll-margin-top: 200px;
        scroll-margin-bottom: 200px;
    }

    .time-row {
        grid-template-columns: 1fr;
        gap: 5px;
    }

    .day-label {
        font-size: 0.75rem;
    }

    .bus-stop-info {
        flex-direction: column;
        align-items: flex-start;
    }

    .bus-stop-description,
    body.dark-mode .bus-stop-description {
        margin-left: 0;
        margin-top: 10px;
        font-size: 28px;
    }
}

/* Loading Indicator Styles */
.loading-stops {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    padding: 3rem 2rem;
    gap: 0.75rem;
}

.loading-stops p {
    margin: 0;
}

.loading-spinner {
    display: inline-block;
    width: 32px;
    height: 32px;
    color: #1f84a2;
    box-sizing: border-box;
    padding: 4px;
    overflow: visible;
}

.loading-spinner circle {
    fill: none;
    stroke: currentColor;
    cx: 50%;
    cy: 50%;
    r: 50%;
    stroke-width: 11;
    stroke-linecap: round;
    transform-origin: center;
}

body.dark-mode .loading-spinner {
    color: #1f84a2;
}