.chatBotWidget {
    --chat--color-primary: var(--n8n-chat-primary-color, #264ee0);
    --chat--color-secondary: var(--n8n-chat-secondary-color, #5979f0);
    --chat--color-background: var(--n8n-chat-background-color, #ffffff);
    --chat--color-font: var(--n8n-chat-font-color, #333333);
    font-family: 'Geist Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif !important;
}

.chatBotWidget .chat-container {
    position: fixed;
    right: 20px;
    z-index: 1000;
    width: 380px;
    height: 600px;
    background: var(--chat--color-background);
    border-radius: 24px;
    box-shadow: 0 8px 48px rgb(47 49 53 / 15%);
    overflow: hidden;
    font-family: inherit;
    bottom: -100%;
    transition: all .5s;
}

@media only screen and (max-width: 767px) {
    .chatBotWidget .chat-container {
        width: 100%;
        height: 98vh;
        height: 98dvh;
        right: 0;
    }
}

.chatBotWidget .chat-container.position-left {
    right: auto;
    left: 20px;
}

.chatBotWidget .chat-container.open {
    display: flex;
    flex-direction: column;
    bottom: 20px;
}

@media only screen and (max-width: 767px) {
    .chatBotWidget .chat-container.open {
        bottom: 0;
    }
}

.chatBotWidget .brand-header {
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid rgb(54 56 61 / 15%);
    position: relative;
}

.chatBotWidget .brand-header span {
    display: inline-grid;
}

.chatBotWidget .brand-header span small {
    font-size: 12px;
    opacity: 0.5;
}

.chatBotWidget .close-button {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--chat--color-font);
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
    font-size: 38px;
    opacity: 0.6;
}

.chatBotWidget .close-button:hover {
    opacity: 1;
}

.chatBotWidget .brand-header img {
    width: 32px;
    height: 32px;
    border-radius: 32px;
}

.chatBotWidget .brand-header span {
    font-size: 18px;
    font-weight: 500;
    color: var(--chat--color-font);
}

.chatBotWidget .new-conversation {
    padding: 0px;
    width: 100%;
}

.chatBotWidget .new-conversation-hero {
    padding: 20px 40px;
    text-align: left;
    background: #d3d7e6;
    background: linear-gradient(180deg, rgb(225, 228, 236) 0%, rgba(255, 255, 255, 1) 100%);
}

.chatBotWidget .new-conversation-content {
    padding: 0 20px;
}

.chatBotWidget .welcome-text {
    font-size: 32px;
    font-weight: 600;
    color: var(--chat--color-font);
    margin-bottom: 24px;
    line-height: 1.3;
}

.chatBotWidget .new-chat-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 20px 24px;
    background: linear-gradient(135deg, var(--chat--color-primary) 0%, var(--chat--color-secondary) 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    transition: transform 0.3s;
    font-weight: 500;
    font-family: inherit;
    margin-bottom: 8px;
}

.chatBotWidget .new-chat-btn.hidden {
    /* New CSS rule */
    display: none;
}

.chatBotWidget .new-chat-btn:hover {
    transform: scale(1.05);
}

.chatBotWidget .new-chat-btn svg {
    width: 24px;
}

.chatBotWidget .predefined-btn:hover {
    transform: scale(1.05);
}

.chatBotWidget .predefined-buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.chatBotWidget .predefined-btn {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    width: 100% !important;
    padding: 12px 16px !important;
    color: #767ca3 !important;
    border: 1px solid #ccd3ff !important;
    background: #e9ecff !important;
    cursor: pointer !important;
    font-size: 15px !important;
    transition: transform 0.3s !important;
    font-weight: 400 !important;
    font-family: inherit;
    border-radius: 8px !important;
    white-space: normal !important;
}

.chatBotWidget .message-icon {
    width: 20px;
    height: 20px;
}

.chatBotWidget .response-text {
    font-size: 14px;
    color: var(--chat--color-font);
    opacity: 0.7;
    margin: 0;
    margin-top: 8px;
    text-align: center;
}

.chatBotWidget .chat-interface {
    display: none;
    flex-direction: column;
    height: 100%;
}

.chatBotWidget .chat-interface.active {
    display: flex;
}

.chatBotWidget .chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: var(--chat--color-background);
    display: flex;
    flex-direction: column;
}

.chatBotWidget .chat-message {
    padding: 12px 16px;
    margin: 8px 0;
    border-radius: 12px;
    max-width: 80%;
    word-wrap: break-word;
    font-size: 14px;
    line-height: 1.5;
}

.chatBotWidget .chat-message.user {
    background: linear-gradient(135deg, var(--chat--color-primary) 0%, var(--chat--color-secondary) 100%);
    color: white;
    align-self: flex-end;
    box-shadow: 0 4px 12px rgba(133, 79, 255, 0.2);
    border: none;
}

.chatBotWidget .chat-message.bot {
    background: var(--chat--color-background);
    color: var(--chat--color-font);
    align-self: flex-start;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.chatBotWidget .chat-message.bot a {
    background: #e7eeff;
    padding: 0px 4px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: bold;
    color: #255cdd;
}

.chatBotWidget .chat__wave {
    position: relative;
}

.chatBotWidget .chat__dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--chat--color-primary);
    animation: chat__wave 1.3s linear infinite;
}

.chatBotWidget .chat__dot:nth-child(2) {
    animation-delay: -1.1s;
}

.chatBotWidget .chat__dot:nth-child(3) {
    animation-delay: -0.9s;
}

@keyframes chat__wave {

    0%,
    60%,
    100% {
        transform: initial;
    }

    30% {
        transform: translateY(-15px);
    }
}

.chatBotWidget .chat-input {
    position: relative;
    padding: 16px;
    background: var(--chat--color-background);
    display: flex;
    gap: 8px;
}

.chatBotWidget .chat-input textarea {
    flex: 1;
    padding: 14px 24px;
    border: 1px solid rgb(54 56 61 / 15%);
    box-shadow: inset 0px 4px 12px rgb(0 0 0 / 10%);
    border-radius: 32px;
    background: var(--chat--color-background);
    color: var(--chat--color-font);
    resize: none;
    font-family: inherit;
    font-size: 14px;
    transition: border-color .3s;
}

.chatBotWidget .chat-input textarea::placeholder {
    color: var(--chat--color-font);
    opacity: 0.6;
}

.chatBotWidget .chat-input textarea:focus {
    outline: none;
    border-color: #2b2b2b;
}

.chatBotWidget .chat-input .custom-input-wrapper {
    position: relative;
    width: 100%;
}

.chatBotWidget .chat-input .custom-input-wrapper input {
    width: 100%;
    box-sizing: border-box;
    padding: 14px 24px;
    border: 1px solid rgb(54 56 61 / 15%);
    box-shadow: inset 0px 4px 12px rgb(0 0 0 / 10%);
    border-radius: 32px;
    background: var(--chat--color-background);
    color: var(--chat--color-font);
    font-family: inherit;
    font-size: 14px;
    transition: border-color .3s;
}

.chatBotWidget .chat-input .custom-input-wrapper input:focus {
    outline: none;
    border-color: #2b2b2b;
}

.chatBotWidget .chat-input .custom-input-wrapper button {
    background: linear-gradient(135deg, var(--chat--color-primary) 0%, var(--chat--color-secondary) 100%);
    color: white;
    border: none;
    border-radius: 32px;
    cursor: pointer;
    transition: transform 0.2s;
    font-family: inherit;
    font-weight: 500;
    position: absolute;
    right: 6px;
    bottom: 6px;
    width: 38px;
    height: 38px;
}

.chatBotWidget .chat-input .custom-input-wrapper button:hover {
    transform: scale(1.05);
}

.chatBotWidget .chat-input .custom-input-wrapper button svg {
    width: 24px;
    fill: #fff;
    transform: translateY(2px);
}

.chatBotWidget .chat-input button {
    background: linear-gradient(135deg, var(--chat--color-primary) 0%, var(--chat--color-secondary) 100%);
    color: white;
    border: none;
    border-radius: 32px;
    cursor: pointer;
    transition: transform 0.2s;
    font-family: inherit;
    font-weight: 500;
    position: absolute;
    right: 22px;
    bottom: 22px;
    width: 38px;
    height: 38px;
    padding: 0;
}

.chatBotWidget .chat-input button:hover {
    transform: scale(1.05);
}

.chatBotWidget .chat-input button svg {
    width: 24px;
    fill: #fff;
    transform: translateY(2px);
}

.chatBotWidget .chat-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    border-radius: 30px;
    background: linear-gradient(135deg, var(--chat--color-primary) 0%, var(--chat--color-secondary) 100%);
    color: white;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(133, 79, 255, 0.3);
    z-index: 999;
    transition: transform 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chatBotWidget .chat-toggle.position-left {
    right: auto;
    left: 20px;
}

.chatBotWidget .chat-toggle:hover {
    transform: scale(1.05);
}

.chatBotWidget .chat-toggle svg {
    width: 32px;
    height: 32px;
    fill: currentColor;
}

.chatBotWidget .chat-footer {
    padding: 8px;
    text-align: center;
    background: var(--chat--color-background);
    border-top: 1px solid rgb(54 56 61 / 15%);
}

.chatBotWidget .chat-footer a {
    color: var(--chat--color-primary);
    text-decoration: none;
    font-size: 12px;
    opacity: 0.8;
    transition: opacity 0.2s;
    font-family: inherit;
}

.chatBotWidget .chat-footer a:hover {
    opacity: 1;
}

.chatBotWidget .chat-speech-bubble {
    position: fixed;
    bottom: 90px;
    right: 20px;
    background: linear-gradient(135deg, var(--chat--color-primary) 0%, var(--chat--color-secondary) 100%);
    color: white;
    padding: 12px 16px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.3s, transform 0.3s, visibility 0.3s;
    font-size: 14px;
    white-space: nowrap;
}

.chatBotWidget .chat-speech-bubble.position-left {
    right: auto;
    left: 20px;
}

.chatBotWidget .chat-speech-bubble.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.chatBotWidget .chat-speech-bubble::after {
    content: '';
    position: absolute;
    bottom: -8px;
    right: 22px;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid var(--chat--color-secondary);
}

.chatBotWidget .chat-speech-bubble.position-left::after {
    right: auto;
    left: 22px;
}

.chatBotWidget .chat-message-buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-self: flex-start;
    margin-top: 8px;
    max-width: 90%;
    width: 100%;
}

.chatBotWidget .chat-message-btn {
    padding: 14px 16px;
    border: 1px solid rgba(122, 134, 187, 0.2);
    background: var(--chat--color-background);
    color: var(--chat--color-primary);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
}

.chatBotWidget .chat-message-btn:hover {
    background: rgba(133, 79, 255, 0.05);
    border-color: var(--chat--color-primary);
}