@charset "UTF-8";

:root {
    --uc-primary: #4A90E2;
    --uc-primary-light: #F0F8FF;
    --uc-primary-border: #D0E8FF;
    --uc-success: #4CAF50;
    --uc-text-primary: #1A1A1A;
    --uc-text-secondary: #666666;
    --uc-text-white: #FFFFFF;
    --uc-bg-primary: #FFFFFF;
    --uc-bg-secondary: #F8F9FA;
    --uc-border-primary: #E5E5E5;
    --uc-reset-bg: #F0F8FF;
    --uc-reset-color: #4A90E2;
    --uc-close-bg: #FFF0F0;
    --uc-close-color: #F44336;
    --uc-error-light: #FFEBEE;
    --uc-error: #C62828;
}

.uni-chatbot-fab-wrap {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 10000;
    transition: transform 0.3s ease, opacity 0.3s ease;
}
.uni-chatbot-fab-wrap.hidden {
    transform: translateX(calc(100% + 30px));
    opacity: 0;
    pointer-events: none;
}
.uni-chatbot-fab {
    position: relative;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--uc-primary);
    color: var(--uc-text-white);
    border: none;
    box-shadow: 0 4px 16px rgba(74, 144, 226, 0.4);
    cursor: pointer;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.15s ease;
}
.uni-chatbot-fab:hover { transform: scale(1.05); }
.uni-chatbot-fab img { width: 100%; height: 100%; object-fit: contain; }

/* FAB 우상단 닫기 버튼 — 클릭 시 FAB이 옆으로 숨고 peek 버튼이 노출됨 */
.uni-chatbot-fab-close {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    color: #666;
    border: 1px solid #ddd;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.uni-chatbot-fab-close:hover {
    background: var(--uc-close-color);
    color: #fff;
    border-color: var(--uc-close-color);
}

/* 화면 오른쪽 가장자리에 붙는 peek 탭 — FAB이 숨겨진 동안만 노출 (뉴트럴 그레이) */
.uni-chatbot-peek {
    position: fixed;
    right: 0;
    bottom: 40px;
    width: 22px;
    height: 44px;
    background: #9CA3AF;
    color: var(--uc-text-white);
    border: none;
    border-radius: 8px 0 0 8px;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 0;
    font-size: 16px;
    font-weight: 700;
    line-height: 1;
    box-shadow: -2px 2px 8px rgba(0, 0, 0, 0.15);
    z-index: 10000;
    opacity: 0.8;
    transition: opacity 0.15s ease, background 0.15s ease;
}
.uni-chatbot-peek:hover {
    background: #6B7280;
    opacity: 1;
}
.uni-chatbot-peek.show { display: flex; }

.uni-chatbot-panel {
    position: fixed;
    right: 24px;
    bottom: 96px;
    width: 380px;
    height: 560px;
    min-width: 300px;
    max-width: 700px;
    min-height: 400px;
    background: var(--uc-bg-primary);
    border-radius: 20px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
    display: none;
    flex-direction: column;
    overflow: hidden;
    z-index: 10000;
    font-family: inherit;
    user-select: none;
}
.uni-chatbot-panel.open { display: flex; }

/* 리사이즈 핸들 — 패널 좌측·상단·좌상단 모서리에 배치 */
.uni-chatbot-resize-left {
    position: absolute;
    left: 0; top: 12px; bottom: 12px;
    width: 6px;
    cursor: ew-resize;
    z-index: 1;
    border-radius: 3px 0 0 3px;
}
.uni-chatbot-resize-top {
    position: absolute;
    top: 0; left: 12px; right: 12px;
    height: 6px;
    cursor: ns-resize;
    z-index: 1;
}
.uni-chatbot-resize-topleft {
    position: absolute;
    top: 0; left: 0;
    width: 14px; height: 14px;
    cursor: nwse-resize;
    z-index: 2;
}
.uni-chatbot-resize-left:hover,
.uni-chatbot-resize-top:hover,
.uni-chatbot-resize-topleft:hover {
    background: rgba(74, 144, 226, 0.15);
}

/* Header */
.uni-chatbot-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: var(--uc-bg-primary);
}
.uni-chatbot-header-left {
    display: flex;
    align-items: center;
}
.uni-chatbot-bot-icon-wrapper {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--uc-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    box-shadow: 0 2px 8px rgba(74, 144, 226, 0.4);
    flex-shrink: 0;
}
.uni-chatbot-bot-icon-wrapper img {
    width: 28px;
    height: 28px;
    object-fit: contain;
}
.uni-chatbot-header-title-wrap {
    display: flex;
    flex-direction: column;
}
.uni-chatbot-header-title-row {
    display: flex;
    align-items: center;
    gap: 6px;
}
.uni-chatbot-header-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--uc-text-primary);
    line-height: 1.2;
}
/* BETA 배지 — 프로젝트 warning 팔레트(ai-feedback-history-tag.tag-rule_diff와 동일 톤). */
.uni-chatbot-header-beta {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    background: var(--color-warning-bg);
    color: var(--color-warning-text);
    font-size: 11.5px;
    font-weight: 700;
    padding: 2px 9px;
    border-radius: 99px;
    line-height: 1.2;
}
.uni-chatbot-header-subtitle {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 2px;
}
.uni-chatbot-header-status-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--uc-success);
    display: inline-block;
}
.uni-chatbot-header-subtitle-text {
    font-size: 12px;
    color: var(--uc-primary);
}
.uni-chatbot-header-right {
    display: flex;
    align-items: center;
    gap: 8px;
}
.uni-chatbot-icon-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}
.uni-chatbot-reset {
    background: var(--uc-reset-bg);
    color: var(--uc-reset-color);
    font-size: 22px;
    font-weight: 300;
}
.uni-chatbot-provider {
    background: var(--uc-reset-bg);
    color: var(--uc-reset-color);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: -0.5px;
}
.uni-chatbot-provider.claude {
    background: #FBEBD9;
    color: #C15C15;
}
.uni-chatbot-provider.openai {
    background: #D6F3E4;
    color: #0D8B4F;
}
.uni-chatbot-provider.gemini {
    background: #E6DEFB;
    color: #6B4EE3;
}
.uni-chatbot-close {
    background: var(--uc-close-bg);
    color: var(--uc-close-color);
    font-size: 20px;
}
.uni-chatbot-gradient-bar {
    height: 2px;
    background: var(--uc-primary);
    opacity: 0.6;
}

/* Body */
.uni-chatbot-body {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
    background: var(--uc-bg-secondary);
    font-size: 14px;
    line-height: 1.5;
}
.uni-chatbot-msg {
    margin-bottom: 12px;
    display: flex;
    flex-direction: column;
}
.uni-chatbot-msg.user { align-items: flex-end; }
.uni-chatbot-msg.assistant { align-items: flex-start; }
.uni-chatbot-bubble {
    max-width: 80%;
    padding: 10px 16px;
    border-radius: 18px;
    white-space: pre-wrap;
    word-break: break-word;
    font-size: 14px;
    line-height: 1.5;
    font-family: inherit;
    /* 패널 전체는 user-select: none (리사이즈 UX). 말풍선만 텍스트 선택 허용해 드래그 복사 가능. */
    user-select: text;
    -webkit-user-select: text;
    cursor: text;
}
.uni-chatbot-bubble * {
    font-family: inherit;
}
.uni-chatbot-msg.user .uni-chatbot-bubble {
    background: var(--uc-primary);
    color: var(--uc-text-white);
    border-bottom-right-radius: 6px;
    box-shadow: 0 2px 8px rgba(74, 144, 226, 0.3);
}
.uni-chatbot-msg.assistant .uni-chatbot-bubble {
    background: var(--uc-bg-primary);
    color: var(--uc-text-primary);
    border: 1px solid var(--uc-border-primary);
    border-bottom-left-radius: 6px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
    white-space: normal;
}

/* 어시스턴트 말풍선 내부 마크다운 요소 */
.uni-chatbot-msg.assistant .uni-chatbot-bubble p {
    margin: 0 0 6px;
    font-size: 14px;
    line-height: 1.5;
}
.uni-chatbot-msg.assistant .uni-chatbot-bubble p:last-child {
    margin-bottom: 0;
}
.uni-chatbot-msg.assistant .uni-chatbot-bubble h1,
.uni-chatbot-msg.assistant .uni-chatbot-bubble h2,
.uni-chatbot-msg.assistant .uni-chatbot-bubble h3,
.uni-chatbot-msg.assistant .uni-chatbot-bubble h4,
.uni-chatbot-msg.assistant .uni-chatbot-bubble h5,
.uni-chatbot-msg.assistant .uni-chatbot-bubble h6 {
    margin: 8px 0 4px;
    font-weight: 700;
    line-height: 1.3;
}
.uni-chatbot-msg.assistant .uni-chatbot-bubble h1 { font-size: 18px; }
.uni-chatbot-msg.assistant .uni-chatbot-bubble h2 { font-size: 16px; }
.uni-chatbot-msg.assistant .uni-chatbot-bubble h3,
.uni-chatbot-msg.assistant .uni-chatbot-bubble h4,
.uni-chatbot-msg.assistant .uni-chatbot-bubble h5,
.uni-chatbot-msg.assistant .uni-chatbot-bubble h6 { font-size: 14px; }
.uni-chatbot-msg.assistant .uni-chatbot-bubble ul,
.uni-chatbot-msg.assistant .uni-chatbot-bubble ol {
    margin: 4px 0;
    padding-left: 20px;
    font-size: 14px;
    line-height: 1.5;
}
.uni-chatbot-msg.assistant .uni-chatbot-bubble li {
    margin: 2px 0;
    font-size: 14px;
    line-height: 1.5;
}
.uni-chatbot-msg.assistant .uni-chatbot-bubble strong { font-weight: 700; font-size: inherit; }
.uni-chatbot-msg.assistant .uni-chatbot-bubble em { font-style: italic; font-size: inherit; }
.uni-chatbot-msg.assistant .uni-chatbot-bubble code {
    background: rgba(0, 0, 0, 0.07);
    padding: 1px 5px;
    border-radius: 4px;
    font-family: Consolas, Monaco, 'D2Coding', monospace;
    font-size: 12.5px;
}
.uni-chatbot-msg.assistant .uni-chatbot-bubble pre {
    background: rgba(0, 0, 0, 0.04);
    border: 1px solid var(--uc-border-primary);
    padding: 8px 10px;
    border-radius: 6px;
    overflow-x: auto;
    margin: 6px 0;
}
.uni-chatbot-msg.assistant .uni-chatbot-bubble pre code {
    background: transparent;
    padding: 0;
}
.uni-chatbot-msg.assistant .uni-chatbot-bubble a {
    color: var(--uc-primary);
    text-decoration: underline;
}
.uni-chatbot-msg.assistant .uni-chatbot-bubble table.uni-chatbot-table {
    border-collapse: collapse;
    margin: 6px 0;
    font-size: 13px;
    width: 100%;
    display: block;
    overflow-x: auto;
}
.uni-chatbot-msg.assistant .uni-chatbot-bubble table.uni-chatbot-table th,
.uni-chatbot-msg.assistant .uni-chatbot-bubble table.uni-chatbot-table td {
    border: 1px solid var(--uc-border-primary);
    padding: 5px 8px;
    text-align: left;
    line-height: 1.4;
    vertical-align: top;
}
.uni-chatbot-msg.assistant .uni-chatbot-bubble table.uni-chatbot-table th {
    background: var(--uc-bg-secondary);
    font-weight: 600;
}
.uni-chatbot-msg.assistant .uni-chatbot-bubble table.uni-chatbot-table tbody tr:nth-child(even) td {
    background: rgba(0, 0, 0, 0.015);
}
/* Tool 실행 알림 — 일반 assistant 말풍선과 동일한 스타일 */
.uni-chatbot-tool-status {
    padding: 10px 16px;
    background: var(--uc-bg-primary);
    color: var(--uc-text-secondary);
    border: 1px solid var(--uc-border-primary);
    border-radius: 18px;
    border-bottom-left-radius: 6px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
    max-width: 80%;
    font-style: italic;
    font-size: 13px;
}

/* "답변 생성 중" 인디케이터 — assistant 말풍선 형태의 3점 애니메이션 */
.uni-chatbot-typing {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 12px 16px;
    background: var(--uc-bg-primary);
    border: 1px solid var(--uc-border-primary);
    border-radius: 18px;
    border-bottom-left-radius: 6px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
    max-width: 80%;
}
.uni-chatbot-typing .dot {
    width: 7px;
    height: 7px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 50%;
    animation: uni-chatbot-typing-bounce 1.4s infinite ease-in-out both;
}
.uni-chatbot-typing .dot:nth-child(2) { animation-delay: 0.16s; }
.uni-chatbot-typing .dot:nth-child(3) { animation-delay: 0.32s; }
@keyframes uni-chatbot-typing-bounce {
    0%, 80%, 100% { transform: scale(0.7); opacity: 0.4; }
    40%           { transform: scale(1.0); opacity: 1; }
}

/* 메시지 하단 메타 행 — 시간 + 복사 버튼 */
.uni-chatbot-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
    font-size: 11px;
    color: var(--uc-text-secondary);
    max-width: 80%;
}
.uni-chatbot-msg.user .uni-chatbot-meta { flex-direction: row-reverse; }
.uni-chatbot-time {
    line-height: 1.2;
    font-size: 11px;
}
.uni-chatbot-copy {
    background: transparent;
    border: 1px solid var(--uc-border-primary);
    color: var(--uc-text-secondary);
    border-radius: 6px;
    padding: 3px;
    cursor: pointer;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.uni-chatbot-copy svg {
    display: block;
    width: 14px;
    height: 14px;
}
.uni-chatbot-copy:hover {
    background: var(--uc-primary-light);
    color: var(--uc-primary);
    border-color: var(--uc-primary-border);
}
.uni-chatbot-copy.copied {
    background: var(--uc-primary);
    color: var(--uc-text-white);
    border-color: var(--uc-primary);
}

/* 피드백 버튼 (엄지 up/down) */
.uni-chatbot-feedback {
    background: transparent;
    border: 1px solid var(--uc-border-primary);
    color: var(--uc-text-secondary);
    border-radius: 6px;
    padding: 3px;
    cursor: pointer;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.uni-chatbot-feedback svg {
    display: block;
    width: 16px;
    height: 16px;
}
.uni-chatbot-thumbsup:hover:not(.active) {
    background: #E8F5E9;
    color: var(--uc-success);
    border-color: #A5D6A7;
}
.uni-chatbot-thumbsdown:hover:not(.active) {
    background: var(--uc-error-light);
    color: var(--uc-error);
    border-color: #EF9A9A;
}
.uni-chatbot-thumbsup.active {
    background: var(--uc-success);
    color: var(--uc-text-white);
    border-color: var(--uc-success);
}
.uni-chatbot-thumbsdown.active {
    background: var(--uc-error);
    color: var(--uc-text-white);
    border-color: var(--uc-error);
}

/* 피드백 모달 — 챗봇 패널 내부 오버레이. 표시 여부는 인라인 style.display 로 제어. */
.uni-chatbot-feedback-modal {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    align-items: center;
    justify-content: center;
    z-index: 20;
    padding: 16px;
}
.uni-chatbot-feedback-box {
    background: var(--uc-bg-primary);
    border-radius: 12px;
    padding: 16px;
    width: 100%;
    max-width: 320px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}
.uni-chatbot-feedback-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--uc-text-primary);
    margin-bottom: 10px;
}
.uni-chatbot-feedback-options {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}
.uni-chatbot-feedback-option {
    background: var(--uc-bg-primary);
    color: var(--uc-text-primary);
    border: 1px solid var(--uc-border-primary);
    border-radius: 999px;
    padding: 5px 12px;
    font-size: 12px;
    font-family: inherit;
    line-height: 1.4;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.uni-chatbot-feedback-option:hover {
    background: var(--uc-primary-light);
    border-color: var(--uc-primary-border);
    color: var(--uc-primary);
}
.uni-chatbot-feedback-option.selected,
.uni-chatbot-feedback-option.selected:hover {
    background: var(--uc-primary);
    color: var(--uc-text-white);
    border-color: var(--uc-primary);
}
.uni-chatbot-feedback-textarea {
    width: 100%;
    min-height: 72px;
    resize: none;
    border: 1px solid var(--uc-border-primary);
    border-radius: 8px;
    padding: 8px 10px;
    font-family: inherit;
    font-size: 13px;
    line-height: 1.4;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.15s ease;
}
.uni-chatbot-feedback-textarea:focus { border-color: var(--uc-primary); }
.uni-chatbot-feedback-textarea.error,
.uni-chatbot-feedback-textarea.error:focus {
    border-color: var(--uc-error);
    background: var(--uc-error-light);
}
.uni-chatbot-feedback-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 10px;
}
/* unidocu-button 스타일과 시각적으로 일치 (기본=회색 테두리, submit=blue.bg) */
.uni-chatbot-feedback-cancel,
.uni-chatbot-feedback-submit {
    text-align: center;
    vertical-align: middle;
    touch-action: manipulation;
    padding: 5px 12px;
    line-height: 1.4;
    font-size: 12px;
    border: 1px solid var(--color-border-strong, #CBD5E1);
    border-radius: var(--radius-sm, 4px);
    background-color: var(--color-surface, #FFFFFF);
    color: var(--color-text-primary, #0F172A);
    box-sizing: border-box;
    cursor: pointer;
    font-family: inherit;
    transition: background-color 0.13s ease, border-color 0.13s ease, color 0.13s ease;
}
.uni-chatbot-feedback-cancel:hover {
    background-color: var(--color-surface-secondary, #F8FAFC);
}
.uni-chatbot-feedback-submit {
    color: var(--color-text-inverse, #FFFFFF);
    border-color: var(--color-primary, #1B4FD8);
    background-color: var(--color-primary, #1B4FD8);
}
.uni-chatbot-feedback-submit:hover {
    background-color: var(--color-brand-700, #1540B3);
    border-color: var(--color-brand-700, #1540B3);
}

/* 자주 묻는 질문 — greeting 하단에 노출되는 pill 버튼 리스트 */
.uni-chatbot-faq {
    margin: 6px 0 0 4px;
    max-width: 80%;
}
.uni-chatbot-faq-title {
    font-size: 11px;
    color: var(--uc-text-secondary);
    margin-bottom: 6px;
    padding-left: 2px;
}
.uni-chatbot-faq-list {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
}
.uni-chatbot-faq-item {
    background: var(--uc-primary-light);
    color: var(--uc-primary);
    border: 1px solid var(--uc-primary-border);
    border-radius: 999px;
    padding: 6px 14px;
    font-size: 13px;
    font-family: inherit;
    line-height: 1.3;
    cursor: pointer;
    text-align: left;
    max-width: 100%;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.uni-chatbot-faq-item:hover {
    background: var(--uc-primary);
    color: var(--uc-text-white);
    border-color: var(--uc-primary);
}

/* 어시스턴트 답변 하단 메뉴 이동 버튼 */
.uni-chatbot-menu-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    margin: 6px 0 0 4px;
    max-width: 80%;
}
.uni-chatbot-menu-title {
    font-size: 11px;
    color: var(--uc-text-secondary);
    padding-left: 2px;
}
.uni-chatbot-menu-btn {
    background: var(--uc-primary-light);
    color: var(--uc-primary);
    border: 1px solid var(--uc-primary-border);
    border-radius: 14px;
    padding: 5px 12px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    line-height: 1.3;
    transition: background 0.15s ease, color 0.15s ease;
}
.uni-chatbot-menu-btn:hover {
    background: var(--uc-primary);
    color: var(--uc-text-white);
    border-color: var(--uc-primary);
}
.uni-chatbot-error {
    background: var(--uc-error-light);
    color: var(--uc-error);
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 12px;
    margin-bottom: 8px;
}

/* Disclaimer */
.uni-chatbot-disclaimer {
    position: relative;
    padding: 6px 16px;
    font-size: 11px;
    color: var(--uc-text-secondary);
    text-align: center;
    background: var(--uc-bg-primary);
    border-top: 1px solid var(--uc-border-primary);
    line-height: 1.4;
}

/* Input area */
.uni-chatbot-input-area {
    display: flex;
    padding: 8px 12px 12px;
    background: var(--uc-bg-primary);
    gap: 8px;
    align-items: flex-end;
}
.uni-chatbot-send-col {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}
.uni-chatbot-counter {
    font-size: 11px;
    color: var(--uc-text-secondary);
    line-height: 1.2;
    padding-right: 2px;
}
.uni-chatbot-counter.over {
    color: var(--uc-error);
    font-weight: 700;
}
.uni-chatbot-input {
    flex: 1;
    resize: none;
    border: 1px solid var(--uc-border-primary);
    border-radius: 10px;
    padding: 10px 12px;
    font-family: inherit;
    font-size: 14px;
    height: 40px;
    outline: none;
    transition: border-color 0.15s ease;
}
/* 입력창 높이 조절 핸들 — disclaimer 의 상단 경계선에 얹힌다.
   위로 드래그 시 body 가 줄고 textarea 가 늘어난다. 상한/하한은 JS(initInputResize) 관리. */
.uni-chatbot-input-resize {
    position: absolute;
    top: -3px;
    left: 0;
    right: 0;
    height: 6px;
    cursor: ns-resize;
    background: transparent;
    z-index: 3;
    transition: background 0.15s ease;
}
.uni-chatbot-input-resize:hover,
.uni-chatbot-input-resize.dragging {
    background: rgba(74, 144, 226, 0.15);
}
.uni-chatbot-input:focus { border-color: var(--uc-primary); }
.uni-chatbot-send {
    background: var(--uc-primary);
    color: var(--uc-text-white);
    border: none;
    border-radius: 10px;
    padding: 0 18px;
    height: 40px;
    cursor: pointer;
    font-weight: 700;
    font-size: 14px;
}
.uni-chatbot-send:disabled { background: #BDBDBD; cursor: default; }

/* ============================================================
   Dark Mode
   프로젝트 공식 다크 팔레트(unidocu-tokens.css의 Radix sand 스케일)에
   맞춰 --uc-* 변수를 재정의한다. 상태색(success/danger)도 프로젝트
   다크 토큰과 동일한 Radix step11 값을 사용한다.
   ============================================================ */
html[data-mode="dark"] {
    --uc-primary: #70b8ff;                    /* blue11 — 라이트 sky 톤(#4A90E2)의 다크 대응 */
    --uc-primary-light: rgba(112, 184, 255, 0.14);
    --uc-primary-border: rgba(112, 184, 255, 0.35);
    --uc-success: #3dd68c;                    /* green11 (프로젝트 --color-success-text) */
    --uc-text-primary: #eeeeec;               /* sand12 */
    --uc-text-secondary: #b5b3ad;             /* sand11 */
    --uc-text-white: #FFFFFF;
    --uc-bg-primary: #222221;                 /* sand3 — 헤더/입력/버블 */
    --uc-bg-secondary: #1c1c1b;               /* sand2~3 — body 영역 */
    --uc-border-primary: #3b3a37;             /* sand6 */
    --uc-reset-bg: rgba(112, 184, 255, 0.14);
    --uc-reset-color: #70b8ff;
    --uc-close-bg: rgba(255, 149, 146, 0.14);
    --uc-close-color: #ff9592;                /* red11 */
    --uc-error-light: rgba(255, 149, 146, 0.16);
    --uc-error: #ff9592;                      /* red11 */
}

/* BETA 배지 — 다크에서도 라이트와 동일한 pastel amber pill 톤을 유지 (프로젝트 warning 다크 토큰이
   대비가 강한 것과 별도로, 배지는 시각적 강조 요소로 라이트 톤을 그대로 노출) */
html[data-mode="dark"] .uni-chatbot-header-beta {
    background: #FEF3C7;
    color: #B45309;
}

/* FAB 우상단 닫기 버튼은 흰 원형 하드코딩 → 다크에서는 sand 톤으로 반전 */
html[data-mode="dark"] .uni-chatbot-fab-close {
    background: #2a2a28;                      /* sand4 */
    color: #b5b3ad;
    border-color: #494844;                    /* sand7 */
}

/* peek 탭 톤 다운 */
html[data-mode="dark"] .uni-chatbot-peek { background: #494844; }  /* sand7 */
html[data-mode="dark"] .uni-chatbot-peek:hover { background: #6f6d66; }  /* sand9 */

/* 패널 그림자 (다크 배경에서는 검정을 더 강하게) */
html[data-mode="dark"] .uni-chatbot-panel {
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.55);
}

/* 리사이즈 핸들 hover 톤 */
html[data-mode="dark"] .uni-chatbot-resize-left:hover,
html[data-mode="dark"] .uni-chatbot-resize-top:hover,
html[data-mode="dark"] .uni-chatbot-resize-topleft:hover,
html[data-mode="dark"] .uni-chatbot-input-resize:hover,
html[data-mode="dark"] .uni-chatbot-input-resize.dragging {
    background: rgba(112, 184, 255, 0.22);
}

/* Provider 뱃지 — Radix amber/green/violet 다크 스케일과 유사한 톤 */
html[data-mode="dark"] .uni-chatbot-provider.claude {
    background: rgba(255, 202, 22, 0.14);
    color: #ffca16;                           /* amber11 */
}
html[data-mode="dark"] .uni-chatbot-provider.openai {
    background: rgba(61, 214, 140, 0.14);
    color: #3dd68c;                           /* green11 */
}
html[data-mode="dark"] .uni-chatbot-provider.gemini {
    background: rgba(184, 166, 255, 0.16);
    color: #b8a6ff;                           /* violet11 계열 */
}

/* 마크다운 code / pre / 표 — 원본은 rgba(0,0,0,*) 라 다크에서 대비 상실 */
html[data-mode="dark"] .uni-chatbot-msg.assistant .uni-chatbot-bubble code {
    background: rgba(255, 255, 255, 0.08);
}
html[data-mode="dark"] .uni-chatbot-msg.assistant .uni-chatbot-bubble pre {
    background: rgba(255, 255, 255, 0.04);
}
html[data-mode="dark"] .uni-chatbot-msg.assistant .uni-chatbot-bubble table.uni-chatbot-table th {
    background: #2a2a28;                      /* sand4 — body(sand2~3) 위에서 살짝 밝게 */
}
html[data-mode="dark"] .uni-chatbot-msg.assistant .uni-chatbot-bubble table.uni-chatbot-table tbody tr:nth-child(even) td {
    background: rgba(255, 255, 255, 0.03);
}

/* 어시스턴트 말풍선/툴/타이핑 그림자 & 도트 색 */
html[data-mode="dark"] .uni-chatbot-msg.assistant .uni-chatbot-bubble,
html[data-mode="dark"] .uni-chatbot-tool-status,
html[data-mode="dark"] .uni-chatbot-typing {
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}
html[data-mode="dark"] .uni-chatbot-typing .dot {
    background: rgba(255, 255, 255, 0.4);
}

/* 피드백 모달 오버레이·박스 */
html[data-mode="dark"] .uni-chatbot-feedback-modal {
    background: rgba(0, 0, 0, 0.6);
}
html[data-mode="dark"] .uni-chatbot-feedback-box {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

/* 피드백 모달 버튼 — 앱 --color-* 토큰이 이미 다크 팔레트로 재정의되어
   있으므로 그대로 상속됨. fallback(첫 렌더링 등)만 sand 톤으로 지정. */
html[data-mode="dark"] .uni-chatbot-feedback-cancel,
html[data-mode="dark"] .uni-chatbot-feedback-submit {
    background-color: var(--color-surface, #222221);
    color: var(--color-text-primary, #eeeeec);
    border-color: var(--color-border-strong, #494844);
}
html[data-mode="dark"] .uni-chatbot-feedback-cancel:hover {
    background-color: var(--color-surface-secondary, #1c1c1b);
}
html[data-mode="dark"] .uni-chatbot-feedback-submit {
    color: var(--color-text-inverse, #FFFFFF);
    border-color: var(--color-primary, #1B4FD8);
    background-color: var(--color-primary, #1B4FD8);
}
html[data-mode="dark"] .uni-chatbot-feedback-submit:hover {
    background-color: var(--color-brand-700, #1540B3);
    border-color: var(--color-brand-700, #1540B3);
}
html[data-mode="dark"] .uni-chatbot-feedback-textarea.error,
html[data-mode="dark"] .uni-chatbot-feedback-textarea.error:focus {
    background: rgba(255, 149, 146, 0.12);
}

/* 입력창 — 원본은 배경 미지정이라 브라우저 기본(하양)이 뚫림 → sand4 강제 */
html[data-mode="dark"] .uni-chatbot-input,
html[data-mode="dark"] .uni-chatbot-feedback-textarea {
    background: #2a2a28;                      /* sand4 */
    color: var(--uc-text-primary);
}
html[data-mode="dark"] .uni-chatbot-input::placeholder,
html[data-mode="dark"] .uni-chatbot-feedback-textarea::placeholder {
    color: #7c7b74;                           /* sand10 = --color-text-tertiary */
}

/* Send 버튼 disabled */
html[data-mode="dark"] .uni-chatbot-send:disabled {
    background: #494844;                      /* sand7 */
    color: #7c7b74;                           /* sand10 */
}
