@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;700;900&display=swap');
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}
body {
    height: 100svh;
    overflow: hidden;
}
:root {
    --black: #0f0f0f;
    --white: #f0f0f0;
    --AirportLine: #44c2b2;
    --ArmadaleLine: #f6a800;
    --FremantleLine: #003a79;
    --JoondalupLine: #959300;
    --YanchepLine: #959300;
    --MandurahLine: #d25f15;
    --MidlandLine: #960048;
    --EllenbrookLine: #d2222c;
    --Thornlie-CockburnLink: #735838;
}
::-webkit-scrollbar {
    background: none;
}

.pulse1,
.pulse2 {
  position: absolute;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  z-index: 0;
  animation: pulse 2s infinite;
}

.pulse2 {
  animation-delay: 1s;
}

@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 1;
  }

  100% {
    transform: scale(1.5);
    opacity: 0;
  }
}

.ping {
  position: absolute;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  z-index: 0;
  animation: ping 2s;
  animation-iteration-count: 1;
}

@keyframes ping {
  0% {
    transform: scale(1);
    opacity: 1;
  }

  100% {
    transform: scale(10);
    opacity: 0;
  }
}

.spin1 {
    position: absolute;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    z-index: 0;
}
.spin2 {
    position: absolute;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    z-index: 0;
}

/* Content */

.content {
    margin-left: 50px;
    height: 100%;
    width: calc(100% - 50px);
    opacity: 1;
    transition: 0.5s ease-in-out;
}

#map {
    height: 100vh;
    width: 100%;
}
#statusbar {
    position: absolute;
    z-index: 100000000;
    width: calc(100% - 50px);
    height: 50px;
    background-color: #F34925;
    color: #f0f0f0;
}
#statusbar > h3 {
    margin: 0;
    padding: 0;
    line-height: 50px;
    text-align: center;
}

.leaflet-fade-anim .leaflet-popup {
    transition: none;
}

@media (min-width: 600px) {
    #station-card-container {
        position: absolute;
        z-index: 1000;
        bottom: 15px;
        left: 75px;
    }
    .stationcard {
        background-color: #f0f0f0;
        width: 300px;
        border-radius: 20px;
    }
    .stationcard-top {
        border-radius: 20px 20px 0px 0px;
        height: 140px;
    }
    .stationcard-content {
        margin: 10px;
        max-height: 350px;
        overflow: auto;
        width: 100%;
    }

    #service-card-container {
        position: absolute;
        z-index: 1000;
        bottom: 15px;
        left: 75px;
    }
    .servicecard {
        background-color: #f0f0f0;
        width: 300px;
        border-radius: 20px;
    }
    .servicecard-top {
        border-radius: 20px 20px 0px 0px;
        height: 140px;
    }
}
@media (max-width: 599px) {
    #station-card-container {
        position: absolute;
        z-index: 1000;
        bottom: -10px;
        left: 0px;
        width: 100%;
    }
    .stationcard {
        background-color: #f0f0f0;
        width: calc(100% - 50px);
        margin-left: 50px;
        max-height: 35vh;
    }
    .stationcard-top {
        border-radius: 0px 0px 0px 0px;
        height: 100px;
    }
    .stationcard-content {
        margin: 10px;
        height: calc(100% - 150px);
        overflow: auto;
        width: 95%;
    }
    h3 {
        font-size: 0.8rem;
    }
}
.custom-tooltip {
    position: absolute;
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: none;
}
.custom-tooltip-content {
    font-weight: 700;
    background-color: rgba(255, 255, 255, 0.4);
    border: 3px solid rgba(26, 26, 26, 0.8);
    padding: 5px;
    border-radius: 5px;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
    position: absolute;
    white-space: nowrap;
    z-index: 5000;
    cursor: pointer;
}
.stationcard-top {
    width: 100%;
    background-color: black;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background-image: url('https://hera.net.au/wp-content/uploads/Hera-Nov-2017-8.jpg');
    background-position: center;
    background-size: cover;
    border-bottom: #0f0f0f 5px solid;
}
.stationcard-header {
    color: #f0f0f0;
    font-weight: 900;
    text-align: left;
    position: absolute;
    bottom: 2px;
    left: 10px;
    text-shadow: 0px 0px 10px #0f0f0f;
}
.stationcard-tags {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}
.tag {
    height: 20px;
    cursor: pointer;
    border: #0f0f0f solid 1px;
    border-radius: 20px;
    font-size: 0.7rem;
    padding: 0px 10px 0px 20px;
    position: relative;
    margin-bottom: 5px;
    transition: 0.3s ease-in-out;
}
.tag > i {
    position: absolute;
    right: 5px;
    top: 3px;
}
.tag::before {
    content: '';
    position: absolute;
    top: 5px;
    left: 5px;
    border-radius: 50%;
    height: 7.5px;
    width: 7.5px;
    background-color: #FFFFFF;
    transition: 0.3s ease-in-out;
}
.Mandurah {
    border-color: #d25f15;
}
.Mandurah.selected {
    background-color: #d25f15;
    color: white;
    font-weight: bold;
}
.Mandurah:not(.selected)::before {
    background-color: #d25f15;
}
.Yanchep {
    border-color: #959300;
}
.Yanchep.selected {
    background-color: #959300;
    color: black;
    font-weight: bold;
}
.Yanchep:not(.selected)::before {
    background-color: #959300;
}
.Armadale {
    border-color: #f6a800;
}
.Armadale.selected {
    background-color: #f6a800;
    color: black;
    font-weight: bold;
}
.Armadale:not(.selected)::before {
    background-color: #f6a800;
}
.Fremantle {
    border-color: #003a79;
}
.Fremantle.selected {
    background-color: #003a79;
    color: white;
    font-weight: bold;
}
.Fremantle:not(.selected)::before {
    background-color: #003a79;
}
.Airport {
    border-color: #44c2b2;
}
.Airport.selected {
    background-color: #44c2b2;
    color: black;
    font-weight: bold;
}
.Airport:not(.selected)::before {
    background-color: #44c2b2;
}
.Midland {
    border-color: #960048;
}
.Midland.selected {
    background-color: #960048;
    color: white;
    font-weight: bold;
}
.Midland:not(.selected)::before {
    background-color: #960048;
}
.Ellenbrook {
    border-color: #d2222c;
}
.Ellenbrook.selected {
    background-color: #d2222c;
    color: white;
    font-weight: bold;
}
.Ellenbrook:not(.selected)::before {
    background-color: #d2222c;
}
.carddivider {
    width: calc(100% - 20px);
    margin: 5px 0px 0px 10px;
    height: 1px;
    background-color: #0f0f0f;
}
.stationcard-platforms {
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex-wrap: wrap;
}
.stationcard-line {
    font-size: 0.8rem;
    display: flex;
    flex-direction: column;
}
.cardlisttrip {
    background: none;
    border-radius: 10px;
    display: flex;
    margin-bottom: 5px;
    border: none;
    text-align: left;
    line-height: 0.8rem;
    gap: 5px;
    position: relative;
    width: 100%;
    cursor: pointer;
}
.cardlisttripLINEDOT {
    position: absolute;
    bottom: -3px;
    left: 18px;
    height: 10px;
    width: 10px;
    border-radius: 5px;
}
.cardlisttrip > p:first-child > img {
    height: 0.8rem;
    width: 0.8rem;
}
.cardlisttrip > img {
    height: 1.6rem;
    width: 1.6rem;
}
.cardlisttrip > div > p:last-child {
    font-size: 0.7rem;
}
.retractable {
    transition: 0.3s ease-in-out;
    overflow: hidden;
}

#close-button {
    position: absolute;
    top: 5px;
    right: 10px;
    z-index: 1000;
    background: white;
    border: none;
    color: black;
    height: 25px;
    width: 25px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

/* Service Card */

.servicecard-top {
    width: 100%;
    background-color: black;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background-image: url('https://hera.net.au/wp-content/uploads/Hera-Nov-2017-8.jpg');
    background-position: center;
    background-size: cover;
    border-bottom: #0f0f0f 5px solid;
}
.servicecard-header {
    color: #f0f0f0;
    font-weight: 900;
    text-align: left;
    position: absolute;
    bottom: 10px;
    left: 10px;
    text-shadow: 0px 0px 10px #0f0f0f;
}
.servicecard-subhead {
    color: #f0f0f0;
    font-weight: 700;
    text-align: left;
    position: absolute;
    bottom: 0px;
    left: 10px;
    text-shadow: 0px 0px 10px #0f0f0f;
}
.servicecard-tags {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}
#service-lines {
    margin: 5px 10px;
    font-size: 0.85rem;
}
#service-paragraph {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.working-section {
    padding: 2px 0;
    line-height: 1.2rem;
}
.working-run-id {
    display: inline;
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.04rem;
    color: var(--working-run-colour, #666666);
    white-space: nowrap;
    margin-right: 6px;
}
.working-text {
    display: inline;
    line-height: 1.2rem;
    color: #111;
}
.service-line-container {
    margin-top: 5px;
    position: relative;
    max-height: 350px;
    overflow: auto;
    width: 100%;
}
#service-stops {
    list-style: none;
    margin: 0;
    padding: 0;
    position: relative;
    margin-left: 20px;
}
#service-stops li {
    display: flex;
    flex-direction: column;
    justify-content: center;
    font-size: 0.9rem;
    position: relative;
    padding-left: 20px; /* Add space for the dot */
    margin-bottom: 5px;
}
.service-line-container::before {
    content: '';
    position: absolute;
    left: 17px; /* Adjust to align with the center of the dots */
    top: 0;
    bottom: 0;
    width: 18px; /* Thickness of the vertical line */
    height: var(--line-height, 100%);
    background-color: var(--line-color, #d3d3d3);
    z-index: 0; /* Behind everything */
    border-radius: 25px;
}
#service-stops li::before {
    content: '';
    position: absolute;
    left: 0; /* Align the dot with the line */
    top: 4px; /* Center the dot vertically within each list item */
    width: 12px; /* Diameter of the dot */
    height: 12px; /* Diameter of the dot */
    background-color: white; /* Color of the dot */
    border-radius: 50%; /* Makes it a perfect circle */
    z-index: 1; /* Place the dot above the line */
}
.stop-time {
    font-size: 0.7rem;
}
#service-stops .current-stop {
    font-weight: bold;
    color: #000;
}
.visited-stop {
    opacity: 0.5; /* Visited stops are displayed with reduced opacity */
}
.train-icon {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    left: 8px; /* Align the train with the line */
    width: 36px; /* Same width as the line for a consistent look */
    height: 36px;
    transform: translateY(-50%); /* Center the icon vertically */
    z-index: 2; /* Make sure it's above the line */
}

.cardpulse1,
.cardpulse2 {
    position: absolute;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    z-index: 1; /* Ensure pulses are behind the train image */
    animation: cardpulse 2s infinite;
}

.cardpulse2 {
    animation-delay: 1s; /* Pulse delay for alternating effect */
}

@keyframes cardpulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}