.wpva-widget,
.wpva-widget * {
    box-sizing: border-box !important;
}

.wpva-widget {
    --wpva-orange: #f21515;
    --wpva-orange-dark: #e83f22;
    --wpva-green: #2bc878;
    --wpva-ink: #405967;
    --wpva-muted: #afbec7;
    --wpva-border: #d7dfe3;
    --wpva-surface: #ffffff;
    --wpva-bubble: #f6f6f6;
    --wpva-primary: #ec4900;
    --wpva-user-text: #ffffff;
    --wpva-launcher-bg: #000000;
    --wpva-launcher-label: #ffffff;
    --wpva-launcher-icon-bg: #2b2b2b;
    --wpva-preview-bg: #ffffff;
    --wpva-preview-text: #405967;
    align-items: flex-end !important;
    color: var(--wpva-ink) !important;
    display: flex !important;
    flex-direction: column !important;
    font-family: Arial, Helvetica, sans-serif !important;
    font-size: 16px !important;
    font-weight: 400 !important;
    gap: 12px !important;
    line-height: 1.35 !important;
    position: fixed !important;
    right: 20px !important;
    bottom: 20px !important;
    z-index: 2147483647 !important;
}

.wpva-launcher,
.wpva-icon-button,
.wpva-send,
.wpva-preview-close {
    appearance: none !important;
    -webkit-appearance: none !important;
    border: 0 !important;
    box-shadow: none !important;
    cursor: pointer !important;
    font: inherit !important;
    margin: 0 !important;
    padding: 0 !important;
}

.wpva-preview {
    background: var(--wpva-preview-bg) !important;
    border-radius: 16px !important;
    box-shadow: 0 10px 30px rgba(26, 38, 45, 0.18) !important;
    color: var(--wpva-preview-text) !important;
    cursor: pointer !important;
    max-width: min(320px, calc(100vw - 40px)) !important;
    padding: 14px 18px 14px 14px !important;
    position: relative !important;
    width: max-content !important;
    z-index: 2147483647 !important;
}

.wpva-preview[hidden] {
    display: none !important;
}

.wpva-preview-close {
    align-items: center !important;
    background: #ececec !important;
    border-radius: 50% !important;
    color: #5f5f5f !important;
    display: inline-flex !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    height: 22px !important;
    justify-content: center !important;
    line-height: 1 !important;
    position: absolute !important;
    right: -8px !important;
    top: -8px !important;
    width: 22px !important;
    z-index: 1 !important;
}

.wpva-preview-close:hover {
    background: #e0e0e0 !important;
    color: #333333 !important;
}

.wpva-preview-body {
    align-items: flex-start !important;
    display: flex !important;
    gap: 10px !important;
}

.wpva-preview-avatar {
    align-items: center !important;
    background: var(--wpva-primary) !important;
    border-radius: 50% !important;
    color: #ffffff !important;
    display: inline-flex !important;
    flex: 0 0 auto !important;
    height: 36px !important;
    justify-content: center !important;
    overflow: hidden !important;
    width: 36px !important;
}

.wpva-preview-avatar.wpva-logo--default img,
.wpva-preview-avatar img {
    display: block !important;
    height: 100% !important;
    object-fit: cover !important;
    width: 100% !important;
}

.wpva-preview-avatar.wpva-logo--default img {
    height: 70% !important;
    object-fit: contain !important;
    width: 70% !important;
}

.wpva-preview-text {
    color: inherit !important;
    font: inherit !important;
    font-size: 14px !important;
    line-height: 1.35 !important;
    margin: 0 !important;
    max-width: 240px !important;
    overflow-wrap: anywhere !important;
    padding: 2px 0 0 !important;
}

.wpva-launcher {
    align-items: center !important;
    background: var(--wpva-launcher-bg) !important;
    border-radius: 999px !important;
    color: var(--wpva-launcher-label) !important;
    display: inline-flex !important;
    flex: 0 0 auto !important;
    gap: 10px !important;
    height: 52px !important;
    justify-content: center !important;
    margin-left: auto !important;
    overflow: visible !important;
    padding: 6px 18px 6px 6px !important;
    position: relative !important;
    transition: filter 160ms ease, transform 160ms ease !important;
    width: auto !important;
    z-index: 2147483647 !important;
}

.wpva-launcher:hover {
    filter: brightness(1.08) !important;
    transform: translateY(-2px) !important;
}

.wpva-launcher-icon {
    align-items: center !important;
    background: var(--wpva-launcher-icon-bg) !important;
    border-radius: 50% !important;
    color: var(--wpva-launcher-label) !important;
    display: inline-flex !important;
    flex: 0 0 auto !important;
    height: 40px !important;
    justify-content: center !important;
    width: 40px !important;
}

.wpva-launcher-icon-image {
    background-color: currentColor !important;
    display: block !important;
    height: 22px !important;
    -webkit-mask-position: center !important;
    mask-position: center !important;
    -webkit-mask-repeat: no-repeat !important;
    mask-repeat: no-repeat !important;
    -webkit-mask-size: contain !important;
    mask-size: contain !important;
    width: 22px !important;
}

.wpva-launcher-label {
    color: inherit !important;
    font-family: Arial, Helvetica, sans-serif !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
}

.wpva-launcher:focus-visible,
.wpva-icon-button:focus-visible,
.wpva-send:focus-visible,
.wpva-preview-close:focus-visible {
    outline: 2px solid var(--wpva-primary) !important;
    outline-offset: 2px !important;
}

.wpva-input:focus-visible {
    outline: none !important;
}

.wpva-logo {
    align-items: center !important;
    background: var(--wpva-primary) !important;
    border-radius: 50% !important;
    color: #ffffff !important;
    display: inline-flex !important;
    flex: 0 0 auto !important;
    font-family: Arial Black, Arial, Helvetica, sans-serif !important;
    font-size: 31px !important;
    font-weight: 900 !important;
    height: 60px !important;
    justify-content: center !important;
    letter-spacing: -4px !important;
    line-height: 1 !important;
    padding: 0 4px 5px 0 !important;
    text-align: center !important;
    width: 60px !important;
}

.wpva-logo--image {
    background: transparent !important;
    overflow: hidden !important;
    padding: 0 !important;
}

.wpva-logo--default {
    background: var(--wpva-primary) !important;
    color: #ffffff !important;
}

.wpva-logo--default .wpva-logo-image {
    height: 70% !important;
    object-fit: contain !important;
    width: 70% !important;
}

.wpva-logo-image {
    display: block !important;
    height: 100% !important;
    object-fit: cover !important;
    width: 100% !important;
}

.wpva-dialog {
    background: var(--wpva-surface) !important;
    border-radius: 10px !important;
    bottom: 64px !important;
    box-shadow: 0 18px 55px rgba(26, 38, 45, 0.25) !important;
    display: flex !important;
    flex-direction: column !important;
    height: min(610px, calc(100vh - 112px)) !important;
    opacity: 0 !important;
    overflow: hidden !important;
    pointer-events: none !important;
    position: absolute !important;
    right: 0 !important;
    transform: translateY(14px) scale(0.98) !important;
    transform-origin: bottom right !important;
    transition: opacity 180ms ease, transform 180ms ease, visibility 180ms ease !important;
    visibility: hidden !important;
    width: min(377px, calc(100vw - 32px)) !important;
    z-index: 2147483646 !important;
}

.wpva-widget--preview-visible .wpva-dialog {
    bottom: 140px !important;
}

.wpva-dialog--open {
    opacity: 1 !important;
    pointer-events: auto !important;
    transform: translateY(0) scale(1) !important;
    visibility: visible !important;
}

.wpva-header {
    align-items: center !important;
    display: flex !important;
    flex: 0 0 56px !important;
    gap: 8px !important;
    justify-content: flex-end !important;
    padding: 0 16px !important;
}

.wpva-icon-button {
    align-items: center !important;
    background: transparent !important;
    color: #666666 !important;
    display: inline-flex !important;
    height: 26px !important;
    justify-content: center !important;
    line-height: 1 !important;
    transition: color 150ms ease, transform 150ms ease !important;
    width: 26px !important;
}

.wpva-icon-button:hover {
    color: var(--wpva-primary) !important;
}

.wpva-reset {
    font-family: Arial, Helvetica, sans-serif !important;
    font-size: 22px !important;
    margin-top: -5px !important;
}

.wpva-reset:hover {
    transform: rotate(-25deg) !important;
}

.wpva-close {
    font-family: Arial, Helvetica, sans-serif !important;
    font-size: 30px !important;
    font-weight: 200 !important;
}

.wpva-messages {
    display: flex !important;
    flex: 1 1 auto !important;
    flex-direction: column !important;
    gap: 25px !important;
    min-height: 0 !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    overscroll-behavior: contain !important;
    padding: 0 25px 34px 15px !important;
    scrollbar-color: rgba(64, 89, 103, 0.25) transparent !important;
    scrollbar-width: thin !important;
}

.wpva-message {
    align-items: flex-start !important;
    display: flex !important;
    flex: 0 0 auto !important;
    gap: 10px !important;
    margin: 0 !important;
    max-width: 100% !important;
}

.wpva-message > .wpva-logo {
    font-size: 17px !important;
    height: 28px !important;
    letter-spacing: -2px !important;
    margin-top: 2px !important;
    padding: 0 2px 3px 0 !important;
    width: 28px !important;
}

.wpva-message > .wpva-logo.wpva-logo--image {
    padding: 0 !important;
}

.wpva-message-content {
    display: flex !important;
    flex-direction: column !important;
    min-width: 0 !important;
}

.wpva-message-bubble {
    background: var(--wpva-bubble) !important;
    border-radius: 23px !important;
    color: var(--wpva-ink) !important;
    padding: 11px 17px 10px !important;
}

.wpva-message-text {
    color: inherit !important;
    font: inherit !important;
    font-size: 16px !important;
    line-height: 1.28 !important;
    margin: 0 !important;
    overflow-wrap: anywhere !important;
    padding: 0 !important;
}

.wpva-message-text p,
.wpva-message-text ul {
    margin: 0 0 8px !important;
    padding: 0 !important;
}

.wpva-message-text p:last-child,
.wpva-message-text ul:last-child {
    margin-bottom: 0 !important;
}

.wpva-message-text ul {
    padding-left: 1.2em !important;
}

.wpva-message-text li {
    margin: 0 0 4px !important;
}

.wpva-message-text li:last-child {
    margin-bottom: 0 !important;
}

.wpva-message-text strong {
    font-weight: 700 !important;
}

.wpva-message-text em {
    font-style: italic !important;
}

.wpva-message-time {
    color: var(--wpva-muted) !important;
    display: block !important;
    font-size: 12px !important;
    line-height: 1.2 !important;
    margin-top: 5px !important;
    padding-left: 1px !important;
}

.wpva-message--assistant .wpva-message-content {
    max-width: calc(100% - 38px) !important;
}

.wpva-message--writing .wpva-message-bubble {
    color: var(--wpva-muted) !important;
    font-style: italic !important;
}

.wpva-message--writing .wpva-message-text {
    animation: wpva-writing-pulse 1.2s ease-in-out infinite !important;
}

@keyframes wpva-writing-pulse {
    0%,
    100% {
        opacity: 0.5;
    }

    50% {
        opacity: 1;
    }
}

.wpva-message--user,
.wpva-message--action {
    align-self: flex-end !important;
    justify-content: flex-end !important;
    margin-left: 55px !important;
}

.wpva-message--user .wpva-message-content,
.wpva-message--action .wpva-message-content {
    align-items: flex-end !important;
}

.wpva-message--user .wpva-message-bubble,
.wpva-message--action .wpva-message-bubble {
    background: var(--wpva-primary) !important;
    border-radius: 24px !important;
    color: var(--wpva-user-text) !important;
    padding-left: 18px !important;
    padding-right: 18px !important;
}

.wpva-message--action .wpva-message-bubble {
    cursor: default !important;
}

.wpva-message--user .wpva-message-time,
.wpva-message--action .wpva-message-time {
    padding-left: 0 !important;
    padding-right: 1px !important;
    text-align: right !important;
}

.wpva-composer {
    align-items: center !important;
    border-top: 1px solid var(--wpva-border) !important;
    display: flex !important;
    flex: 0 0 55px !important;
    gap: 10px !important;
    margin: 0 !important;
    padding: 0 15px 0 16px !important;
}

.wpva-input {
    appearance: none !important;
    -webkit-appearance: none !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    color: var(--wpva-ink) !important;
    flex: 1 1 auto !important;
    font: inherit !important;
    font-size: 15px !important;
    height: 100% !important;
    line-height: normal !important;
    margin: 0 !important;
    min-width: 0 !important;
    outline: 0 !important;
    padding: 0 !important;
}

.wpva-input::placeholder {
    color: #b8c4cb !important;
    opacity: 1 !important;
}

.wpva-send {
    align-items: center !important;
    background: transparent !important;
    color: var(--wpva-primary) !important;
    display: flex !important;
    flex: 0 0 30px !important;
    font-family: Arial, Helvetica, sans-serif !important;
    font-size: 29px !important;
    height: 36px !important;
    justify-content: center !important;
    line-height: 1 !important;
    transform: rotate(-4deg) !important;
    transition: color 150ms ease, opacity 150ms ease, transform 150ms ease !important;
    width: 30px !important;
}

.wpva-send:hover:not(:disabled) {
    transform: rotate(-4deg) translateX(2px) !important;
}

.wpva-send:disabled {
    color: #cfd2d4 !important;
    cursor: default !important;
    opacity: 1 !important;
}

@media (max-width: 480px) {
    .wpva-launcher-label{
        font-size: 12px !important;
    }
    .wpva-launcher-icon{
        height: 30px !important;
        width: 30px !important;
    }
    .wpva-widget {
        bottom: 14px !important;
        right: 14px !important;
    }
    .wpva-launcher{
        height: 45px !important;
        gap: 6px !important;
    }
    .wpva-dialog {
        bottom: 64px !important;
        height: min(610px, calc(100vh - 100px)) !important;
        width: calc(100vw - 28px) !important;
    }

    .wpva-widget--preview-visible .wpva-dialog {
        bottom: 132px !important;
    }

    .wpva-preview {
        max-width: calc(100vw - 28px) !important;
    }
}

@media (max-width: 360px) {
    .wpva-messages {
        padding-left: 12px !important;
        padding-right: 15px !important;
    }

    .wpva-header {
        padding-right: 14px !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    .wpva-dialog,
    .wpva-launcher,
    .wpva-icon-button,
    .wpva-send,
    .wpva-preview-close {
        transition: none !important;
    }
}
