/**
 * All of the CSS for your public-facing functionality should be
 * included in this file.
 */

 :root {
    --swttyw-primary-color: #2c74fb;
    --swttyw-avatar-image: url('');
    --swttyw-user-avatar-image: url('');
    --swttyw-background-color: #F7F7F7;
    --swttyw-header-font-size: '16px';
    --swttyw-body-font-size:  '15px';
    --swttyw-footer-font-size: '16px';
    --swttyw-user-background-image: url('');
}

.sw-ttyw-chatbot {
    position: fixed;
    bottom: 0px;
    right: 20px;
    z-index: 1;
}

.sw-ttyw-chat-header {
    position: relative;
    display: flex;
    padding: 10px;
    background: var(--swttyw-primary-color);
    color: #fff;
    border-radius: 10px 10px 0 0;
}

.sw-ttyw-chat-header .sw-ttyw-name {
    font-weight: 500;
    margin-bottom: 0.125rem;
    flex-grow: 1;
    word-break: break-all;
    font-size:var(--swttyw-header-font-size);
}

.sw-ttyw-chat-header a {
    text-decoration: none;
    color: white;
}


.sw-ttyw-chat-header .dashicons {
    margin-left: 5px;
}

.sw-ttyw-chat-box {
    position: relative;
    display: none;
    flex-direction: column;
    max-width: 400px;
    width: 80vw;
    max-height: 75vh;
    height: 75vh;
    bottom: 20px;
    z-index: 2;
    box-sizing: border-box;
    border-radius: 1rem;
    background: white;
    box-shadow: 0 0 8rem 0 rgba(0, 0, 0, 0.1), 0rem 2rem 4rem -3rem rgba(0, 0, 0, 0.5);
}

.sw-ttyw-chat-box .sw-ttyw-chat-header {
    flex-shrink: 0;
    box-sizing: border-box;
}

.sw-ttyw-chat-box .sw-ttyw-messages {
    padding: 1rem;
    background-color: var(--swttyw-background-color);
    flex-shrink: 2;
    overflow-y: auto;
    box-shadow: inset 0 2rem 2rem -2rem rgba(0, 0, 0, 0.05), inset 0 -2rem 2rem -2rem rgba(0, 0, 0, 0.05);
    height: calc(50vh - 200px);
    flex-grow: 1; 
}

.sw-ttyw-chat-box .sw-ttyw-messages .time {
    font-size: 0.8rem;
    background: #EEE;
    padding: 0.25rem 1rem;
    border-radius: 2rem;
    color: #999;
    width: -webkit-fit-content;
    width: -moz-fit-content;
    width: fit-content;
    margin: 0 auto;
}

.sw-ttyw-chat-box .sw-ttyw-messages .sw-ttyw-message {
    box-sizing: border-box;
    padding: 0.5rem 1rem;
    margin: 1rem;
    background: #FFF;
    border-radius: 1.125rem 1.125rem 1.125rem 0;
    min-height: 2.25rem;
    width: -webkit-fit-content;
    width: -moz-fit-content;
    width: fit-content;
    /* max-width: 80%; */
    box-shadow: 0 0 2rem rgba(0, 0, 0, 0.075), 0rem 1rem 1rem -1rem rgba(0, 0, 0, 0.1);
    font-size: 15px;
    word-break: break-word;
}

span.sw-ttyw-chatbot-btn {
    margin-bottom: 20px;
    max-width: 280px;
    word-break: break-word;
}

.sw-ttyw-chat-box .sw-ttyw-messages .sw-ttyw-message.self {
    margin: 1rem 1rem 1rem auto;
    border-radius: 1.125rem 1.125rem 0 1.125rem;
    /* background: #333; */
    background: var(--swttyw-primary-color);
    color: white;
    position: relative;
    max-width: 80%;
    font-size: var(--swttyw-body-font-size);
}

.sw-ttyw-chat-box .sw-ttyw-messages .sw-ttyw-message.self:after {
    background-color: var(--swttyw-primary-color);
    mask-image: var(--swttyw-user-avatar-image);
    position: absolute;
    top: 5px;
    border-radius: 100%;
    width: 24px;
    height: 24px;
    border-radius: 24px;
    content: '';
    background-size: cover;
    right: -28px;
}

.sw-ttyw-chat-box .sw-ttyw-messages .sw-ttyw-message.other {
    position: relative;
    font-size: var(--swttyw-body-font-size);
}

.sw-ttyw-chat-box .sw-ttyw-messages .sw-ttyw-message.other:before {
    background-image: var(--swttyw-avatar-image);
    position: absolute;
    top: 5px;
    border-radius: 100%;
    width: 24px;
    height: 24px;
    border-radius: 24px;
    content: '';
    background-size: cover;
    left: -28px;
}

.sw-ttyw-chat-box .sw-ttyw-messages .sw-ttyw-message .typing {
    display: inline-block;
    width: 0.8rem;
    height: 0.8rem;
    margin-right: 0rem;
    box-sizing: border-box;
    background: #ccc;
    border-radius: 50%;
}

.sw-ttyw-chat-box .sw-ttyw-messages .sw-ttyw-message .typing.typing-1 {
    -webkit-animation: typing 3s infinite;
    animation: typing 3s infinite;
}

.sw-ttyw-chat-box .sw-ttyw-messages .sw-ttyw-message .typing.typing-2 {
    -webkit-animation: typing 3s 250ms infinite;
    animation: typing 3s 250ms infinite;
}

.sw-ttyw-chat-box .sw-ttyw-messages .sw-ttyw-message .typing.typing-3 {
    -webkit-animation: typing 3s 500ms infinite;
    animation: typing 3s 500ms infinite;
}

.sw-ttyw-chat-box .sw-ttyw-chat-input-section {
    box-sizing: border-box;
    flex-basis: 4rem;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    box-shadow: 0 0 1rem rgba(0, 0, 0, 0.1), 0rem 1rem 1rem -1rem rgba(0, 0, 0, 0.2);
    margin: 0.50rem;
}

.sw-ttyw-chat-box .sw-ttyw-chat-input-section i {
    font-size: 1.5rem;
    margin-right: 1rem;
    color: #666;
    cursor: pointer;
    transition: color 200ms;

}

.sw-ttyw-chat-box .sw-ttyw-chat-input-section i:hover {
    color: #333;
}

.sw-ttyw-chat-box .sw-ttyw-chat-input-section input,
.sw-ttyw-chat-box .sw-ttyw-chat-input-section textarea {
    border: none;
    background-image: none;
    background-color: white;
    padding: 0.5rem 1rem;
    margin-right: 1rem;
    border-radius: 10px;
    flex-grow: 2;
    font-family: Red hat Display, sans-serif;
    font-weight: 400;
    letter-spacing: 0.025em;
    resize: none;
    font-size: 16px;
}

.sw-ttyw-chat-box .sw-ttyw-chat-input-section .sw-ttyw-chat-input-content {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 5px
}

.sw-ttyw-chat-box .sw-ttyw-chat-input-section input:placeholder,
.sw-ttyw-chat-box .sw-ttyw-chat-input-section textarea:placeholder {
    color: #999;
}

.sw-ttyw-chat-box .sw-ttyw-chat-input-section input:focus-visible,
.sw-ttyw-chat-box .sw-ttyw-chat-input-section textarea:focus-visible {
    outline: none;
}

#sw-ttyw-chat-send-message {
    background: transparent;
    border: 0px;
    cursor: pointer;
}

.sw-ttyw-chatbot-btn {
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    bottom: 20px;
    right: 20px;
    font-size: 16px;
    border-radius: 10px;
    padding: 5px;
    background: var(--swttyw-primary-color);
    width: max-content
}

.sw-ttyw-chatbot-btn svg {
    fill: #fff;
    width: 35px;
    min-width: 35px;
}

.sw-ttyw-chat-box .sw-ttyw-chat-footer {
    flex-shrink: 0;
    display: flex;
    background: var(--swttyw-primary-color);
    border-radius: 0 0 10px 10px;
    flex-direction: column !important;
    padding-bottom: 6px;
    padding-top: 6px;
    margin-top: 0px;
}

.sw-ttyw-chat-box .sw-ttyw-chat-footer small {
    text-align: center;
    font-size: 80%;
    font-weight: 400;
    color: #f8f9fa;
    font-size: var(--swttyw-footer-font-size);
}

.sw-ttyw-chat-box .sw-ttyw-chat-footer svg {
    max-height: 18px;
    height: auto;
    width: auto;
    vertical-align: middle;

}

.sw-ttyw-chat-box .sw-ttyw-chat-footer a {
    margin-left: 0.25rem;
    line-height: 1;
}

@-webkit-keyframes typing {

    0%,
    75%,
    100% {
        transform: translate(0, 0.25rem) scale(0.9);
        opacity: 0.5;
    }

    25% {
        transform: translate(0, -0.25rem) scale(1);
        opacity: 1;
    }
}

@keyframes typing {

    0%,
    75%,
    100% {
        transform: translate(0, 0.25rem) scale(0.9);
        opacity: 0.5;
    }

    25% {
        transform: translate(0, -0.25rem) scale(1);
        opacity: 1;
    }
}

svg.cwv.replaced-svg {
    fill: var(--swttyw-primary-color);
}

small#sw-ttyw-chat-textbox-status {
    color: var(--swttyw-primary-color)
}

.swttyw-modal.swttyw-modal-clear-history {
    position: absolute;
    background: #ffffffe8;
    height: calc(100% - 85px);
    width: 100%;
    top: 48px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.sw-ttyw-chat-container {
    position: relative;
    flex-grow: 1;
    display: flex;
}

.sw-ttyw-chat-section {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.swtty-modal-body {
    text-align: center;
}

.swtty-action input[type="button"] {
    background: transparent;
    padding: 10px 20px;
    margin: 10px 5px;
    cursor: pointer;
    border-radius: 8px;
    border: 1px solid var(--swttyw-primary-color);
}

input#swttyw-btn-clear-history-yes {
    background-color: var(--swttyw-primary-color);
    color: #fff;
}

input#swttyw-btn-clear-history-no {
    color: var(--swttyw-primary-color);
}

small.swttyw-input-error {
    color: red;
    position: absolute;
    bottom: 45px;
    left: 24px;
}

/* width */
.sw-ttyw-chatbot ::-webkit-scrollbar {
    width: 3px;
}

/* Track */
.sw-ttyw-chatbot ::-webkit-scrollbar-track {
    background: transparent;
}

/* Handle */
.sw-ttyw-chatbot ::-webkit-scrollbar-thumb {
    background: var(--swttyw-primary-color);
}

/* Handle on hover */
.sw-ttyw-chatbot ::-webkit-scrollbar-thumb:hover {
    background: var(--swttyw-primary-color);
}
 
.sw-ttyw-messages-bg-image{
  position: relative;
  background-color:#F7F7F7 !important ;
}    
.sw-ttyw-messages-bg-image::after{
    transition: all 2s ease-out;
    background-image: var(--swttyw-background-image);
    content: "";
    opacity: 0;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    height: 100%;
    width: 100%;
    background-repeat: no-repeat;
    background-position: center;
    background-size: 90%;
    
}
.sw-ttyw-messages-bg-image.sw-ttyw-messages-box-open::after{
    opacity: 1;
    transition: all 3s ease-out;
}

.sw-ttyw-messages-remove-bg-image::after{
    transition: all 1s ease-out;
    opacity: 0;
}
.sw-ttyw-messages-remove-bg-image{
    background-color: var(--swttyw-background-color) !important;
}

