/* Shared Styles - Common styles across all pages */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    height: 100%;
    width: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

body {
    font-family: 'Inter', Arial, sans-serif;
    background: #181a1b;
    color: #fff;
    line-height: 1.2;
    width: 100vw;
    height: 100dvh;
}

.container {
    width: 100%;
    height: 100dvh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    padding: 0;
    margin: 0 auto;
    background: #181a1b;
    overflow: hidden;
}

.header {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid #333;
    min-height: 70px;
    flex-shrink: 0;
}

.header-left {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
    margin-right: auto;
}

.header-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    margin: 0 20px;
    text-align: center;
    min-height: 0;
    min-width: 0;
    gap: 4px;
}

.header-right {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
    margin-left: auto;
}

.header .header-center .current-location {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 2px;
    color: #fff;
    font-size: 13px;
    max-width: 100%;
    word-wrap: break-word;
    white-space: normal;
    line-height: 1.2;
}

.header .header-center .current-location span {
    flex: 1;
    word-wrap: break-word;
    white-space: normal;
    max-width: 100%;
    display: block;
    font-size: 13px;
}

.header-center>* {
    line-height: 1.2;
}

.live-indicator-container {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
}

dotlottie-wc {
    display: block;
    flex-shrink: 0;
}

.live-indicator-container dotlottie-wc {
    align-self: center;
    margin: 0 !important;
    vertical-align: middle;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
}

.icon {
    width: 20px;
    height: 20px;
    display: block;
}

@keyframes blink {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0.3;
    }

    100% {
        opacity: 1;
    }
}

.header-text {
    font-size: 16px;
    font-weight: 600;
    color: #fff;
}

.status-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 10px;
}

.status-label {
    font-size: 20px;
    font-weight: 600;
    color: #C8C7C5;
}

.page-title {
    font-size: 32px;
    font-weight: bold;
    color: #fff;
    margin: 0;
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 0;
    margin-top: 5px;
    margin-bottom: 100px;
    overflow: hidden;
    position: relative;
}

.nav-icon-img {
    width: 24px;
    height: 24px;
    filter: brightness(0) invert(1);
    box-sizing: content-box;
    padding: 4px;
}

.bottom-nav {
    position: fixed;
    bottom: 75px;
    left: 0;
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    z-index: 100;
    background-color: #181a1b;
    border-top: 1px solid #333;
    padding: 10px 0;
    height: auto;
}

.bottom-nav-content {
    display: flex;
    position: relative;
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
}

.nav-icon {
    width: 50px;
    height: 50px;
    background-color: #6A63F6;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-rectangle {
    width: 35px;
    height: 45px;
    background-color: #413C96;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    padding: 8px;
    margin: 4px;
}

/* Responsive design */
@media (min-width: 768px) {
    .container {
        max-width: 500px;
        margin: 0 auto;
        box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
    }

    .page-title {
        font-size: 36px;
    }
}

/* Desktop notification banner */
.desktop-notification {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: #6A63F6;
    color: white;
    text-align: center;
    padding: 10px;
    z-index: 9999;
    font-size: 14px;
}

.desktop-notification p {
    margin: 0;
    display: inline-block;
}

.desktop-notification button {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    padding: 0 10px;
    margin-left: 10px;
    float: right;
}

/* Search Modal Styles */
.search-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    backdrop-filter: blur(5px);
}

.search-modal-content {
    position: absolute;
    top: 10%;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 500px;
    background-color: #181a1b;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    max-height: 80vh;
    display: flex;
    flex-direction: column;
}

.search-header {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    background-color: #2a2d2e;
    position: relative;
}

.search-input {
    flex: 1;
    padding: 12px 16px;
    border: none;
    border-radius: 8px;
    background-color: #3a3d3e;
    color: white;
    font-size: 16px;
    outline: none;
}

.search-input:focus {
    background-color: #4a4d4e;
}

.close-search-btn {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0 10px;
    margin-left: 10px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.close-search-btn:hover {
    background-color: #444;
}

.search-results {
    max-height: 400px;
    overflow-y: auto;
    padding: 8px 0;
    flex: 1;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

.search-result-item {
    padding: 14px 16px;
    border-bottom: 1px solid #333;
    cursor: pointer;
    color: white;
    font-size: 14px;
    transition: background-color 0.2s;
    display: flex;
    flex-direction: column;
    min-height: 50px;
    max-width: 100%;
    box-sizing: border-box;
    word-break: break-word;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background-color: #2a2d2e;
}

.search-result-item .result-title {
    font-weight: 500;
    margin-bottom: 4px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal;
    font-size: 14px;
    line-height: 1.3;
    max-width: 100%;
    box-sizing: border-box;
}

.search-result-item .result-address {
    font-size: 12px;
    color: #aaa;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal;
    line-height: 1.3;
    max-width: 100%;
    box-sizing: border-box;
}

/* Refresh button styles */
.refresh-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 1000;
    background: #6A63F6;
    border: 1px solid #6A63F6;
    cursor: pointer;
    padding: 14px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    backdrop-filter: blur(5px);
}

.refresh-btn .icon {
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
}

/* Show notification only on desktop screens */
@media (min-width: 768px) {
    .desktop-notification {
        display: block;
    }

    .container {
        display: none;
    }
}

/* Common button styles */
.search-btn,
.menu-btn,
.back-btn,
.feedback-btn {
    background: none;
    border: 1px solid white;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: auto;
    width: 40px;
    height: 40px;
}

/* Common popup styles */
.bus-stop-popup {
    color: #181a1b;
}

.bus-stop-popup h3 {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 600;
    color: #181a1b;
}

.bus-stop-popup .popup-details {
    font-size: 14px;
}

.bus-stop-popup .stop-info {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.bus-stop-popup .stop-code {
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: bold;
    font-size: 12px;
    background-color: #f0f0f0;
    color: #333;
}

.bus-stop-popup .stop-name {
    font-weight: 600;
}

.bus-stop-popup .routes-serving {
    margin: 8px 0;
}

.bus-stop-popup .route-list {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin: 4px 0;
}

.bus-stop-popup .route-item {
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
    color: white;
}

.bus-stop-popup .arrival-info {
    display: flex;
    flex-direction: column;
    margin: 8px 0;
}

.bus-stop-popup .next-arrival {
    font-weight: 600;
    margin-bottom: 2px;
}

.bus-stop-popup .departure-info {
    display: flex;
    flex-direction: column;
    margin: 8px 0;
}

.bus-stop-popup .next-departure {
    font-weight: 600;
    margin-bottom: 2px;
}

.bus-stop-popup .real-time-indicator {
    font-size: 12px;
    color: #06d6a0;
}

.bus-stop-popup .scheduled-indicator {
    font-size: 12px;
    color: #595959;
}

.bus-stop-popup .vehicle-type {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    font-size: 14px;
}

.bus-stop-popup .vehicle-type-label {
    font-weight: 600;
    color: #181a1b;
}

.bus-stop-popup .vehicle-type-value {
    font-weight: 500;
    color: #6A63F6;
    background-color: #e0e0ff;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
}

.bus-stop-popup .vehicle-type-value.bus {
    color: #6A63F6;
    background-color: #e0e0ff;
}

.bus-stop-popup .vehicle-type-value.rail {
    color: #d32f2f;
    background-color: #ffebee;
}

.bus-stop-popup .vehicle-type-value.subway {
    color: #e64a19;
    background-color: #ffe0b2;
}

.bus-stop-popup .vehicle-type-value.tram {
    color: #388e3c;
    background-color: #e8f5e9;
}

.bus-stop-popup .vehicle-type-value.ferry {
    color: #0288d1;
    background-color: #e1f5fe;
}

.bus-stop-popup .accessibility-info {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    margin-top: 6px;
}

.bus-stop-popup .accessibility-label {
    font-weight: 600;
    color: #181a1b;
    font-size: inherit;
}

.bus-stop-popup .accessibility-value {
    color: #000000;
    background-color: #f0f0f0;
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 500;
    font-size: 12px;
}

.bus-stop-popup .accessibility-value.accessible {
    color: #0066cc;
    background-color: #e6f0ff;
}

.bus-stop-popup .route-info {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.bus-stop-popup .route-number {
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: bold;
    font-size: 12px;
}

.bus-stop-popup .direction {
    font-weight: 500;
    color: #181a1b;
}