#ap-chat-launcher {
    gap: 7px;
    background: #0061c8;
    color: #fff;
    font-weight: 600;
}

#ap-chat-launcher:hover { background: #004fa6; }

.ap-chat-icon {
    position: relative;
    width: 17px;
    height: 13px;
    border: 1.5px solid currentColor;
    border-radius: 5px;
}

.ap-chat-icon::after {
    content: "";
    position: absolute;
    left: 3px;
    bottom: -4px;
    width: 5px;
    height: 5px;
    border-left: 1.5px solid currentColor;
    transform: skewY(-35deg);
}

.ap-chat-panel {
    position: fixed;
    z-index: 1000;
    right: max(16px, env(safe-area-inset-right));
    bottom: max(16px, env(safe-area-inset-bottom));
    display: flex;
    flex-direction: column;
    width: min(400px, calc(100% - 32px));
    height: min(600px, calc(100vh - 32px));
    height: min(600px, calc(100dvh - 32px));
    overflow: hidden;
    border: 1px solid #d2d7de;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 12px 48px rgba(13, 34, 58, 0.22);
}

.ap-chat-panel[hidden] { display: none; }

.ap-chat-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 7px 14px 7px 18px;
    border-bottom: 1px solid #e0e5eb;
    color: #1d1d1f;
}

.ap-chat-bar strong { margin-right: auto; }

.ap-chat-bar a,
.ap-chat-bar button {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    font: inherit;
    font-size: 14px;
    color: #0058ac;
}

.ap-chat-bar button {
    padding: 0 10px;
    border: 0;
    border-radius: 8px;
    background: #f0f3f6;
    cursor: pointer;
}

.ap-chat-panel iframe {
    flex: 1;
    width: 100%;
    min-height: 0;
    border: 0;
}

@media (max-width: 540px) {
    .ap-chat-panel {
        inset: max(8px, env(safe-area-inset-top)) max(8px, env(safe-area-inset-right))
               max(8px, env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left));
        width: auto;
        height: auto;
    }
}
