body,
html {
    margin: 0;
    padding: 0;
    min-width: 100%;
    min-height: 100vh;
    -webkit-background-size: cover;
    -moz-background-size: cover;
    -o-background-size: cover;
    background-size: cover;
    line-height: 1.5;
    font-family: 'Roboto', sans-serif;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-color: white;
    overscroll-behavior: none;
    touch-action: pan-down;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    font-size: 16px;
}

* {
    scrollbar-color: var(--dark);
}

*::-webkit-scrollbar {
    width: .3em;
}

*::-webkit-scrollbar-track {
    background: none;
}

*::-webkit-scrollbar-thumb {
    background-color: var(--dark);
}

:root {
    --bright: #ffffff;
    --dark: #000000;
    --primary: #007bff;
    --secondary: hsla(0, 0%, 100%, 0.9);
    --success: #28a745;
    --info: #17a2b8;
    --warning: #ffc107;
    --danger: #dc3545;
    --light: #f8f9fa;
    --dark: #343a40;
}

h1 {
    font-size: 2em;
    margin: 0;
    font-weight: 900;
    color: var(--bright);
    z-index: 1;

}

h3 {
    font-size: 1.2em;
    margin: 1em 0 0 0;
    color: var(--bright);
    z-index: 1;

}

p {
    margin: 0em 0 1em 0;
    font-size: 1em;
    color: var(--secondary);
    z-index: 1;
}

p:hover {
    color: var(--light);
    opacity: 1;
    transition: all 0.5s ease-in-out;

}

a {
    color: black;
    text-decoration: underline;
    font-weight: bolder;
    cursor: pointer;
    transition: color 0.1s ease-in-out;
}

a:hover {
    color: var(--primary);
}

:-webkit-scrollbar {
    display: none;
}

i {
    font-size: 1.5em;
    font-style: normal;
}

.message {
    display: inline-block;
    padding: 10px 15px;
    border-radius: 0.7em;
    font-size: 16px;
    line-height: 1.4;
    word-wrap: break-word;
    box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);    position: relative;
    clear: both;
    white-space: pre-wrap;
    display: inline-block;
    word-wrap: break-word;
    white-space: normal;
    max-width: 7%;
}


.message.received img {
    max-width: 100%;
    max-height: 20em;
}

.sent {
    background-color: #007aff;
    color: white;
    text-align: right;
    border-bottom-right-radius: 3px;
    max-width: fit-content;
    max-width: -moz-fit-content;
    float: right;
    align-self: flex-end;
    max-width: fit-content;
    max-width: -moz-fit-content;
    margin-left: 15%;
    margin: .5em 0em;

}

.received {
    background-color: #e5e5ea;
    color: black;
    text-align: left;
    border-bottom-left-radius: 3px;
    float: left;
    display: inline-block;
    max-width: fit-content;
    max-width: -moz-fit-content;
    max-width: 75%;
}
.receivedmessage {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: left;
}


#welcome-message p {
    margin: 0;
    text-align: left;
}

.loader {
    transform: scale(0.5);
    width: 1em;
    height: 1em;
    border-radius: 50%;
    display: block;
    margin: 0.2em 0.8em;
    position: relative;
    background: #FFF;
    box-shadow: -24px 0 #FFF, 24px 0 #FFF;
    box-sizing: border-box;
    animation: shadowPulse 2s linear infinite;
}

.initialmessage {
    margin-top: 5em;
}
#suggestedmessages {
    position: absolute;
    font-size: smaller;
    bottom: 5em;
    left: 2em;
    /* width: calc(100vw - 10em); */
}

#suggestedmessages button {
    background-color: #ffffff10;
    border: 1px solid #ffffff;
    color: white;
    border-radius: 5px;
    padding: 0.5em 1em;
    margin: .25em .25em;
    cursor: pointer;
    border-style: dashed;
    transition: all 0.2s ease-in-out;
    font-size: smaller;
    line-height: normal;

}

#suggestedmessages button:last-child {
    margin: .5em .25em 1em;

}

#suggestedmessages button:hover {
    background-color: #ffffff50;
    transform: scale(1.05);
    border-style: groove;
}

.suggested-container {
    margin-top: 0em;
}

#input-wrapper {
    position: relative;
    flex-grow: 1;
    margin: -1em 1em 1em 1em;
}

#chat {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    justify-content: flex-end;
    align-items: center;
    z-index: 99;
}

#chat-messages {
    margin: 0;
    position: fixed;
    justify-content: end;
    justify-content: flex-end;
    width: calc(70vw - 4em);
    overflow-x: hidden;
    overflow-y: scroll;
    bottom: calc(50vh + 2em);
    scrollbar-width: thin;
    scrollbar-color: transparent transparent;
    max-height: calc(50vh - 4em);
    padding: 4em 0em 1em;
    z-index: 50;
}

/* Hide the scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-thumb {
    background-color: transparent;
}

::-webkit-scrollbar-track {
    background-color: transparent;
}

#header {
    box-shadow: 0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23);
    background-color: var(--light);
    position: fixed; /* Of 'sticky', afhankelijk van de behoefte */
    top: 0;
    width: 100%;
    height: 4em; /* Specifieke hoogte van de header */
    z-index: 1000; /* Zorgt dat de header boven andere elementen blijft */
    display: flex;
    align-items: center; /* Centreert items verticaal */
    justify-content: space-between; /* Dit is niet nodig als je 'margin-left: auto' op de button toepast */
    padding: 0 20px; /* Voegt wat ruimte toe aan beide kanten */
}

#flush {
    height: 60%;
    margin-left: auto; /* Duwt de knop naar de rechterkant */
    margin-right: 2em;
    font-size: 1em;
    background: none;
    border: none;
    color: inherit;
    font: inherit;
    cursor: pointer;
}

#header a {
    height: 100%;
    display: flex;
    align-items: center;
}
#header a img {
    height: 60%; /* Zorgt ervoor dat de afbeelding zich aanpast aan de hoogte van #header-logo */
    width: auto; /* Behoudt de aspect ratio van de afbeelding */
}

.error {
/* Show the error in the middle of the screen */
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    padding: 1em;
    color: var(--dark);
    opacity: .5;
    border-radius: 0.7em;
    z-index: 999999999;


}
#chat-input {
    font-family: inherit;
    width: 100vw;
    padding: 1em 3em 1em 1em;
    border: 0.5px solid var(--light);
    border-radius: 0.7em;
    outline: none;
    border: 0.5px solid var(--bright);
    resize: none;
    box-sizing: border-box;
    position: relative;
    box-shadow: 0 3px 7px 0 rgba(0, 0, 0, .13), 0 1px 2px 0 rgba(0, 0, 0, .11);    width: 70vw;
}

#message-input-container {
    position: fixed;
    bottom: calc(50vh - 2em);
    padding: 0em;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999999999;
    /* width: calc(100% - 2em); */
    /* margin: 1em; */
}

/* Hide scrollbar for webkit browsers */
#chat-input::-webkit-scrollbar {
    display: none;
}

/* For other browsers where the above does not work, 
   you can try to make the scrollbar transparent */
#chat-input {
    scrollbar-color: transparent transparent;
}


.input-group {
    position: relative;
    display: inline-block;
    width: calc(70vw - 2em);
    /* padding: 1em; */
    margin: 1em 1em;
    justify-content: end;
    display: flex;
    align-items: center;
}

#chat-input {
    padding-right: 60px;
    /* adjust as needed */
}

#send-button {
    opacity: .3;
    background: transparent;
    border: none;
    outline: none;
    color: inherit;
    position: absolute;
    z-index: 999;
    width: 3.5em;
    line-height: normal;
}

#send-button:hover {
    cursor: pointer;
    opacity: .8;
    transition: all 0.3s ease-in-out;
}

#chat-input:focus {
    box-shadow: 0 7px 15px 0 rgba(0, 0, 0, .13), 0 1px 4px 0 rgba(0, 0, 0, .11);
}

@keyframes shadowPulse {
    33% {
        background: #FFF;
        box-shadow: -24px 0 black, 24px 0 #FFF;
    }

    66% {
        background: black;
        box-shadow: -24px 0 #FFF, 24px 0 #FFF;
    }

    100% {
        background: #FFF;
        box-shadow: -24px 0 #FFF, 24px 0 black;
    }
}
  
.wrapper {
    display: flex;
    justify-content: center;
    height: 100vh;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
}


#chat-input::placeholder {
    transition: opacity .5s ease-in-out;
}

@media only screen and (max-width: 768px) {
    .input-group {
        width: calc(100vw - 2em);
    }
    
    #chat-messages {
        max-height: calc(100vh - 4em);
        bottom: 3.7em;
        width: 90vw;
    }
    
    #message-input-container {
        bottom: 0em;
        padding: 0em;
    }
}
    
