/* Moved from templates/education/pages/school_bus.tpl (was an inline <style> block). */
#school-bus.bus-view-page {
    background: #fff;
    color: #172033;
}




.bus-view-layout {
    padding: 0 0 42px;
}

.bus-view-grid {
    display: grid;
    grid-template-columns: 420px minmax(0, 1fr);
    gap: 24px;
    align-items: stretch;
}

.bus-view-panel,
.bus-view-map-card {
    background: #fff;
    border: 1px solid #e5ebf3;
    border-radius: 24px;
    box-shadow: 0 18px 50px rgba(15, 23, 42, .08);
    overflow: hidden;
}

.bus-view-panel {
    display: flex;
    flex-direction: column;
    min-height: 640px;
    max-height: calc(100vh - 170px);
}

.bus-view-head {
    padding: 24px 24px 18px;
    background: #fff;
    color: #111827;
    flex: 0 0 auto;
}

.bus-view-kicker {
    margin: 0 0 7px;
    font-size: 13px;
    font-weight: 600;
    color: #2563eb;
}

.bus-view-title {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    color: #111827;
}

.bus-view-subtitle {
    margin: 9px 0 0;
    font-size: 14px;
    line-height: 1.5;
    color: #64748b;
}

.bus-view-search {
    padding: 0 24px 18px;
    border-bottom: 1px solid #eef2f7;
    flex: 0 0 auto;
}

.bus-view-search label {
    display: block;
    margin-bottom: 8px;
    color: #475569;
    font-size: 13px;
    font-weight: 600;
}

.bus-view-search input {
    width: 100%;
    border: 1px solid #dbe3ee;
    background: #fbfdff;
    border-radius: 14px;
    padding: 13px 14px;
    outline: none;
    box-sizing: border-box;
    font-size: 14px;
    color: #172033;
}


.bus-view-list {
    padding: 18px 24px 24px;
    overflow: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1 1 auto;
}

.bus-view-list::-webkit-scrollbar {
    width: 7px;
}

.bus-view-list::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 999px;
}

.bus-view-card {
    border: 1px solid #e2e8f0;
    background: #fff;
    border-radius: 14px;
    padding: 14px 16px;
    transition: border-color .18s ease, background-color .18s ease;
}

.bus-view-card:hover {
    border-color: #bfd4f6;
}

.bus-view-card.active {
    border-color: #2563eb;
    background: #f8fbff;
}

.bus-view-route-top {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.bus-view-chevron {
    margin-left: auto;
    color: #64748b;
    transition: transform 0.3s ease;
}

.bus-view-card.expanded .bus-view-chevron {
    transform: rotate(180deg);
}

.bus-view-card-body {
    display: none;
    padding-top: 12px;
}

.bus-view-card.expanded .bus-view-card-body {
    display: block;
}

.bus-view-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex: 0 0 auto;
}

.bus-view-route-name {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.35;
    color: #111827;
    flex: 1;
}

.bus-view-badge {
    display: inline-flex;
    border-radius: 999px;
    padding: 5px 9px;
    font-size: 11px;
    font-weight: 600;
    background: #ecfdf5;
    color: #047857;
    white-space: nowrap;
}

.bus-view-meta {
    margin-top: 10px;
    color: #64748b;
    font-size: 13px;
    display: grid;
    gap: 5px;
}

.bus-view-stops {
    margin-top: 13px;
    border-top: 1px solid #eef2f7;
    padding-top: 10px;
}

.bus-view-actions {
    margin-top: 16px;
}

.bus-view-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    background: #eef5ff;
    color: #2563eb;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    border: 1px solid transparent;
    cursor: pointer;
    transition: .2s ease;
    width: 100%;
    gap: 8px;
}

.bus-view-btn:hover {
    background: #2563eb;
    color: #fff;
}

.bus-view-stop {
    display: grid;
    grid-template-columns: 24px 1fr auto;
    gap: 10px;
    align-items: start;
    padding: 10px 0;
    border-bottom: 1px dashed #e2e8f0;
}

.bus-view-stop:last-child {
    border-bottom: 0;
}

.bus-view-stop-number {
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #dbeafe;
    color: #1d4ed8;
    font-size: 11px;
    font-weight: 600;
}

.bus-view-stop-name {
    display: block;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.35;
    color: #1e293b;
}

.bus-view-stop-note {
    font-size: 12px;
    color: #64748b;
    margin-top: 2px;
}

.bus-view-time {
    color: #0f172a;
    font-size: 12px;
    font-weight: 600;
    background: #f1f5f9;
    border-radius: 999px;
    padding: 5px 8px;
    white-space: nowrap;
}

.bus-view-empty {
    text-align: center;
    color: #64748b;
    padding: 22px 12px;
    border: 1px dashed #cbd5e1;
    border-radius: 16px;
    background: #f8fafc;
    font-size: 14px;
}

.bus-view-map-card {
    position: relative;
    min-height: 640px;
}

.bus-view-map-toolbar {
    position: absolute;
    z-index: 900;
    left: 18px;
    top: 18px;
    right: 18px;
    display: flex;
    justify-content: flex-start;
    pointer-events: none;
}

.bus-view-map-pill {
    background: rgba(255, 255, 255, .95);
    border: 1px solid #e5ebf3;
    border-radius: 999px;
    padding: 10px 15px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, .12);
    font-size: 13px;
    font-weight: 750;
    color: #172033;
    pointer-events: auto;
}

#schoolBusViewMap {
    width: 100%;
    height: 100%;
    min-height: 640px;
}

.bus-view-routes-section {
    padding: 34px 0 46px;
    background: #fff;
}

.bus-view-info-card {
    border: 0;
    border-left: 4px solid #2563eb;
    border-radius: 16px;
    box-shadow: 0 10px 28px rgba(15, 23, 42, .08);
    height: 100%;
    background: #fff;
}

.bus-view-info-card .card-body {
    padding: 20px;
}

.bus-view-info-icon {
    color: #2563eb;
    font-size: 18px;
}

.bus-view-info-title {
    font-size: 15px;
    font-weight: 700;
    color: #111827;
}

.bus-view-info-text {
    color: #64748b;
    font-size: 14px;
    margin: 0;
}

@media (max-width: 1200px) {
    .bus-view-grid {
        grid-template-columns: 380px minmax(0, 1fr);
        gap: 20px;
    }
}

@media (max-width: 992px) {
    .bus-view-grid {
        grid-template-columns: 1fr;
    }

    .bus-view-panel {
        min-height: auto;
        max-height: none;
    }

    .bus-view-list {
        max-height: 520px;
    }

    .bus-view-map-card {
        min-height: 460px;
    }

    #schoolBusViewMap {
        height: 460px;
        min-height: 460px;
    }
}

@media (max-width: 576px) {

    .bus-view-head,
    .bus-view-search,
    .bus-view-list {
        padding-left: 18px;
        padding-right: 18px;
    }

    .bus-view-title {
        font-size: 21px;
    }

    .bus-view-stop {
        grid-template-columns: 28px 1fr;
    }

    .bus-view-time {
        grid-column: 2;
        justify-self: flex-start;
    }

    .bus-view-map-card {
        border-radius: 18px;
        min-height: 390px;
    }

    #schoolBusViewMap {
        height: 390px;
        min-height: 390px;
    }
}
