header {
    background-color: #a99c9c;
    padding: 20px;
    text-align: center;
    border-color: rgb(161, 151, 139);
    border-width: 5px;
    border-style: solid;
    position: relative;
    border-radius: 10px;
}
body {
    background-color: #c4bcbc;
    font-family: Arial, sans-serif;
    margin:0px;
    padding :20px;
}

.logo {
    float: left;
    margin-right: -50px;
    padding: 10px;

}
/* Style vom Titel im Header */
#content2 {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 10px;
    font-family: Arial, sans-serif;
}
/* Style von den Bottons an sich im Header */
#button1, #button2, #button3, #button4 {
    background-color: #0b66c6;
    color: white;
    border: none;
    padding: 10px 20px;
    margin: 0px;
    cursor: pointer;
    border-radius: 5px;
}
/* Style vom Hovern über die Buttons im Header */
#button1:hover, #button2:hover, #button3:hover, #button4:hover {
    background-color: #0b66c6;
    color: white;
    border: none;
    padding: 10px 20px;
    margin: 0px;
    cursor: pointer;
    border-radius: 5px;
    opacity: 0.8;
}
/* Style vom Titel im Body */
#content3 {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 10px;
    font-family: Arial, sans-serif;
    text-align: center;
}

.pageActions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

#sourceCompareBtn,
#climateStatsBtn {
    display: none;
    background: #991b1b;
    color: white;
    border: none;
    padding: 8px 14px;
    margin: 0;
    cursor: pointer;
    border-radius: 6px;
    font-size: 12px;
    line-height: 1.2;
    transition: 0.2s;
}

#sourceCompareBtn.internalVisible,
#climateStatsBtn.internalVisible {
    display: inline-block;
}

#sourceCompareBtn[hidden],
#climateStatsBtn[hidden] {
    display: none !important;
}

#sourceCompareBtn:hover,
#climateStatsBtn:hover {
    background: #7f1d1d;
}
/* Style vom Wetterwidget */
#wx {
    text-align: center;
    margin: 10px auto;
    max-width: 600px;
    max-height: 300px
    display block;
    z-index: 10;
    position: relative;
}
/*Style vom Disclaimer */
#content4 {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 10px;
    font-family: Arial, sans-serif;
    text-align: center;
}
/*Style vom normalen Text im Footer */
footer {
    padding: 25px;
    text-align: center;
    margin-top: auto;
    position: relative;
    z-index: 10;
}
/*Style der Buttons im Footer*/
#button5, #button6 {
    background-color: #4a4c4f;
    color: white;
    border: none;
    padding: 10px 20px;
    margin: 0px;
    cursor: pointer;
    border-radius: 5px;
}
/* Style der Charts*/
#tempChart,
#windChart,
#rainChart,
#pressureChart,
#humChart,
#dewChart,
#ch3TempChart,
#leafChart,
#windDirChart {
    height: 340px;
    margin-top: 10px;
}
.grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    padding: 15px;
}

/* KACHEL ansicht der Charts*/
.tile {
    background: #a99c9c;
    border-radius: 12px;
    padding: 14px;
    min-height: auto;
    overflow: visible;
}

/* HANDY Apassung von Highcharts */
@media (max-width: 768px) {
    .grid {
        grid-template-columns: 1fr;
    }
}
@keyframes wiggle {
    0% { transform: rotate(-1deg); }
    50% { transform: rotate(1deg); }
    100% { transform: rotate(-1deg); }
}

.edit-mode .tile {
    animation: wiggle 0.4s infinite;
}
#loginButton {
    position: absolute;
    top: 20px;
    right: 20px;
    background-color: #2f2f2f;
    color: white;
    border: none;
    padding: 12px 20px;
    cursor: pointer;
    font-size: 16px;
    transition: 0.2s;
    border-radius: 5px;
}
#loginButton:hover {
    background: #444;
}
#stationSelect {
    left: 20px;
    padding: 10px;
    font-size: 15px;
    border-radius: 5px;
    cursor: pointer;
    background-color: #0b66c6;
    text-align: right;
} 
.tile {
    position: relative;
    overflow: visible;
}
.chartControls {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 200;
    display: flex;
    gap: 5px;
    pointer-events: auto;
}
.sourceControls {
    position: relative;
    z-index: 60;
}
.chartControls button {
    background-color: rgba(40, 40, 40, 0.9);
    color : white;
    border: none;
    padding: 4px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    line-height: normal;
    position: relative;
    touch-action: manipulation;
    z-index: 201;
}
.sourceControls button {
    background-color: rgba(40, 40, 40, 0.9);
    color : white;
    border: none;
    padding: 4px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
}
.activeSource {
    background-color: #0b66c6 !important;
    color : white;
}
.sourceMaintenance {
    cursor: not-allowed !important;
    opacity: 0.45;
    text-decoration: line-through;
}
.tooltip {
    position: relative;
}

.tooltip .tooltiptext {

    visibility: hidden;

    position: absolute;

    bottom: -35px;
    left: 50%;

    transform: translateX(-50%);

    background: rgba(30,30,30,0.95);
    color: white;

    padding: 6px 10px;

    border-radius: 8px;

    font-size: 11px;

    white-space: nowrap;

    opacity: 0;

    transition: 0.2s;

    z-index: 99999;

    pointer-events: none;
}

/* Desktop Hover */

.tooltip:hover .tooltiptext {

    visibility: visible;
    opacity: 1;
}

/* Handy Touch */

.tooltip:active .tooltiptext {

    visibility: visible;
    opacity: 1;
}
/* =========================
   INFO BUTTON
========================= */

#infoButton {

    position: absolute;

    right: 30px;

    background: transparent;

    border: none;

    cursor: pointer;

    padding: 0;

    transition: 0.25s;

    top : 264px;
}
 @media (max-width: 600px) {

    #infoButton {

        position: relative  !important;

        top: auto !important;

        right: auto !important;

        margin-left: 6px;
    }

    .chartControls {

        display: flex;

        align-items: center;

        flex-wrap: wrap;

        gap: 6px;
   }
}

    #infoContent {

        width: 75%;

        padding: 20px;

        margin: 20% auto;

        border-radius: 18px;
    }

    #infoContent h2 {

        font-size: 22px;
    }

    #infoContent p {

        font-size: 15px;

        line-height: 1.5;
    }

    #closeInfo {

        font-size: 26px;

        top: 8px;

        right: 14px;
    }

#infoButton img {

    width: 42px;

    height: 42px;

    filter: none !important;

    box-shadow: none !important;
}

#infoButton:hover {

    transform: scale(1.1);
}

/* =========================
   INFO MODAL
========================= */

#infoModal {

    display: none;

    position: fixed;

    z-index: 999999;

    left: 0;

    top: 0;

    width: 100%;

    height: 100%;

    background: rgba(0,0,0,0.55);

    backdrop-filter: blur(5px);
}

#infoContent {

     background: #2f2f2f;

    color: white;

    width: 600px;

    max-width: 90%;

    margin: 3% auto;

    padding: 30px;

    border-radius: 22px;

    box-shadow: none;

    border: 1px solid #444;

    position: relative;

    animation: popupFade 0.3s ease;
}

#infoContent h2 {

    margin-top: 0;

    color: #60a5fa;
}

#infoContent p {

    line-height: 1.7;

    color: #d1d5db;
}

#closeInfo {

    position: absolute;

    right: 18px;

    top: 12px;

    font-size: 30px;

    cursor: pointer;

    color: #94a3b8;

    transition: 0.2s;
}

#closeInfo:hover {

    color: white;
}

/* =========================
   ANIMATION
========================= */

@keyframes popupFade {

    from {

        opacity: 0;

        transform: scale(0.92);
    }

    to {

        opacity: 1;

        transform: scale(1);
    }
}
#editBtn {
    background: #2f2f2f;
    color: white;
    border: none;
    padding: 8px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    transition: 0.2s;
}
#editBtn:hover {

    background: #0b66c6;
}
#stationSelect {

    background: #2f2f2f;
    color: white;

    border: none;

    padding: 8px 15px;

    border-radius: 6px;


    cursor: pointer;

    font-size: 12px;

    transition: 0.2s;

    text-align: center;

    height: 30px;

    box-sizing: border-box;
}


/* =======================
   HANDY OPTIMIERUNG
========================= */

@media (max-width: 600px) {

header {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 6px;
    padding: 6px;
}

header button {
    width: 45%;
    max-width: 170px;
    padding: 6px;
    font-size: 12px;
    margin: 0;
}

.logo {
    display: none;
}

#content2{
    width: 100%;
    text-align: center;
    margin: 0px;
}
#mainContainer {
    display: flex;
    flex-direction: column;
    width: 100%;
    padding: 0;
    margin: 0;
    gap: 10px;
}

#mapContainer {
    width: 100% !important;
    order: 1;
    padding: 0 !important;
    margin: 0 !important;
}

#chartContainer {
    width: 100% !important;
    order: 2;
    padding: 0 !important;
    margin: 0 !important;
    border-radius: 14px;
    overflow: hidden;
}

#map {
    width: 100vw;
    height: 500px;
}

#chart {
    width: 100vw;
    height: 500px;
}
#searchBox {
    flex-direction: column;
}


#searchBtn {
    width: 100%;
}

#titleBar {
    display: flex;
    flex-direction: column !important;
    align-items: center !important;
    gap: 15px;
}

#backButton {
    order: 3;
    margin-top: 20px;
}

#content3 {
    position: static !important;
    transform: none !important;
    left: auto !important;
    padding: 0 4px;
}

#content3 h1 {
    font-size: 24px;
    line-height: 1.2;
    margin: 16px 0 12px;
}

.pageActions {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    width: 100%;
    max-width: none;
    margin: 0 auto 12px;
    min-height: 42px;
    padding: 0 52px;
    box-sizing: border-box;
}

#editBtn,
#sourceCompareBtn,
#climateStatsBtn {
    width: auto;
    max-width: 100%;
    min-height: 38px;
    padding: 8px 10px;
    font-size: 12px;
    white-space: normal;
}

#infoButton {
    position: absolute !important;
    right: 0 !important;
    top: 50% !important;
    transform: translateY(-50%);
    margin: 0 !important;
}

img {
    max-width: 100%;
    height: auto;
}

#loginButton {
    display: none;
}
#humChart, #dewChart, #ch3TempChart {
    padding-top: 25px;
    box-sizing: border-box;
}
}
@media screen and (max-width: 768px) {

    #infoButton {

        position: absolute !important;

        top: 50% !important;

        right: 0 !important;

        margin: 0 !important;

        transform: translateY(-50%);
    }

}
 

    #infoContent {

    background: #2f2f2f;
    color: white;

    width: 600px;
    max-width: 85%;

    margin: 7% auto;

    padding: 30px;

    border-radius: 22px;

    position: relative;

    max-height: 70vh;
    overflow-y: auto;
}

    #infoContent h2 {

        font-size: 22px;
    }

    #infoContent p {

        font-size: 15px;

        line-height: 1.5;
    }

    #closeInfo {

        font-size: 26px;

        top: 8px;

        right: 14px;
    }
