/**
 * ==============================================
 * Chat Window in iFrame
 * ==============================================
 */

:root {
    --primary-color: #00285F;
    --secondary-color: #8d8c8c;
    --grey-color: #f1f0f0;
    --hover-color: #2F5293;
    --border-color: #A1A1A1;
    --text-color: #333;
    --font-family-main: "Roboto", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

*, *::before, *::after {
    box-sizing: border-box;
}

body, html {
    height: 100%;
    margin: 0;
    padding: 0;
    font-family: var(--font-family-main);
    font-size: 16px; /* Set overall font size */
    color: var(--text-color);
}

@media (max-height: 480px) {
    body, html {
        font-size: 14px;
    }
}

h1 {
    margin: 8px 0 0 0;
    font-size: 2em;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
}

@media screen and (max-width: 768px) {
    h1 {
        font-size: 1.2em;
        font-weight: 800;
    }
}

button {
    font-family: var(--font-family-main);
    font-size: 1em;
}

input {
    font-family: var(--font-family-main);
    font-size: 1em;
}

#chat-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    margin: 0 auto;
    padding: 10px;
}

@media screen and (max-width: 768px) {
    #chat-container {
        padding: 0 10px;
    }
}

header {
    padding: 10px 20px;
    text-align: center;
    background-color: #405e87;
    color: #fff;
}

.chat__messages {
    flex-grow: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    scrollbar-width: none; /* For Firefox */
    -ms-overflow-style: none; /* For Internet Explorer and Edge */
    background-color: #fff;
    box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.10);
}

.chat__messages::-webkit-scrollbar {
    display: none; /* For WebKit-based browsers (Chrome, Safari) */
}

.chat__message {
    padding: 10px;
    border-radius: 0.5em;
    margin-bottom: 10px;
    max-width: 80%;
    width: fit-content;
}

@media screen and (max-width: 768px) {
    .chat__message {
        max-width: 100%;
    }
}

.chat__message--teaser {
    align-self: flex-end;
    background: #ededed;
    color: #707070;
    border: 0;
    margin-top: 0;
    padding-top: 10px !important;
    padding-bottom: 10px !important;
    border-radius: 0.5em;
    cursor: pointer;
    border-bottom-right-radius: 0;
}

@media screen and (max-width: 768px) {
    .chat__message--teaser {
        margin-bottom: 10px;
    }
}

.chat__message--teaser:hover {
    background: #d1d1d1;
    box-shadow: 0 4px 12px rgba(49, 130, 206, 0.4);
}

@media screen and (max-width: 768px) {
    .chat__messages > .chat__message--teaser:nth-child(n+4) {
        display: none;
    }
}

.chat__message--bot {
    position: relative;
    align-self: flex-start;
    background: var(--primary-color);
    color: white;
    border-bottom-left-radius: 0;
}

.chat__message--bot a {
    color: #d2c5bc;
    text-decoration: none;
}

.chat__message--user {
    align-self: flex-end;
    background: #d1d1d1;
    border: 0;
    border-bottom-right-radius: 0;
}

.chat__message--divider {
    width: 100%;
    height: 2px;
    /*background-color: rgb(122, 122, 217);*/
    margin: 25px 0;
}

@media screen and (max-width: 768px) {
    .chat__message--divider {
        margin: 10px 0;
    }
}

.dimmed {
    /*opacity: 0.7;*/
    opacity: 1;
}

.chat__message img {
    display: block;
    width: 200px;
    margin: 10px 0 10px 0;
    vertical-align: middle;
    cursor: pointer;
}

.image-description {
    font-style: italic;
}


#scroll-down-button {
    display: none;
    position: fixed;
    right: 20px;
    bottom: 100px;
    width: 50px;
    height: 50px;
    padding: 0;
    background-color: var(--border-color);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 24px;
    text-align: center;
    justify-content: center;
    align-items: center;
}

#scroll-down-button:hover {
    background-color: black;
}

@media (hover: none) {
    #scroll-down-button:hover {
        background-color: var(--border-color);
    }
}

footer {
    /*display: flex;*/
    /*justify-content: space-between;*/
    /*align-items: center;*/
    padding: 10px 20px;
    background-color: #405e87;
    color: #fff;
}

footer .input-container {
    position: relative;
    width: 100%;
    height: 45px;
}

/* necessary for additional buttons */
footer .input-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 920px;
    margin: 0 auto;
}

footer .chat__input {
    width: 100%;
    height: 100%;
    padding: 8px 40px 8px 16px;
    border: 1px solid var(--border-color);
    border-radius: 0;
    outline: none;
    color: #493727;
}

footer .chat__input:focus {
    border: 1px solid black;
}

footer .chat__input::placeholder {
    color: rgba(73, 55, 39, 0.56);
}

footer .chat__send {
    position: absolute;
    right: 0;
    top: 0;
    background-color: transparent;
    color: black;
    border: none;
    cursor: pointer;
    height: 100%;
    padding: 0 12px;
    background-color: var(--primary-color);
    color: #fff;
    font-weight: 500; /* 'fa-solid' style */
}

footer .chat__send::before {
    font-family: 'Font Awesome 6 Pro';
    font-size: 1.5em;
    content: "\f061"; /* arrow-right */
}

footer .chat__send:hover {
	color: #fff;
    font-weight: 900; /* 'fa-solid' style */
}

@media (hover: none) {
    footer .chat__send:hover {
        color: initial;
    }
}

.refresh-chat {
	border-radius: 0;
    display: none;
}

.refresh-chat:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
} 

.stop-stream {
	color: #fff;
}

.stop-stream:hover {
	color: var(--primary-color);
}

.disclaimer {
    padding: 5px;
    text-align: center;
    font-size: 10px;
    color: #fff;
    max-width: 920px;
    margin: 0 auto;
}

.recording-button {
    width: 45px;
    height: 45px;
    margin-right: 5px;
    border: 1px solid var(--border-color);
    border-radius: 0;
    cursor: pointer;
    font-family: 'Font Awesome 6 Pro';
    outline: none;
    color: var(--text-color);
    background-color: white;
    font-weight: 800;
    font-size: 18px;
}
.recording-button::before {
    content: '\f130'; /* FontAwesome unicode for 'microphone' icon */
}
.recording-button[data-recording-state="active"]::before {
    content: '\f04d'; /* Stop icon */
}
.recording-button:focus {
    border: 1px solid var(--primary-color)
}
.recording-button:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
    outline: none;
}
.recording_off {
    /* just for the color of the recording button when no sound detected */
    color: var(--title-color);
    background-color: #ffffff;
}
.recording_max {
    /* just for the color of the recording button when max sound detected */
    color: #ffffff;
    background-color: var(--hover-color);
}

/**
 * ==============================================
 * Feedback
 * ==============================================
 */
.feedback-icons {
    position: absolute;
    bottom: 10px;
    right: 10px;
    display: flex;
    gap: 0;
    display: none;
}

.feedback-icons .thumbs-up, .feedback-icons .thumbs-down {
    cursor: pointer;
    opacity: 0.5;
    background: transparent;
    border: none;
    color: #fff;
}

.feedback-icons .thumbs-up:hover, .feedback-icons .thumbs-down:hover {
    opacity: 1;
}

.invisible {
    opacity: 0;
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
    pointer-events: none;
}

.thumbs-up::before {
    content: "\f164";
    font-family: "Font Awesome 6 Pro";
    font-weight: 900; /* Solid style */
}

.thumbs-down::before {
    content: "\f165";
    font-family: "Font Awesome 6 Pro";
    font-weight: 900; /* Solid style */
}

.feedback-modal {
    position: absolute;
    top: 0;
    left: 0;
    background-color: #f1f1f1;
    border: 1px solid #d2d2d2;
    padding: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    z-index: 10;
    border-radius: 10px;
}

.feedback-modal textarea {
    width: 250px;
    height: 150px;
    display: block;
    margin-bottom: 10px;
    border: 1px solid rgb(228, 225, 225);
    font-size: 14px;
}

.feedback-buttons {
    display: flex;
    justify-content: space-between;
}

.feedback-modal button {
    padding: 5px 10px;
    cursor: pointer;
    font-size: 14px;
    border: none;
    background-color: #f4f4f4;
    border-radius: 5px;
}

.feedback-modal button:hover {
    background-color: #d9d9d9;
}

/**
 * ==============================================
 * Images
 * ==============================================
 */
.popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
}

.popup__button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10000;
    cursor: pointer;
}

.popup__button--left {
    left: 10px;
}

.popup__button--right {
    right: 10px;
}

.popup__img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    cursor: pointer;
}

/**
 * ==============================================
 * Dot Flashing
 * ==============================================
 */
.dot {
    font-size: 0.6rem;
    margin-right: 5px;
    color: #fff;
}

.dot1 {
    animation: visibility1 3s linear infinite;
}

@keyframes visibility1 {
    0% {
        opacity: 1;
    }
    65% {
        opacity: 1;
    }
    66% {
        opacity: 0;
    }
    100% {
        opacity: 0;
    }
}

.dot2 {
    animation: visibility2 3s linear infinite;
}

@keyframes visibility2 {
    0% {
        opacity: 0;
    }
    21% {
        opacity: 0;
    }
    22% {
        opacity: 1;
    }
    65% {
        opacity: 1;
    }
    66% {
        opacity: 0;
    }
    100% {
        opacity: 0;
    }
}

.dot3 {
    animation: visibility3 3s linear infinite;
}

@keyframes visibility3 {
    0% {
        opacity: 0;
    }
    43% {
        opacity: 0;
    }
    44% {
        opacity: 1;
    }
    65% {
        opacity: 1;
    }
    66% {
        opacity: 0;
    }
    100% {
        opacity: 0;
    }
}