/**
 * 2008-2026 Prestaworld
 *
 * NOTICE OF LICENSE
 *
 * The source code of this module is under a commercial license.
 * Each license is unique and can be installed and used on only one website.
 * Any reproduction or representation total or partial of the module, one or more of its components,
 * by any means whatsoever, without express permission from us is prohibited.
 *
 * DISCLAIMER
 *
 * Do not alter or add/update to this file if you wish to upgrade this module to newer
 * versions in the future.
 *
 * @author    prestaworld
 * @copyright 2008-2026 Prestaworld
 * @license https://opensource.org/licenses/AFL-3.0 Academic Free License version 3.0
 * International Registered Trademark & Property of prestaworld
 */

.is-hidden {
    display: none !important;
}

:root {
    --aibot-color-primary: #2f80ed;
    --aibot-color-primary-dark: #1e6dd8;
    --aibot-color-primary-light: #4a9eff;
    --aibot-color-success: #10b981;
    --aibot-color-text: #1f2937;
    --aibot-color-text-light: #6b7280;
    --aibot-color-bg: #ffffff;
    --aibot-color-bg-light: #f9fafb;
    --aibot-color-border: #e5e7eb;
    --aibot-radius: 12px;
    --aibot-radius-sm: 8px;
    --aibot-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
    --aibot-shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.15);
}

[data-aibot-widget] {
    position: fixed;
    z-index: 9500;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--aibot-color-text);
    font-size: 14px;
    line-height: 1.5;
}

[data-aibot-widget].aibot-bottom-right {
    right: var(--aibot-offset-x, 24px);
    bottom: var(--aibot-offset-y, 24px);
}

[data-aibot-widget].aibot-bottom-left {
    left: var(--aibot-offset-x, 24px);
    bottom: var(--aibot-offset-y, 24px);
}

[data-aibot-widget].aibot-top-right {
    right: var(--aibot-offset-x, 24px);
    top: var(--aibot-offset-y, 24px);
}

[data-aibot-widget].aibot-top-left {
    left: var(--aibot-offset-x, 24px);
    top: var(--aibot-offset-y, 24px);
}

/* Launcher Button - Circular Icon */
.aibot-launcher {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--aibot-color-primary) 0%, var(--aibot-color-primary-light) 100%);
    color: #fff;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    box-shadow: var(--aibot-shadow);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: all 0.3s ease;
    padding: 0;
}

.aibot-launcher:hover {
    transform: scale(1.05);
    box-shadow: var(--aibot-shadow-lg);
}

.aibot-launcher:active {
    transform: scale(0.95);
}

.aibot-icon-wrapper {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.aibot-launcher .aibot-icon {
    width: 100%;
    height: 100%;
}

.aibot-icon-emoji {
    font-size: 40px;
    line-height: 1;
    display: block;
}

.aibot-icon-img {
    width: 48px;
    height: 48px;
    object-fit: contain;
    border-radius: 50%;
}

.aibot-status-indicator {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 16px;
    height: 16px;
    background: var(--aibot-color-success);
    border: 3px solid #fff;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    animation: pulse 2s infinite;
}

/* Panel - Full Height Responsive */
.aibot-panel {
    position: fixed;
    width: 100%;
    max-width: 420px;
    height: 90vh;
    background: var(--aibot-color-bg);
    border-radius: var(--aibot-radius);
    box-shadow: var(--aibot-shadow-lg);
    display: none;
    flex-direction: column;
    overflow: hidden;
    z-index: 9501;
}

/* Panel positioning based on widget position */
[data-aibot-widget].aibot-bottom-right .aibot-panel {
    bottom: 20px;
    right: 20px;
}

[data-aibot-widget].aibot-bottom-left .aibot-panel {
    bottom: 20px;
    left: 20px;
}

[data-aibot-widget].aibot-top-right .aibot-panel {
    top: 20px;
    right: 20px;
}

[data-aibot-widget].aibot-top-left .aibot-panel {
    top: 20px;
    left: 20px;
}

.aibot-panel.is-open {
    display: flex;
}

/* Hide launcher when panel is open */
[data-aibot-widget] .aibot-launcher {
    display: flex;
}

[data-aibot-widget].panel-open .aibot-launcher {
    display: none;
}

/* Header */
.aibot-panel-header {
    padding: 16px 20px;
    background: linear-gradient(135deg, var(--aibot-color-primary) 0%, var(--aibot-color-primary-dark) 100%);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    color: #fff;
}

.aibot-header-left {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.aibot-logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.aibot-logo-icon {
    font-size: 24px;
    line-height: 1;
}

.aibot-logo-icon-img {
    width: 24px;
    height: 24px;
    object-fit: contain;
    display: block;
}

.aibot-logo-text {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.aibot-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    opacity: 0.95;
}

.aibot-status-dot {
    width: 8px;
    height: 8px;
    background: var(--aibot-color-success);
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.3);
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }
}

.aibot-context {
    font-size: 11px;
    opacity: 0.85;
    margin-top: 2px;
}

.aibot-header-actions {
    display: flex;
    gap: 4px;
    align-items: flex-start;
}

.aibot-header-btn {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    padding: 0;
}

.aibot-header-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.05);
}

.aibot-header-btn svg {
    width: 16px;
    height: 16px;
}

.aibot-close-btn {
    background: rgba(255, 255, 255, 0.2);
}

.aibot-close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Panel Body */
.aibot-panel-body {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: var(--aibot-color-bg-light);
}

.aibot-panel-body::-webkit-scrollbar {
    width: 6px;
}

.aibot-panel-body::-webkit-scrollbar-track {
    background: transparent;
}

.aibot-panel-body::-webkit-scrollbar-thumb {
    background: var(--aibot-color-border);
    border-radius: 3px;
}

.aibot-panel-body::-webkit-scrollbar-thumb:hover {
    background: var(--aibot-color-text-light);
}

/* Welcome Message */
.aibot-welcome-message {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 16px 0;
}

.aibot-welcome-message.hidden {
    display: none;
}

.aibot-welcome-text {
    font-size: 15px;
    color: var(--aibot-color-text);
    font-weight: 500;
    line-height: 1.6;
}

.aibot-suggested-questions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.aibot-suggestion-btn {
    background: #fff;
    border: 1px solid var(--aibot-color-border);
    border-radius: var(--aibot-radius-sm);
    padding: 12px 16px;
    text-align: left;
    cursor: pointer;
    font-size: 14px;
    color: var(--aibot-color-text);
    transition: all 0.2s ease;
    font-weight: 500;
}

.aibot-suggestion-btn:hover {
    background: var(--aibot-color-primary);
    color: #fff;
    border-color: var(--aibot-color-primary);
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(47, 128, 237, 0.2);
}

/* Messages */
.aibot-message {
    padding: 12px 16px;
    border-radius: var(--aibot-radius-sm);
    max-width: 85%;
    word-break: break-word;
    line-height: 1.6;
    animation: slideIn 0.3s ease;
}

/* Typing Animation */
.aibot-message.aibot-typing {
    position: relative;
}

.aibot-message-content {
    display: inline;
}

.aibot-word {
    display: inline;
    opacity: 0;
    animation: fadeInWord 0.1s ease forwards;
}

@keyframes fadeInWord {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.aibot-typing-cursor {
    display: inline-block;
    margin-left: 2px;
    color: var(--aibot-color-primary);
    font-weight: bold;
    animation: blinkCursor 1s infinite;
    vertical-align: baseline;
}

@keyframes blinkCursor {

    0%,
    50% {
        opacity: 1;
    }

    51%,
    100% {
        opacity: 0;
    }
}

/* Typing Indicator */
.aibot-typing-indicator {
    background: #fff;
    border: 1px solid var(--aibot-color-border);
    padding: 12px 16px;
}

.aibot-typing-indicator-content {
    display: flex;
    align-items: center;
    gap: 8px;
}

.aibot-typing-dots {
    display: flex;
    gap: 4px;
}

.aibot-typing-dots span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--aibot-color-primary);
    animation: typingDot 1.4s infinite ease-in-out;
}

.aibot-typing-dots span:nth-child(1) {
    animation-delay: -0.32s;
}

.aibot-typing-dots span:nth-child(2) {
    animation-delay: -0.16s;
}

.aibot-typing-dots span:nth-child(3) {
    animation-delay: 0;
}

@keyframes typingDot {

    0%,
    80%,
    100% {
        transform: scale(0.8);
        opacity: 0.5;
    }

    40% {
        transform: scale(1);
        opacity: 1;
    }
}

.aibot-typing-text {
    color: var(--aibot-color-text-light);
    font-size: 13px;
    font-style: italic;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.aibot-message.aibot-customer {
    align-self: flex-end;
    background: var(--aibot-color-primary);
    color: #fff;
    border-bottom-right-radius: 4px;
    position: relative;
}

.aibot-message.aibot-customer .aibot-message-meta {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    font-size: 11px;
    opacity: 0.9;
    margin-top: 6px;
    text-align: right;
    font-style: italic;
    padding-top: 4px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.aibot-message-user {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.aibot-message-user-icon {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2px;
}

.aibot-message-user-icon svg {
    width: 16px;
    height: 16px;
    opacity: 0.95;
}

.aibot-message-user-name {
    font-weight: 600;
}

.aibot-message-timestamp {
    opacity: 0.9;
}

.aibot-message.aibot-bot {
    align-self: flex-start;
    background: #fff;
    color: var(--aibot-color-text);
    border: 1px solid var(--aibot-color-border);
    border-bottom-left-radius: 4px;
}

.aibot-message a {
    color: var(--aibot-color-primary);
    text-decoration: underline;
    font-weight: 600;
}

.aibot-message.aibot-customer a {
    color: #fff;
    opacity: 0.9;
}

.aibot-message img {
    max-width: 100%;
    border-radius: var(--aibot-radius-sm);
    margin-top: 8px;
    display: block;
}

.aibot-message button {
    border: none;
    padding: 10px 18px;
    border-radius: 20px;
    background: var(--aibot-color-primary);
    color: #fff;
    cursor: pointer;
    margin-top: 10px;
    display: inline-block;
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
    transition: all 0.2s ease;
    pointer-events: auto;
    user-select: none;
}

.aibot-message button:hover {
    background: var(--aibot-color-primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(47, 128, 237, 0.3);
}

.aibot-message button:active {
    transform: translateY(0);
}

.aibot-message button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* Product List Items as Buttons */
.aibot-message ul {
    list-style: none;
    padding: 0;
    margin: 12px 0;
}

.aibot-message li.aibot-product-li-btn,
.aibot-message li.btn,
.aibot-message li.btn-default {
    background: #fff !important;
    border: 1px solid #ccc !important;
    border-radius: var(--aibot-radius-sm);
    padding: 12px 16px;
    margin: 8px 0;
    cursor: pointer;
    font-size: 14px;
    color: var(--aibot-color-text) !important;
    transition: all 0.2s ease;
    font-weight: 500;
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    outline: none;
    list-style: none;
}

.aibot-message li.aibot-product-li-btn:hover,
.aibot-message li.btn:hover,
.aibot-message li.btn-default:hover {
    background: #f5f5f5 !important;
    color: var(--aibot-color-text) !important;
    border-color: #adadad !important;
    transform: translateX(2px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    outline: none;
}

.aibot-message li.aibot-product-li-btn:active,
.aibot-message li.btn:active,
.aibot-message li.btn-default:active {
    background: #e8e8e8 !important;
    border-color: #adadad !important;
    outline: none;
}

.aibot-product-card {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
    text-align: left;
}

.aibot-product-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: flex-start;
}

.aibot-product-link {
    font-weight: 600;
    text-decoration: none !important;
}

.aibot-product-img {
    width: 50px;
    height: 50px;
    min-width: 50px;
    border-radius: 6px;
    object-fit: cover;
    border: 1px solid var(--aibot-color-border);
    flex-shrink: 0;
}

.aibot-product-price {
    font-weight: 700;
    font-size: 15px;
    color: var(--aibot-color-primary);
    margin-left: 0;
}

/* Product list items in customer messages */
.aibot-message.aibot-customer li.aibot-product-li-btn {
    background: rgba(255, 255, 255, 0.15) !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
    color: #fff !important;
}

.aibot-message.aibot-customer li.aibot-product-li-btn:hover {
    background: rgba(255, 255, 255, 0.25) !important;
    border-color: rgba(255, 255, 255, 0.4) !important;
}

.aibot-message.aibot-customer .aibot-product-price {
    color: #fff;
}

/* Footer */
.aibot-panel-footer {
    padding: 16px;
    background: #fff;
    border-top: 1px solid var(--aibot-color-border);
}

.aibot-input-form {
    margin-bottom: 12px;
}

.aibot-input-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--aibot-color-bg-light);
    border: 1px solid var(--aibot-color-border);
    border-radius: 24px;
    padding: 4px 4px 4px 16px;
    transition: all 0.2s ease;
}

.aibot-input-wrapper:focus-within {
    border-color: var(--aibot-color-primary);
    box-shadow: 0 0 0 3px rgba(47, 128, 237, 0.1);
}

.aibot-input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 10px 0;
    font-size: 14px;
    color: var(--aibot-color-text);
    outline: none;
}

.aibot-input::placeholder {
    color: var(--aibot-color-text-light);
}

.aibot-mic-btn,
.aibot-send-btn {
    background: transparent;
    border: none;
    color: var(--aibot-color-text-light);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    padding: 0;
}

.aibot-mic-btn:hover {
    background: var(--aibot-color-bg);
    color: var(--aibot-color-primary);
}

.aibot-send-btn {
    background: var(--aibot-color-primary);
    color: #fff;
}

.aibot-send-btn:hover {
    background: var(--aibot-color-primary-dark);
    transform: scale(1.05);
}

.aibot-send-btn svg,
.aibot-mic-btn svg {
    width: 18px;
    height: 18px;
}

.aibot-consent-wrapper {
    margin-top: 12px;
}

.aibot-consent {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    margin-top: 8px;
    color: var(--aibot-color-text-light);
    text-align: left !important;
}

.aibot-consent input[type="checkbox"] {
    width: 14px;
    height: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.aibot-consent input[type="checkbox"].aibot-consent-error-highlight {
    outline: 3px solid #ef4444;
    outline-offset: 2px;
    animation: consentPulse 0.5s ease-in-out;
}

@keyframes consentPulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

.aibot-consent-error {
    color: #ef4444;
    font-size: 11px;
    margin-top: 6px;
    padding-left: 22px;
    font-weight: 500;
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Email Form Styles */
.aibot-email-form {
    padding: 20px;
    animation: fadeIn 0.3s ease-in;
}

.aibot-email-title {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 20px 0;
    color: var(--aibot-color-text);
}

.aibot-email-form-content {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.aibot-email-field {
    display: flex;
    flex-direction: column;
}

.aibot-email-input,
.aibot-email-textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--aibot-color-border);
    border-radius: var(--aibot-radius-sm);
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    background: var(--aibot-color-bg);
    color: var(--aibot-color-text);
}

.aibot-email-input:focus,
.aibot-email-textarea:focus {
    outline: none;
    border-color: var(--aibot-color-primary);
    box-shadow: 0 0 0 3px rgba(47, 128, 237, 0.1);
}

.aibot-email-textarea {
    resize: vertical;
    min-height: 120px;
}

.aibot-email-consent {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--aibot-color-text-light);
}

.aibot-email-consent input[type="checkbox"] {
    width: 14px;
    height: 14px;
    cursor: pointer;
}

.aibot-email-submit-btn {
    width: 100%;
    padding: 14px 24px;
    background: var(--aibot-color-primary);
    color: white;
    border: none;
    border-radius: var(--aibot-radius-sm);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.1s ease;
}

.aibot-email-submit-btn:hover {
    background: var(--aibot-color-primary-dark);
}

.aibot-email-submit-btn:active {
    transform: scale(0.98);
}

.aibot-email-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.aibot-email-message {
    padding: 12px 16px;
    border-radius: var(--aibot-radius-sm);
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    margin-top: 10px;
}

/* WhatsApp Form Styles */
.aibot-whatsapp-form {
    padding: 40px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    animation: fadeIn 0.3s ease-in;
}

.aibot-whatsapp-content {
    text-align: center;
    max-width: 300px;
}

.aibot-whatsapp-logo {
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.aibot-whatsapp-logo svg {
    width: 120px;
    height: 120px;
}

.aibot-whatsapp-title {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 12px 0;
    color: var(--aibot-color-text);
}

.aibot-whatsapp-desc {
    font-size: 14px;
    color: var(--aibot-color-text-light);
    margin: 0 0 30px 0;
    line-height: 1.6;
}

.aibot-whatsapp-btn {
    width: 100%;
    padding: 16px 24px;
    background: #25D366;
    color: white;
    border: none;
    border-radius: var(--aibot-radius-sm);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.1s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
}

.aibot-whatsapp-btn:hover {
    background: #20BA5A;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(37, 211, 102, 0.4);
}

.aibot-whatsapp-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(37, 211, 102, 0.3);
}

.aibot-whatsapp-btn svg {
    flex-shrink: 0;
}

/* Callback Form Styles */
.aibot-callback-form {
    padding: 30px 20px;
    animation: fadeIn 0.3s ease-in;
}

.aibot-callback-title {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 24px 0;
    color: var(--aibot-color-text);
    text-align: center;
}

.aibot-callback-form-content {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.aibot-callback-field {
    width: 100%;
}

.aibot-callback-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--aibot-color-border);
    border-radius: var(--aibot-radius-sm);
    font-size: 14px;
    font-family: inherit;
    background: white;
    color: var(--aibot-color-text);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.aibot-callback-input:focus {
    outline: none;
    border-color: var(--aibot-color-primary);
    box-shadow: 0 0 0 3px rgba(47, 128, 237, 0.1);
}

.aibot-callback-input:read-only {
    background: #f5f5f5;
    cursor: not-allowed;
}

.aibot-callback-consent {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-top: 8px;
}

.aibot-callback-consent label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 14px;
    color: var(--aibot-color-text-light);
    cursor: pointer;
    line-height: 1.5;
}

.aibot-callback-consent input[type="checkbox"] {
    margin-top: 2px;
    cursor: pointer;
    flex-shrink: 0;
}

.aibot-callback-submit-btn {
    width: 100%;
    padding: 14px 24px;
    background: var(--aibot-color-primary);
    color: white;
    border: none;
    border-radius: var(--aibot-radius-sm);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.1s ease;
    margin-top: 8px;
}

.aibot-callback-submit-btn:hover {
    background: #2563eb;
    transform: translateY(-1px);
}

.aibot-callback-submit-btn:active {
    transform: translateY(0);
}

.aibot-callback-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.aibot-callback-message {
    padding: 12px 16px;
    border-radius: var(--aibot-radius-sm);
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    margin-top: 10px;
}

.aibot-callback-message.aibot-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #6ee7b7;
}

.aibot-callback-message.aibot-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

/* Footer Navigation */
.aibot-footer-nav {
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding-top: 12px;
    margin-top: 12px;
    border-top: 1px solid var(--aibot-color-border);
}

.aibot-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    background: transparent;
    border: none;
    color: var(--aibot-color-text-light);
    cursor: pointer;
    padding: 6px 8px;
    border-radius: var(--aibot-radius-sm);
    transition: all 0.2s ease;
    font-size: 10px;
    font-weight: 500;
}

.aibot-nav-item svg {
    width: 18px;
    height: 18px;
}

.aibot-nav-item:hover {
    color: var(--aibot-color-primary);
    background: var(--aibot-color-bg-light);
}

.aibot-nav-item.active {
    color: var(--aibot-color-primary);
    background: rgba(47, 128, 237, 0.1);
}

/* Conversations List */
.aibot-conversations-list {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--aibot-color-bg);
    display: none;
    flex-direction: column;
    z-index: 10;
}

.aibot-conversations-list.is-open {
    display: flex;
}

.aibot-conversations-header {
    padding: 16px 20px;
    background: var(--aibot-color-bg-light);
    border-bottom: 1px solid var(--aibot-color-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.aibot-conversations-header strong {
    font-size: 15px;
    color: var(--aibot-color-text);
    font-weight: 600;
}

.aibot-conversations-items {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
}

.aibot-conversation-item {
    padding: 12px;
    border-radius: var(--aibot-radius-sm);
    cursor: pointer;
    margin-bottom: 6px;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.aibot-conversation-item:hover {
    background: var(--aibot-color-bg-light);
    border-color: var(--aibot-color-border);
}

.aibot-conversation-item.active {
    background: rgba(47, 128, 237, 0.1);
    border-color: var(--aibot-color-primary);
}

.aibot-conversation-item-title {
    font-weight: 500;
    font-size: 14px;
    color: var(--aibot-color-text);
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.aibot-conversation-item-date {
    font-size: 12px;
    color: var(--aibot-color-text-light);
}

.aibot-loading {
    padding: 40px 20px;
    text-align: center;
    color: var(--aibot-color-text-light);
    font-size: 14px;
}

.aibot-empty-state {
    padding: 40px 20px;
    text-align: center;
    color: var(--aibot-color-text-light);
    font-size: 14px;
}

.btn-custom {
    background: #fff;
    border: 1px solid #ddd;
    text-decoration: none !important;
    font-size: 14px;
    border-radius: 5px;
    margin-bottom: 10px;
}

/* Responsive */
@media (max-width: 768px) {
    .aibot-panel {
        width: calc(100vw - 32px);
        height: 90vh;
        border-radius: var(--aibot-radius);
    }

    [data-aibot-widget].aibot-bottom-right .aibot-panel {
        bottom: 16px;
        right: 16px;
        left: auto;
    }

    [data-aibot-widget].aibot-bottom-left .aibot-panel {
        bottom: 16px;
        left: 16px;
        right: auto;
    }

    [data-aibot-widget].aibot-top-right .aibot-panel {
        top: 16px;
        right: 16px;
        left: auto;
    }

    [data-aibot-widget].aibot-top-left .aibot-panel {
        top: 16px;
        left: 16px;
        right: auto;
    }
}

@media (max-width: 480px) {
    .aibot-panel {
        width: 100vw;
        height: 100vh;
        max-height: none;
        border-radius: 0;
        position: fixed;
        top: 0 !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
    }

    [data-aibot-widget].aibot-bottom-right,
    [data-aibot-widget].aibot-bottom-left,
    [data-aibot-widget].aibot-top-right,
    [data-aibot-widget].aibot-top-left {
        right: 0;
        left: 0;
        bottom: 0;
        top: 0;
    }

    [data-aibot-widget].aibot-bottom-right .aibot-panel,
    [data-aibot-widget].aibot-bottom-left .aibot-panel,
    [data-aibot-widget].aibot-top-right .aibot-panel,
    [data-aibot-widget].aibot-top-left .aibot-panel {
        top: 0 !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
    }

    .aibot-footer-nav {
        flex-wrap: wrap;
        gap: 8px;
    }

    .aibot-nav-item {
        flex: 1 1 calc(33.333% - 8px);
        min-width: 0;
        font-size: 9px;
    }

    .aibot-nav-item svg {
        width: 16px;
        height: 16px;
    }

    .aibot-launcher {
        width: 56px;
        height: 56px;
    }

    .aibot-icon-wrapper {
        width: 42px;
        height: 42px;
    }

    .aibot-status-indicator {
        width: 14px;
        height: 14px;
        border-width: 2px;
    }
}

/* Conversation Start Modal */
/* Customer Details Form (inside panel) */
.aibot-customer-details-form {
    padding: 20px;
    background: var(--aibot-color-bg);
    border-bottom: 1px solid var(--aibot-color-border);
}

.aibot-customer-details-header {
    margin-bottom: 20px;
}

.aibot-customer-details-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--aibot-color-text);
}

.aibot-customer-field {
    margin-bottom: 16px;
}

.aibot-customer-field label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--aibot-color-text);
    font-size: 14px;
    text-align: left;
}

.aibot-customer-field label .required {
    color: #ef4444;
    margin-left: 4px;
}

.aibot-customer-field input {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--aibot-color-border);
    border-radius: var(--aibot-radius-sm);
    font-size: 14px;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.aibot-customer-field input:focus {
    outline: none;
    border-color: var(--aibot-color-primary);
    box-shadow: 0 0 0 3px rgba(47, 128, 237, 0.1);
}

.aibot-customer-details-actions {
    margin-top: 20px;
    display: flex;
    justify-content: flex-end;
}

.aibot-submit-btn {
    background: var(--aibot-color-primary);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: var(--aibot-radius-sm);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.aibot-submit-btn:hover {
    background: var(--aibot-color-primary-dark);
}

/* Customer Details Display (shown after form submission) */
.aibot-customer-details-display {
    padding: 16px 20px;
    background: var(--aibot-color-bg-light);
    border-bottom: 1px solid var(--aibot-color-border);
    font-size: 14px;
}

.aibot-customer-name-display,
.aibot-customer-topic-display {
    margin-bottom: 8px;
    color: var(--aibot-color-text);
    font-weight: 500;
}

.aibot-customer-name-display:last-child,
.aibot-customer-topic-display:last-child {
    margin-bottom: 0;
}

.modal-backdrop.in {
    z-index: 99 !important;
}

#prestaAiChatBotModal {
    z-index: 2000 !important;
}

#prestaAiChatBotModal .modal-header {
    padding: 4px 12px 0px 0px !important;
    border-bottom: unset !important;
}

#prestaAiChatBotModal .modal-content {
    z-index: 2000 !important;
}
