/* Asad Webs website chat — launcher and panel both follow the main-site theme (app.css brand green #02a96c, hover #087a52); panel themed 2026-10-22 on owner order. Launcher corners 5px (owner, 2026-10-22); panel radius unchanged. */
#aw-chat {
    --awc-accent: #02a96c;
    --awc-accent-hover: #087a52;
    --awc-bg: #ffffff;
    --awc-surface: #fbfaf7;
    --awc-border: #ddd9ce;
    --awc-text: #131318;
    --awc-muted: #51515b;
    --awc-admin-bubble: #e7f6ef;
    font-family: inherit;
}
html[data-theme="dark"] #aw-chat {
    --awc-bg: #17181d;
    --awc-surface: #1e2026;
    --awc-border: #34363f;
    --awc-text: #f2f2f4;
    --awc-muted: #a7a7b3;
    --awc-admin-bubble: #173a2c;
}
@media (prefers-color-scheme: dark) {
    html:not([data-theme="light"]) #aw-chat {
        --awc-bg: #17181d;
        --awc-surface: #1e2026;
        --awc-border: #34363f;
        --awc-text: #f2f2f4;
        --awc-muted: #a7a7b3;
        --awc-admin-bubble: #173a2c;
    }
}
.awc-launcher {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 9990;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 16px;
    background: #02a96c;
    color: #fff;
    border: 1px solid #02a96c;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(15, 15, 30, .18);
}
.awc-launcher:hover { background: #087a52; border-color: #087a52; }
.awc-panel {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 9991;
    width: 360px;
    max-width: calc(100vw - 24px);
    height: 540px;
    max-height: calc(100vh - 36px);
    display: flex;
    flex-direction: column;
    background: var(--awc-bg);
    color: var(--awc-text);
    border: 1px solid var(--awc-border);
    border-radius: 2px;
    box-shadow: 0 14px 40px rgba(15, 15, 30, .22);
    overflow: hidden;
}
.awc-panel[hidden] { display: none !important; }
.awc-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
    padding: 13px 14px;
    background: var(--awc-accent);
    color: #fff;
}
.awc-head strong { display: block; font-size: 15px; }
.awc-head span { display: block; font-size: 12px; opacity: .88; margin-top: 2px; line-height: 1.35; }
.awc-close {
    background: transparent;
    border: 0;
    color: #fff;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    padding: 0 2px;
}
.awc-pre {
    padding: 14px;
    overflow-y: auto;
    display: grid;
    gap: 10px;
    align-content: start;
}
.awc-note { margin: 0; font-size: 13px; color: var(--awc-muted); line-height: 1.45; }
.awc-pre label { display: grid; gap: 5px; font-size: 13px; font-weight: 600; }
.awc-pre input, .awc-pre select, .awc-pre textarea, .awc-composer textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 9px 10px;
    border: 1px solid var(--awc-border);
    border-radius: 2px;
    background: var(--awc-surface);
    color: var(--awc-text);
    font: inherit;
    font-size: 14px;
    font-weight: 400;
}
.awc-hp { position: absolute; left: -9999px; top: -9999px; height: 1px; width: 1px; overflow: hidden; }
.awc-error { margin: 0; font-size: 13px; color: #b91c1c; line-height: 1.45; }
.awc-send {
    padding: 10px 14px;
    background: var(--awc-accent);
    color: #fff;
    border: 1px solid var(--awc-accent);
    border-radius: 2px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    justify-self: start;
}
.awc-send:hover { background: var(--awc-accent-hover); border-color: var(--awc-accent-hover); }
.awc-send[disabled] { opacity: .6; cursor: wait; }
.awc-chat { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.awc-chat[hidden] { display: none !important; }
.awc-pre[hidden] { display: none !important; }
.awc-messages {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: var(--awc-surface);
}
.awc-msg {
    max-width: 82%;
    padding: 8px 11px;
    border: 1px solid var(--awc-border);
    border-radius: 2px;
    background: var(--awc-bg);
    font-size: 14px;
    line-height: 1.45;
    white-space: pre-wrap;
    word-break: break-word;
    align-self: flex-start;
}
.awc-msg small { display: block; margin-top: 4px; font-size: 11px; color: var(--awc-muted); }
.awc-msg.admin { background: var(--awc-admin-bubble); align-self: flex-end; }
.awc-sysnote { margin: 0; padding: 8px 12px; font-size: 12.5px; color: var(--awc-muted); border-top: 1px solid var(--awc-border); line-height: 1.45; }
.awc-composer { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--awc-border); align-items: flex-end; }
.awc-composer textarea { flex: 1; resize: none; }
.awc-closed { padding: 14px; border-top: 1px solid var(--awc-border); display: grid; gap: 10px; }
.awc-closed[hidden] { display: none !important; }
.awc-closed p { margin: 0; font-size: 13.5px; color: var(--awc-muted); line-height: 1.45; }
@media (max-width: 480px) {
    .awc-panel { right: 8px; bottom: 8px; }
    .awc-launcher { right: 10px; bottom: 10px; }
}
