/*
 * Chatbot Pilot Styles
 *
 * CSS Custom Properties API
 * =========================
 * Override these on #chatbot-pilot or :root to customize the chatbot.
 *
 * Colors:
 *   --chatbot-pilot-primary-color:  #0073aa    Primary/accent color
 *   --chatbot-pilot-chat-bg:        #ffffff    Chat window background
 *   --chatbot-pilot-user-msg-bg:    #0073aa    User message bubble background
 *   --chatbot-pilot-ai-msg-bg:      #f0f0f0    AI message bubble background
 *   --chatbot-pilot-user-text:      #ffffff    User message text color
 *   --chatbot-pilot-ai-text:        #333333    AI message text color
 *   --chatbot-pilot-input-focus:    (primary)  Input border color on focus
 *
 * Layout:
 *   --chatbot-pilot-chat-width:     380px      Chat window width
 *   --chatbot-pilot-chat-height:    500px      Chat window height
 *   --chatbot-pilot-border-radius:  12px       Chat window border radius
 *   --chatbot-pilot-button-size:    60px       Toggle button diameter
 *   --chatbot-pilot-z-index:        999999     Stack order
 *
 * Typography:
 *   --chatbot-pilot-font-family:    system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif
 *   --chatbot-pilot-font-size:      14px       Base font size
 *   --chatbot-pilot-line-height:    1.5        Base line height
 *
 * Bubbles:
 *   --chatbot-pilot-bubble-padding: 12px 16px  Bubble inner padding
 *   --chatbot-pilot-bubble-radius:  16px       Bubble border radius
 *   --chatbot-pilot-user-bubble-radius: 16px 16px 4px 16px  User bubble border radius
 *
 * Input:
 *   --chatbot-pilot-input-border:   2px solid rgba(0, 0, 0, 0.15)
 *   --chatbot-pilot-input-radius:   24px       Input border radius
 *   --chatbot-pilot-input-padding:  12px 48px 12px 18px
 *
 * Shadows:
 *   --chatbot-pilot-window-shadow:  0 8px 32px rgba(0, 0, 0, 0.15)
 *   --chatbot-pilot-button-shadow:  0 4px 12px rgba(0, 0, 0, 0.2)
 *
 * Animations:
 *   --chatbot-pilot-transition-speed: 0.3s     Transition duration
 *   --chatbot-pilot-animation-easing: ease      Easing function
 *
 * Icons:
 *   --chatbot-pilot-ai-icon:        (default SVG)  AI avatar in bubble
 *   --chatbot-pilot-user-icon:      (none)          User avatar
 */

#chatbot-pilot.chatbot-pilot {
    --chatbot-pilot-primary-color: #0073aa;
    --chatbot-pilot-chat-bg: #ffffff;
    --chatbot-pilot-user-msg-bg: #0073aa;
    --chatbot-pilot-ai-msg-bg: #f0f0f0;
    --chatbot-pilot-user-text: #ffffff;
    --chatbot-pilot-ai-text: #333333;
    --chatbot-pilot-chat-width: 380px;
    --chatbot-pilot-chat-height: 600px;
    --chatbot-pilot-border-radius: 12px;
    --chatbot-pilot-button-size: 60px;
    --chatbot-pilot-z-index: 999999;
    --chatbot-pilot-font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    --chatbot-pilot-font-size: 14px;
    --chatbot-pilot-line-height: 1.5;
    --chatbot-pilot-bubble-padding: 12px 16px;
    --chatbot-pilot-bubble-radius: 16px;
    --chatbot-pilot-user-bubble-radius: 16px 16px 4px 16px;
    --chatbot-pilot-input-border: 2px solid rgba(0, 0, 0, 0.15);
    --chatbot-pilot-input-radius: 24px;
    --chatbot-pilot-input-padding: 12px 48px 12px 18px;
    --chatbot-pilot-window-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    --chatbot-pilot-button-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    --chatbot-pilot-transition-speed: 0.3s;
    --chatbot-pilot-animation-easing: ease;

    position: fixed;
    z-index: var(--chatbot-pilot-z-index);
    font-family: var(--chatbot-pilot-font-family);
    font-size: var(--chatbot-pilot-font-size);
    line-height: var(--chatbot-pilot-line-height);
}

/* Reset box-sizing */
#chatbot-pilot *,
#chatbot-pilot *::before,
#chatbot-pilot *::after {
    box-sizing: border-box;
}

/* Balloon */
#chatbot-pilot .chatbot-pilot-balloon {
    position: absolute;
    background: var(--chatbot-pilot-balloon-bg, var(--chatbot-pilot-chat-bg));
    border-radius: var(--chatbot-pilot-border-radius);
    padding: 10px 32px 10px 14px;
    box-shadow: var(--chatbot-pilot-button-shadow);
    opacity: 0;
    visibility: hidden;
    transform: scale(0.8);
    transition: opacity var(--chatbot-pilot-transition-speed) var(--chatbot-pilot-animation-easing),
                transform var(--chatbot-pilot-transition-speed) var(--chatbot-pilot-animation-easing),
                visibility var(--chatbot-pilot-transition-speed) var(--chatbot-pilot-animation-easing);
    cursor: pointer;
    min-width: 200px;
    max-width: 400px;
    white-space: nowrap;
    font-size: 13px;
    line-height: 1.4;
    color: var(--chatbot-pilot-balloon-text, var(--chatbot-pilot-ai-text));
}

/* Balloon position based on chatbot position */
#chatbot-pilot[data-position="bottom-right"] .chatbot-pilot-balloon {
    bottom: calc(var(--chatbot-pilot-button-size) + 10px);
    right: 0;
}

#chatbot-pilot[data-position="bottom-left"] .chatbot-pilot-balloon {
    bottom: calc(var(--chatbot-pilot-button-size) + 10px);
    left: 0;
}

#chatbot-pilot[data-position="top-right"] .chatbot-pilot-balloon {
    top: calc(var(--chatbot-pilot-button-size) + 10px);
    right: 0;
}

#chatbot-pilot[data-position="top-left"] .chatbot-pilot-balloon {
    top: calc(var(--chatbot-pilot-button-size) + 10px);
    left: 0;
}

/* Balloon arrow */
#chatbot-pilot .chatbot-pilot-balloon::after {
    content: '';
    position: absolute;
    width: 0;
    height: 0;
    border: 8px solid transparent;
}

#chatbot-pilot[data-position="bottom-right"] .chatbot-pilot-balloon::after,
#chatbot-pilot[data-position="bottom-left"] .chatbot-pilot-balloon::after {
    bottom: -16px;
    border-top-color: var(--chatbot-pilot-balloon-bg, var(--chatbot-pilot-chat-bg));
}

#chatbot-pilot[data-position="bottom-right"] .chatbot-pilot-balloon::after {
    right: 20px;
}

#chatbot-pilot[data-position="bottom-left"] .chatbot-pilot-balloon::after {
    left: 20px;
}

#chatbot-pilot[data-position="top-right"] .chatbot-pilot-balloon::after,
#chatbot-pilot[data-position="top-left"] .chatbot-pilot-balloon::after {
    top: -16px;
    border-bottom-color: var(--chatbot-pilot-balloon-bg, var(--chatbot-pilot-chat-bg));
}

#chatbot-pilot[data-position="top-right"] .chatbot-pilot-balloon::after {
    right: 20px;
}

#chatbot-pilot[data-position="top-left"] .chatbot-pilot-balloon::after {
    left: 20px;
}

#chatbot-pilot .chatbot-pilot-balloon.is-visible {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
}

#chatbot-pilot .chatbot-pilot-balloon-text {
    display: block;
}

#chatbot-pilot .chatbot-pilot-balloon-close {
    position: absolute;
    top: 6px;
    right: 8px;
    width: 20px;
    height: 20px;
    border: none;
    background: transparent;
    font-size: 18px;
    line-height: 1;
    color: rgba(0, 0, 0, 0.4);
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s ease, color 0.2s ease;
}

#chatbot-pilot .chatbot-pilot-balloon-close:hover {
    background: rgba(0, 0, 0, 0.1);
    color: rgba(0, 0, 0, 0.7);
}

/* Hide balloon when chat is open */
#chatbot-pilot.is-open .chatbot-pilot-balloon {
    opacity: 0;
    visibility: hidden;
}

/* Toggle Button */
#chatbot-pilot .chatbot-pilot-toggle {
    width: var(--chatbot-pilot-button-size);
    height: var(--chatbot-pilot-button-size);
    border-radius: 50%;
    background: var(--chatbot-pilot-primary-color);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--chatbot-pilot-button-shadow);
    transition: transform 0.2s var(--chatbot-pilot-animation-easing),
                box-shadow 0.2s var(--chatbot-pilot-animation-easing);
    padding: 0;
    position: relative;
}

#chatbot-pilot .chatbot-pilot-toggle:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
}

#chatbot-pilot .chatbot-pilot-toggle:focus {
    outline: 2px solid var(--chatbot-pilot-primary-color);
    outline-offset: 2px;
}

#chatbot-pilot .chatbot-pilot-toggle svg {
    width: 28px;
    height: 28px;
    color: #ffffff;
}

#chatbot-pilot .chatbot-pilot-toggle img {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

#chatbot-pilot .chatbot-pilot-toggle-open,
#chatbot-pilot .chatbot-pilot-toggle-close {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s var(--chatbot-pilot-animation-easing),
                transform 0.2s var(--chatbot-pilot-animation-easing);
}

#chatbot-pilot .chatbot-pilot-toggle-close {
    opacity: 0;
    transform: rotate(-90deg);
}

#chatbot-pilot.is-open .chatbot-pilot-toggle-open {
    opacity: 0;
    transform: rotate(90deg);
}

#chatbot-pilot.is-open .chatbot-pilot-toggle-close {
    opacity: 1;
    transform: rotate(0);
}

/* Chat Window */
#chatbot-pilot .chatbot-pilot-window {
    position: absolute;
    width: var(--chatbot-pilot-chat-width);
    height: var(--chatbot-pilot-chat-height);
    max-height: calc(100vh - 120px);
    background: var(--chatbot-pilot-chat-bg);
    border-radius: var(--chatbot-pilot-border-radius);
    box-shadow: var(--chatbot-pilot-window-shadow);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.95);
    transition: opacity var(--chatbot-pilot-transition-speed) var(--chatbot-pilot-animation-easing),
                transform var(--chatbot-pilot-transition-speed) var(--chatbot-pilot-animation-easing),
                visibility var(--chatbot-pilot-transition-speed) var(--chatbot-pilot-animation-easing);
}

/* Position adjustments — window always at corner edge (bottom: 0 / top: 0) */
#chatbot-pilot[data-position="bottom-right"] .chatbot-pilot-window {
    bottom: 0;
    right: 0;
}

#chatbot-pilot[data-position="bottom-left"] .chatbot-pilot-window {
    bottom: 0;
    left: 0;
}

#chatbot-pilot[data-position="top-right"] .chatbot-pilot-window {
    top: 0;
    right: 0;
}

#chatbot-pilot[data-position="top-left"] .chatbot-pilot-window {
    top: 0;
    left: 0;
}

/* When open: hide toggle button, chat window takes its place */
#chatbot-pilot.is-open .chatbot-pilot-toggle {
    display: none;
}

#chatbot-pilot.is-open .chatbot-pilot-window {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

/* Header */
#chatbot-pilot .chatbot-pilot-header {
    padding: 14px 16px;
    background: var(--chatbot-pilot-header-bg, var(--chatbot-pilot-chat-bg));
    color: var(--chatbot-pilot-header-text, var(--chatbot-pilot-ai-text));
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

#chatbot-pilot .chatbot-pilot-header-icon {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--chatbot-pilot-primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #ffffff;
}

#chatbot-pilot .chatbot-pilot-header-icon svg {
    width: 16px;
    height: 16px;
}

#chatbot-pilot .chatbot-pilot-title {
    font-weight: 600;
    font-size: 16px;
    flex: 1;
}

#chatbot-pilot .chatbot-pilot-header-actions {
    display: flex;
    align-items: center;
    gap: 4px;
}

#chatbot-pilot .chatbot-pilot-reset,
#chatbot-pilot .chatbot-pilot-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: background 0.2s ease;
}

#chatbot-pilot .chatbot-pilot-reset:hover,
#chatbot-pilot .chatbot-pilot-close:hover {
    background: rgba(0, 0, 0, 0.06);
}

#chatbot-pilot .chatbot-pilot-reset svg,
#chatbot-pilot .chatbot-pilot-close svg {
    width: 18px;
    height: 18px;
    color: rgba(0, 0, 0, 0.45);
}

/* Welcome screen (centered, not a chat bubble) */
#chatbot-pilot .chatbot-pilot-welcome {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 32px 24px 16px;
}

#chatbot-pilot .chatbot-pilot-welcome-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 16px;
    color: var(--chatbot-pilot-primary-color);
    opacity: 0.8;
}

#chatbot-pilot .chatbot-pilot-welcome-icon svg {
    width: 100%;
    height: 100%;
}

#chatbot-pilot .chatbot-pilot-welcome-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--chatbot-pilot-ai-text);
    margin-bottom: 8px;
    line-height: 1.3;
}

#chatbot-pilot .chatbot-pilot-welcome-subtitle {
    font-size: 14px;
    color: rgba(0, 0, 0, 0.45);
    line-height: 1.4;
    max-width: 280px;
}

/* Example questions — full-width cards */
#chatbot-pilot .chatbot-pilot-suggestions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px 16px 8px;
}

#chatbot-pilot .chatbot-pilot-suggestion {
    display: block;
    width: 100%;
    background: var(--chatbot-pilot-chat-bg);
    border: 1px solid rgba(0, 0, 0, 0.12);
    color: var(--chatbot-pilot-ai-text);
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
    font-family: var(--chatbot-pilot-font-family);
    line-height: 1.4;
    text-align: left;
}

#chatbot-pilot .chatbot-pilot-suggestion:hover {
    background: rgba(0, 0, 0, 0.03);
    border-color: var(--chatbot-pilot-primary-color);
}

/* Messages Container */
#chatbot-pilot .chatbot-pilot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Scrollbar */
#chatbot-pilot .chatbot-pilot-messages::-webkit-scrollbar {
    width: 6px;
}

#chatbot-pilot .chatbot-pilot-messages::-webkit-scrollbar-track {
    background: transparent;
}

#chatbot-pilot .chatbot-pilot-messages::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

/* Message */
#chatbot-pilot .chatbot-pilot-message {
    display: flex;
    flex-direction: column;
    animation: chatbot-pilot-message-appear var(--chatbot-pilot-transition-speed) var(--chatbot-pilot-animation-easing);
}

@keyframes chatbot-pilot-message-appear {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#chatbot-pilot .chatbot-pilot-message.ai {
    align-self: stretch;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 4px 8px;
}

#chatbot-pilot .chatbot-pilot-message.user {
    align-self: flex-end;
    max-width: 85%;
}

/* Avatar */
#chatbot-pilot .chatbot-pilot-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 12px;
    font-weight: 600;
    overflow: hidden;
    margin-top: 2px;
}

#chatbot-pilot .chatbot-pilot-message.ai .chatbot-pilot-avatar {
    display: flex;
    background: var(--chatbot-pilot-ai-msg-bg);
    color: rgba(0, 0, 0, 0.4);
}

#chatbot-pilot .chatbot-pilot-message.user .chatbot-pilot-avatar {
    display: none;
}

#chatbot-pilot .chatbot-pilot-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

#chatbot-pilot .chatbot-pilot-avatar svg {
    width: 16px;
    height: 16px;
}

/* Message Bubble */
#chatbot-pilot .chatbot-pilot-bubble {
    padding: var(--chatbot-pilot-bubble-padding);
    border-radius: var(--chatbot-pilot-bubble-radius);
    word-wrap: break-word;
    overflow-wrap: break-word;
    position: relative;
}

#chatbot-pilot .chatbot-pilot-message.ai .chatbot-pilot-bubble {
    background: var(--chatbot-pilot-ai-msg-bg);
    color: var(--chatbot-pilot-ai-text);
    border-radius: var(--chatbot-pilot-bubble-radius);
    min-height: 36px;
    flex: 1;
    min-width: 0;
}

/* AI bubble — no internal icon in clean design */

#chatbot-pilot .chatbot-pilot-message.user .chatbot-pilot-bubble {
    background: var(--chatbot-pilot-user-msg-bg);
    color: var(--chatbot-pilot-user-text);
    border-radius: var(--chatbot-pilot-user-bubble-radius);
}

/* HTML content styling inside AI bubble */
#chatbot-pilot .chatbot-pilot-message.ai .chatbot-pilot-bubble p {
    margin: 0 0 0.4em 0;
}

#chatbot-pilot .chatbot-pilot-message.ai .chatbot-pilot-bubble p:last-child {
    margin-bottom: 0;
}

#chatbot-pilot .chatbot-pilot-message.ai .chatbot-pilot-bubble ul,
#chatbot-pilot .chatbot-pilot-message.ai .chatbot-pilot-bubble ol {
    margin: 0.4em 0;
    padding-left: 1.5em;
    list-style-position: outside;
}

#chatbot-pilot .chatbot-pilot-message.ai .chatbot-pilot-bubble ul {
    list-style-type: disc;
}

#chatbot-pilot .chatbot-pilot-message.ai .chatbot-pilot-bubble ol {
    list-style-type: decimal;
}

#chatbot-pilot .chatbot-pilot-message.ai .chatbot-pilot-bubble li {
    margin-bottom: 0.2em;
    display: list-item;
}

#chatbot-pilot .chatbot-pilot-message.ai .chatbot-pilot-bubble a {
    color: var(--chatbot-pilot-primary-color);
    text-decoration: underline;
}

#chatbot-pilot .chatbot-pilot-message.ai .chatbot-pilot-bubble strong,
#chatbot-pilot .chatbot-pilot-message.ai .chatbot-pilot-bubble b {
    font-weight: 700;
}

#chatbot-pilot .chatbot-pilot-message.ai .chatbot-pilot-bubble .response {
    display: block;
}

#chatbot-pilot .chatbot-pilot-message.ai .chatbot-pilot-bubble code {
    background: rgba(0, 0, 0, 0.06);
    padding: 1px 5px;
    border-radius: 4px;
    font-size: 0.9em;
    font-family: "SF Mono", Monaco, Consolas, monospace;
}

#chatbot-pilot .chatbot-pilot-message.ai .chatbot-pilot-bubble pre {
    background: rgba(0, 0, 0, 0.06);
    padding: 10px 12px;
    border-radius: 6px;
    overflow-x: auto;
    margin: 8px 0;
}

#chatbot-pilot .chatbot-pilot-message.ai .chatbot-pilot-bubble pre code {
    background: none;
    padding: 0;
}

/* Message Meta (timestamp + actions) */
#chatbot-pilot .chatbot-pilot-message-meta {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    padding: 4px 8px 0 8px;
    font-size: 10px;
    color: rgba(0, 0, 0, 0.4);
    width: 100%;
    margin-left: 36px;
}

#chatbot-pilot .chatbot-pilot-message-time {
    font-size: 10px;
}

#chatbot-pilot .chatbot-pilot-message-actions {
    display: flex;
    gap: 4px;
    align-items: center;
}

#chatbot-pilot .chatbot-pilot-message-actions button {
    background: none;
    border: none;
    padding: 2px;
    cursor: pointer;
    color: rgba(0, 0, 0, 0.35);
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease, background 0.2s ease;
}

#chatbot-pilot .chatbot-pilot-message-actions button:hover {
    color: rgba(0, 0, 0, 0.6);
    background: rgba(0, 0, 0, 0.05);
}

#chatbot-pilot .chatbot-pilot-message-actions button.active {
    color: var(--chatbot-pilot-primary-color);
}

#chatbot-pilot .chatbot-pilot-message-actions button svg {
    width: 12px;
    height: 12px;
}

/* Feedback buttons specific styling */
#chatbot-pilot .chatbot-pilot-feedback-up.voted,
#chatbot-pilot .chatbot-pilot-feedback-down.voted {
    pointer-events: none;
    color: rgba(0, 0, 0, 0.5);
}

/* Typing Indicator */
#chatbot-pilot .chatbot-pilot-typing {
    display: flex;
    gap: 4px;
    padding: 4px 0;
}

#chatbot-pilot .chatbot-pilot-typing span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--chatbot-pilot-ai-text);
    opacity: 0.4;
    animation: chatbot-pilot-typing 1.4s infinite ease-in-out;
}

#chatbot-pilot .chatbot-pilot-typing span:nth-child(1) {
    animation-delay: 0s;
}

#chatbot-pilot .chatbot-pilot-typing span:nth-child(2) {
    animation-delay: 0.2s;
}

#chatbot-pilot .chatbot-pilot-typing span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes chatbot-pilot-typing {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.4;
    }
    30% {
        transform: translateY(-6px);
        opacity: 1;
    }
}

/* Input Form */
#chatbot-pilot .chatbot-pilot-form {
    padding: 12px 16px 16px;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    display: flex;
    background: var(--chatbot-pilot-chat-bg);
    flex-shrink: 0;
}

#chatbot-pilot .chatbot-pilot-input-wrapper {
    flex: 1;
    position: relative;
    display: flex;
    align-items: flex-end;
}

#chatbot-pilot .chatbot-pilot-input {
    flex: 1;
    padding: 12px 48px 12px 16px;
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 16px;
    font-size: var(--chatbot-pilot-font-size);
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    background: #f7f7f8;
    width: 100%;
    min-height: 44px;
}

#chatbot-pilot .chatbot-pilot-input:focus,
#chatbot-pilot input[type=text].chatbot-pilot-input:focus {
    border-color: var(--chatbot-pilot-input-focus, var(--chatbot-pilot-primary-color));
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--chatbot-pilot-input-focus, var(--chatbot-pilot-primary-color)) 12%, transparent);
    background: #ffffff;
    color: inherit;
}

#chatbot-pilot .chatbot-pilot-input::placeholder {
    color: rgba(0, 0, 0, 0.4);
}

#chatbot-pilot .chatbot-pilot-input:disabled {
    background: #f5f5f5;
    cursor: not-allowed;
}

#chatbot-pilot .chatbot-pilot-send {
    position: absolute;
    right: 6px;
    bottom: 4px;
    width: 36px;
    height: 36px;
    padding: 0;
    background: var(--chatbot-pilot-send-btn-bg, var(--chatbot-pilot-primary-color));
    color: var(--chatbot-pilot-send-btn-text, #ffffff);
    border: none;
    border-radius: 50%;
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

#chatbot-pilot .chatbot-pilot-send svg {
    width: 18px;
    height: 18px;
}

#chatbot-pilot .chatbot-pilot-send:hover {
    filter: brightness(1.1);
    transform: scale(1.05);
}

#chatbot-pilot .chatbot-pilot-send:active {
    transform: scale(0.95);
}

#chatbot-pilot .chatbot-pilot-send:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Error Message */
#chatbot-pilot .chatbot-pilot-error {
    color: #d63638;
    font-size: 13px;
    padding: 8px 12px;
    background: #fcecec;
    border-radius: 8px;
    text-align: center;
}

/* Mobile Responsive */
@media (max-width: 480px) {
    #chatbot-pilot .chatbot-pilot-window {
        position: fixed;
        width: 100%;
        height: 100%;
        max-height: 100%;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        border-radius: 0;
    }

}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    #chatbot-pilot .chatbot-pilot-window,
    #chatbot-pilot .chatbot-pilot-toggle,
    #chatbot-pilot .chatbot-pilot-message,
    #chatbot-pilot .chatbot-pilot-typing span {
        animation: none;
        transition: none;
    }
}
