#n8n-chat-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 999999;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

@media (max-width: 1024px) {
    #n8n-chat-container {
        bottom: 79px;
    }
}

#n8n-chat-toggle-btn {
    position: relative;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    background-color: var(--n8n-chat-color, #0066FF);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#n8n-chat-toggle-btn:hover {
    transform: scale(1.06);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.n8n-custom-toggle-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.n8n-chat-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background-color: #ff3b30;
    color: #ffffff;
    font-size: 11px;
    font-weight: bold;
    height: 20px;
    width: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #ffffff;
    animation: n8n-pulse 1.8s infinite;
}

@keyframes n8n-pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.n8n-chat-window {
    position: absolute;
    bottom: 75px;
    right: 0;
    width: 360px;
    max-width: calc(100vw - 32px);
    height: 520px;
    max-height: calc(100vh - 120px);
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.n8n-chat-header {
    background-color: var(--n8n-chat-color, #0066FF);
    color: #ffffff;
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.n8n-chat-header-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.n8n-status-dot {
    width: 10px;
    height: 10px;
    background-color: #2ed573;
    border-radius: 50%;
    display: inline-block;
}

.n8n-chat-header-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.5);
    flex-shrink: 0;
    background-color: #ffffff;
}

.n8n-chat-header h4 {
    margin: 0;
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
}

#n8n-chat-close-btn {
    background: transparent;
    border: none;
    color: #ffffff;
    font-size: 24px;
    cursor: pointer;
    line-height: 1;
}

.n8n-chat-messages {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background-color: #f8f9fa;
}

.n8n-msg {
    max-width: 82%;
    padding: 10px 14px;
    border-radius: 14px;
    font-size: 14px;
    line-height: 1.45;
    word-break: break-word;
}

.n8n-msg-bot {
    align-self: flex-start;
    background-color: #ffffff;
    color: #222222;
    border: 1px solid #e1e4e8;
    border-bottom-left-radius: 4px;
}

.n8n-msg-user {
    align-self: flex-end;
    background-color: var(--n8n-chat-color, #0066FF);
    color: #ffffff;
    border-bottom-right-radius: 4px;
}

.n8n-msg a {
    text-decoration: underline;
    word-break: break-all;
}

.n8n-msg-bot a {
    color: var(--n8n-chat-color, #0066FF);
    font-weight: 600;
}

.n8n-msg-user a {
    color: #ffffff;
}

.n8n-chat-form {
    display: flex;
    padding: 12px;
    background-color: #ffffff;
    border-top: 1px solid #e1e4e8;
    gap: 8px;
}

#n8n-chat-input {
    flex: 1;
    border: 1px solid #dcdfe6;
    border-radius: 20px;
    padding: 8px 16px;
    font-size: 14px;
    outline: none;
}

#n8n-chat-input:focus {
    border-color: var(--n8n-chat-color, #0066FF);
}

#n8n-chat-send-btn {
    background-color: var(--n8n-chat-color, #0066FF);
    color: #ffffff;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

#n8n-chat-send-btn svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.n8n-chat-typing {
    font-style: italic;
    color: #888888;
    font-size: 12px;
    align-self: flex-start;
}

.n8n-chat-footer {
    text-align: center;
    font-size: 11px;
    color: #9aa0a6;
    padding: 4px 0 10px;
    background-color: #ffffff;
}

.n8n-chat-heart {
    color: #9aa0a6;
}

.n8n-chat-footer a {
    color: #9aa0a6;
    text-decoration: none;
    font-weight: 600;
}

.n8n-chat-footer a:hover {
    text-decoration: underline;
}

.hidden {
    display: none !important;
}