:root {
    --pxai-dark: #303030;
    --pxai-deep: #0a0a0a;
    --pxai-accent: #D3EC8E;
    --pxai-bg: #f1f1f1;
    --pxai-silver: #c9c9c9;
    --pxai-white: #ffffff;
}

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

.pxai-widget {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 9999998;
    font-family: Inter, Arial, sans-serif;
}

.pxai-launcher {
    position: relative;
    min-width: 164px;
    height: 58px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 16px 7px 7px !important;
    border: 0 !important;
    border-radius: 999px !important;
    background: var(--pxai-dark) !important;
    color: var(--pxai-white) !important;
    box-shadow: 0 16px 45px rgba(0,0,0,.22);
    cursor: pointer;
}

.pxai-launcher__pulse {
    position: absolute;
    left: 11px;
    top: 11px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(211,236,142,.3);
    animation: pxaiPulse 2s infinite;
}

@keyframes pxaiPulse {
    0% { transform: scale(.9); opacity: .7; }
    70% { transform: scale(1.35); opacity: 0; }
    100% { transform: scale(1.35); opacity: 0; }
}

.pxai-avatar {
    position: relative;
    z-index: 2;
    width: 44px;
    height: 44px;
    display: block;
    flex: 0 0 auto;
}

.pxai-avatar svg {
    width: 100%;
    height: 100%;
    display: block;
}

.pxai-launcher__label {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .1px;
}

.pxai-panel {
    position: absolute;
    right: 0;
    bottom: 72px;
    width: min(390px, calc(100vw - 28px));
    height: min(650px, calc(100vh - 120px));
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid rgba(48,48,48,.12);
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 30px 85px rgba(0,0,0,.3);
    opacity: 0;
    visibility: hidden;
    transform: translateY(24px) scale(.96);
    transform-origin: right bottom;
    transition: opacity .3s ease, transform .35s cubic-bezier(.22,1,.36,1), visibility 0s linear .35s;
}

.pxai-panel.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    transition-delay: 0s;
}

.pxai-header {
    min-height: 78px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background:
        radial-gradient(circle at 90% 0, rgba(211,236,142,.24), transparent 38%),
        var(--pxai-dark);
    color: #fff;
}

.pxai-header__avatar .pxai-avatar {
    width: 48px;
    height: 48px;
}

.pxai-header strong {
    display: block;
    font-size: 17px;
}

.pxai-header span {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-top: 4px;
    color: var(--pxai-silver);
    font-size: 11px;
}

.pxai-header span i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--pxai-accent);
    box-shadow: 0 0 10px rgba(211,236,142,.8);
}

.pxai-close {
    margin-left: auto;
    width: 38px !important;
    min-width: 38px !important;
    height: 38px !important;
    padding: 0 !important;
    border: 1px solid rgba(255,255,255,.18) !important;
    border-radius: 50% !important;
    background: rgba(255,255,255,.07) !important;
    color: #fff !important;
    font-size: 23px !important;
    cursor: pointer;
}

.pxai-body {
    flex: 1;
    min-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background: #f8f8f8;
}

.pxai-messages {
    flex: 1;
    overflow-y: auto;
    padding: 17px 14px;
}

.pxai-message {
    display: flex;
    margin-bottom: 11px;
}

.pxai-message > div {
    max-width: 84%;
    padding: 11px 13px;
    border-radius: 15px;
    font-size: 13px;
    line-height: 1.5;
    white-space: pre-wrap;
}

.pxai-message--bot,
.pxai-message--admin {
    justify-content: flex-start;
}

.pxai-message--bot > div {
    background: #fff;
    color: #303030;
    border: 1px solid #e6e6e6;
    border-bottom-left-radius: 4px;
}

.pxai-message--admin > div {
    background: var(--pxai-accent);
    color: #303030;
    border-bottom-left-radius: 4px;
}

.pxai-message--visitor {
    justify-content: flex-end;
}

.pxai-message--visitor > div {
    background: var(--pxai-dark);
    color: #fff;
    border-bottom-right-radius: 4px;
}

.pxai-quick-questions {
    display: flex;
    gap: 7px;
    overflow-x: auto;
    padding: 0 14px 12px;
}

.pxai-quick-questions button {
    flex: 0 0 auto;
    padding: 8px 10px !important;
    border: 1px solid #dedede !important;
    border-radius: 999px !important;
    background: #fff !important;
    color: #303030 !important;
    font-size: 11px !important;
    cursor: pointer;
}

.pxai-quick-questions button:hover {
    border-color: var(--pxai-accent) !important;
    background: var(--pxai-accent) !important;
}

.pxai-specialist-form {
    padding: 0 14px 12px;
}

.pxai-specialist-note {
    margin-bottom: 9px;
    padding: 10px 11px;
    border-left: 3px solid var(--pxai-accent);
    background: #fff;
    color: #555;
    font-size: 11px;
    line-height: 1.45;
}

.pxai-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.pxai-fields input,
.pxai-input-row textarea {
    width: 100%;
    border: 1px solid #dcdcdc !important;
    border-radius: 11px !important;
    background: #fff !important;
    color: #303030 !important;
    outline: none;
}

.pxai-fields input {
    min-height: 40px;
    padding: 9px 10px;
    font-size: 12px;
}

.pxai-footer {
    padding: 12px 13px;
    border-top: 1px solid #e7e7e7;
    background: #fff;
}

.pxai-input-row {
    display: grid;
    grid-template-columns: minmax(0,1fr) 42px;
    gap: 8px;
    align-items: end;
}

.pxai-input-row textarea {
    min-height: 42px;
    max-height: 95px;
    resize: none;
    padding: 11px 12px;
    font-family: inherit;
    font-size: 13px;
}

#pxaiSend {
    width: 42px !important;
    height: 42px !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 12px !important;
    background: var(--pxai-accent) !important;
    color: #303030 !important;
    font-size: 20px !important;
    cursor: pointer;
}

.pxai-specialist-button {
    width: 100%;
    margin-top: 9px;
    padding: 10px 14px !important;
    border: 1px solid var(--pxai-dark) !important;
    border-radius: 11px !important;
    background: var(--pxai-dark) !important;
    color: #fff !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    cursor: pointer;
}

.pxai-contact-mini {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-top: 9px;
    font-size: 9px;
}

.pxai-contact-mini a {
    color: #777;
    text-decoration: none;
}

@media (max-width: 600px) {
    .pxai-widget {
        right: 12px;
        bottom: 12px;
    }

    .pxai-launcher {
        min-width: 58px;
        width: 58px;
        padding: 7px !important;
    }

    .pxai-launcher__label {
        display: none;
    }

    .pxai-panel {
        position: fixed;
        left: 10px;
        right: 10px;
        bottom: 82px;
        width: auto;
        height: min(650px, calc(100dvh - 98px));
    }

    .pxai-fields {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    .pxai-panel,
    .pxai-launcher__pulse {
        animation: none !important;
        transition-duration: .01ms !important;
    }
}


/* === Pursuitix Chatbot v1.1.0 fixes === */
.pxai-launcher {
    width: auto !important;
    min-width: 210px !important;
    min-height: 64px !important;
    display: flex !important;
    align-items: center !important;
    gap: 11px !important;
    padding: 8px 18px 8px 8px !important;
    overflow: visible !important;
    border: 1px solid rgba(255,255,255,.08) !important;
    border-radius: 999px !important;
    background: linear-gradient(135deg,#303030,#222) !important;
    color: #fff !important;
}

.pxai-launcher::before,
.pxai-launcher::after {
    display: none !important;
    content: none !important;
}

.pxai-launcher__copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.1;
}

.pxai-launcher__copy strong {
    color: #fff;
    font-size: 14px;
    font-weight: 800;
}

.pxai-launcher__copy small {
    margin-top: 5px;
    color: #c9c9c9;
    font-size: 9px;
}

.pxai-launcher.has-unread::after {
    content: "" !important;
    display: block !important;
    position: absolute;
    top: 2px;
    right: 8px;
    width: 12px;
    height: 12px;
    border: 2px solid #303030;
    border-radius: 50%;
    background: #D3EC8E;
}

.pxai-panel {
    width: min(410px, calc(100vw - 28px)) !important;
    height: min(690px, calc(100vh - 115px)) !important;
    border-radius: 24px !important;
}

.pxai-header__copy {
    min-width: 0;
}

.pxai-header__copy strong {
    display: block;
    color: #fff;
    font-size: 18px;
    line-height: 1.1;
}

.pxai-header__copy span {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-top: 6px;
    color: #c9c9c9;
    font-size: 11px;
}

.pxai-header__copy span i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #D3EC8E;
    box-shadow: 0 0 10px rgba(211,236,142,.8);
}

.pxai-close {
    width: 40px !important;
    min-width: 40px !important;
    max-width: 40px !important;
    height: 40px !important;
    min-height: 40px !important;
    padding: 0 !important;
    border-radius: 50% !important;
    background: rgba(255,255,255,.07) !important;
    color: #fff !important;
}

.pxai-faq-area {
    flex: 0 0 auto;
    padding: 9px 14px 13px;
    border-top: 1px solid #e9e9e9;
    background: #fff;
}

.pxai-faq-title {
    margin-bottom: 8px;
    color: #777;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .8px;
    text-transform: uppercase;
}

.pxai-quick-questions {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 7px !important;
    max-height: 160px !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    padding: 0 !important;
}

.pxai-quick-questions button {
    width: 100% !important;
    min-height: 38px !important;
    padding: 8px 9px !important;
    border: 1px solid #dedede !important;
    border-radius: 10px !important;
    background: #f8f8f8 !important;
    color: #303030 !important;
    font-size: 10px !important;
    font-weight: 600 !important;
    text-align: left !important;
}

.pxai-specialist-form {
    padding: 14px !important;
    border-top: 1px solid #e8e8e8;
    background: #fff;
}

.pxai-fields {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
}

.pxai-fields input,
.pxai-fields textarea {
    width: 100% !important;
    max-width: 100% !important;
    border: 1px solid #d9d9d9 !important;
    border-radius: 11px !important;
    background: #fff !important;
    color: #303030 !important;
    font-family: inherit !important;
}

.pxai-fields textarea {
    grid-column: 1 / -1;
    min-height: 78px;
    resize: vertical;
    padding: 10px;
    font-size: 12px;
}

.pxai-submit-specialist {
    width: 100% !important;
    margin-top: 9px !important;
    padding: 11px 14px !important;
    border: 0 !important;
    border-radius: 11px !important;
    background: #D3EC8E !important;
    color: #303030 !important;
    font-size: 12px !important;
    font-weight: 800 !important;
}

.pxai-form-status {
    min-height: 16px;
    margin-top: 7px;
    color: #b42318;
    font-size: 10px;
}

.pxai-input-lock {
    margin-bottom: 8px;
    padding: 8px 10px;
    border-radius: 9px;
    background: #f1f1f1;
    color: #777;
    font-size: 10px;
    text-align: center;
}

.pxai-input-row textarea:disabled {
    background: #f3f3f3 !important;
    color: #999 !important;
    cursor: not-allowed;
}

#pxaiSend:disabled {
    opacity: .42;
    cursor: not-allowed;
}

.pxai-specialist-button.is-active {
    background: #D3EC8E !important;
    border-color: #D3EC8E !important;
    color: #303030 !important;
}

@media (max-width: 600px) {
    .pxai-launcher {
        min-width: 60px !important;
        width: 60px !important;
        min-height: 60px !important;
        padding: 6px !important;
        justify-content: center !important;
    }

    .pxai-launcher__copy {
        display: none !important;
    }

    .pxai-panel {
        left: 8px !important;
        right: 8px !important;
        bottom: 78px !important;
        width: auto !important;
        height: min(690px, calc(100dvh - 90px)) !important;
    }

    .pxai-quick-questions {
        grid-template-columns: 1fr !important;
        max-height: 145px !important;
    }

    .pxai-fields {
        grid-template-columns: 1fr !important;
    }

    .pxai-fields textarea {
        grid-column: auto !important;
    }
}
