.visualisation-menu {
    position: fixed;
    z-index: 10000;
    background-color: #f1f1f1;
    width: 1200px;
    height: 400px;
    top: 50%;
    left: 50%;
    display: none;
}

.visualisation-menu.is-visible {
    display: block;
}

.visualisation-menu__top-bar {
    background-color: #112d80;
    height: 100px;
    display: flex;
    align-items: center;
    padding: 0 20px;
}

.visualisation-menu__title {
    color: #f1f1f1;
    font-family: "TFL", sans-serif;
    font-size: 45px;
    margin: 0;
}

.visualisation-menu__line-container {
    position: relative;
    height: 300px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Line runs from centre of first station to centre of last station (no overhang) */
.visualisation-menu__line {
    position: absolute;
    top: 42%;
    left: 6%;
    right: 6%;
    width: auto;
    height: 8px;
    background-color: #112d80;
    transform: translateY(-50%);
}

.visualisation-menu__stations {
    position: absolute;
    display: flex;
    justify-content: space-between;
    width: 1200px;
    top: 42%;
    /* Top edge of stations row aligns with centre of line so markers sit on line */
}

.station {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    padding: 8px;
    padding-top: 30px; /* Space for marker centered on line */
    min-width: 60px;
    min-height: 60px;
    position: relative;
}

.station__marker {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 45px;
    height: 45px;
    min-width: 45px;
    min-height: 45px;
    border-radius: 50%;
    background-color: #f1f1f1;
    border: 6px solid var(--station-color);
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    box-sizing: border-box;
    transition: background-color 0.2s ease;
}

.station:hover .station__marker {
    background-color: var(--station-color);
}

.station__details {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 10px;
}

.station__name {
    font-family: "TFL", sans-serif;
    font-size: 20px;
    color: #112d80;
}

.station__detail-badge {
    margin-top: 5px;
    padding: 5px 10px;
    min-height: 24px; /* Ensure touch target size */
    background-color: var(--station-color);
    color: white;
    font-family: "TFL", sans-serif;
    border-radius: 5px;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

/* Responsive design */
@media (max-width: 1500px) {
    .visualisation-menu {
        width: 80%;
        max-width: 1400px;
    }

    .visualisation-menu__line {
        left: 6%;
        right: 6%;
    }

    .visualisation-menu__stations {
        width: 80%;
    }
}

/* Mobile-specific improvements */
@media (max-width: 768px) {
    .station {
        padding: 12px;
        padding-top: 35px; /* Space for larger marker centered on line */
        min-width: 70px;
        min-height: 70px;
    }

    .station__marker {
        width: 50px;
        height: 50px;
        min-width: 50px;
        min-height: 50px;
        border-width: 6px;
    }
}
