@import url(https://fonts.googleapis.com/css?family=Open+Sans+Condensed:300,700);

html,
body {
    background-color: black;
    margin: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

canvas {
    image-rendering: pixelated;
    cursor: grab;
}

#mapa {
    width: 100%;
    height: 100%;
    background-color: black;
    image-rendering: pixelated;
    position: fixed;
}

.leaflet-layer {
    filter: brightness(70%);
}

#sidebar {
    width: 15%;
    height: 100%;
    color: white;
    position: absolute;
    background-color: black;
    z-index: 2;
    box-shadow: rgba(0, 0, 0, 0.3) 15px 0px 15px;
    transform: translateX(-200%);
    transition: transform 0.3s ease;
}

.x {
    position: absolute;
    top: 10px;
    right: 10px;
    margin: 0;
    cursor: pointer;
}

#hamburger {
    color: white;
    position: fixed;
    margin: 0;
    padding: 20px;
    font-size: 30px;
    z-index: 1;
    cursor: pointer;
}

#nav {
    width: 24%;
    float: left;
    background-color: #222;
    display: none;
}

#nav p {
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0;
    box-sizing: border-box;
    width: 100%;
    padding: 10px;
    height: calc((100% - 3px) / 4);
    writing-mode: sideways-lr;
    text-orientation: upright;
    font-size: 24px;
}

#nav .active {
    background-color: black;
}

#bar {
    width: 2%;
    height: 100%;
    background-color: #555;
    float: left;
}

#content {
    width: 98%;
    height: 100%;
    float: left;
}

.section {
    box-sizing: border-box;
    padding: 3em;
    height: 100%;
}

.list-container {
    height: 100%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.list-container h1 {
    margin: 0
}

dl> :nth-of-type(2n) {
    background: #222;
}

.list {
    margin: 0;
    position: relative;
    overflow: auto;
    width: 100%;
}

.list dt {
    padding: 1em;
    font-size: 20px;
}

.details {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.details>* {
    padding: 0 3rem;
}

.back {
    position: absolute;
    top: 15px;
    left: calc(2% + 10px);
    margin: 0;
    cursor: pointer;
    padding: 0;
}

#line-stations {
    padding: 0;
    padding-right: 5px;
    overflow: auto;
}

#line-stations h3 {
    text-align: center;
}

#filters {
    position: absolute;
    width: calc(50%);
    height: 50%;
    top: 25%;
    left: 25%;
}

.filter-container {
    position: absolute;
    box-sizing: border-box;
    width: 100%;
    height: 100%;
    border-radius: 10px;
    padding: 20px;
    background-color: #222;
    color: white;
}

.searchbar {
    position: relative;
    border: 1px solid #ccc; /* optional: adds a visible border */
    border-radius: 14px;     /* adjust the value to your liking */
    padding: 8px;           /* optional: adds spacing inside */
}

.section hr {
    width: 100%;
    box-sizing: border-box;
}

.filter-link {
    text-align: center;
    padding: 5px;
}

a {
    color: lightskyblue;
    cursor: pointer;
}

#line-stations {
    overflow-y: auto;
    overflow-x: hidden;
}

.station-item:before {
    background-color: var(--line-color, white);
    width: 2px;
    content: '';
    position: absolute;
    top: 0px;
    bottom: 0px;
    left: 20.65px;
}


.station-item {
    display: flex;
    flex-direction: column;
    position: relative;
    margin: 0;
    padding-bottom: 1em;
    padding-left: 35px;
}

#line-stations>ul {
    padding: 0;
    list-style-type: none;
}

.station-item::after {
    content: '';
    position: absolute;
    -moz-border-radius: 7.5px;
    -webkit-border-radius: 7.5px;
    border-radius: 7.5px;
    background-color: var(--line-color, white);
    left: 15.5px;
    top: 2px;
    width: 12px;
    height: 12px;
}

.station-item:first-child:before {
    top: 10px;
}

.station-item:last-child:before {
    height: 6px;
}

.connections {
    display: inline;
    padding: 5px 0px;
}

.connections_line {
    display: inline-block;
}

.badge {
    font-family: 'Open Sans Condensed', sans-serif;
    display: inline-block;
    height: 1em;
    font-size: 1em;
    line-height: 1em;
    padding: 0.25em;
    text-align: center;
    color: #fff;
    background-color: darkslategray;
    border: 1px solid rgba(75, 75, 75, 0.5);
    text-shadow: rgba(75, 75, 75, 0.5) 1px 0px, rgba(75, 75, 75, 0.5) 0px 1px, rgba(75, 75, 75, 0.5) -1px 0px, rgba(75, 75, 75, 0.5) 0px -1px;
    cursor: pointer;
}

hr {
    margin: 0;
    border: solid 1px #555;
}

/* Custom popup styling */
.leaflet-popup-content-wrapper {
    background: transparent;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    min-width: 300px !important;
}

.leaflet-popup-content {
    background: transparent;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 14px;
    line-height: 1.4;
    min-width: 300px !important;
}

/* Style the text content area */
.leaflet-popup-content span {
    display: block;
    padding: 12px;
    background: white;
    white-space: nowrap;
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Specific styling for station notes */
.leaflet-popup-content strong {
    color: black !important;
    font-size: 16px !important;
    font-weight: bold !important;
    display: block !important;
    margin-top: 5px !important;
    margin-bottom: 0 !important;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
}

/* New specific styling for popup content */
.popup-content {
    background: white !important;
    padding: 15px !important;
    margin: 0 !important;
}

.station-notes {
    color: black !important;
    font-size: 18px !important;
    font-weight: bold !important;
    margin: 0 !important;
    padding: 0 !important;
    display: block !important;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
}

/* Ensure popup content has relative positioning for custom close button */
.leaflet-popup-content {
    position: relative;
}

.leaflet-popup-tip {
    background: rgba(255, 255, 255, 0.95);
}

.leaflet-popup-close-button {
    display: none !important;
}