#wteam-executor-assistant-root {
    position: fixed !important;
    inset: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    max-width: none !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    overflow: visible !important;
    pointer-events: none !important;
    z-index: 2147483647 !important;
}

#wteam-executor-assistant-root::backdrop {
    background: transparent !important;
    pointer-events: none !important;
}

#wteam-executor-assistant-root #wpex-launcher,
#wteam-executor-assistant-root #wteam-executor-visual-panel {
    pointer-events: auto !important;
}

#wpex-launcher {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 2147483647;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    min-width: 48px;
    min-height: 48px;
    margin: 0;
    padding: 0;
    border: 1px solid rgba(0, 0, 0, .14);
    border-radius: 50%;
    background: #fff;
    color: #1d2327;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(0, 0, 0, .18);
    appearance: none;
    -webkit-appearance: none;
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}

#wpex-launcher.is-left {
    right: auto;
    left: 18px;
}

#wpex-launcher:hover {
    transform: translateY(-1px);
    border-color: rgba(0, 0, 0, .28);
    box-shadow: 0 8px 24px rgba(0, 0, 0, .22);
}

#wpex-launcher:focus-visible {
    outline: 3px solid #2271b1;
    outline-offset: 3px;
}

#wpex-launcher.has-active-session::after {
    content: '';
    position: absolute;
    top: 1px;
    right: 1px;
    width: 10px;
    height: 10px;
    border: 2px solid #fff;
    border-radius: 50%;
    background: #00a32a;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .22);
    pointer-events: none;
}

#wpex-launcher.is-busy::before {
    content: '';
    position: absolute;
    inset: -5px;
    border: 2px solid rgba(34, 113, 177, .72);
    border-radius: 50%;
    pointer-events: none;
    animation: wpex-launcher-pulse 1.15s ease-out infinite;
}

#wpex-launcher.is-busy::after {
    content: '';
    position: absolute;
    top: 1px;
    right: 1px;
    width: 10px;
    height: 10px;
    border: 2px solid #fff;
    border-radius: 50%;
    background: #2271b1;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .22);
    pointer-events: none;
}

@keyframes wpex-launcher-pulse {
    0% { opacity: .9; transform: scale(.92); }
    70% { opacity: 0; transform: scale(1.16); }
    100% { opacity: 0; transform: scale(1.16); }
}

@media (prefers-reduced-motion: reduce) {
    #wpex-launcher.is-busy::before {
        animation: none;
        opacity: .8;
    }
}

.wpex-launcher-icon {
    display: block;
    width: 32px;
    height: 32px;
    background: url('../images/assistant-launcher.png') center / contain no-repeat;
    pointer-events: none;
}

#wpex-launcher[hidden],
#wteam-executor-visual-panel[hidden] {
    display: none !important;
}

#wteam-executor-visual-panel {
    position: fixed;
    right: 18px;
    bottom: 18px;
    display: flex;
    flex-direction: column;
    width: 390px;
    max-width: calc(100vw - 36px);
    max-height: calc(100vh - 70px);
    z-index: 2147483647;
    background: #fff;
    border: 1px solid #c3c4c7;
    border-radius: 8px;
    box-shadow: 0 8px 28px rgba(0, 0, 0, .18);
    color: #1d2327;
    font-size: 13px;
    line-height: 1.45;
}

#wteam-executor-visual-panel.is-left {
    right: auto;
    left: 18px;
}

.wpex-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px;
    border-bottom: 1px solid #dcdcde;
    background: #f6f7f7;
    border-radius: 8px 8px 0 0;
}

.wpex-title,
.wpex-window-actions {
    display: flex;
    align-items: center;
}

.wpex-window-actions {
    gap: 2px;
}

.wpex-header-link {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 6px;
    border-radius: 4px;
    color: #50575e;
    font-size: 11px;
    line-height: 1;
    text-decoration: none;
}

.wpex-header-link:hover,
.wpex-header-link:focus {
    background: #e2e4e7;
    color: #1d2327;
    outline: none;
    box-shadow: none;
}

.wpex-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-left: 7px;
    background: #8c8f94;
}

.wpex-dot.is-active,
.wpex-dot.is-success { background: #00a32a; }
.wpex-dot.is-busy { background: #2271b1; }
.wpex-dot.is-warning { background: #dba617; }
.wpex-dot.is-error { background: #d63638; }

.wpex-icon-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 28px;
    border: 0;
    border-radius: 4px;
    background: transparent;
    color: #3c434a;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
}

.wpex-icon-button:hover,
.wpex-icon-button:focus {
    background: #e2e4e7;
    color: #1d2327;
    outline: none;
}

.wpex-close-button:hover,
.wpex-close-button:focus {
    background: #d63638;
    color: #fff;
}

.wpex-body {
    flex: 1 1 auto;
    min-height: 0;
    padding: 12px;
    overflow: auto;
}

.wpex-context {
    margin-bottom: 10px;
    padding: 7px 8px;
    background: #f0f6fc;
    border-radius: 4px;
    color: #3c434a;
    font-size: 11px;
}

.wpex-label {
    display: block;
    font-weight: 600;
    margin: 8px 0 4px;
}

.wpex-select {
    box-sizing: border-box;
    width: 100%;
}

.wpex-status {
    padding: 7px 8px;
    background: #f6f7f7;
    border-left: 3px solid #8c8f94;
    margin-top: 8px;
    font-size: 12px;
    position: relative;
    isolation: isolate;
    overflow: hidden;
    min-height: 18px;
    transition: border-color .2s ease, background .2s ease;
}

.wpex-chat {
    min-height: 110px;
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #dcdcde;
    border-radius: 4px;
    padding: 8px;
    margin-top: 10px;
    background: #fbfbfc;
}

.wpex-chat:empty::before {
    content: attr(data-empty-text);
    display: block;
    color: #646970;
    font-size: 12px;
}

.wpex-message {
    padding: 7px 8px;
    border-radius: 5px;
    margin-bottom: 7px;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.wpex-message:last-child { margin-bottom: 0; }
.wpex-message.is-user { background: #eaf3fa; }
.wpex-message.is-assistant { background: #fff; border: 1px solid #e2e4e7; }

.wpex-role {
    font-size: 10px;
    text-transform: uppercase;
    font-weight: 700;
    color: #646970;
    margin-bottom: 2px;
}

.wpex-sources {
    margin-top: 8px;
    font-size: 11px;
}

.wpex-sources ul {
    margin: 4px 0 0 18px;
}

.wpex-composer {
    margin-top: 10px;
}

.wpex-prompt-wrap {
    position: relative;
}

#wpex-prompt {
    width: 100%;
    min-height: 68px;
    resize: vertical;
    box-sizing: border-box;
    padding-right: 42px;
}

.wpex-microphone {
    position: absolute;
    right: 7px;
    bottom: 7px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    padding: 0;
    border: 1px solid #8c8f94;
    border-radius: 50%;
    background: #fff;
    color: #2c3338;
    cursor: pointer;
    font-size: 15px;
    line-height: 1;
    z-index: 2;
}

.wpex-microphone-icon {
    display: block;
    pointer-events: none;
}

.wpex-microphone:hover,
.wpex-microphone:focus {
    border-color: #2271b1;
    color: #2271b1;
    outline: none;
    box-shadow: 0 0 0 1px #2271b1;
}

.wpex-microphone.is-listening {
    border-color: #d63638;
    color: #d63638;
    box-shadow: 0 0 0 2px rgba(214, 54, 56, .16);
    animation: wpex-microphone-pulse 1.2s ease-in-out infinite;
}

.wpex-microphone:disabled {
    cursor: default;
    opacity: .55;
}

@keyframes wpex-microphone-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.08); }
}

@media (prefers-reduced-motion: reduce) {
    .wpex-microphone.is-listening {
        animation: none;
    }
}

.wpex-composer-actions {
    display: flex;
    justify-content: flex-end;
    gap: 6px;
    margin-top: 6px;
}

.wpex-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-top: 9px;
    font-size: 10px;
    color: #646970;
}

.wpex-target {
    position: relative !important;
    outline: 4px solid #d63638 !important;
    outline-offset: 3px !important;
    box-shadow: 0 0 0 7px rgba(214, 54, 56, .18) !important;
    z-index: 99998 !important;
}

@media screen and (max-width: 600px) {
    #wpex-launcher,
    #wteam-executor-visual-panel {
        right: 8px;
        bottom: 8px;
    }

    #wpex-launcher.is-left,
    #wteam-executor-visual-panel.is-left {
        right: auto;
        left: 8px;
    }

    #wteam-executor-visual-panel {
        max-width: calc(100vw - 16px);
    }

    .wpex-footer {
        flex-wrap: wrap;
    }

    .wpex-footer > span {
        min-width: 0;
        max-width: 100%;
        overflow-wrap: anywhere;
    }
}

.wpex-option {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    margin: 10px 0 4px;
    padding: 9px 10px;
    border: 1px solid #dcdcde;
    border-radius: 6px;
    background: #fbfbfc;
    cursor: pointer;
}

.wpex-option-copy {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}

.wpex-option-copy strong {
    font-size: 12px;
    line-height: 1.35;
}

.wpex-option-copy small {
    color: #646970;
    font-size: 10px;
    line-height: 1.35;
}

.wpex-switch {
    position: relative;
    flex: 0 0 auto;
    width: 34px;
    height: 18px;
    margin-top: 1px;
}

.wpex-switch input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
}

.wpex-switch-track {
    position: absolute;
    inset: 0;
    border-radius: 999px;
    background: #a7aaad;
    transition: background .18s ease, box-shadow .18s ease;
}

.wpex-switch-track::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .22);
    transition: transform .18s ease;
}

.wpex-switch input:checked + .wpex-switch-track {
    background: #6d5dfc;
}

.wpex-switch input:checked + .wpex-switch-track::after {
    transform: translateX(16px);
}

.wpex-switch input:focus-visible + .wpex-switch-track {
    box-shadow: 0 0 0 2px #fff, 0 0 0 4px #2271b1;
}

.wpex-switch input:disabled + .wpex-switch-track {
    opacity: .65;
    cursor: default;
}


.wpex-status.is-active {
    border-left-color: #2271b1;
}

.wpex-status.is-success {
    border-left-color: #00a32a;
}

.wpex-status.is-warning {
    border-left-color: #dba617;
}

.wpex-status.is-error {
    border-left-color: #d63638;
}

.wpex-status.is-thinking {
    border-left-color: #725cff;
    background: linear-gradient(100deg, #f6f2ff 0%, #eef6ff 52%, #f8f3ff 100%);
    color: #27233a;
}

.wpex-status.is-thinking::before,
.wpex-status.is-thinking::after {
    content: "";
    position: absolute;
    z-index: -1;
    pointer-events: none;
    border-radius: 999px;
    filter: blur(12px);
    opacity: .72;
}

.wpex-status.is-thinking::before {
    width: 72%;
    height: 210%;
    left: -18%;
    top: -58%;
    background:
        radial-gradient(circle at 35% 48%, rgba(112, 76, 255, .55) 0 17%, rgba(112, 76, 255, .18) 36%, transparent 64%),
        radial-gradient(circle at 72% 54%, rgba(52, 151, 255, .45) 0 18%, rgba(52, 151, 255, .14) 38%, transparent 68%);
    animation: wpex-cloud-wave-a 5.8s ease-in-out infinite alternate;
}

.wpex-status.is-thinking::after {
    width: 68%;
    height: 190%;
    right: -20%;
    top: -44%;
    background:
        radial-gradient(circle at 40% 48%, rgba(44, 126, 255, .50) 0 19%, rgba(44, 126, 255, .14) 40%, transparent 68%),
        radial-gradient(circle at 72% 50%, rgba(149, 78, 255, .44) 0 18%, rgba(149, 78, 255, .12) 42%, transparent 70%);
    animation: wpex-cloud-wave-b 6.6s ease-in-out infinite alternate;
}

.wpex-dot.is-thinking {
    background: #725cff;
    box-shadow: 0 0 0 0 rgba(114, 92, 255, .35);
    animation: wpex-thinking-dot 1.9s ease-out infinite;
}

@keyframes wpex-cloud-wave-a {
    0% { transform: translate3d(-4%, 1%, 0) scale(.92); }
    50% { transform: translate3d(34%, -4%, 0) scale(1.12); }
    100% { transform: translate3d(78%, 3%, 0) scale(.98); }
}

@keyframes wpex-cloud-wave-b {
    0% { transform: translate3d(8%, -3%, 0) scale(1.02); }
    50% { transform: translate3d(-30%, 5%, 0) scale(1.14); }
    100% { transform: translate3d(-72%, -1%, 0) scale(.96); }
}

@keyframes wpex-thinking-dot {
    0% { box-shadow: 0 0 0 0 rgba(114, 92, 255, .34); }
    70% { box-shadow: 0 0 0 6px rgba(114, 92, 255, 0); }
    100% { box-shadow: 0 0 0 0 rgba(114, 92, 255, 0); }
}

@media (prefers-reduced-motion: reduce) {
    .wpex-status.is-thinking::before,
    .wpex-status.is-thinking::after,
    .wpex-dot.is-thinking {
        animation: none !important;
    }
}

.wpex-continuation {
    display: flex;
    gap: 8px;
    align-items: center;
    margin: 4px 0 8px;
}

.wpex-continuation .button {
    min-width: 92px;
    text-align: center;
}

.wpex-microphone[hidden] {
    display: none;
}

#wteam-executor-visual-panel select,
#wteam-executor-visual-panel textarea,
#wteam-executor-visual-panel input[type="text"],
#wteam-executor-visual-panel input[type="search"],
#wteam-executor-visual-panel input[type="number"] {
    box-sizing: border-box;
    border: 1px solid #8c8f94;
    border-radius: 4px;
    background: #fff;
    color: #2c3338;
    font: inherit;
    line-height: 1.5;
    box-shadow: 0 0 0 transparent;
}

#wteam-executor-visual-panel select {
    min-height: 38px;
    padding: 0 30px 0 10px;
}

#wteam-executor-visual-panel textarea,
#wteam-executor-visual-panel input[type="text"],
#wteam-executor-visual-panel input[type="search"],
#wteam-executor-visual-panel input[type="number"] {
    padding: 8px 10px;
}

#wteam-executor-visual-panel select:focus,
#wteam-executor-visual-panel textarea:focus,
#wteam-executor-visual-panel input[type="text"]:focus,
#wteam-executor-visual-panel input[type="search"]:focus,
#wteam-executor-visual-panel input[type="number"]:focus {
    border-color: #2271b1;
    outline: 1px solid #2271b1;
    box-shadow: 0 0 0 1px #2271b1;
}

#wteam-executor-visual-panel .button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    margin: 0;
    padding: 0 12px;
    border: 1px solid #2271b1;
    border-radius: 3px;
    background: #f6f7f7;
    color: #2271b1;
    font: inherit;
    font-weight: 400;
    line-height: 2.15;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    box-shadow: none;
    appearance: none;
    -webkit-appearance: none;
}

#wteam-executor-visual-panel .button:hover,
#wteam-executor-visual-panel .button:focus {
    border-color: #135e96;
    background: #f0f0f1;
    color: #135e96;
    outline: none;
    box-shadow: 0 0 0 1px #135e96;
}

#wteam-executor-visual-panel .button.button-primary {
    border-color: #2271b1;
    background: #2271b1;
    color: #fff;
}

#wteam-executor-visual-panel .button.button-primary:hover,
#wteam-executor-visual-panel .button.button-primary:focus {
    border-color: #135e96;
    background: #135e96;
    color: #fff;
}

#wteam-executor-visual-panel .button:disabled,
#wteam-executor-visual-panel .button.disabled {
    border-color: #dcdcde;
    background: #f6f7f7;
    color: #a7aaad;
    cursor: default;
    box-shadow: none;
    opacity: 1;
}
