/* Pulse animation for loading road names */
@keyframes navPulse {
    0% {
        opacity: 0.6;
    }
    50% {
        opacity: 1;
    }
    100% {
        opacity: 0.6;
    }
}

.navigate-wrapper {
    position: fixed;
    top: 0;
    /* left: 0; */
    z-index: 403;
    pointer-events: none;
    font-family: var(--font-family);
    color: var(--theme-color);
    width: 100%;
    font-size: 1.5rem;
    height: 100%;
    padding: 1rem;
    box-sizing: border-box;
}

.navigate-inner {
    height: 100%;
    row-gap: 1rem;
}

/* Navigation input containers */
.nav-from,
.nav-to {
    position: relative;
}

/* Navigation input wrapper for clear button positioning */
.nav-input-wrapper {
    position: relative;
}

/* Navigation input styling */
.nav-input {
    box-sizing: border-box;
    width: 100%;
    padding: 0.8rem 1rem;
    font-size: 1.4rem;
    border-radius: 0.8rem;
    border: 1px solid var(--theme-color);
    background-color: var(--theme-bg);
    color: var(--theme-color);
    margin: 0;
    outline: none;
    font-family: var(--font-family);
    transition: all 0.2s ease;
}

.nav-input::placeholder {
    color: var(--theme-extra);
}

.nav-input:focus {
    border-color: var(--theme-color-lighter);
    box-shadow: 0 0 0 0.2rem rgba(128, 128, 128, 0.2);
}

.nav-input:hover {
    border-color: var(--theme-color-lighter);
}

.nav-input.has-value {
    border-color: var(--theme-color-lighter);
    background-color: rgba(128, 128, 128, 0.05);
}

/* Navigation directions wrapper styling */
.nav-directions-wrapper {
    overflow-y: auto;
    scrollbar-width: thin;
    flex: 1;
    background-color: var(--theme-bg);
    flex-direction: column;
    pointer-events: all;
}

.nav-directions-wrapper::-webkit-scrollbar {
    width: 6px;
}

.nav-directions-wrapper::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 3px;
}

.nav-directions-wrapper::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 3px;
}

.nav-directions-wrapper::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.5);
}

/* Navigation message styling */
.nav-message {
    background-color: var(--theme-bg);
    color: var(--theme-color);
    padding: 1rem;
    margin: 1rem;
    border-radius: 0.8rem;
    border: 1px solid var(--theme-color);
    text-align: center;
    font-size: 1.4rem;
    display: none;
}

/* Make swap button more interactive */
.nav-swap {
    cursor: pointer;
    transition: transform 0.2s ease;
}

.nav-swap:hover {
    transform: scale(1.1);
}

.nav-swap:active {
    transform: scale(0.95);
}

/* Navigation autocomplete dropdown styling */
.nav-from-search-results,
.nav-to-search-results {
    background-color: var(--theme-bg);
    border: 1px solid var(--theme-color);
    border-radius: 0.8rem;
    margin-top: 0.5rem;
    max-height: 200px;
    overflow-y: auto;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 404;
    pointer-events: all;
}

.nav-search-result-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.8rem 1rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
    border-radius: 0.5rem;
    margin: 0.2rem;
    font-size: 1.3rem;
    /* user-select: none;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    touch-action: manipulation; */
}

.nav-search-result-item:hover,
.nav-search-result-item.highlighted {
    background-color: var(--theme-color);
    color: var(--theme-bg);
}

.nav-search-result-item.highlighted i {
    color: var(--theme-bg);
}

.nav-search-result-item i {
    font-size: 1.4rem;
    color: var(--theme-color);
    min-width: 1.4rem;
}

.nav-search-no-results {
    padding: 1rem;
    text-align: center;
    color: var(--theme-extra);
    font-size: 1.2rem;
    font-style: italic;
}

/* Ensure dropdown appears above other navigation elements */
.nav-from-search-results,
.nav-to-search-results {
    position: relative;
    z-index: 10;
}

.route-options-container {
    display: flex;
    gap: 0.75rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.route-options-container::-webkit-scrollbar {
    display: none;
}

.route-option {
    flex-shrink: 0;
    padding: 0.5rem 1rem;
    border-radius: 4rem;
    font-weight: 600;
    font-size: 1.2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    border: 2px solid transparent;
    user-select: none;
}

.route-option.selected {
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}



/* Timeline styling */
.route-timeline-container {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.route-timeline {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 60px;
    padding-top: 1rem;
}

.timeline-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    margin-bottom: 2rem;
}

.timeline-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--theme-color);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    position: relative;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.timeline-item.building .timeline-circle,
.timeline-item.stop .timeline-circle,
.timeline-item.boarding .timeline-circle,
.timeline-item.alighting .timeline-circle,
.timeline-item.intermediate .timeline-circle {
    background-color: #000000;
}

.timeline-line {
    position: absolute;
    top: 40px;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 2rem;
    background-color: #d1d5db;
    z-index: 1;
}

.route-content-wrapper {
    flex: 1;
    min-width: 0;
    padding: 1rem;
}

/* Waypoint row styling */
.waypoint-row {
    display: flex;
    align-items: flex-start;
    margin-bottom: 3rem;
    position: relative;
    gap: 0.75rem;
}

.waypoint-circle {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: var(--theme-color);
    box-sizing: border-box;
    flex-shrink: 0;
    margin-right: 1rem;
    margin-top: 0.4rem;
    position: relative;
    z-index: 2;
}

.waypoint-circle.building-circle {
    background-color: var(--theme-color);
}

.waypoint-circle.stop-circle {
    background-color: var(--theme-color);
}

.waypoint-circle.boarding-circle {
    background-color: var(--theme-color);
}

.waypoint-circle.alighting-circle {
    background-color: var(--theme-color);
    border: 2px solid var(--theme-extra);
}

.waypoint-content {
    flex: 1;
    min-width: 0;
}

.waypoint-header {
    margin-bottom: 0.5rem;
}

.waypoint-title {
    font-size: 1.7rem;
    font-weight: 500;
    margin: 0;
    color: var(--theme-color);
}

.waypoint-description {
    font-size: 1.2rem;
    color: var(--theme-extra);
    font-style: italic;
}

.waypoint-details {
    margin-top: 0.5rem;
}

.waypoint-rows-container {
    position: relative;
}

.waypoint-connector { display: none; }

.waypoint-connector-global {
    position: absolute;
    width: 2px;
    background-color: #d1d5db;
    z-index: 1;
}

.connector-text {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.75rem;
    color: #6b7280;
    white-space: nowrap;
    background-color: var(--theme-bg);
    padding: 0.125rem 0.5rem;
}