.wcai-widget,
.wcai-widget * {
    box-sizing: border-box;
}

.wcai-widget {
    position: fixed;
    bottom: 22px;
    z-index: 99999;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.wcai-widget-right {
    right: 22px;
}

.wcai-widget-left {
    left: 22px;
}

.wcai-floating-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 0;
    border-radius: 999px;
    padding: 13px 18px;
    background: #17a765;
    color: #fff;
    font-weight: 700;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
    cursor: pointer;
}

.wcai-floating-button:hover,
.wcai-floating-button:focus {
    background: #118b53;
    color: #fff;
}

.wcai-dot {
    width: 10px;
    height: 10px;
    border-radius: 99px;
    background: #fff;
    display: inline-block;
    box-shadow: 0 0 0 4px rgba(255,255,255,0.25);
}

.wcai-panel {
    width: min(380px, calc(100vw - 28px));
    max-height: min(720px, calc(100vh - 110px));
    overflow: auto;
    margin-bottom: 12px;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.24);
    border: 1px solid rgba(0,0,0,0.08);
}

.wcai-widget-right .wcai-panel {
    margin-left: auto;
}

.wcai-panel[hidden] {
    display: none;
}

.wcai-panel-header {
    position: sticky;
    top: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 16px 18px;
    background: #111827;
    color: #fff;
    border-radius: 18px 18px 0 0;
}

.wcai-panel-header strong,
.wcai-panel-header small {
    display: block;
}

.wcai-panel-header small {
    opacity: 0.75;
    margin-top: 2px;
}

.wcai-close {
    border: 0;
    width: 32px;
    height: 32px;
    border-radius: 99px;
    background: rgba(255,255,255,0.12);
    color: #fff;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
}

.wcai-panel-body {
    padding: 16px;
}

.wcai-bot-message {
    background: #f3f4f6;
    border-radius: 14px;
    padding: 12px 14px;
    color: #111827;
    margin-bottom: 14px;
}

.wcai-bot-message p:last-child {
    margin-bottom: 0;
}

.wcai-divider {
    height: 1px;
    background: #e5e7eb;
    margin: 18px 0;
}

.wcai-label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: #374151;
    margin: 10px 0 6px;
}

.wcai-lead-form input,
.wcai-lead-form select,
.wcai-lead-form textarea,
.wcai-faq-search input {
    width: 100%;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    padding: 10px 11px;
    font: inherit;
    color: #111827;
    background: #fff;
}

.wcai-lead-form input:focus,
.wcai-lead-form select:focus,
.wcai-lead-form textarea:focus,
.wcai-faq-search input:focus {
    outline: 2px solid rgba(23, 167, 101, 0.22);
    border-color: #17a765;
}

.wcai-submit-button,
.wcai-faq-search button,
.wcai-whatsapp-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 10px;
    padding: 11px 14px;
    background: #17a765;
    color: #fff;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}

.wcai-submit-button {
    width: 100%;
    margin-top: 12px;
}

.wcai-submit-button:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.wcai-consent {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    margin-top: 12px;
    font-size: 12px;
    color: #4b5563;
}

.wcai-consent input {
    width: auto;
    margin-top: 3px;
}

.wcai-small {
    font-size: 13px;
    color: #6b7280;
    margin-top: -4px;
}

.wcai-faq-box {
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 12px;
    background: #fff;
}

.wcai-faq-search {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
}

.wcai-faq-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}

.wcai-faq-chips button {
    border: 1px solid #d1d5db;
    border-radius: 999px;
    background: #f9fafb;
    color: #374151;
    padding: 6px 10px;
    cursor: pointer;
    font-size: 12px;
}

.wcai-faq-answer,
.wcai-form-response {
    margin-top: 10px;
    border-radius: 12px;
    padding: 10px 12px;
    font-size: 13px;
}

.wcai-success {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.wcai-error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.wcai-loading {
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
}

.wcai-branding {
    text-align: center;
    font-size: 11px;
    color: #6b7280;
    padding: 0 16px 14px;
}

.wcai-shortcode-form {
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    padding: 20px;
    background: #fff;
    max-width: 620px;
}

.wcai-honeypot {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

@media (max-width: 520px) {
    .wcai-widget {
        left: 14px;
        right: 14px;
        bottom: 14px;
    }

    .wcai-floating-button {
        width: 100%;
        justify-content: center;
    }

    .wcai-panel {
        width: 100%;
    }
}
