@font-face {
    font-family: Font-Regular-EN;
    src: url("../fonts/english.ttf");
}
@font-face {
    font-family: Font-Regular-AR;
    src: url("../fonts/arabic.ttf");
}
:root {
    --accent-color: #cd1b2e;
    --background-color: #f2f1f0;
    --container-background-color: #E5E5E5;
    --font-color: #74777B;
}

p {
    margin: 0 1rem;
}

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    background-color: var(--background-color);
    font-family: Font-Regular-EN, serif;
    color: var(--font-color);
}

.lang-AR {
    font-family: Font-Regular-AR, serif;
    direction: rtl;
    margin-top: -5px;
}

.original.lang-AR {
    margin-top: 0;
}

svg {
    height: 32px;
    width: 32px;
    fill: white;
}

.container {
    display: flex;
    flex-direction: column;
    height: 100%;
    justify-content: center;
    align-items: center;
    padding: 0 2%;
}

.header {
    width: 92%;
    display: flex;
    flex-wrap: wrap;
    align-content: center;
    justify-content: space-between;
    align-items: center;
}

.header h1{
    font-weight: lighter;
    color: var(--accent-color);
}

.chat-container {
    flex: 10;
    overflow-y: auto;
    width: 90%;
    padding: 20px 20px;
    background-color: var(--container-background-color);
}

.chat-container::-webkit-scrollbar-track {
    -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.3);
    background-color: #F5F5F5;
}

.chat-container::-webkit-scrollbar {
    width: 6px;
    background-color: #F5F5F5;
}

.chat-container::-webkit-scrollbar-thumb {
    background-color: var(--accent-color);
}

#conversations {
    padding: 20px 40px
}

.message {
    display:flex;
    align-items: center;
    margin-bottom: 8px;
}

.message .text .translated {
    display: block;
    margin-top: 20px;
}

.message .text .original {
    display: block;
}

.text {
    margin: 0 0 0 0;
    background-color: #f6f6f6;
    padding: 15px;
    border-radius: 12px;
}

.text-only {
    margin-left: 45px;
}

.time {
    font-size: 10px;
    color: lightgrey;
    margin-bottom:10px;
    float: left;
}

.response-time {
    float: right;
}

.response {
    float: right;
    margin-right: 0 !important;
    margin-left:auto; /* flexbox alignment rule */
}

.response .text {
    background-color: #e3effd !important;
}

.input-container {
    flex: 1;
    width: 90%;
    padding: 0 20px;
    background-color: var(--container-background-color);
}

.input-group {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 10px;
    border-radius: 5px;
}

.input-group input {
    flex: 1;
    margin: 0 5px;
    padding: 15px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
}

.button-group {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.button-group span {
    margin-left: 5px;
    margin-right: 5px;
    margin-top: -5px;
}

.button-group p {
    margin-top: -5px;
    font-size: 1.5rem;
}

.button-group button {
    margin: 0 5px;
    padding: 7px 10px;
    border: none;
    border-radius: 10px;
    font-size: 1.5rem;
    cursor: pointer;
    color: white;
    background-color: var(--accent-color);
    display: flex;
    align-items: center;
    font-family: Font-Regular-AR, serif;
}

.keyboard-container {
    flex: 0;
    padding: 0 20px;
    transition: flex 0.3s ease-out;
    width: 90%;
    background-color: var(--container-background-color);
}

.keyboard-container.active {
    /*flex: 4;*/
}

.footer {
    padding: 20px 0;
}

.footer button{
    margin-left: 10px;
    padding: 10px 10px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    color: white;
    background-color: var(--accent-color);
    display: flex;
    justify-content: center;
    align-items: center;
}

.wave{
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.wave.active{
    display: block;
}

#canvas {
    height: 100px;
    display: block;
    margin: 0 auto 50px auto;
    border-bottom: 2px solid #9C27B0;
}

.no-margin {
    margin: 0 0 0 0 !important;
}
.ui-keyboard-tab, .ui-keyboard-enter, .ui-keyboard-cancel{
    display: none !important;
}
.footer button svg {
    margin-left: 5px;
}

#sign-language-container {
    display: none;
    padding: 20px 0;
    text-align: center
}

.popup-content button {
    padding: 10px 10px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    color: white;
    background-color: var(--accent-color);
    display: flex;
    justify-content: center;
    align-items: center;
}

.popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999999;
}

.popup-content {
    background-color: #fff;
    max-width: 1024px;
    margin: 100px auto;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

iframe {
    width: 100%;
    height: 720px;
    margin-bottom: 10px;
    border: 0px;
}

.loading-spinner {
    border: 4px solid rgba(0, 0, 0, 0.3);
    border-top: 4px solid #007bff;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 2s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.help-text{
    display: flex;
    font-size: 2.5em;
    margin-bottom: 10px;
}
.help-text svg{
    fill: var(--accent-color);
    padding: 0 15px;
    width: 50px !important;
    height: 50px !important;
}
.info-button {
    width: 50px;
    height: 50px;
    padding: 0 9px;
    cursor: pointer;
}

#videoElement {
    width: 630px;
}

.sign-image-main-container {
    display: flex;
    align-items: center;
    justify-content: space-evenly;
    width: 750px;
    margin-bottom: 40px;
}

.sign-image-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.sign-image {
    width: 200px; /* Fixed width for the images */
    height: 200px; /* Fixed height for the images */
    display: inline-block;
    text-align: center;
}

.sign-image  img {
    max-width: 100%;
    max-height: 100%;
    display: block;
    margin: 0 auto; /* Center the image horizontally */
}

.sign-title {
    margin-top: 10px;
    font-size: 1.5rem;
}

.sign-help-translation-texts {
    width: 830px;
    height: 250px;
    overflow: auto;
    padding: 10px 0 0 0;
}

.sign-help-translation-texts::-webkit-scrollbar-track {
    -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.3);
    background-color: #F5F5F5;
}

.sign-help-translation-texts::-webkit-scrollbar {
    width: 6px;
    background-color: #F5F5F5;
}

.sign-help-translation-texts::-webkit-scrollbar-thumb {
    background-color: var(--accent-color);
}

.sign-image-container p {
    font-size: 1.7rem;
}

@media screen and (max-width: 1478px) and (max-height: 842px) {
    #videoElement {
        width: 510px !important;
    }
    .sign-help-translation-texts {
        width: 666px;
    }
    .sign-help-translation-texts h1 {
        font-size: 1.3rem;
    }
}

.blink {
    animation: blink 1.5s infinite;
}

@keyframes blink {
    0% { opacity: 1; }
    50% { opacity: 0; }
}