/*!
 * name: docs.nuvei.com chatbot
 * version: v1.0.4 / 12/16/2025, 11:36:21 AM
 *
 */
body {
    font-family: arial;
}

.chatbot-panel {
    width: 450px;
    min-width: 300px;
    height: 55vh;
    max-height: 75vh;
    min-height: 300px;
    font-size: 14px;
    position: fixed;
    bottom: 129px;
    right: 20px;
    background-color: var(--white);
    border-radius: 12px; /* Only top corners rounded */
    box-shadow: 0 4px 12px 5px rgb(0 0 0 / 7%) !important;
    overflow: hidden;
    z-index: -1;
    display: flex;
    flex-direction: column; /* Stack children vertically */
    transform: translateY(8%); /* This will hide the chatbot by moving it downwards by its full height */
    transition: transform 0.1s ease-in-out, opacity 0.1s ease-in-out;  /* Add an opacity transition */
    opacity: 0;
}

.chatbot-panel.open {
    transform: translateY(0%); /* This will move the chatbot back to its original position */
    opacity: 1;  /* This will make the chatbot fully visible */
    z-index: 99999;
}

.chatbot-panel button {
    color: var(--grey);
    box-shadow: none;
    min-height: auto;
}

.resize-top-handle {
    width: 100%;
    height: 20px;
    position: absolute;
    left: 0;
    top: -12px;
    bottom: 0;
    cursor: ns-resize;
}

.resize-left-handle {
    width: 20px;
    position: absolute;
    left: -10px;
    top: 0;
    bottom: 0;
    cursor: ew-resize;
}

.resize-top-left-handle {
    width: 16px;
    height: 16px;
    position: absolute;
    left: -4px;
    top: -4px;
    bottom: 0;
    cursor: nw-resize;
    z-index: 9;
}

.chatbot-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 16px;
    color: var(--heading-color);
    font-weight: 700;
    border-bottom: 1px solid var(--border-color);
    line-height: 1.7;
}

.chatbot-header > svg {
    max-width: 30px;
    border-radius: 50px;
    margin-right: 10px;
}

.chatbot-title {
    width: 100%;
    padding: 16px 0;
}

.chatbot-close {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    cursor: pointer;    
    position: absolute;
    right: 10px;
    top: 10px;
}

.chatbot-close:hover {
    background-color: var(--lightgrey);
}

.chatbot-messages {
    padding: 14px;
    overflow-y: scroll;
    /* white-space: pre-wrap; */
    flex: 1; /* Take all available space, pushing the input to the bottom */
}

@supports not selector(::-webkit-scrollbar) {
    .chatbot-messages {
        scrollbar-width: thin;
        scrollbar-color: var(--grey) var(--white);
    }
}

.chatbot-messages::-webkit-scrollbar {
    background-color: var(--white);
    width: 10px;
    height: 10px;
}

.chatbot-messages::-webkit-scrollbar-button {
    display: none;
}

.chatbot-messages::-webkit-scrollbar-thumb {
    border-radius: 6px;
    background-color: var(--grey);
    border: 3px solid var(--white);
}

.chatbot-messages::-webkit-scrollbar-track {
    background-color: var(--white);
}

.chatbot-message {
    display: flex;
    align-items: center; /* This centers the content vertically */
    margin-bottom: 14px;
    line-height: 1.4;
}


.chatbot-message.user {
    justify-content: flex-start;
    flex-direction: row-reverse;
}

.chatbot-message.assistant {
    justify-content: flex-start; /* Aligns bot message to the left */
    flex-wrap: wrap;
}

.chatbot-message .message-content {
    padding: 10px 15px;
    border-radius: 10px;
    font-size: 14px;
    word-wrap: break-word;
}

.chatbot-message .message-content p {
    margin: 0;
}

.chatbot-message .message-content ol, 
.chatbot-message .message-content ul {
    padding-left: 24px;
    margin: 12px 0;
}

.chatbot-message .message-content li {
    margin-bottom: 10px;
}

.chatbot-message.user .message-content p {
    color: var(--white) !important;
}

.chatbot-message .message-content table {
    margin: 10px 0;
}

.chatbot-message .message-content table td, 
.chatbot-message .message-content table th {
    padding: 6px 8px;
    border-color: var(--border-color);
}

.chatbot-message .message-content pre {
    color: var(--black);
    background-color: var(--default-light-2);
    white-space: break-spaces;
    word-break: break-all;
    margin: 10px 0 !important;
    padding: 10px;
}

.chatbot-message .message-content code {
    display: inline-block;
    word-break: break-all;
    padding: 0px 4px;
}

.chatbot-message .message-content a {
    color: var(--link-color);
    text-decoration: none;
}

.chatbot-message .message-content a:hover {
    color: var(--link-color-hover);
    text-decoration: underline;
}

.bot-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    align-self: center;
    margin: 0 8px;
}

/* User messages styling */
.chatbot-message.user .message-content {
    background-color: var(--primary);
    color: var(--white);
    max-width: 70%;
}

/* Bot messages styling */
.chatbot-message.assistant .message-content {
    background-color: var(--lightgrey);
    color: var(--text-default);
    max-width: 80%; /* Adjust this percentage as per your design needs */
    position: relative;
    margin-bottom: 26px;
}

.chatbot-message .message-reactions {
    padding: 5px 10px;
    position: absolute;
    right: 0;
    bottom: -32px;
}

.chatbot-message button {
    background-color: transparent;
    color: var(--grey);
    border: none;
    padding: 0 5px;
    margin-right: 5px;
    cursor: pointer;
}

.chatbot-message .message-reactions:not(.disabled) button:hover {
    background-color: transparent;
    color: var(--primary-light-1);
}

.chatbot-message .message-reactions.disabled button:not(.selected) {
    opacity: 0.5;
}

.chatbot-message button.selected {
    color: var(--primary);
}

.chatbot-messages .feedback-popup {
    width: 60%;
    background-color: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    box-sizing: border-box;
    box-shadow: 0px 5px 10px 8px rgba(0,0,0,.05);
    left: 50%;
    padding: 20px;
    position: fixed;
    top: 50%;
    -webkit-transform: translate(-50%,-50%);
    transform: translate(-50%,-50%);
    z-index: 999;
}

.chatbot-messages .feedback-popup h3 {
    color: var(--heading-color);
    font-size: 16px;
    margin: 0 0 8px;
    line-height: 1.3;
}

.chatbot-messages .feedback-popup textarea {
    height: 100px;
    width: 100%;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    box-sizing: border-box;
    display: inline-block;
    margin: 10px 0;
    padding: 12px;
    outline: none;
    resize: vertical;
}

.chatbot-messages .feedback-popup .buttons-wrapper {
    display: flex;
    justify-content: space-between;
    justify-content: right;
}

.chatbot-messages .feedback-popup button {
    background-color: var(--primary);
    color: var(--white);
    font-size: 14px;
    border: none;
    border-radius: 4px;
    padding: 3px 8px;
    margin-right: 5px;
    cursor: pointer;
}

.chatbot-messages .feedback-popup button:hover {
    background-color: var(--primary-light-1);
}

.chatbot-input {
    display: flex;
    align-items: center;
    padding: 8px 10px;
    position: relative;
    border-top: 1px solid var(--border-color);
}

.chatbot-input input {
    flex: 1;
    padding: 10px;
    border: none;
    margin-right: 10px; /* Spacing between input and send button */
    outline: none; /* Removing the default focus outline */
}

.chatbot-input button {
    height: 24px;
    width: 24px;
    background-color: transparent;
    color: var(--primary);
    padding: 0;
    border: none;
    cursor: pointer;
    margin-left: 4px;
    margin-right: 10px;
    align-self: center;
}

.chatbot-input button:hover {
    transform: scale(1.1);
}

.typing-indicator {
    position: relative;
    margin: 10px;
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    padding: 10px;
}

.typing-indicator > div {
    content: '';
    animation: blink 1.5s infinite;
    animation-fill-mode: both;
    height: 10px;
    width: 10px;
    background: var(--grey);
    position: absolute;
    left:0;
    top:0;
    border-radius: 50%;
}

.typing-indicator > div:nth-child(2) {
    animation-delay: .2s;
    margin-left: 15px;
}

.typing-indicator > div:nth-child(3) {
    animation-delay: .4s;
    margin-left: 30px;
}


@keyframes blink {
    0% {
        opacity: .1;
    }
    20% {
        opacity: 1;
    }
    100% {
        opacity: .1;
    }
}

.chatbot-input textarea {
    max-height: 36px;
    min-height: auto;
    background-color: var(--white);
    flex: 1;
    padding: 6px 8px;
    margin-right: 5px; /* Ensures a little space between textarea and Send icon */
    border: none;
    resize: none;
    overflow-y: auto;
    font-family: inherit;
    font-size: inherit;
    line-height: 1.6;
    outline: none; /* Removes the default browser focus style */
    box-sizing: border-box;
}

/* Scrollbar styles remain unchanged */
.chatbot-input textarea::-webkit-scrollbar {
    width: 10px;
}

.chatbot-input textarea::-webkit-scrollbar-thumb {
    border-radius: 6px;
    background-color: var(--grey);
    border: 3px solid var(--white);
}

.chatbot-input textarea::-webkit-scrollbar-track {
    background-color: var(--white);
}

.toggle-chatbot {
    position: fixed;
    bottom: 35px;
    right: 37px;  /* Adjust based on your layout */
    opacity: 0;
    animation: toggle-chatbot-intro 800ms ease 500ms 1 forwards;
    z-index: 100000;
}

.toggle-chatbot-btn {
    background-color: #0C98D4;
    border: none;
    border-radius: 50%;  /* Makes the button round */
    width: 50px;  /* Or your preferred size */
    height: 50px;
    color: var(--white);  /* Icon color */
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);  /* Optional shadow for a lifted look */
    transition: background-color 0.3s;
}

.toggle-chatbot-btn::before {
    content: "";
    position: absolute;
    color: var(--white); /* Semi-transparent version of the primary color */
    animation: pulse-purple 2s ease-out infinite;
    z-index: -1; /* Ensure the pulse is behind the button */
    width: 26px;
    height: 26px;
    background-image: var(--icon-chatbot);
    background-color: currentColor;           /* paints the icon */
    -webkit-mask: var(--icon-chatbot) center/contain no-repeat;
    mask: var(--icon-chatbot) center/contain no-repeat;
    background-size: cover;
    background-repeat: no-repeat;
    margin-top: -2px;
}

.toggle-chatbot-btn > svg.fa-comment {
    display: none;
}

/* .toggle-chatbot-btn:hover {
    transform: scale(1.08);
    transition: all ease 0.15s;
} */

@keyframes toggle-chatbot-intro {
    0% {
        opacity: 0;
        right: -100px
    }
    100% {
        opacity: 1;
        right: 20px;
    }
}

.toggle-chatbot:not(.open) .toggle-chatbot-btn {
    animation: pulse-purple 5s ease-in-out infinite;
}

.toggle-chatbot:not(.open) .toggle-chatbot-btn:hover,
.chatbot-panel.open .toggle-chatbot-btn {
    transition: all ease 0.15s;
    animation: chatbot-hover 5s ease-in-out infinite;
}

@keyframes pulse-purple {
    0%, 60%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(142, 68, 173, 0.7);
    }

    70% {
        transform: scale(1.10);
    }
    80% {
        box-shadow: 0 0 0 12px rgba(142, 68, 173, 0);
    }

    90% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(142, 68, 173, 0);
    }
}

@keyframes chatbot-hover {
    0%, 100% {
        transform: scale(1.03);
        box-shadow: none;
    }
}

.toggle-chatbot:not(.open)::after {
    content: attr(data-title);
    position: absolute;
    text-align: center;
    top: 50%;
    right: calc(100% + 12px);
    min-width: 3em;
    max-width: 21em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 5px;
    border-radius: .3ch;
    box-shadow: 0 1em 2em -0.5em var(--box-shadow);
    background: var(--tooltip-bg);
    color: var(--tooltip-bg-text);
    z-index: 10000;
    text-transform: none;
    line-height: 1;
    user-select: none;
    pointer-events: none;
    transform: translate(-5px, -50%);
    opacity: 0;
    transition: all 300ms ease;
    display: block;
    height: auto;
    font-size: 12px !important;
}

.toggle-chatbot:not(.open):hover::after {
    transform: translate(0, -50%) scale(1);
    opacity: 1;
}


.toggle-chatbot:not(.open)::before {
    content: "";
    border: 5px solid rgba(0, 0, 0, 0);
    z-index: 1001;
    top: 50%;
    border-right-width: 0;
    border-left-color: var(--tooltip-bg);
    left: calc(0em - 13px);
    transform: translate(-5px, -50%);
    text-transform: none;
    line-height: 1;
    user-select: none;
    pointer-events: none;
    position: absolute;
    opacity: 0;
    transition: all 300ms ease;
    display: block;
    height: auto;
}

.toggle-chatbot:not(.open):hover::before {
    transform: translate(0em, -50%) scale(1);
    opacity: 1;
}

/* theme dark */
body.theme-dark #chatBot .chatbot-panel {
    background-color: var(--white);
}

body.theme-dark .toggle-chatbot-btn {
    background-color: #0C98D4;
}

body.theme-dark #chatBot .chatbot-panel {
    background-color: var(--nav-bgr);
    box-shadow: 0 4px 15px 5px rgb(0 0 0 / 25%);
}

body.theme-dark .chatbot-panel .chatbot-header {
    background-color: var(--nav-bgr);
    color: var(--white);
    border-bottom: 1px solid var(--darkgrey);
}

body.theme-dark .chatbot-message .message-content pre {
    color: var(--white);
    background-color: var(--code-block-special-bgr);
}

body.theme-dark .chatbot-message.assistant .message-content {
    background-color: var(--code-block-bgr);
}

body.theme-dark .chatbot-message.user .message-content {
    background-color: var(--primary-light-1);
}

body.theme-dark .chatbot-message .message-content a {
    color: var(--link-color-hover);
}

body.theme-dark .chatbot-message .message-content table td, 
body.theme-dark .chatbot-message .message-content table th {
    border-color: var(--whitegrey);
}

body.theme-dark #chatBot .chatbot-input textarea {
    background-color: var(--nav-bgr);
    color: var(--white);
    border-top: var(--nav-bgr);
}

body.theme-dark .chatbot-panel textarea::placeholder {
    color: var(--grey);
}

body.theme-dark .chatbot-panel .chatbot-input {
    border-top: 1px solid var(--darkgrey);
}

body.theme-dark #chatBot .chatbot-input button {
    color: var(--primary-light-1);
}

body.theme-dark #chatBot .chatbot-close {
    fill: var(--default-light-1);
}

body.theme-dark #chatBot .chatbot-close:hover {
    background: var(--lightgrey);
}

body.theme-dark .chatbot-messages::-webkit-scrollbar-track,
body.theme-dark textarea::-webkit-scrollbar-track {
    background-color: var(--nav-bgr);
}

body.theme-dark .chatbot-messages::-webkit-scrollbar-thumb,
body.theme-dark textarea::-webkit-scrollbar-thumb {
    background-color: var(--grey);
    border: 3px solid var(--nav-bgr);
}

body.theme-dark .chatbot-messages .feedback-popup {
    background-color: var(--code-block-bgr);
    border: none;
}

body.theme-dark .chatbot-messages .feedback-popup h3 {
    color: var(--white);
}

body.theme-dark .chatbot-messages .feedback-popup textarea {
    background: var(--nav-bgr);
    border: 1px solid var(--whitegrey);
}

body.theme-dark .chatbot-messages .feedback-popup button {
    background-color: var(--primary-light-1);
}

body.theme-dark .chatbot-messages .feedback-popup button:hover {
    background-color: var(--primary);
}

body.theme-dark .chatbot-message button.selected {
    color: var(--primary-light-1);
}

@media screen and (max-width: 500px) {
    .chatbot-panel {
      width: 90%;
    }
}
