.cw-launcher {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 90;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    height: 56px;
    padding: 0 22px 0 18px;
    background: var(--green, #4cb140);
    color: #fff;
    border-radius: 999px;
    font-weight: 600;
    font-size: 15px;
    box-shadow: 0 10px 30px -8px rgba(76, 177, 64, 0.6), 0 4px 12px rgba(0, 0, 0, 0.12);
    cursor: pointer;
    transition: transform 0.15s ease, background 0.15s ease;
    border: 0;
}

.cw-launcher:hover {
    transform: translateY(-2px);
    background: var(--green-dark, #3d9433);
}

.cw-launcher svg {
    width: 22px;
    height: 22px;
}

.cw-launcher.is-hidden {
    display: none;
}

@media (max-width: 480px) {
    .cw-launcher {
        right: 16px;
        bottom: 16px;
    }
}

.cw-panel {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 95;
    width: 380px;
    max-width: calc(100vw - 32px);
    height: 560px;
    max-height: calc(100vh - 48px);
    background: #fff;
    border-radius: 22px;
    box-shadow: 0 24px 60px -12px rgba(20, 18, 14, 0.35);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    transform: translateY(16px) scale(0.98);
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    font-family: 'Inter', system-ui, sans-serif;
}

.cw-panel.is-open {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

@media (max-width: 480px) {
    .cw-panel {
        right: 0;
        bottom: 0;
        width: 100vw;
        height: 100dvh;
        max-height: 100dvh;
        border-radius: 0;
    }
}

.cw-head {
    background: linear-gradient(135deg, #2f7a26 0%, #4cb140 100%);
    color: #fff;
    padding: 18px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.cw-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
    display: grid;
    place-items: center;
    flex-shrink: 0;
}

.cw-avatar svg {
    width: 24px;
    height: 24px;
    color: #fff;
}

.cw-head-info {
    flex: 1;
    min-width: 0;
}

.cw-head-info strong {
    display: block;
    font-size: 15px;
    font-weight: 700;
}

.cw-head-info span {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
}

.cw-close {
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    transition: background 0.15s ease;
    flex-shrink: 0;
}

.cw-close:hover {
    background: rgba(255, 255, 255, 0.18);
}

.cw-close svg {
    width: 18px;
    height: 18px;
}

.cw-body {
    flex: 1;
    overflow-y: auto;
    padding: 18px;
    background: #f7f4ee;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cw-intro {
    text-align: center;
    color: #8a8278;
    font-size: 13px;
    padding: 12px 16px;
    background: #fff;
    border-radius: 14px;
    line-height: 1.5;
}

.cw-msg {
    max-width: 80%;
    padding: 10px 14px;
    border-radius: 16px;
    font-size: 14px;
    line-height: 1.45;
    word-wrap: break-word;
    white-space: pre-wrap;
}

.cw-msg-user {
    align-self: flex-end;
    background: var(--green, #4cb140);
    color: #fff;
    border-bottom-right-radius: 4px;
}

.cw-msg-operator {
    align-self: flex-start;
    background: #fff;
    color: #2a2723;
    border-bottom-left-radius: 4px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.cw-msg-system {
    align-self: center;
    background: transparent;
    color: #8a8278;
    font-size: 12px;
    max-width: 100%;
    text-align: center;
}

.cw-msg-time {
    display: block;
    font-size: 10px;
    opacity: 0.65;
    margin-top: 3px;
}

.cw-foot {
    padding: 14px;
    background: #fff;
    border-top: 1px solid #efe6d2;
}

.cw-phone-row {
    margin-bottom: 10px;
}

.cw-phone-row input {
    width: 100%;
    height: 42px;
    padding: 0 14px;
    border: 1px solid #e7dcc6;
    border-radius: 12px;
    font-size: 14px;
}

.cw-phone-row input:focus {
    outline: none;
    border-color: var(--green, #4cb140);
}

.cw-input-row {
    display: flex;
    gap: 8px;
    align-items: flex-end;
}

.cw-input-row textarea {
    flex: 1;
    resize: none;
    border: 1px solid #e7dcc6;
    border-radius: 12px;
    padding: 11px 14px;
    font-size: 14px;
    font-family: inherit;
    max-height: 100px;
    min-height: 44px;
    line-height: 1.4;
}

.cw-input-row textarea:focus {
    outline: none;
    border-color: var(--green, #4cb140);
}

.cw-send {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--green, #4cb140);
    color: #fff;
    display: grid;
    place-items: center;
    flex-shrink: 0;
    transition: background 0.15s ease;
}

.cw-send:hover {
    background: var(--green-dark, #3d9433);
}

.cw-send:disabled {
    opacity: 0.5;
    cursor: default;
}

.cw-send svg {
    width: 20px;
    height: 20px;
}

.cw-honeypot {
    position: absolute;
    left: -9999px;
    opacity: 0;
    height: 1px;
    width: 1px;
}
