.wpaimp-camera-chat {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 99999;
    font-family: inherit;
}

.wpaimp-camera-chat button,
.wpaimp-camera-chat textarea {
    font: inherit;
}

.wpaimp-camera-chat__toggle {
    min-height: 46px;
    padding: 10px 18px;
    border: 0;
    border-radius: 24px;
    background: #1769aa;
    color: #fff;
    box-shadow: 0 4px 16px rgba(0, 0, 0, .2);
    cursor: pointer;
    font-weight: 600 !important;
}

.wpaimp-camera-chat__panel {
    position: absolute;
    right: 0;
    bottom: 58px;
    display: flex;
    flex-direction: column;
    width: min(360px, calc(100vw - 32px));
    height: min(520px, calc(100vh - 110px));
    overflow: hidden;
    border: 1px solid #dcdcde;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 8px 32px rgba(0, 0, 0, .2);
    color: #1d2327;
}

.wpaimp-camera-chat__panel[hidden] {
    display: none;
}

.wpaimp-camera-chat__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: #1769aa;
    color: #fff;
}

.wpaimp-camera-chat__header strong,
.wpaimp-camera-chat__header span {
    display: block;
}

.wpaimp-camera-chat__header span {
    margin-top: 3px;
    font-size: 12px;
    opacity: .9;
}

.wpaimp-camera-chat__close {
    border: 0;
    background: transparent;
    color: #fff;
    cursor: pointer;
    font-size: 26px !important;
    line-height: 1;
}

.wpaimp-camera-chat__messages {
    flex: 1;
    overflow-y: auto;
    padding: 14px;
    scroll-behavior: smooth;
}

.wpaimp-camera-chat__message {
    max-width: 90%;
    margin: 0 0 10px;
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 14px;
    line-height: 1.5;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.wpaimp-camera-chat__message--assistant:first-child {
    max-width: 100%;
}

.wpaimp-camera-chat__message--assistant {
    margin-right: auto;
    background: #f0f0f1;
}

.wpaimp-camera-chat__message--user {
    margin-left: auto;
    background: #e7f2fa;
}

.wpaimp-camera-chat__disclosure {
    max-height: 220px;
    overflow-y: auto;
    margin: 0;
    padding: 12px 14px;
    background: #f6f7f7;
    color: #1d2327;
    font-size: 13px;
    line-height: 1.55;
}

.wpaimp-camera-chat__form {
    display: flex;
    gap: 8px;
    padding: 10px;
    border-top: 1px solid #dcdcde;
}

.wpaimp-camera-chat__form textarea {
    flex: 1;
    min-width: 0;
    min-height: 42px;
    max-height: 100px;
    resize: vertical;
}

.wpaimp-camera-chat__form button {
    align-self: flex-end;
    min-height: 40px;
    padding: 7px 11px;
    border: 0;
    border-radius: 5px;
    background: #1769aa;
    color: #fff;
    cursor: pointer;
}

.wpaimp-camera-chat__form.is-loading button {
    cursor: wait;
    opacity: .65;
}

.wpaimp-camera-chat__website {
    position: absolute;
    left: -9999px;
}

.wpaimp-camera-chat__status {
    min-height: 0;
    margin: 0;
    padding: 0 10px 5px;
    color: #50575e;
    font-size: 12px;
}

@media (max-width: 480px) {
    .wpaimp-camera-chat {
        right: 12px;
        bottom: 12px;
    }
}
