
.wcs-root {
    position: fixed;
    right: 15px;
    bottom: 15px;
    z-index: 99999;
    font-family: inherit;
   font-size: 16px;
   line-height: 1.4;
   
}

.wcs-root * {
    box-sizing: border-box;
}

.wcs-toggle {
    width: 56px !important;
    height: 56px!important;
    border: 0!important;
    border-radius: 50%!important;
    background: var(--wcs-accent)!important;
    color: #fff!important;
    cursor: pointer!important;
    display: flex!important;
    align-items: center!important;
    justify-content: center!important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .25)!important;
    padding: 0!important;
	margin-bottom: 250px;
}

.wcs-toggle:hover {
    filter: brightness(1.1);
}

.wcs-toggle:focus-visible,
.wcs-close:focus-visible,
.wcs-send:focus-visible,
.wcs-accept:focus-visible,
.wcs-input:focus-visible {
    outline: 2px solid #6ba02e;
    outline-offset: 2px;
}
span.wcs-title {
    font-size: 20px;
    font-style: italic;
    letter-spacing: 0.03em;
}
.wcs-panel {
    position: absolute;
    right: 0;
    bottom: 70px;
    width: 460px;
    max-width: calc(100vw - 32px);
    height: min(520px, calc(100vh - 110px));
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, .28);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.wcs-panel[hidden],
.wcs-consent[hidden],
.wcs-log[hidden],
.wcs-form[hidden] {
    display: none;
}

.wcs-head {
    background: var(--wcs-accent);
    color: #fff;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-style: italic;
    letter-spacing: 0.02em;
}

.wcs-close {
    background: none;
    border: 0 !important;
    color: #fff !important;
    font-size: 26px !important;
    line-height: 1 !important;
    cursor: pointer !important;
    padding: 0 4px !important;
}

.wcs-log {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: #f3f4f6;
}

.wcs-msg {
    max-width: 88%;
    padding: 9px 12px;
    border-radius: 12px;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.wcs-bot {
    background: #fff;
    align-self: flex-start;
    border: 1px solid #e5e7eb;
}

.wcs-user {
    background: var(--wcs-accent);
    color: #fff;
    align-self: flex-end;
}

.wcs-wait {
    color: #6b7280;
    font-style: italic;
}

.wcs-err {
    background: #fef2f2;
    border-color: #fecaca;
    color: #991b1b;
}

.wcs-msg a {
    color: inherit;
    text-decoration: underline;
}

.wcs-consent {
    padding: 16px;
    overflow-y: auto;
    flex: 1;
    background: #fff;
    font-size: 14px;
}

.wcs-consent p {
    margin: 0 0 12px;
}

.wcs-accept {
    background: var(--wcs-accent);
    color: #fff !important;
    border: 0 !important;
    border-radius: 8px !important;
    padding: 10px 14px !important;
    cursor: pointer !important;
    font: inherit !important;
    font-size: 15px !important;
}

.wcs-form {
    display: flex;
    gap: 8px;
    padding: 10px;
    border-top: 1px solid #e5e7eb;
    background: #fff;
    align-items: flex-end;
}

.wcs-input {
    flex: 1;
    resize: none;
    border: 1px solid #9ca3af;
    border-radius: 8px;
    padding: 8px 10px;
    font: inherit;
    max-height: 96px;
    min-height: 38px;
    color: #111827;
    background: #fff;
}

.wcs-send {
    background: var(--wcs-accent);
    color: #fff !important;
    border: 0 !important;
    border-radius: 8px !important;
    padding: 9px 14px !important;
    cursor: pointer !important;
    font: inherit !important;
    font-weight: 400;
}

.wcs-send:disabled {
    opacity: .55;
    cursor: not-allowed;
}

@media (max-width: 480px) {
    .wcs-panel {
        position: fixed;
        inset: 0;
        width: auto;
        max-width: none;
        height: auto;
        border-radius: 0;
    }

    .wcs-root {
        right: 12px;
        bottom: 12px;
    }
}

@media (prefers-reduced-motion: no-preference) {
    .wcs-panel {
        animation: wcsIn .15s ease-out;
    }

    @keyframes wcsIn {
        from {
            opacity: 0;
            transform: translateY(8px);
        }

        to {
            opacity: 1;
            transform: none;
        }
    }
}

@media (max-width: 480px) {
    .wcs-toggle[aria-expanded="true"] {
        display: none;
    }
}
