@import url("https://fonts.googleapis.com/css?family=IBM Plex Sans Arabic");

.frontend-wrap {
    direction: rtl;
    font-family: "IBM Plex Sans Arabic";
    margin: 0;
    padding: 0;
    height: 100%;
}
.d-none {
    display: none;
}

.mobile-header,
.mobile-footer {
    display: none;
}

.bot-img {
    height: 80px !important;
}


.chat-bot {
    position: fixed;
    bottom: 20px;
    z-index: 1000;
    right: 20px;
}


html[dir="rtl"] .chat-bot {
    left: 20px;
    right: unset;
}

    .chat-bot img {
        border-radius: 50%;
        margin-top: 5px;
    }

    .chat-bot > img:hover {
        box-shadow: 8px 8px 16px 0px #0000001a;
        cursor: pointer;
    }

@media (max-width: 640px) {
    .bot-img {
       
    }

}

#chat-bot-screen {
    height: 470px;
    width: 430px;
    background: #f5f5f5;
    border-radius: 25px;
    /* display: flex; */
    flex-direction: column;
    direction: ltr;
    overflow: hidden;
}

.bot-header {
    height: 50px;
    background: #4f7382;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    direction: ltr;
    align-items: center;
    color: #e3d1b0;
    border-top-right-radius: 25px;
    border-top-left-radius: 25px;
    padding: 0 0.5rem;
    flex-shrink: 0;
}

    .bot-header > div {
        box-sizing: border-box;
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 0.5rem;
        font-size: 21px;
    }

    .bot-header .closed-icon img {
        width: 20px;
        cursor: pointer;
    }

#bot-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
}

.first-answer-screen {
    box-sizing: border-box;
    padding: 1rem;
    gap: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: end;
}

.question-answer-screen {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    scroll-behavior: smooth;
}

.answer {
    box-sizing: border-box;
    display: flex;
    flex-direction: row;
    gap: 0.5rem;
    align-items: start;
}

    .answer span {
        box-sizing: border-box;
        padding: 1rem;
        color: #282828;
        background-color: #e3e3e3;
        border-radius: 16px;
        max-width: 314px;
        font-size: 15px;
    }

    .answer img {
        width: 45px;
    }

.question {
    box-sizing: border-box;
    display: flex;
    flex-direction: row;
    gap: 0.5rem;
    align-items: center;
    justify-content: end;
}

    .question span {
        box-sizing: border-box;
        padding: 1rem;
        color: #ffffff;
        background-color: #4f7382;
        border-radius: 16px;
        max-width: 314px;
        font-size: 15px;
    }

.start-conv {
    align-self: center;
}

.start-btn {
    padding: 0.5rem;
    font-size: 18px;
    color: #e3d1b0;
    border-radius: 110px;
    background-color: #4f7382;
    text-align: center;
    width: 314px;
    border: none;
    cursor: pointer;
}



.chat-input {
    padding: 10px;
    display: flex;
    gap: 10px;
    align-items: center;
    height: 56px;
    box-sizing: border-box;
}

    .chat-input input {
        flex: 1;
        padding: 10px;
        border-radius: 30px;
        border: none;
        outline: none;
        position: relative;
    }

    .chat-input button {
        background: transparent;
        border: none;
        cursor: pointer;
        position: absolute;
        right: 18px;
    }

    /*from me*/
    [dir="rtl"] .chat-input button {
        left: 18px;
        right: unset;
    }



.option-btn {
    margin-top: 8px;
    padding: 5px 40px;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-size: 18px;
}

    .option-btn#no-btn {
        color: #4f7382;
        border: 1px solid #4f7382;
    }

    .option-btn#yes-btn {
        color: #e3d1b0;
        background-color: #4f7382;
    }

    .option-btn:hover {
        background-color: #3b5b69;
    }

.follow-up-buttons {
    display: flex;
    flex-direction: row;
    gap: 15px;
    justify-content: center;
}

/* ----- mobile view ----- */
@media (max-width: 768px) {
    .bot-header,
    .first-answer-screen {
        display: none;
    }

    .chat-bot {
        position: fixed;
        bottom: 0;
        left: 0!important;
    }

    #chat-bot-screen {
        width: 100vw;
        height: 100vh;
        background: #f5f5f5;
        /* display: flex; */
        flex-direction: column;
        direction: ltr;
        overflow: hidden;
        border-radius: 0;
    }

    .mobile-header {
        display: flex;
        flex-direction: row;
        justify-content: end;
        align-items: center;
        background-color: #4f7382;
        font-size: 21px;
        font-weight: 600;
        color: #e3d1b0;
        padding: 0 15px;
        border-bottom: 1px solid #e3d1b0;
    }

    .first-answer-screen-mob {
        display:flex;
        flex-direction: column;
        overflow-y: auto;
        padding: 1.2rem;
    }

    .answers {
        font-size: 16px;
        display: flex;
        flex: 1;
        flex-direction: column;
        gap: 1rem;
        color: #4f7382;
        font-weight: 400;
    }

        .answers .ar {
            direction: rtl;
        }

    .mobile-home-screen {
        height: 100%;
        direction: ltr;
        display: flex;
        flex-direction: column;
        background-color: #4f7382;
        align-items: center;
        justify-content: center;
    }

    .start-conv {
        direction: ltr;
        margin-top: 2rem;
        align-self: center;
        display: flex;
        gap: 1rem;
    }

    .start-btn {
        padding: 10px 30px;
        width: auto;
        font-size: 16px;
        font-weight: 700;
        color: #e3d1b0;
        border-radius: 40px;
        background-color: #4f7382;
        text-align: center;
        border: none;
        cursor: pointer;
    }

    .loading-screen {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        height: 100%;
    }

    .bot-avatar-wrapper {
        position: relative;
        width: 100px;
        height: 100px;
    }

        .bot-avatar-wrapper img {
            width: 100px;
        }

    .bot-avatar {
        width: 100px;
        height: 100px;
        border-radius: 50%;
        object-fit: cover;
        position: relative;
        z-index: 2;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    }

    .loading-ring {
        position: absolute;
        top: -10px;
        left: -10px;
        width: 120px;
        height: 120px;
        border: 1px solid transparent;
        border-top: 1px solid #e3d1b0;
        border-right: 1px solid #e3d1b0;
        border-radius: 50%;
        animation: spin 1s linear infinite;
        z-index: 1;
    }

    .loading-text {
        margin-top: 20px;
        font-size: 16px;
        color: #e3d1b0;
    }

    @keyframes spin {
        0% {
            transform: rotate(0deg);
        }

        100% {
            transform: rotate(360deg);
        }
    }

    .mobile-footer {
        display: flex;
        background-color: #4f7382;
        justify-content: center;
        padding: 10px 0;
    }

        .mobile-footer span {
            width: 134px;
            height: 5px;
            background-color: white;
            border-radius: 100px;
        }
}
