/* 
--------------------------------------------------------------------------------------------------------------
--------------------------------------------- Global styles---------------------------------------------------
--------------------------------------------------------------------------------------------------------------
 */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: #e6f2f2;
    /* overflow-y: scroll; */
    scrollbar-width: none;
    /* overflow-x: hidden;
    overflow-y: hidden;*/
}

body::-webkit-scrollbar {
    display: none;
}

button {
    margin: 10px;
    padding: 10px 20px;
    /*border: none;*/
    border: solid;
    border-radius: 5px;
    cursor: pointer;
    /*background-color: #007BFF;*/
    background-color: rgba(140, 173, 174, 1);
    border-color: rgba(211, 119, 30, 1);
    color: white;
    font-size: clamp(1rem, 2vw, 3rem);
}

button:hover {
    background-color: rgba(84, 110, 111, 1);
    border-color: rgba(240, 166, 51, 1);
}

h1 {
    margin-top: 0;
}

.screen {
    display: none;
    flex-direction: column;
    align-items: center;
    text-align: center;
    /*background-color: white;*/
    padding: 0px;
    /*border-radius: 10px;*/
    /*box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);*/
    width: 85%;
    /*max-width: 1200px;*/
    overflow: hidden
}

.screen.active {
    display: flex;
}

.top-bar {
    position: absolute;
    top: 0px;
    width: 100%;
    height: 13%;
    display: flex;
    text-align: left;
    justify-content: space-between;
    padding-top: 1%;
    font-size: x-large;
    color: rgba(211, 119, 30, 1);
}

/*
Home Button on the top left.
*/
.top-bar .home-button {
    height: 10vw;
    float: left;
    margin-left: 1%;
    display: flex;
    max-height: 100%;
}

/* 
Use for text in the top bar.
 */
.top-bar span {
    padding-left: 10%;
    /* font-size: larger; */
    font-size: clamp(1rem, 2vw, 3rem);
    display: table-cell;
    vertical-align: top;
    /* width: 100%; */
}

/* 
The size of the language buttons should be adjusted with the width attribute of this parent class to 
keep the correct ratios
*/
.top-bar .language-container {
    /* float: right; */
    margin-right: 1%;
    width: 20vw;
    aspect-ratio: 2/1;
}

.top-bar .language-container .language-button {
    /* height: 50%; */
    float: right;
    border-radius: 5%;
    margin-right: 1%;
    width: 45%;
}


/* 
--------------------------------------------------------------------------------------------------------------  
----------------------------------------------- Quiz stylings ------------------------------------------------
--------------------------------------------------------------------------------------------------------------
 */
.top-bar .quiz {
    width: 100%;
    display: flex;
}

.quiz span {
    display: table-cell;
    vertical-align: middle;
}

.quiz-label {
    float: left;
    display: table;
    width: 80%;
}

.quiz-counter {
    float: right;
    display: table;
    width: 10%;
}

.quiz-start {
    position: absolute;
    top: 15%;
}

.quiz-info {
    display: none;
    justify-content: center;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    /*color: rgba(140,173,174,1);*/
    z-index: 9999;
}

.quiz-info-content {
    background-color: #e6f2f2;
    padding: 20px;
    width: 50%;
    border-radius: 10px;
    text-align: center;
    position: relative;
}

.quiz-info-content img {
    width: 10%;
}

/* 
--------------------------------------------------------------------------------------------------------------
-------------------------------------------------- ECG list --------------------------------------------------
--------------------------------------------------------------------------------------------------------------
 */
#main-screen .ecg-list {
    position: absolute;
    top: 30%;
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

#main-screen .ecg-list img {
    margin: 0.2%;
    width: 10%;
    height: 100px;
    cursor: pointer;
    border: 1px solid #ccc;
    border-radius: 5px;
}

.main-screen-header {
    padding-right: 5%;
    width: 65%
}

/* 
--------------------------------------------------------------------------------------------------------------
---------------------------------- ECG and AI ECG plots and animation ----------------------------------------
--------------------------------------------------------------------------------------------------------------
 */

#ecg-plot,
#ecg-plot-ai {
    position: absolute;
    top: 18%;
    width: 80%;
    height: 35%;
    display: grid;

    background-color: white;
    border: 1px solid #ccc;
    border-radius: 5px;
    border-radius: 10px;

    padding-left: 1%;
    padding-bottom: 1%;
    padding-top: 1%;
    padding-right: 15%;
}

#ecg-display-ai {
    cursor: pointer;
}

.ecg-plot-ai .ecg-display-axis {
    position: absolute;
    left: 1.5%;
    top: 57%;
    transform: translate(0, -50%);
    /* padding-top: 1.5%;
    padding-left: 1%; */
    width: 82%;
}

.ecg-plot-ai .ecg-display-axis img{
    width: 100%;
}

.ecg-plot-ai .ecg-display-xfusemap {
    display: none;
    position: absolute;
    top: 50%;
    transform: translate(0, -50%);
    right: 1%;
    width: 15%;
}

.ecg-plot-ai .ecg-display-xfusemap img {
    width: 100%;
}

#ecg-plot img,
#ecg-plot-ai img {
    /* max-height: 100%; */
    grid-area: 1 / 1 / 1 / 1;
    /* position: absolute;
    left: 50%; */
    /* transform: translateX(-50%); */
    /* width: 80vw; */
}

.ecg-display-img {
    position: absolute;
    top: 50%;
    transform: translate(0, -50%);
    left: 3%;
    height: auto;
    width: 80%;
}

.ecg-display-ai-img {
    position: absolute;
    top: 50%;
    transform: translate(0, -50%);
    left: 3%;
    clip-path: inset(0% 0% 0% 0%) ;
    /* rect(0 0 100% 100%) */
    /*background-color: blue;*/
    z-index: 1;
    transition: clip-path 2s;
    /* letter-spacing: 100px; */
    width: 80%;
}

.ecg-display-ai-img.hidden {
    clip-path: inset(0% 100% 0% 0%) /*rect(0 0 100% 0)*/;
}

#ecg-display:not(.ai) .hide-ai-opac {
    opacity: 0;
}

#ecg-display:not(.ai) .show-ai {
    display: none;
}

#ecg-display.ai .hide-ai {
    display: none;
}

#ecg-display.ai #btn-ai {
    opacity: 0;
}


/* 
--------------------------------------------------------------------------------------------------------------
----------------------------------- Hide/Show AI Buttons and NN image ----------------------------------------
--------------------------------------------------------------------------------------------------------------
 */

.show-ai {
    font-size: clamp(1rem, 2vw, 3rem);
    color: rgba(84, 110, 111, 0);
    background-color: rgba(84, 110, 111, 0);
    border-color: rgba(211, 119, 30, 0);
}

.show-ai:hover {
    color: rgba(84, 110, 111, 0);
    background-color: rgba(84, 110, 111, 0);
    border-color: rgba(240, 166, 51, 0);
}

.hide-ai {
    font-size: clamp(1rem, 2vw, 3rem);
}

.apply-ai-button {
    position: absolute;
    left: 31%;
    top: 59%;
    width: 50%;
    display: flex;
    justify-content: center; /* Centers the buttons horizontally */
}

.apply-ai-button button {
    font-size: clamp(1rem, 2vw, 3rem);
}

.nn-img {
    position: absolute;
    /* opacity: 0; */
    width: 30%;
    top: -31%;
    /* bottom: 0; */
    z-index: -1;
}

/* 
--------------------------------------------------------------------------------------------------------------
--------------------------------------- Heart rate display ---------------------------------------------------
--------------------------------------------------------------------------------------------------------------
 */

.heart-rate-display {
    position: absolute;
    top: 57%;
    left: 8%;
    display: flex;
    align-items: center;
}

.heart-rate-display span {
    width: auto;
    font-size: clamp(1rem, 2vw, 3rem);
    padding-top: 2%;
}

#heart-rate,
#heart-rate-ai {
    text-align: right;
    font-size: clamp(1rem, 2vw, 3rem);
    margin-bottom: 10px;
    width: 100%;
    /*max-width: 400px;*/
}

.animated-svg {
    width: 10%;
    aspect-ratio: 1;
    /* Definiere die Größe der SVG */
    /* height: 100px; */
    /* Definiere die Größe der SVG */
    /* animation: scaleUpDown 2s infinite; */
    /* Animation für die SVG */
    animation-name: scaleUpDown;
    animation-iteration-count: infinite;
    /* Standardwert, wird in scripts.js auf die Herzrate des Patienten angepasst */
    animation-duration: 10s;
}

@keyframes scaleUpDown {
    0% {
        transform: scale(1);
        /* Anfangsgröße */
    }

    50% {
        transform: scale(1.2);
        /* Vergrößerung um 20% */
    }

    100% {
        transform: scale(1);
        /* Zurück zur Ursprungsgröße */
    }
}

/* 
--------------------------------------------------------------------------------------------------------------
-------------------------------------- Patient Info and AI Certainties ---------------------------------------
--------------------------------------------------------------------------------------------------------------
 */

.patient-info {
    font-family: Arial, sans-serif;
}

.patient-info-boxes {
    position: absolute;
    top: 70%;
    left: 2%;
    width: 70%;
    display: flex;
    gap: 7%;
}

.patient-info-boxes p {
    font-weight: bold;
}

.patient-info-boxes p,
span {
    font-size: x-large;
}

.patient-info,
#model-certainty {
    text-align: left;
    padding: 10px;
    padding-bottom: 3%;
    /*border: 3px solid #ccc;*/
    border: none;
    border-radius: 5px;
    margin: 10px 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.5);
}

.patient-info-grid {
    display: grid;
    grid-template-columns: auto  auto 1fr; /* Zwei Spalten: erste Spalte ist automatisch breit, zweite Spalte nimmt den verbleibenden Platz ein */
    gap: 10%; /* Abstand zwischen den Grid-Items */
    align-items: center; /* Vertikale Zentrierung der Items innerhalb der Zeilen */
}

.info-buttons {
    position: absolute;
    top: 71%;
    right: 1.5%;
    display: grid;
}

.info-buttons button {
    font-size: x-large;
}

.info-buttons .desc-button-fusemap {
    visibility: hidden;
}

/* 
--------------------------------------------------------------------------------------------------------------
----------------------------- Description Boxes/Infoboxes and Buttons ----------------------------------------
--------------------------------------------------------------------------------------------------------------
*/

.desc-box {
    display: none;
    position: absolute;
    align-items: center;
    bottom: 5%;
    left: 2%;
    height: 38%;
    width: 72%;
    background-color: white;
    border: 1px solid #ccc;
    border-radius: 5px;
    padding: 0.2%;
}

.desc-box img {
    max-height: 100%;
    margin: 0;
    margin-right: 5%;
}

.desc-box h1 {
    font-size: large;
}

.desc-box h2 {
    font-size: x-large;
}

/* .desc-box .desc-text {
    max-height: 100%;
    overflow-y: scroll;
    overflow-x: hidden;
    padding-right: 0.5%;
} */
.desc-text-container {
    max-height: 100%;
    padding-right: 0.5px;
    overflow-y: scroll;
    overflow-x: hidden;
    /* padding-top: 1px; */
}

.desc-text {
    display: none;
}


/* .desc-box .desc-text {
    max-height: 100%;
    overflow-x: hidden;
    padding-right: 0.5%;
} */

button_desc {
    margin: 10px;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    /*background-color: #007BFF;*/
    background-color: rgba(140, 173, 174, 1);
    color: white;
    font-size: x-large;
    /*font-size: 16px;*/
}

button_desc:hover {
    background-color: rgba(84, 110, 111, 1);
}

/* 
--------------------------------------------------------------------------------------------------------------
-------------------------------------- Timeout Screen/Modal --------------------------------------------------
--------------------------------------------------------------------------------------------------------------
 */

 .modal {
    display: none;
    justify-content: center;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    color: rgba(140, 173, 174, 1);
    font-size: 26px;
}

.modal.active {
    display: flex;
}

.modal-content {
    background-color: black;
    padding: 20px;
    width: 50%;
    border-radius: 10px;
    text-align: center;
    position: relative;
}

.modal-content img {
    max-width: 80%;
}
