.pwsa-root,
.pwsa-root * {
    box-sizing: border-box;
}

.pwsa-root {
    --pwsa-bg: #07111f;
    --pwsa-panel: #0c1829;
    --pwsa-panel-2: #111f33;
    --pwsa-line: rgba(151, 190, 225, 0.16);
    --pwsa-text: #f4f8fb;
    --pwsa-muted: #9eb2c7;
    color: var(--pwsa-text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 14px;
    line-height: 1.45;
    pointer-events: none;
}

.pwsa-root button,
.pwsa-root textarea {
    font: inherit;
}

.pwsa-launcher {
    align-items: center;
    background: linear-gradient(135deg, var(--pwsa-button), var(--pwsa-accent));
    border: 1px solid rgba(255, 255, 255, 0.26);
    border-radius: 999px;
    bottom: 22px;
    box-shadow: 0 16px 38px rgba(1, 8, 18, 0.42), 0 0 0 5px rgba(43, 198, 233, 0.08);
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    gap: 10px;
    min-height: 58px;
    padding: 9px 18px 9px 10px;
    pointer-events: auto;
    position: fixed;
    right: 22px;
    transition: transform 180ms ease, box-shadow 180ms ease;
    z-index: 100101;
}

.pwsa-root--left .pwsa-launcher {
    left: 22px;
    right: auto;
}

.pwsa-launcher:hover,
.pwsa-launcher:focus-visible {
    box-shadow: 0 20px 44px rgba(1, 8, 18, 0.5), 0 0 0 7px rgba(43, 198, 233, 0.12);
    transform: translateY(-2px);
}

.pwsa-launcher:focus-visible,
.pwsa-chat button:focus-visible,
.pwsa-chat a:focus-visible,
.pwsa-chat textarea:focus-visible {
    outline: 3px solid rgba(43, 198, 233, 0.5);
    outline-offset: 2px;
}

.pwsa-launcher__orb {
    align-items: center;
    background: rgba(3, 12, 23, 0.38);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 50%;
    display: inline-flex;
    height: 38px;
    justify-content: center;
    width: 38px;
}

.pwsa-launcher__orb svg {
    fill: none;
    height: 22px;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
    width: 22px;
}

.pwsa-launcher__label {
    font-size: 13px;
    font-weight: 750;
    letter-spacing: 0.01em;
    white-space: nowrap;
}

.pwsa-launcher__ping {
    background: #57e2b1;
    border: 2px solid var(--pwsa-button);
    border-radius: 50%;
    height: 10px;
    position: absolute;
    right: 7px;
    top: 5px;
    width: 10px;
}

.pwsa-chat {
    background: var(--pwsa-bg);
    border: 1px solid rgba(154, 205, 237, 0.22);
    border-radius: 14px;
    bottom: 92px;
    box-shadow: 0 28px 90px rgba(0, 0, 0, 0.48), 0 0 0 1px rgba(10, 26, 45, 0.75);
    display: flex;
    flex-direction: column;
    height: min(680px, calc(100vh - 130px));
    max-height: calc(100vh - 40px);
    opacity: 0;
    overflow: hidden;
    pointer-events: none;
    position: fixed;
    right: 22px;
    transform: translateY(14px) scale(0.985);
    transform-origin: bottom right;
    transition: opacity 180ms ease, transform 220ms ease, visibility 220ms ease;
    visibility: hidden;
    width: min(420px, calc(100vw - 36px));
    z-index: 100100;
}

.pwsa-root--left .pwsa-chat {
    left: 22px;
    right: auto;
    transform-origin: bottom left;
}

.pwsa-root.is-open .pwsa-chat {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
    visibility: visible;
}

.pwsa-root.is-open .pwsa-launcher {
    transform: translateY(-2px);
}

.pwsa-backdrop {
    background: rgba(2, 9, 18, 0.62);
    inset: 0;
    pointer-events: auto;
    position: fixed;
    z-index: 100099;
}

.pwsa-chat__header {
    align-items: center;
    background:
        radial-gradient(circle at 85% 0%, rgba(43, 198, 233, 0.16), transparent 42%),
        linear-gradient(135deg, #0c1c31, #0b1424);
    border-bottom: 1px solid var(--pwsa-line);
    display: flex;
    justify-content: space-between;
    min-height: 78px;
    padding: 15px 16px;
}

.pwsa-chat__identity {
    align-items: center;
    display: flex;
    gap: 11px;
    min-width: 0;
}

.pwsa-chat__avatar,
.pwsa-message__avatar {
    align-items: center;
    background: linear-gradient(145deg, var(--pwsa-button), var(--pwsa-accent));
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 12px;
    color: #fff;
    display: inline-flex;
    flex: 0 0 auto;
    font-size: 11px;
    font-weight: 850;
    height: 38px;
    justify-content: center;
    letter-spacing: 0.04em;
    width: 38px;
}

.pwsa-chat__identity strong {
    display: block;
    font-size: 14px;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pwsa-chat__identity small {
    align-items: center;
    color: #94acc4;
    display: flex;
    font-size: 11px;
    gap: 6px;
    margin-top: 5px;
}

.pwsa-chat__identity small i {
    background: #5de2b2;
    border-radius: 50%;
    display: inline-block;
    height: 6px;
    width: 6px;
}

.pwsa-chat__close {
    align-items: center;
    background: transparent;
    border: 0;
    border-radius: 7px;
    color: #abc0d4;
    cursor: pointer;
    display: inline-flex;
    font-size: 27px;
    height: 34px;
    justify-content: center;
    line-height: 1;
    width: 34px;
}

.pwsa-chat__close:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.pwsa-chat__body {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

.pwsa-messages {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 13px;
    min-height: 150px;
    overflow-y: auto;
    padding: 19px 16px 10px;
    scrollbar-color: rgba(127, 174, 210, 0.35) transparent;
    scrollbar-width: thin;
}

.pwsa-message {
    align-items: flex-end;
    display: flex;
    gap: 8px;
    max-width: 92%;
}

.pwsa-message--user {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.pwsa-message__avatar {
    border-radius: 8px;
    font-size: 8px;
    height: 24px;
    width: 24px;
}

.pwsa-message--user .pwsa-message__avatar {
    display: none;
}

.pwsa-message__bubble {
    background: var(--pwsa-panel-2);
    border: 1px solid var(--pwsa-line);
    border-radius: 4px 13px 13px 13px;
    color: #e6f0f8;
    font-size: 13px;
    line-height: 1.55;
    padding: 10px 12px;
    white-space: pre-wrap;
    word-break: break-word;
}

.pwsa-message__bubble strong {
    color: #fff;
    font-weight: 800;
}

.pwsa-message__bubble .pwsa-inline-link {
    color: var(--pwsa-accent);
    overflow-wrap: anywhere;
    text-decoration: underline;
    text-decoration-color: rgba(43, 198, 233, 0.55);
    text-underline-offset: 2px;
}

.pwsa-message__bubble .pwsa-inline-link:hover {
    color: #fff;
}

.pwsa-message__actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 6px;
}

.pwsa-message__speak {
    align-items: center;
    background: rgba(43, 198, 233, 0.1);
    border: 1px solid rgba(43, 198, 233, 0.3);
    border-radius: 6px;
    color: #a8dceb;
    cursor: pointer;
    display: inline-flex;
    height: 26px;
    justify-content: center;
    padding: 0;
    width: 28px;
}

.pwsa-message__speak:hover,
.pwsa-message__speak.is-speaking {
    background: var(--pwsa-accent);
    color: #061522;
}

.pwsa-message__speak svg {
    fill: none;
    height: 14px;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
    width: 14px;
}

.pwsa-buy-picker {
    background: rgba(10, 26, 44, 0.96);
    border: 1px solid rgba(43, 198, 233, 0.28);
    border-radius: 10px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.22);
    margin: 7px 0 0 auto;
    max-width: 290px;
    padding: 10px;
    position: relative;
    width: 100%;
}

.pwsa-buy-picker__header {
    align-items: center;
    display: flex;
    gap: 8px;
    justify-content: space-between;
    margin-bottom: 7px;
}

.pwsa-buy-picker__heading {
    color: #9ec0db;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.pwsa-buy-picker__close {
    align-items: center;
    background: transparent;
    border: 0;
    border-radius: 5px;
    color: #9eb2c7;
    cursor: pointer;
    display: inline-flex;
    flex: 0 0 auto;
    font-size: 18px;
    height: 24px;
    justify-content: center;
    line-height: 1;
    padding: 0;
    width: 24px;
}

.pwsa-buy-picker__close:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.pwsa-buy-picker__select {
    align-items: center;
    background: rgba(17, 31, 51, 0.72);
    border: 1px solid var(--pwsa-line);
    border-radius: 8px;
    color: #eef8fc;
    font-size: 11px;
    min-height: 36px;
    min-width: 0;
    padding: 7px 9px;
    width: 100%;
}

.pwsa-buy-picker__select:focus {
    border-color: var(--pwsa-accent);
    outline: 0;
}

.pwsa-buy-picker__button {
    background: var(--pwsa-button);
    border: 0;
    border-radius: 7px;
    color: #fff;
    cursor: pointer;
    display: block;
    font-size: 11px;
    font-weight: 800;
    margin-top: 7px;
    min-height: 34px;
    padding: 7px 11px;
    width: 100%;
}

.pwsa-buy-picker__button:hover {
    background: var(--pwsa-accent);
    color: #061522;
}

.pwsa-portfolio-link {
    align-items: center;
    align-self: flex-start;
    background: rgba(17, 31, 51, 0.82);
    border: 1px solid rgba(43, 198, 233, 0.38);
    border-radius: 7px;
    color: var(--pwsa-accent);
    display: inline-flex;
    font-size: 11px;
    font-weight: 800;
    margin: 0 0 0 32px;
    max-width: calc(100% - 32px);
    padding: 7px 10px;
    text-decoration: none;
}

.pwsa-portfolio-link:hover {
    background: rgba(43, 198, 233, 0.14);
    color: #fff;
}

.pwsa-message--user .pwsa-message__bubble {
    background: linear-gradient(135deg, var(--pwsa-button), #176bbd);
    border-color: rgba(255, 255, 255, 0.13);
    border-radius: 13px 4px 13px 13px;
    color: #fff;
}

.pwsa-message__support-link {
    color: var(--pwsa-accent);
    display: inline-block;
    font-size: 12px;
    font-weight: 750;
    margin-top: 6px;
    text-decoration: none;
}

.pwsa-message__support-link:hover {
    color: #fff;
    text-decoration: underline;
}

.pwsa-message--typing .pwsa-message__bubble {
    align-items: center;
    display: flex;
    gap: 4px;
    min-height: 39px;
}

.pwsa-message--typing b {
    animation: pwsa-bounce 900ms ease-in-out infinite;
    background: #98b9d2;
    border-radius: 50%;
    display: block;
    height: 5px;
    opacity: 0.65;
    width: 5px;
}

.pwsa-message--typing b:nth-child(2) {
    animation-delay: 120ms;
}

.pwsa-message--typing b:nth-child(3) {
    animation-delay: 240ms;
}

@keyframes pwsa-bounce {
    0%, 60%, 100% { transform: translateY(0); }
    30% { transform: translateY(-3px); }
}

.pwsa-catalog {
    border-top: 1px solid var(--pwsa-line);
    padding: 0 16px;
}

.pwsa-catalog__toggle {
    align-items: center;
    color: #9ec0db;
    cursor: pointer;
    display: flex;
    font-size: 10px;
    font-weight: 800;
    justify-content: space-between;
    letter-spacing: 0.11em;
    list-style: none;
    min-height: 36px;
    text-transform: uppercase;
}

.pwsa-catalog__toggle::-webkit-details-marker {
    display: none;
}

.pwsa-catalog__toggle:hover {
    color: #e8f7fc;
}

.pwsa-catalog__toggle-icon {
    color: var(--pwsa-accent);
    font-size: 18px;
    font-weight: 400;
    letter-spacing: 0;
    line-height: 1;
    transition: transform 160ms ease;
}

.pwsa-catalog[open] .pwsa-catalog__toggle-icon {
    transform: rotate(45deg);
}

.pwsa-catalog__items {
    display: grid;
    gap: 7px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 8px;
}

.pwsa-product {
    background: rgba(17, 31, 51, 0.72);
    border: 1px solid var(--pwsa-line);
    border-radius: 9px;
    display: flex;
    flex-direction: column;
    gap: 7px;
    min-width: 0;
    padding: 9px;
}

.pwsa-product__copy {
    min-width: 0;
}

.pwsa-product__copy strong,
.pwsa-product__copy span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pwsa-product__copy strong {
    color: #f1f7fc;
    font-size: 11px;
}

.pwsa-product__copy span {
    color: var(--pwsa-accent);
    font-size: 10px;
    font-weight: 700;
    margin-top: 3px;
}

.pwsa-product__link {
    color: #b9d9eb;
    font-size: 10px;
    font-weight: 750;
    text-decoration: none;
}

.pwsa-product__link:hover {
    color: #fff;
}

.pwsa-product__link span {
    margin-left: 4px;
}

.pwsa-lead-trigger {
    align-items: center;
    align-self: flex-start;
    background: rgba(43, 198, 233, 0.08);
    border: 1px solid rgba(43, 198, 233, 0.34);
    border-radius: 999px;
    color: #c9edf6;
    cursor: pointer;
    display: inline-flex;
    font-size: 11px;
    gap: 6px;
    margin: 0 16px;
    padding: 7px 10px;
}

.pwsa-lead-trigger:hover {
    background: rgba(43, 198, 233, 0.16);
    border-color: var(--pwsa-accent);
    color: #fff;
}

.pwsa-root.pwsa-lead-open .pwsa-catalog,
.pwsa-root.pwsa-lead-open .pwsa-lead-trigger,
.pwsa-root.pwsa-lead-open .pwsa-prompts {
    display: none;
}

.pwsa-lead-form {
    background: #0a1726;
    border-top: 1px solid var(--pwsa-line);
    display: block;
    padding: 12px 16px 13px;
}

.pwsa-lead-form__heading {
    align-items: center;
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.pwsa-lead-form__heading strong {
    color: #eef8fc;
    font-size: 12px;
}

.pwsa-lead-form__heading button {
    background: transparent;
    border: 0;
    color: #9bb4c9;
    cursor: pointer;
    font-size: 21px;
    line-height: 1;
    padding: 0 2px;
}

.pwsa-lead-form__fields {
    display: grid;
    gap: 7px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.pwsa-lead-form__fields label {
    min-width: 0;
}

.pwsa-lead-form__fields span {
    color: #88a8bf;
    display: block;
    font-size: 10px;
    margin-bottom: 4px;
}

.pwsa-lead-form__fields input {
    background: #07101c;
    border: 1px solid rgba(151, 190, 225, 0.2);
    border-radius: 7px;
    color: #edf6fb;
    font-size: 11px;
    min-height: 35px;
    min-width: 0;
    padding: 7px 8px;
    width: 100%;
}

.pwsa-lead-form__fields input:focus {
    border-color: var(--pwsa-accent);
    outline: 0;
}

.pwsa-lead-form__fields input::placeholder {
    color: #637d92;
}

.pwsa-lead-form__submit {
    align-items: center;
    background: var(--pwsa-button);
    border: 0;
    border-radius: 7px;
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    font-size: 11px;
    font-weight: 750;
    gap: 7px;
    justify-content: center;
    margin-top: 10px;
    min-height: 35px;
    padding: 7px 10px;
}

.pwsa-lead-form__submit:hover {
    background: var(--pwsa-accent);
}

.pwsa-lead-form__submit:disabled {
    cursor: wait;
    opacity: 0.55;
}

.pwsa-lead-form__submit span {
    font-size: 14px;
}

.pwsa-lead-form__status {
    color: #78e5bc;
    font-size: 11px;
    line-height: 1.4;
    margin: 8px 0 0;
}

.pwsa-lead-form__status.is-error {
    color: #ffabab;
}

.pwsa-prompts {
    display: flex;
    gap: 7px;
    overflow-x: auto;
    padding: 12px 16px 13px;
    scrollbar-width: none;
}

.pwsa-prompts::-webkit-scrollbar {
    display: none;
}

.pwsa-prompts button {
    background: transparent;
    border: 1px solid rgba(86, 164, 209, 0.4);
    border-radius: 999px;
    color: #b9d9eb;
    cursor: pointer;
    flex: 0 0 auto;
    font-size: 11px;
    padding: 7px 10px;
    white-space: nowrap;
}

.pwsa-prompts button:hover {
    background: rgba(43, 198, 233, 0.1);
    border-color: var(--pwsa-accent);
    color: #fff;
}

.pwsa-chat__form {
    align-items: flex-end;
    background: #091523;
    border-top: 1px solid var(--pwsa-line);
    display: flex;
    gap: 8px;
    padding: 12px 13px 8px;
}

.pwsa-chat__form textarea {
    background: #07101c;
    border: 1px solid rgba(151, 190, 225, 0.2);
    border-radius: 10px;
    color: #edf6fb;
    line-height: 1.4;
    max-height: 100px;
    min-height: 42px;
    padding: 11px 12px;
    resize: none;
    width: 100%;
}

.pwsa-chat__form textarea::placeholder {
    color: #71869a;
}

.pwsa-chat__form textarea:focus {
    border-color: var(--pwsa-accent);
    box-shadow: 0 0 0 3px rgba(43, 198, 233, 0.1);
    outline: 0;
}

.pwsa-chat__form button {
    align-items: center;
    background: var(--pwsa-button);
    border: 0;
    border-radius: 10px;
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    flex: 0 0 auto;
    height: 42px;
    justify-content: center;
    width: 42px;
}

.pwsa-chat__form button:hover {
    background: var(--pwsa-accent);
}

.pwsa-chat__form .pwsa-chat__voice {
    background: #122a40;
    border: 1px solid rgba(143, 198, 226, 0.2);
}

.pwsa-chat__form .pwsa-chat__voice:hover {
    background: #1a4260;
}

.pwsa-root.pwsa-is-recording .pwsa-chat__form .pwsa-chat__voice {
    animation: pwsa-voice-pulse 1.3s ease-in-out infinite;
    background: #d54e68;
    border-color: rgba(255, 255, 255, 0.32);
}

.pwsa-root.pwsa-is-transcribing .pwsa-chat__form .pwsa-chat__voice {
    animation: pwsa-voice-pulse 1.1s ease-in-out infinite;
}

@keyframes pwsa-voice-pulse {
    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(213, 78, 104, 0.18);
    }
    50% {
        box-shadow: 0 0 0 5px rgba(213, 78, 104, 0.12);
    }
}

.pwsa-chat__form button:disabled {
    cursor: wait;
    opacity: 0.55;
}

.pwsa-chat__form svg {
    fill: none;
    height: 19px;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
    width: 19px;
}

.pwsa-chat__note {
    background: #091523;
    color: #6f8599;
    font-size: 10px;
    margin: 0;
    padding: 0 15px 12px;
    text-align: center;
}

.pwsa-root--desktop-only {
    display: block;
}

.screen-reader-text {
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    overflow: hidden;
    position: absolute;
    white-space: nowrap;
    width: 1px;
}

@media (max-width: 640px) {
    .pwsa-root--desktop-only .pwsa-launcher,
    .pwsa-root--desktop-only .pwsa-chat {
        display: none;
    }

    .pwsa-launcher {
        bottom: 14px;
        right: 14px;
    }

    .pwsa-root--left .pwsa-launcher {
        left: 14px;
    }

    .pwsa-chat,
    .pwsa-root--left .pwsa-chat {
        bottom: 12px;
        left: 12px;
        max-height: calc(100vh - 24px);
        right: 12px;
        transform-origin: bottom center;
        width: auto;
    }

    .pwsa-root.is-open .pwsa-launcher {
        opacity: 0;
        pointer-events: none;
        transform: scale(0.9);
    }
}

@media (max-width: 480px) {
    .pwsa-launcher__label {
        display: none;
    }

    .pwsa-launcher {
        padding: 9px;
    }

    .pwsa-catalog__items {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .pwsa-lead-form__fields {
        grid-template-columns: 1fr;
    }

    .pwsa-product:last-child {
        display: none;
    }
}

@media (max-width: 360px) {
    .pwsa-chat__header {
        min-height: 68px;
        padding: 12px;
    }

    .pwsa-messages {
        padding-left: 12px;
        padding-right: 12px;
    }

    .pwsa-catalog,
    .pwsa-prompts {
        padding-left: 12px;
        padding-right: 12px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .pwsa-launcher,
    .pwsa-chat,
    .pwsa-message--typing b {
        animation: none;
        transition: none;
    }
}
