#aiutoma-chatbot {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 320px;
    height: 400px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    z-index: 999999;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    display: flex;
    flex-direction: column;
    /*overflow: hidden;*/
    transition: all 0.3s ease;
}

#aiutoma-chatbot.aiutoma-chatbot-closed {
    width: 50px !important;
    height: 50px !important;
    border-radius: 50%;
}

#aiutoma-chatbot.aiutoma-chatbot-closed #aiutoma-chatbot-body {
    display: none !important;
}

#aiutoma-chatbot.aiutoma-chatbot-closed #aiutoma-chatbot-header {
    border-radius: 50%;
    padding: 0;
    height: 100%;
    width: 100%;
    justify-content: center;
    cursor: pointer;
}

#aiutoma-chatbot.aiutoma-chatbot-closed .aiutoma-chatbot-title-text,
#aiutoma-chatbot.aiutoma-chatbot-closed #aiutoma-chatbot-toggle,
#aiutoma-chatbot.aiutoma-chatbot-closed #aiutoma-chatbot-reset {
    display: none;
}

#aiutoma-chatbot.aiutoma-chatbot-closed #aiutoma-chatbot-header>span.dashicons:first-child {
    font-size: 28px;
    width: 28px;
    height: 28px;
    margin: 0;
}

#aiutoma-chatbot-header {
    background: #2271b1;
    color: #fff;
    padding: 12px 15px;
    display: flex;
    align-items: center;
    font-weight: 600;
}

.aiutoma-chatbot-title-text {
    margin-left: 8px;
    font-size: 14px;
}

#aiutoma-chatbot:not(.aiutoma-chatbot-closed) .aiutoma-chatbot-ai-badge {
    display: none;
}
.aiutoma-chatbot-ai-badge {
    display: inline-block;
    background: red;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: 6px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    vertical-align: middle;
    line-height: 1;
    position: absolute;
    top: 0;
    right: 0;
}

#aiutoma-chatbot-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    height: auto;
    min-height: 0;
}

#aiutoma-chatbot-messages {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    background: #f9f9f9;
}

.aiutoma-chatbot-msg {
    margin-bottom: 12px;
    padding: 10px 12px;
    border-radius: 6px;
    font-size: 13px;
    line-height: 1.4;
    word-wrap: break-word;
    position: relative;
}

.aiutoma-chatbot-author {
    font-size: 11px;
    font-weight: 600;
    margin-bottom: 4px;
    opacity: 0.7;
}

.aiutoma-chatbot-ai {
    background: #fff;
    border: 1px solid #ddd;
    color: #333;
    align-self: flex-start;
    padding-bottom: 24px;
}

.aiutoma-chatbot-sys {
    background: #f0f6fc;
    border: 1px dashed #72aee6;
    color: #1d2327;
    align-self: center;
    width: 100%;
    box-sizing: border-box;
    text-align: center;
    font-style: italic;
    font-size: 12px;
    padding: 8px 12px;
}

.aiutoma-chatbot-sys .aiutoma-chatbot-author {
    display: none;
}

.aiutoma-chatbot-user {
    background: #e3f2fd;
    color: #0d47a1;
    align-self: flex-end;
    margin-left: 20px;
}

.aiutoma-chatbot-speak-btn {
    position: absolute;
    bottom: 4px;
    right: 4px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 11px;
    padding: 2px;
    margin: 0;
    opacity: 0.4;
    transition: opacity 0.2s;
}

.aiutoma-chatbot-speak-btn:hover {
    opacity: 1;
}

#aiutoma-chatbot-input-area {
    display: flex;
    padding: 10px;
    background: #fff;
    border-top: 1px solid #ddd;
}

#aiutoma-chatbot-prompt {
    flex: 1;
    height: 36px;
    min-height: 36px;
    resize: none;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 8px 32px 8px 8px;
    font-size: 13px;
    font-family: inherit;
    box-sizing: border-box;
    width: 100%;
}

#aiutoma-chatbot-mic {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
    border-radius: 50%;
}

#aiutoma-chatbot-mic:hover {
    color: #2271b1;
}

#aiutoma-chatbot-send {
    margin-left: 8px;
    height: 36px;
    width: 36px;
    border: none;
    background: #2271b1;
    color: #fff;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

#aiutoma-chatbot-send:hover {
    background: #135e96;
}

.aiutoma-chatbot-btn {
    display: inline-block;
    margin-top: 10px;
    padding: 8px 16px;
    background-color: #2271b1;
    color: #fff !important;
    text-decoration: none !important;
    border-radius: 4px;
    font-weight: 500;
    font-size: 13px;
    transition: background-color 0.2s;
    text-align: center;
}

.aiutoma-chatbot-btn:hover {
    background-color: #135e96;
}

/* jQuery UI Resizable fallback styles */
.ui-resizable-handle {
    position: absolute;
    font-size: 0.1px;
    display: block;
    touch-action: none;
}

.ui-resizable-se {
    cursor: se-resize;
    width: 12px;
    height: 12px;
    right: 1px;
    bottom: 1px;
}

.ui-resizable-nw {
    cursor: nw-resize;
    width: 9px;
    height: 9px;
    left: 1px;
    top: 1px;
}

.ui-resizable-ne {
    cursor: ne-resize;
    width: 9px;
    height: 9px;
    right: 1px;
    top: 1px;
}

.ui-resizable-sw {
    cursor: sw-resize;
    width: 9px;
    height: 9px;
    left: 1px;
    bottom: 1px;
}

.ui-resizable-n {
    cursor: n-resize;
    height: 7px;
    width: 100%;
    top: 0;
    left: 0;
}

.ui-resizable-s {
    cursor: s-resize;
    height: 7px;
    width: 100%;
    bottom: 0;
    left: 0;
}

.ui-resizable-e {
    cursor: e-resize;
    width: 7px;
    right: 0;
    top: 0;
    height: 100%;
}

.ui-resizable-w {
    cursor: w-resize;
    width: 7px;
    left: 0;
    top: 0;
    height: 100%;
}

#aiutoma-chatbot.aiutoma-pos-bottom-left {
    left: 20px;
    right: auto;
}

#aiutoma-chatbot.aiutoma-pos-bottom-right {
    right: 20px;
    left: auto;
}

#aiutoma-chatbot-reset {
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    margin-left: auto;
    margin-right: 5px;
}

#aiutoma-chatbot-toggle {
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
}

#aiutoma-chatbot-email-hint {
    display: none;
    font-size: 12px;
    padding: 10px;
    color: #666;
    text-align: center;
    border-bottom: 1px solid #eee;
    background-color: #fafafa;
}

.aiutoma-chatbot-contact-msg {
    margin-bottom: 8px;
    font-style: italic;
}

.aiutoma-chatbot-email-form {
    display: flex;
    gap: 5px;
    justify-content: center;
    flex-wrap: wrap;
}

.aiutoma-chatbot-email-input {
    font-size: 11px;
    padding: 4px;
    border: 1px solid #ddd;
    border-radius: 3px;
    flex: 1;
}

#aiutoma-chatbot-name-input {
    min-width: 80px;
}

#aiutoma-chatbot-email-input {
    min-width: 120px;
}

#aiutoma-chatbot-email-submit {
    font-size: 11px;
    padding: 2px 8px;
    min-height: 0;
    line-height: 1.5;
    color: #fff;
    border: none;
    border-radius: 3px;
    cursor: pointer;
}

#aiutoma-chatbot-hp {
    display: none !important;
}

#aiutoma-chatbot-gdpr-notice {
    font-size: 11px;
    color: #646970;
    padding: 8px 12px;
    line-height: 1.35;
    background-color: #f6f7f7;
    border-top: 1px solid #dcdcde;
}

.aiutoma-privacy-link {
    color: #2271b1;
    text-decoration: underline;
}

.aiutoma-privacy-link:hover {
    color: #135e96;
}

.aiutoma-chatbot-gdpr-label {
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 6px;
    cursor: pointer;
    margin: 0;
    text-align: left;
    transition: color 0.2s ease;
}

.aiutoma-chatbot-gdpr-label.aiutoma-gdpr-error {
    color: #d63638 !important;
    font-weight: 500;
}

#aiutoma-chatbot-gdpr-consent {
    margin: 2px 0 0 0;
    flex-shrink: 0;
    cursor: pointer;
}

.aiutoma-chatbot-disclaimer {
    font-size: 10px;
    color: #646970;
    text-align: center;
    padding: 6px 10px;
    line-height: 1.3;
    background-color: #fff;
    border-top: 1px solid #f0f0f1;
    user-select: none;
    flex-shrink: 0;
}

.aiutoma-chatbot-disclaimer a {
    color: #2271b1;
    text-decoration: underline;
}

.aiutoma-chatbot-disclaimer a:hover {
    color: #135e96;
}