/* Shared Dolmuş Detail Styles for Route Pages */

:root {
    --primary-blue: #1e3a8a;
    --primary-light: #eff6ff;
    --border-gray: #e2e8f0;
    --text-dark: #1e293b;
    --text-light: #64748b;
    --bg-light: #f8fafc;
    --bg-dark: #1e293b;
    --green-active: #10b981;
    --red-alert: #ef4444;
}

/* Direction Switcher */
.direction-switcher {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 40px;
}

.dir-btn {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: white;
    border: 2px solid var(--border-gray);
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
}

.dir-btn.active {
    border-color: var(--primary-blue);
    background: var(--primary-light);
    box-shadow: 0 4px 12px rgba(30, 58, 138, 0.1);
}

.dir-icon {
    width: 48px;
    height: 48px;
    background: var(--bg-light);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--primary-blue);
}

.dir-btn.active .dir-icon {
    background: var(--primary-blue);
    color: white;
}

.dir-label {
    display: block;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-light);
    margin-bottom: 4px;
}

.dir-title {
    display: block;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
}

/* Sefer Header */
.sefer-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
    margin-top: 30px;
    border-bottom: 2px solid var(--border-gray);
    padding-bottom: 15px;
}

.sefer-header .header-icon i {
    font-size: 2.4rem;
    color: var(--primary-blue);
    flex-shrink: 0;
}

.sefer-header .header-titles {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.sefer-header .main-line-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-blue);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.sefer-header .main-line-title i {
    font-size: 1.3rem;
}

.sefer-header h2 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-light);
    margin: 0;
    padding: 0;
    line-height: 1.4;
    display: flex;
    align-items: center;
    gap: 5px;
}

.sefer-header h2 i {
    font-size: 0.9rem;
    color: var(--text-light);
}

.sefer-info-text {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 10px;
}

.sefer-warning {
    font-size: 0.8rem;
    color: var(--red-alert);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 30px;
}

/* Tarife Grid */
.tarife-container {
    margin-bottom: 40px;
    background: var(--bg-light);
    border: 1px solid var(--border-gray);
    border-radius: 12px;
    padding: 25px;
}

.tarife-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-blue);
    margin: 0 0 20px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tarife-title i {
    font-size: 1.4rem;
}

.tarife-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

.tarife-box {
    background: var(--bg-dark);
    border: 1px solid #334155;
    border-radius: 10px;
    padding: 15px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.tarife-box span {
    display: block;
    font-size: 0.65rem;
    font-weight: 700;
    color: #94a3b8;
    margin-bottom: 5px;
    text-transform: uppercase;
}

.tarife-box strong {
    display: block;
    font-size: 0.9rem;
    color: var(--bg-light);
    margin-bottom: 10px;
    min-height: 2.5rem;
}

.tarife-box .price {
    font-size: 1.5rem;
    font-weight: 700;
    color: #34d399;
}

/* Time Grid */
.time-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 12px;
    margin-bottom: 50px;
}

.time-card {
    background: white;
    border: 1px solid var(--border-gray);
    border-radius: 8px;
    padding: 15px 10px;
    position: relative;
    text-align: center;
    transition: transform 0.2s, opacity 0.3s;
}

.time-card.past {
    opacity: 0.3;
}

.time-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.card-badge {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #334155;
    color: white;
    font-size: 0.55rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 20px;
    white-space: nowrap;
    z-index: 2;
}

.time-card.first .card-badge {
    background: var(--green-active);
}

.time-card.last .card-badge {
    background: var(--red-alert);
}

/* Sanayi seferi kartı — Yukarı Gökçebel'e gitmeyen seferler */
.time-card.sanayi-card {
    border-color: rgba(234, 88, 12, 0.45);
    background: linear-gradient(135deg, rgba(234,88,12,0.07), rgba(251,146,60,0.04));
}

.time-card.sanayi-card:hover {
    border-color: rgba(234, 88, 12, 0.75);
    box-shadow: 0 4px 16px rgba(234, 88, 12, 0.15);
}

.sanayi-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    background: rgba(234, 88, 12, 0.12);
    color: #c2410c;
    font-size: 0.52rem;
    font-weight: 700;
    padding: 3px 6px;
    border-radius: 6px;
    margin-bottom: 6px;
    text-align: center;
    line-height: 1.3;
    border: 1px solid rgba(234, 88, 12, 0.2);
}

.sanayi-badge i {
    font-size: 0.7rem;
    flex-shrink: 0;
}

/* Bodrum Otogar kalkış saati - kart içi küçük satır */
.otogar-info {
    display: flex;
    align-items: center;
    gap: 3px;
    color: #f59e0b;
    font-size: 0.58rem;
    font-weight: 600;
    margin-top: 3px;
    opacity: 0.9;
}

.otogar-info i {
    font-size: 0.7rem;
}

/* Turgutreis->Bodrum yönü: Bodrum Otogar'a devam eder */
.otogar-info.otogar-devam {
    color: #60a5fa;
}

.time-card.otogar-trip {
    border-color: rgba(245,158,11,0.4);
    background: linear-gradient(135deg, rgba(245,158,11,0.06), rgba(217,119,6,0.03));
}

.time-card.otogar-trip:hover {
    border-color: rgba(245,158,11,0.65);
    box-shadow: 0 4px 16px rgba(245,158,11,0.15);
}

.card-status {
    font-size: 0.65rem;
    font-weight: 700;
    color: #94a3b8;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.card-status.active {
    color: var(--green-active);
}

.time-val {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-dark);
    display: block;
    margin-bottom: 6px;
}

.trip-note {
    display: block;
    color: #1d4ed8;
    font-size: 0.52rem;
    font-weight: 700;
    line-height: 1.2;
    margin: -2px 0 6px;
}

.card-details {
    border-top: 1px solid var(--border-gray);
    padding-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 0.65rem;
    color: var(--text-light);
}

/* Route Description Box */
.route-description-box {
    background: white;
    border-radius: 16px;
    padding: 30px;
    margin-top: 50px;
    margin-bottom: 20px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-gray);
    line-height: 1.8;
}

.route-description-box h4 {
    color: var(--primary-blue);
    margin: 0 0 15px 0;
    font-size: 1.25rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.route-description-box p {
    color: var(--text-dark);
    font-size: 1rem;
    margin-bottom: 15px;
}

.route-description-box p:last-child {
    margin-bottom: 0;
}

/* Smart Guide Trigger */
.smart-guide-trigger {
    margin-bottom: 30px;
    display: flex;
    justify-content: center;
}

.smart-btn {
    background: linear-gradient(135deg, var(--primary-blue) 0%, #3b82f6 100%);
    color: white;
    border: none;
    padding: 18px 30px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 10px 25px rgba(30, 58, 138, 0.3);
    transition: all 0.3s ease;
}

.smart-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px rgba(30, 58, 138, 0.4);
}

.smart-btn i {
    font-size: 1.2rem;
}

/* Smart Guide Panel */
.smart-guide-panel {
    margin-bottom: 40px;
    animation: slideDown 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.smart-guide-panel.hidden {
    display: none;
}

.dir-panel.hidden {
    display: none;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.smart-close-bar {
    width: 100%;
    background: #3b82f6;
    color: white;
    border: none;
    padding: 15px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-bottom: 15px;
    transition: background 0.2s;
}

.smart-close-bar:hover {
    background: #2563eb;
}

.smart-guide-dark-box {
    background: #475569;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
}

.smart-inputs-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 25px;
}

.input-group label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: #cbd5e1;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.select-wrapper {
    position: relative;
}

.select-wrapper select {
    width: 100%;
    padding: 14px 15px;
    background: transparent;
    border: 1px solid #64748b;
    border-radius: 12px;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    color: white;
    appearance: auto;
    cursor: pointer;
}

.select-wrapper select:focus {
    outline: none;
    border-color: #94a3b8;
}

.select-wrapper select option {
    color: #1e293b;
    background: white;
}

.smart-result-box {
    background: var(--bg-light);
    border-radius: 20px;
    padding: 25px;
}

.result-box-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
}

.assistant-tag {
    color: #3b82f6;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: block;
    margin-bottom: 6px;
}

.result-box-header h3 {
    color: #0f172a;
    font-size: 1.3rem;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.live-pill {
    background: #ecfdf5;
    color: #059669;
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.live-pill .dot {
    width: 8px;
    height: 8px;
    background: var(--green-active);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--green-active);
    animation: pulse 1.5s infinite;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.stat-box {
    background: white;
    border-radius: 16px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
}

.departure-box {
    grid-column: 1 / -1;
}

.stat-icon {
    font-size: 1.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: #f1f5f9;
    border-radius: 50%;
}

.stat-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stat-info label {
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--text-light);
    text-transform: uppercase;
    margin: 0;
}

.stat-info strong {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-dark);
}

#traffic-status {
    text-shadow: 0.5px 0.5px 0px rgba(0, 0, 0, 0.05);
    letter-spacing: 0.2px;
}

/* Live Fleet Tracker Styles */
.live-tracker-container {
    background: linear-gradient(135deg, #ffffff 0%, var(--bg-light) 100%);
    border: 1px solid var(--border-gray);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 25px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
}

.live-tracker-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    border-bottom: 1px solid #edf2f7;
    padding-bottom: 12px;
}

.live-tracker-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.15rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
}

.live-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--red-alert);
    background: #fef2f2;
    padding: 4px 10px;
    border-radius: 20px;
    border: 1px solid #fee2e2;
    text-transform: uppercase;
}

.live-pulse-dot {
    width: 8px;
    height: 8px;
    background-color: var(--red-alert);
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
    animation: pulse-live 1.6s infinite;
}

@keyframes pulse-live {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
    }
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 8px rgba(239, 68, 68, 0);
    }
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
    }
}

.active-fleet-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

@media (max-width: 768px) {
    .active-fleet-grid {
        grid-template-columns: 1fr;
    }
}

.fleet-bus-card {
    background: #ffffff;
    border: 2px solid #e2e8f0;
    border-radius: 14px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05), 0 2px 4px -1px rgba(0,0,0,0.03);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
}

.fleet-bus-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    border-color: #3b82f6;
}

.bus-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.bus-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 8px;
}

.bus-gidis {
    background: #eff6ff;
    color: #2563eb;
    border: 1px solid #dbeafe;
}

.bus-donus {
    background: #f0fdf4;
    color: var(--green-active);
    border: 1px solid #dcfce7;
}

.bus-eta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 8px;
    background: #f8fafc;
    color: #475569;
    border: 1px solid #e2e8f0;
}

.bus-route-path {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.85rem;
    color: #334155;
    font-weight: 600;
    margin: 4px 0;
}

.route-arrow-animated {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #2563eb;
    font-size: 1.1rem;
    animation: arrowPulse 1.4s infinite ease-in-out;
}

@keyframes arrowPulse {
    0% {
        opacity: 0.3;
        transform: translateX(-4px);
    }
    50% {
        opacity: 1;
        transform: translateX(4px);
    }
    100% {
        opacity: 0.3;
        transform: translateX(-4px);
    }
}

.bus-route-line {
    position: relative;
    height: 8px;
    background: #e2e8f0;
    border-radius: 10px;
    width: 100%;
    margin: 22px 0;
}

.bus-route-fill {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    border-radius: 10px;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.fill-gidis {
    background: linear-gradient(90deg, #3b82f6, #60a5fa, #3b82f6);
    background-size: 200% 100%;
    animation: moveGradient 2s linear infinite;
}

.fill-donus {
    background: linear-gradient(90deg, var(--green-active), #34d399, var(--green-active));
    background-size: 200% 100%;
    animation: moveGradient 2s linear infinite;
}

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

/* Driving Bus Icon */
.driving-bus-icon {
    position: absolute;
    right: -14px;
    top: -10px;
    width: 28px;
    height: 28px;
    background: #ffffff;
    color: #2563eb;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15), 0 0 6px rgba(37, 99, 235, 0.3);
    font-size: 14px;
    animation: busWobble 0.6s ease-in-out infinite alternate;
    z-index: 10;
    border: 2px solid currentColor;
    transition: all 0.3s ease;
}

.bus-icon-donus {
    color: var(--green-active) !important;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15), 0 0 6px rgba(22, 163, 74, 0.3) !important;
}

/* Travel Time Tooltip */
.bus-time-tooltip {
    position: absolute;
    bottom: 34px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-dark);
    color: #ffffff;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 6px;
    white-space: nowrap;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    pointer-events: none;
    z-index: 11;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.bus-time-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 5px;
    border-style: solid;
    border-color: var(--bg-dark) transparent transparent transparent;
}

@keyframes busWobble {
    0% {
        transform: translateY(-1px) scale(1) rotate(-3deg);
    }
    100% {
        transform: translateY(1px) scale(1.05) rotate(3deg);
    }
}

.bus-card-bottom {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    font-size: 0.8rem;
    background: var(--bg-light);
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #f1f5f9;
}

.bus-stat {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.bus-stat-label {
    color: var(--text-light);
    font-weight: 500;
    font-size: 0.7rem;
    text-transform: uppercase;
}

.bus-stat-val {
    color: var(--text-dark);
    font-weight: 700;
}

.no-active-buses {
    text-align: center;
    padding: 30px;
    color: var(--text-light);
    font-size: 0.9rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.no-active-buses i {
    font-size: 2rem;
    color: #94a3b8;
}

/* Inactive Schedule Styles (for weekend/weekday splits) */
.inactive-schedule-wrapper {
    margin-top: 50px;
    opacity: 0.55;
    transition: opacity 0.3s ease;
    border-top: 2px dashed var(--border-gray);
    padding-top: 25px;
}

.inactive-schedule-wrapper:hover {
    opacity: 1;
}

.inactive-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-light);
    margin: 0 0 20px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.inactive-time-grid {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 8px;
    margin-bottom: 20px;
}

.inactive-card {
    background: var(--bg-light);
    border: 1px solid var(--border-gray);
    border-radius: 6px;
    padding: 10px 5px;
    position: relative;
    text-align: center;
}

.inactive-card .time-val {
    font-size: 0.95rem;
    font-weight: 600;
    color: #475569;
    display: block;
}

.inactive-card .card-details,
.inactive-card .card-badge {
    display: none;
}

/* Responsive Breakpoints */
@media (max-width: 900px) {
    .time-grid {
        grid-template-columns: repeat(6, 1fr);
    }
    .inactive-time-grid {
        grid-template-columns: repeat(8, 1fr);
    }
    .smart-inputs-row,
    .stats-grid {
        grid-template-columns: 1fr;
    }
    .tarife-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .tarife-box strong {
        min-height: auto;
    }
}

@media (max-width: 768px) {
    .direction-switcher {
        grid-template-columns: 1fr;
    }
    .time-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    .inactive-time-grid {
        grid-template-columns: repeat(6, 1fr);
    }
    .result-box-header {
        flex-direction: column;
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .time-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .inactive-time-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    .tarife-grid {
        grid-template-columns: 1fr;
    }
}

/* Premium Map Component Styles */
#live-route-map {
    height: 480px;
    width: 100%;
    border-radius: 20px;
    margin-bottom: 25px;
    box-shadow: 0 12px 35px rgba(15, 23, 42, 0.08);
    border: 1px solid #e2e8f0;
    z-index: 10;
    overflow: hidden;
}

/* Dark mode-ish styling for Leaflet custom popup */
.leaflet-popup-content-wrapper {
    background: #0f172a !important;
    color: #ffffff !important;
    border-radius: 12px !important;
    padding: 8px !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25) !important;
}

.leaflet-popup-content {
    margin: 0 !important;
    width: auto !important;
}

.leaflet-popup-tip {
    background: #0f172a !important;
}

.map-popup-card {
    font-family: 'Poppins', sans-serif;
    padding: 8px;
    position: relative;
    width: 320px;
    min-height: 160px;
    height: auto;
    overflow: hidden;
}

.station-popup-card {
    min-height: auto;
    width: 290px;
}

.bus-popup-wrapper {
    pointer-events: none;
}

.bus-popup-wrapper .leaflet-popup-content-wrapper,
.bus-popup-wrapper .leaflet-popup-tip {
    pointer-events: none;
}

/* Bulletproof Pure CSS GPRS Loader Transitions */
.popup-gprs-loading {
    position: absolute;
    top: 8px;
    left: 8px;
    width: calc(100% - 16px);
    height: calc(100% - 16px);
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 1;
    animation: popupLoaderHide 0.4s forwards 2.2s ease-in-out;
}

.popup-vehicle-details {
    position: absolute;
    top: 8px;
    left: 8px;
    width: calc(100% - 16px);
    height: calc(100% - 16px);
    display: block !important;
    opacity: 0;
    pointer-events: none;
    animation: popupDetailsShow 0.4s forwards 2.4s ease-in-out;
}

@keyframes popupLoaderHide {
    0% {
        opacity: 1;
        transform: scale(1);
    }
    100% {
        opacity: 0;
        transform: scale(0.95);
        display: none !important;
        pointer-events: none;
    }
}

@keyframes popupDetailsShow {
    0% {
        opacity: 0;
        transform: scale(1.05);
        pointer-events: none;
    }
    100% {
        opacity: 1;
        transform: scale(1);
        pointer-events: auto;
    }
}

.gprs-popup-badge {
    position: absolute;
    top: 0px;
    right: 0px;
    display: flex;
    align-items: center;
    gap: 5px;
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 20px;
    padding: 3px 8px;
    font-size: 0.65rem;
    font-weight: 700;
    color: #10b981;
    letter-spacing: 0.3px;
    box-shadow: 0 2px 6px rgba(16, 185, 129, 0.1);
}

.map-popup-card h5 {
    margin: 0 0 6px 0;
    font-size: 0.85rem;
    font-weight: 700;
    color: #38bdf8;
    display: flex;
    align-items: center;
    gap: 5px;
}

.map-popup-card p {
    margin: 2px 0;
    font-size: 0.75rem;
    color: #cbd5e1;
}

.map-popup-card strong {
    color: #ffffff;
}

/* Custom Marker Styles */
.custom-bus-marker {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.map-bus-icon {
    width: 32px;
    height: 32px;
    background: #2563eb;
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
    border: 2.5px solid #ffffff;
    z-index: 2;
    transition: all 0.2s ease;
    font-size: 14px;
    animation: mapBusDriving 0.6s ease-in-out infinite alternate;
}

.map-bus-icon.donus {
    background: #10b981;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

.map-bus-icon:hover {
    transform: scale(1.2) !important;
    animation: none !important;
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.6);
}

.map-bus-icon.donus:hover {
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.6);
}

@keyframes mapBusDriving {
    0% {
        transform: rotate(-3deg) translateY(0);
    }
    100% {
        transform: rotate(3deg) translateY(-1.5px);
    }
}

/* Map buttons styling inside Leaflet */
.leaflet-bar {
    border: none !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
}

.leaflet-bar a {
    background-color: #ffffff !important;
    color: #1e293b !important;
    border: 1px solid #e2e8f0 !important;
    transition: background 0.2s, color 0.2s;
}

.leaflet-bar a:hover {
    background-color: #f8fafc !important;
    color: #2563eb !important;
}

/* GPRS loading overlay */
.gprs-loader-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(4px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.gprs-loader-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.gprs-loader-box {
    background: rgba(30, 41, 59, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 24px 32px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.gprs-loader-overlay.active .gprs-loader-box {
    transform: scale(1);
}

.gprs-radar {
    position: relative;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 2px solid #2563eb;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gprs-radar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid #3b82f6;
    animation: radarPulse 1.5s infinite linear;
}

.gprs-radar i {
    font-size: 28px;
    color: #3b82f6;
}

.gprs-text {
    font-size: 15px;
    color: #f1f5f9;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 4px;
}

.gprs-text .dots {
    display: flex;
    gap: 2px;
    margin-left: 4px;
}

.gprs-text .dots span {
    display: inline-block;
    width: 4px;
    height: 4px;
    background-color: #3b82f6;
    border-radius: 50%;
    animation: dotPulse 1.2s infinite alternate;
}

.gprs-text .dots span:nth-child(2) {
    animation-delay: 0.3s;
}

.gprs-text .dots span:nth-child(3) {
    animation-delay: 0.6s;
}

@keyframes radarPulse {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }
    100% {
        transform: scale(1.6);
        opacity: 0;
    }
}

@keyframes dotPulse {
    0% {
        transform: scale(0.6);
        opacity: 0.3;
    }
    100% {
        transform: scale(1.2);
        opacity: 1;
    }
}

/* GPRS status indicator in header */
.gprs-status-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 20px;
    padding: 6px 14px;
    font-size: 0.8rem;
    font-weight: 700;
    color: #10b981;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.05);
}

.gprs-signal-dot {
    width: 8px;
    height: 8px;
    background-color: #10b981;
    border-radius: 50%;
    position: relative;
    display: inline-block;
    box-shadow: 0 0 8px #10b981;
}

.gprs-signal-dot::after {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 1.5px solid rgba(16, 185, 129, 0.5);
    animation: gprsBlink 1.5s infinite linear;
}

.gprs-status-indicator i {
    font-size: 1rem;
    animation: signalPulse 1s infinite alternate;
}

@keyframes gprsBlink {
    0% {
        transform: scale(0.6);
        opacity: 1;
    }
    100% {
        transform: scale(1.6);
        opacity: 0;
    }
}

@keyframes signalPulse {
    0% {
        opacity: 0.4;
    }
    100% {
        opacity: 1;
    }
}
/* Extended Popup Styles */
.station-popup-title {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.icon-box {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 6px;
    font-size: 14px;
}
.station-popup-rows {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 10px;
}
.station-popup-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.station-popup-row--next {
    padding-top: 8px;
    border-top: 1px dashed rgba(255, 255, 255, 0.1);
}
.station-popup-label {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    color: #94a3b8;
    text-transform: uppercase;
    font-weight: 600;
}
.station-popup-val {
    font-size: 0.85rem;
}
.time-block {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.time-main-row {
    display: flex;
    align-items: center;
    gap: 6px;
}
.time-main {
    font-size: 1.1rem;
    font-weight: 700;
}
.last-time {
    color: #cbd5e1;
}
.next-time {
    color: #38bdf8;
}
.time-sub {
    font-size: 0.7rem;
    color: #64748b;
}
.time-relative {
    font-size: 0.75rem;
    color: #fde047;
}
.active-badge {
    background: rgba(16, 185, 129, 0.18);
    color: #10b981;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
}
.empty-status {
    color: #cbd5e1;
    font-style: italic;
    font-size: 0.8rem;
}
.empty-status.danger {
    color: #ef4444;
}
