.spinner {
    width: 16px;
    height: 16px;
    border: 2px solid #fff;
    border-top: 2px solid transparent;
    border-radius: 50%;
    display: inline-block;
    animation: spin 0.8s linear infinite;
    margin-right: 6px;
    vertical-align: middle;
    position: relative;
}

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

#chat-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.3);
    display: none; /* hidden by default */
    z-index: 9998; /* under chat popup */
}

#chat-popup {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    display: none;
    width: 370px;
    max-width: 90%;
}

#chat-popup .card {
    background-color: #000000; /* black background */
    color: #ffffff;
    border-radius: 5px !important; /* full card radius */
    box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.4);
    overflow: hidden;
}

/* Chat body scrollable */
#chat-popup .card-body {
    height: 430px;
    overflow-y: auto;
    padding: 10px;
}

/* Website (support) message */
.msg-website {
    display: flex;
    align-items: flex-start;
    margin-bottom: 10px;
}

.msg-website img {
    width: 40px;
    border-radius: 0 !important;
    margin-right: 8px;
    margin-top: 10px;
}

.msg-website .bubble {
    background-color: #3E3E3E;
    color: #FFFFFF;
    padding: 6px 10px;
    border-radius: 3px;
    font-size: 14px;
    max-width: 75%;
}

/* User message */
.msg-user {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 10px;
}

.msg-user .bubble {
    background-color: #FFBBB8;
    color: #000000;
    padding: 6px 10px;
    border-radius: 3px;
    font-size: 14px;
    max-width: 75%;
}

/* Input area */
#chat-popup .card-footer {
    background: #000000;
}

#chat-popup input[type="text"] {
    background-color: #3E3E3E;
    color: #FFFFFF;
    border: none;
    border-radius: 0;
    width: 292px;
}

.chat-ask-view {
    background-color: #3E3E3E;
    padding: 8px 10px;
}

#chat-popup input::placeholder {
    color: #bbbbbb;
}

#chat-button {
    position: fixed;
    bottom: 26px;
    right: 26px;
    z-index: 10000;
    border-radius: 50%;
    width: 65px;
    height: 65px;
    cursor: pointer;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.2);
}

.chat-send {
    width: 25px;height: 25px;
    cursor: pointer;
}
.input-textarea {
    font-size: 14px;font-family: 'Exo 2', sans-serif;
}
.thinking-text {
    width: 130px;font-size: 14px;font-family: 'Exo 2', sans-serif;
}

.chat-buttons button {
    margin-top: 8px;
    margin-left: 2px;
    margin-right: 2px;
}

.chat-default-view {
    font-family: 'Exo 2', sans-serif;
}

.chat-btn {
    padding: 4px 8px;
    font-size: 13px;
    line-height: 1.2;
    border-radius: 2px;
    color: #000000;
    background-color: #ffbbb8;
    border: 1px solid #ffcfcd;
    box-shadow: none;
    display: inline-block;
    font-weight: 300;
    font-family: sans-serif;
    text-align: center;
    vertical-align: middle;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    text-decoration: none;
    transition: color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;
}
.chat-btn:hover {
    background-color: #ffcfcd;
    color: #000000;
}

.chat-btn:focus {
    background-color: #ffcfcd;
    color: #000000;
}
