:root {
    --scrollingTextWidth: 0; /*wird in announcements.js gesetzt */
}

@font-face {
    font-family: 'Open Sans Bold';
    src: url('open-sans/OpenSans-Bold.ttf') format('truetype');
}

@font-face {
    font-family: 'Open Sans Regular';
    src: url('open-sans/OpenSans-Regular.ttf') format('truetype');
}

html, body {
    padding: 0;
    margin: 0;
    height: 100%;
    width: 100vw;
    font-size: 100%;
    overflow: hidden; /* Verhindert Scrollbalken */
}
#wrapper{
    display: grid;
    grid-template-rows: 3rem 1fr 3rem;
    grid-template-columns: 1fr;
    gap: 0px;
    height: 100%;
    width: 100%;
    border-width: 0px;
    margin: 0px
}
#top-strip {
    grid-row: 1 / span 1;
    grid-column: 1 / span 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: #009bb1;
    overflow: hidden;
}
#top-strip img {
    height: calc(3rem - 6px);
    width: auto;
}
#clock {
    font-size: 2rem;
    font-family: 'Open Sans Bold', sans-serif;
    color: white;
    padding-right: 5px;
}
#map{
    grid-row: 2 / span 1;
    grid-column: 1 / span 1;
    width: 100%;
}
#map-overlay{
    grid-row: 2 / span 1;
    grid-column: 1 / span 1;
    width: 100%;
    flex-grow: 1;
    background-color: rgba(10, 153, 163, 0.8); /* Halbtransparent */
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    left: 0;
    z-index: 5000;
}
#map-overlay .text-big{
    text-align: center;
    color: #ffec00;
    font-family: 'Open Sans Bold', sans-serif;
    font-size: 3rem;
}
#map-overlay .text-small{
    text-align: center;
    color: white;
    font-family: 'Open Sans Regular', sans-serif;
    font-size: 1.5rem;
}

#wakelock-query {
    grid-row: 2 / span 1;
    grid-column: 1 / span 1;
    width: 100%;
    flex-grow: 1;
    background-color: rgba(105, 105, 105, 0.6); /* Halbtransparent */
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    left: 0;
    z-index: 0;
}
#wakelock-query p{
    text-align: center;
    color: white;
    font-family: 'Open Sans Bold', sans-serif;
    font-size: 2rem;
}

#info{
    grid-row: 2 / span 1;
    grid-column: 1 / span 1;
    background-color: rgb(255, 255, 255);
    display: none;
    flex-direction: column;
    overflow-x: hidden;  
    overflow-y: scroll;
    left: 0;
    z-index: 10000;
}
.info-element{
    display: flex;
    align-items: center;
    justify-content: left;
    padding-bottom: 100px;
    flex-direction: row;
}
#info-jump-labels{
    font-size: 1rem;
}
#announcements{
    grid-row: 2 / span 1;
    grid-column: 1 / span 1;
    background-color: rgb(255, 255, 255);
    display: none;
    flex-direction: column;
    overflow-x: hidden;  
    overflow-y: scroll;
    left: 0;
    z-index: 8000;
}
#businfo{
    grid-row: 2 / span 1;
    grid-column: 1 / span 1;
    background-color: rgb(255, 255, 255);
    display: none;
    flex-direction: column;
    overflow-x: hidden;  
    overflow-y: hidden;
    position: relative;
    top: 0%;
    right: 0%;
    height: 100%;
    width: 30%;
    min-width: 500px;
    z-index: 7000;
    box-shadow: 0 0px 8.5px rgba(0,0,0,0.4);

}
#businfo-content{
    flex-direction: column;
    overflow-x: auto;  
    overflow-y: auto;
    position: relative;
    top: 0%;
    right: 0%;
    height: 100%;
    width: 100%;
}
#businfo-title-row {
    align-self: flex-start;
    display: flex;
    flex-direction: row;
    width: 100%;
    height: 3rem;
}
#businfo-title {
    flex: 1; /* Nimmt den verfügbaren Platz ein */
    display: flex;
    background-color: #000000;
    align-items: center;
    padding: 0px;
    margin: 0px;
    height: 100%;
}
#businfo-title p {
    font-family: 'Open Sans Bold', sans-serif;
    color:rgb(255, 255, 255);
    font-size: 1.5rem;
    padding-inline-start: 10px;
    margin: 0px;
}
#businfo-close-button {  
    margin-left: auto;
    align-self: center;
    cursor: pointer;
    height: 100%;
}
#businfo-close-button img {
    width: auto;
    height: 100%;
}
#businfo-current-info-row {
    align-self: flex-start;
    display: flex;
    align-items: center;
    background-color: #00000040;
    width: 100%;
    height: auto;
}
#businfo-current-info-row p {
    font-family: 'Open Sans Bold', sans-serif;
    font-size: 1rem;
    padding-inline-start: 10px;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    margin: 0px;
}
#businfo-subtitle-row {
    align-self: flex-start;
    display: flex;
    align-items: center;
    background-color: #000000;
    width: 100%;
    height: auto;
}
#businfo-subtitle-row p {
    font-family: 'Open Sans Bold', sans-serif;
    color:rgb(0, 0, 0);
    font-size: 1rem;
    padding-inline-start: 10px;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    margin: 0px;
}
#businfo-txt {
    width: 100%;
    height: auto;
    margin-top: 15px;
    margin-bottom: 15px;
    /*align-self:flex-end;*/
    display: flex;
    flex-direction: column;
    overflow-x: auto;
    overflow-y: auto;
    justify-content: flex-start; /* Text oben ausrichten */
}
#businfo-txt h1{
    font-family: 'Open Sans Bold', sans-serif;
    font-size: 1.2rem;
    padding-inline-start: 10px;
    margin-inline: 0px;
    margin-top: 0px;
    margin-bottom: 0px;
    max-width: 90vw;
}
#businfo-txt button{
    display: inline;
    background-color: #cccccc;
    font-family: 'Open Sans Regular', sans-serif;
    font-size: 1rem;
    color: #000000;
    padding: 10px 20px;
    border: none;
    border-radius: 0px;
    cursor: pointer;
}
#businfo-txt p{
    font-family: 'Open Sans Regular', sans-serif;
    font-size: 1rem;
    padding-inline-start: 10px;
    margin-inline: 0px;
    margin-top: 0px;
    margin-bottom: 20px;
    max-width: 90vw;
}
#businfo-txt table{
    font-family: 'Open Sans Regular', sans-serif;
    font-size: 1rem;
    margin-inline: 10px;
    margin-top: 0px;
    margin-bottom: 0px;
    max-width: 90vw;
    border-collapse: collapse;    
}
#businfo-txt table td{
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}
.bus-in-hst{
    width: 1.5rem;
}
.abfahrt{
    width: 3px;
}
.ausfall{
    background-color: #ffe6e6;
    border-top: 1px solid #dddddd;
    border-bottom: 1px solid #dddddd;
    text-decoration-line: line-through;
    text-decoration-thickness: 1px;
    font-style: italic;
}
.ersatzhst{
    background-color: #fff3c4;
    border-top: 1px solid #dddddd;
    border-bottom: 1px solid #dddddd;
}
.abgefahren{
    background-color: #cccccc;
    border-top: 1px solid #dddddd;
    border-bottom: 1px solid #dddddd;
}
.bevorstehend{    
    background-color: #ffffff;
    border-top: 1px solid #dddddd;
    border-bottom: 1px solid #dddddd;
}
.verspaetung{
    font-family: 'Open Sans Bold', sans-serif;
    color: red;
}
.puenktlich{
    font-family: 'Open Sans Bold', sans-serif;
    color: green;
}
.verfruehung{
    font-family: 'Open Sans Bold', sans-serif;
    color: blue;
}
.signal-verloren{
    background-color: black;
    color: white;
    text-align: center;
    margin-top: 20px !important;
    padding-top: 5px;
    padding-bottom: 5px;
    border-radius: 20px;
}

#map-protector {
    grid-row: 2 / span 1;
    grid-column: 1 / span 1;
    width: 100%;
    flex-grow: 1;
    background-color: rgba(255, 255, 255, 0); /* Transparent */
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    left: 0;
    z-index: 0;
}

#stoerungsmeldung {
    grid-row: 2 / span 1;
    grid-column: 1 / span 1;
    background-color: rgba(255, 0, 0, 0.5);
    display: none;
    flex-direction: column;
    align-items: center;
    overflow-x: hidden;  
    overflow-y: hidden;
    position: relative;
    top: 0%;
    left: 0%;
    height: 8vw;
    width: 100%;
    z-index: 9000;
    box-shadow: 0 0px 8.5px rgba(0,0,0,0.4);
}
#stoerungsmeldung h1{
    font-family: 'Open Sans Bold', sans-serif;
    color: white;
    font-size: 5vw;
    margin: auto;
    max-width: 90%;
}
#info h1, #announcements h1{
    padding-inline: 5vh;
    color: #076970;
    font-family: 'Open Sans Bold', sans-serif;
    font-size: 2rem;
}
#info h2, #announcements h2{
    padding-inline: 0vh;
    margin: 0vh;
    color: #000000;
    font-family: 'Open Sans Bold', sans-serif;
    font-size: 1.5rem;
}
#info p{
    padding-inline: 5vh;
    color: #000000;
    font-family: 'Open Sans Regular', sans-serif;
    font-size: 1rem;
}
.info-element img{
    width: 10rem;
    max-width: 100%;
    height: auto;
    padding-left: 5vh;
}
.info-element p{
    max-width: 600px;
}
#announcements p{
    margin-inline: 5vh;
    padding-bottom: 20px;
    max-width: 800px;
    display: inline-block;
    color: #000000;
    font-family: 'Open Sans Regular', sans-serif;
    font-size: 1rem;
}
.announcement-el{
    margin-bottom: 20px;
    padding-bottom: 10px;
}

#announcement-el-info{
    background-color: #f5f6fa;
    margin-bottom: 1rem;
    padding: 1rem;
    border-left: 0.3rem solid #1900d7;
    border-radius: 0.2rem;
}

#announcement-el-stoerung{
    background-color: #ffe6e6;
    margin-bottom: 1rem;
    padding: 1rem;
    border-left: 0.3rem solid #ff0000;
    border-radius: 0.2rem;
}

#scrolling-announcements{
    grid-row: 3 / span 1;
    grid-column: 1 / span 1;
    background-color: rgb(255, 255, 0);
    display: flex;
    flex-direction: column;
    justify-content: center;
    left: 0;
    z-index: 50001;
    overflow: hidden;
}
#scrolling-announcements span{
    justify-content: center;
    align-items: center;
    font-size: 4vh;
    font-family: 'Open Sans Bold', sans-serif;
    color: rgb(0, 0, 0);
    white-space: nowrap;
    position: absolute;
    left: 100vw;
    animation: scrolling-text;
    animation-duration: 5s;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
}
#scrolling-announcements-gutefahrt{
    grid-row: 3 / span 1;
    grid-column: 1 / span 1;
    background-color: #296600;
    display: flex;
    flex-direction: column;
    justify-content: center;
    left: 0;
    z-index: 0;
    overflow: hidden;
}
#scrolling-announcements-gutefahrt span{
    justify-content: center;
    align-items: center;
    text-align: center;
    font-size: 4vh;
    font-family: 'Open Sans Bold', sans-serif;
    color: rgb(255, 255, 255);
    white-space: nowrap;
}
@keyframes scrolling-text {
    0% { left: 100vw; }
    100% { left: var(--scrollingTextWidth); }
}
#bottom-strip{
    grid-row: 3 / span 1;
    grid-column: 1 / span 1;
    display: grid;
    grid-template-columns: 3rem 1fr 3rem;
}
#menupunkt-info{
    grid-column: 1 / span 1;
    background-color: #009bb1;
    font-family: 'Open Sans Bold', sans-serif;
    color: rgb(255, 255, 255);
    font-size: 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    cursor: pointer;
    z-index: 10000; 
}
#info-img{
    height: 1.5rem;
    width: 1.5rem;
}
#menupunkt-aktuell{
    grid-column: 2 / span 1;
    background-color: #009bb1;
    font-family: 'Open Sans Bold', sans-serif;
    color: rgb(255, 255, 255);
    font-size: 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    cursor: pointer;
    z-index: 8000;  
}
#location-on-symbol{
    grid-column: 3 / span 1;
    grid-row: 1 / span 1;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #296600;
    z-index: 0;
    cursor: pointer;
}
#location-off-symbol{
    grid-column: 3 / span 1;
    grid-row: 1 / span 1;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #009bb1;
    z-index: 10;
    cursor: pointer;
}
.location-img{
    height: calc(3rem - 12px);
}

.leaflet-popup-content-wrapper{
    font-family: 'Open Sans Regular', sans-serif;
    font-size: 1rem;
    max-width: 90vw;
    max-height: 60vh;
    overflow: auto;
}
.leaflet-popup-content-wrapper h2{
    font-family: 'Open Sans Regular', sans-serif;
    font-size: 1.5rem;
}
.leaflet-tooltip{
    font-family: 'Open Sans Bold', sans-serif !important;
    font-size: 1.5rem !important;
    color: rgb(0, 0, 0) !important;
    background-color: rgba(255, 255, 255, 0.5) !important;
    border: none !important;
    padding: 4px !important;
}

@media screen and (max-width: 800px){
    
    .info-element{
        flex-direction: column;
    }
    .info-element img{
        padding-left: 0px;
    }
    #businfo{
        top: 65%;
        left: 50%;
        height: 35%;
        width: 80%;
        min-width: 200px;
        transform: translate(-50%, 0%); /* Verschiebt das Element um die Hälfte seiner Breite in die Mitte */
    }

}

@media screen and (max-width: 500px){

    #map-overlay .text-big{
        font-size: 2.5rem;
    }
    #map-overlay .text-small{
        font-size: 1.5rem;
    }
    #info p, #announcements p{
        font-size: 1.5rem;
    }
    html, body {
        font-size: 70%;
    }
    .leaflet-popup-content-wrapper {
        font-size: 1.5rem;	
    }
    .leaflet-popup-content-wrapper h2{
        font-size: 1.8rem;	
    }
    #businfo{
        top: 45%;
        height: 55%;
        width: 100%;
        min-width: 200px;
    }
    #businfo h1{
        font-size: 2rem;
    }
    #businfo-txt button{
        font-size: 1.5rem;
    }
    #businfo p{
        font-size: 1.5rem;
    }
    #businfo-txt table{
        font-size: 1.5rem;
    }
    #businfo-txt h2{
        font-size: 1.5rem;
    }
}