/* OpenClaw Web Chat Widget */
#oc-chat-root * { box-sizing: border-box; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; }

#oc-chat-launcher {
    position: fixed; bottom: 24px; z-index: 99999;
    width: 58px; height: 58px; border-radius: 50%;
    background: var(--oc-brand, #6C63FF);
    border: none; cursor: pointer;
    box-shadow: 0 4px 20px rgba(108,99,255,0.4);
    display: flex; align-items: center; justify-content: center;
    transition: transform .2s, box-shadow .2s;
}
#oc-chat-launcher:hover { transform: scale(1.08); box-shadow: 0 6px 26px rgba(108,99,255,0.5); }
#oc-chat-launcher svg { width: 26px; height: 26px; fill: #fff; }
#oc-chat-launcher .oc-badge-count {
    position: absolute; top: -4px; right: -4px;
    background: #ef4444; color: #fff; border-radius: 50%;
    width: 18px; height: 18px; font-size: 11px; font-weight: 700;
    display: none; align-items: center; justify-content: center;
}
#oc-chat-launcher .oc-badge-count.show { display: flex; }

#oc-chat-window {
    position: fixed; bottom: 92px; z-index: 99998;
    width: 370px; max-height: 580px;
    background: #fff; border-radius: 16px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.15);
    display: flex; flex-direction: column;
    transform: scale(0.8) translateY(20px);
    transform-origin: bottom right;
    opacity: 0; pointer-events: none;
    transition: all .25s cubic-bezier(.34,1.56,.64,1);
}
#oc-chat-window.open {
    transform: scale(1) translateY(0);
    opacity: 1; pointer-events: all;
}
.oc-right { right: 24px; } .oc-left { left: 24px; }

.oc-header {
    background: var(--oc-brand, #6C63FF);
    border-radius: 16px 16px 0 0;
    padding: 14px 16px; display: flex; align-items: center; gap: 10px;
}
.oc-avatar {
    width: 36px; height: 36px; border-radius: 50%;
    background: rgba(255,255,255,0.25);
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 15px; color: #fff; flex-shrink: 0;
}
.oc-header-text { flex: 1; }
.oc-bot-name { color: #fff; font-weight: 600; font-size: 14px; line-height: 1.2; }
.oc-online { color: rgba(255,255,255,0.8); font-size: 11px; }
.oc-header-close {
    background: none; border: none; cursor: pointer;
    color: rgba(255,255,255,0.8); font-size: 20px; line-height: 1; padding: 0;
}
.oc-header-close:hover { color: #fff; }

.oc-lang-bar {
    background: #f8f7ff; border-bottom: 1px solid #ede9fe;
    padding: 6px 12px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap;
}
.oc-lang-btn {
    background: none; border: 1px solid #c4b5fd; border-radius: 20px;
    padding: 2px 10px; font-size: 11px; cursor: pointer; color: #6C63FF; transition: all .15s;
}
.oc-lang-btn.active, .oc-lang-btn:hover { background: #6C63FF; color: #fff; border-color: #6C63FF; }

.oc-messages {
    flex: 1; overflow-y: auto; padding: 16px 14px;
    display: flex; flex-direction: column; gap: 10px;
    min-height: 200px; max-height: 300px;
}
.oc-msg { display: flex; gap: 8px; max-width: 85%; }
.oc-msg.user { align-self: flex-end; flex-direction: row-reverse; }
.oc-msg-bubble {
    padding: 9px 13px; border-radius: 14px;
    font-size: 13px; line-height: 1.5; color: #222;
    background: #f1f0f5;
    white-space: pre-wrap; word-break: break-word;
}
.oc-msg.user .oc-msg-bubble { background: var(--oc-brand, #6C63FF); color: #fff; }
.oc-msg.bot .oc-msg-avatar {
    width: 26px; height: 26px; border-radius: 50%;
    background: var(--oc-brand, #6C63FF);
    display: flex; align-items: center; justify-content: center;
    font-size: 12px; font-weight: 700; color: #fff; flex-shrink: 0; align-self: flex-end;
}
.oc-typing { display: flex; gap: 4px; align-items: center; padding: 10px 14px; }
.oc-typing span { width: 7px; height: 7px; border-radius: 50%; background: #c4b5fd; animation: ocBounce 1.2s infinite; }
.oc-typing span:nth-child(2) { animation-delay: .2s; }
.oc-typing span:nth-child(3) { animation-delay: .4s; }
@keyframes ocBounce { 0%,60%,100%{transform:translateY(0)} 30%{transform:translateY(-6px)} }

.oc-quote-card {
    background: #f8f7ff; border: 1px solid #ede9fe;
    border-radius: 10px; padding: 12px 14px; font-size: 12px; line-height: 1.6;
    white-space: pre-wrap; color: #333; max-height: 180px; overflow-y: auto;
}

.oc-actions {
    padding: 10px 14px; display: flex; gap: 8px; border-top: 1px solid #f0f0f5; flex-wrap: wrap;
}
.oc-action-btn {
    flex: 1; min-width: 130px; padding: 9px 12px; border-radius: 10px;
    border: 1.5px solid var(--oc-brand, #6C63FF);
    background: none; color: var(--oc-brand, #6C63FF);
    font-size: 12px; font-weight: 600; cursor: pointer; transition: all .15s;
    display: flex; align-items: center; justify-content: center; gap: 5px;
}
.oc-action-btn:hover, .oc-action-btn.primary {
    background: var(--oc-brand, #6C63FF); color: #fff;
}
.oc-action-btn svg { width: 14px; height: 14px; fill: currentColor; }

.oc-input-row {
    padding: 10px 12px; border-top: 1px solid #f0f0f5;
    display: flex; gap: 8px; align-items: flex-end;
}
.oc-input-row textarea {
    flex: 1; resize: none; border: 1.5px solid #e0ddf5; border-radius: 10px;
    padding: 8px 12px; font-size: 13px; color: #222; outline: none;
    max-height: 80px; min-height: 38px; transition: border .15s;
    font-family: inherit;
}
.oc-input-row textarea:focus { border-color: var(--oc-brand, #6C63FF); }
.oc-send-btn {
    width: 38px; height: 38px; border-radius: 10px;
    background: var(--oc-brand, #6C63FF); border: none; cursor: pointer;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
    transition: opacity .15s;
}
.oc-send-btn:hover { opacity: .85; }
.oc-send-btn svg { width: 18px; height: 18px; fill: #fff; }

/* Enquiry form */
.oc-form { padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.oc-form input {
    width: 100%; padding: 9px 12px; border: 1.5px solid #e0ddf5;
    border-radius: 8px; font-size: 13px; color: #222; outline: none;
}
.oc-form input:focus { border-color: var(--oc-brand, #6C63FF); }
.oc-form-title { font-size: 14px; font-weight: 600; color: #333; }
.oc-form-sub { font-size: 12px; color: #888; margin-top: -6px; }
.oc-form-submit {
    padding: 10px; border-radius: 10px; background: var(--oc-brand,#6C63FF);
    color: #fff; border: none; font-size: 13px; font-weight: 600; cursor: pointer;
}
.oc-form-submit:hover { opacity: .9; }
.oc-form-back { background: none; border: none; font-size: 12px; color: #888; cursor: pointer; }

@media (max-width: 480px) {
    #oc-chat-window { width: calc(100vw - 24px); right: 12px !important; left: 12px !important; }
}
