/* Claude Site Assistant — widget chat */
.csa-root {
    --csa-color: #cc0000;
    position: fixed;
    bottom: 20px;
    z-index: 999999;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 15px;
    line-height: 1.5;
}
.csa-pos-right { right: 20px; }
.csa-pos-left { left: 20px; }

.csa-root *,
.csa-root *::before,
.csa-root *::after { box-sizing: border-box; }

.csa-toggle {
    width: 60px;
    height: 60px;
    border: 0;
    border-radius: 50%;
    background: var(--csa-color);
    color: #fff;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .25);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: transform .15s ease;
}
.csa-toggle:hover { transform: scale(1.06); }
.csa-pos-left .csa-toggle { margin-right: auto; }
.csa-pos-right .csa-toggle { margin-left: auto; }

.csa-panel {
    width: 370px;
    max-width: calc(100vw - 32px);
    height: 540px;
    max-height: calc(100vh - 110px);
    background: #fff;
    color: #222;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, .25);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    margin-bottom: 12px;
}
.csa-panel[hidden] { display: none; }

.csa-header {
    background: var(--csa-color);
    color: #fff;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.csa-title { font-weight: 700; flex: 1; }
.csa-reset,
.csa-close {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, .6);
    color: #fff;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    padding: 4px 8px;
    line-height: 1.2;
}
.csa-close { border: 0; font-size: 24px; padding: 0 4px; }

.csa-messages {
    flex: 1;
    overflow-y: auto;
    padding: 14px;
    background: #f4f4f4;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.csa-msg {
    max-width: 85%;
    padding: 9px 12px;
    border-radius: 12px;
    word-wrap: break-word;
    overflow-wrap: anywhere;
}
.csa-msg ul { margin: 4px 0; padding-left: 18px; }
.csa-msg a { color: var(--csa-color); text-decoration: underline; }
.csa-user {
    align-self: flex-end;
    background: var(--csa-color);
    color: #fff;
    border-bottom-right-radius: 3px;
    white-space: pre-wrap;
}
.csa-bot {
    align-self: flex-start;
    background: #fff;
    border: 1px solid #e2e2e2;
    border-bottom-left-radius: 3px;
}
.csa-system {
    align-self: center;
    background: #fff4e5;
    color: #7a4b00;
    font-size: 13px;
    text-align: center;
}

.csa-typing { display: flex; gap: 4px; padding: 12px; }
.csa-typing span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #999;
    animation: csa-blink 1.2s infinite ease-in-out;
}
.csa-typing span:nth-child(2) { animation-delay: .2s; }
.csa-typing span:nth-child(3) { animation-delay: .4s; }
@keyframes csa-blink {
    0%, 80%, 100% { opacity: .3; }
    40% { opacity: 1; }
}

.csa-form {
    display: flex;
    gap: 8px;
    padding: 10px;
    border-top: 1px solid #e2e2e2;
    background: #fff;
}
.csa-input {
    flex: 1;
    resize: none;
    border: 1px solid #ccc;
    border-radius: 8px;
    padding: 8px 10px;
    font: inherit;
    color: #222;
    background: #fff;
    min-height: 40px;
    max-height: 120px;
}
.csa-input:focus { outline: 2px solid var(--csa-color); outline-offset: -1px; }
.csa-send {
    border: 0;
    border-radius: 8px;
    background: var(--csa-color);
    color: #fff;
    font-weight: 700;
    padding: 0 16px;
    cursor: pointer;
}
.csa-send:disabled { opacity: .5; cursor: default; }

.csa-privacy {
    font-size: 11px;
    color: #777;
    padding: 0 12px 10px;
    background: #fff;
}
.csa-privacy a { color: #777; }

@media (max-width: 480px) {
    .csa-root { bottom: 12px; }
    .csa-pos-right { right: 12px; }
    .csa-pos-left { left: 12px; }
    .csa-panel { height: calc(100vh - 100px); }
}
