/* Echo Chat dedicated stylesheet.
   Extracted from echo.css for maintainability. */

/* MCP progress state */
.thinking-text-container.mcp-progress-running {
    border-color: #b8b8b8 !important;
}

.thinking-text-container.mcp-progress-done {
    border-color: #24a148 !important;
    background-color: #f3fff6;
}

/* Echo v2 host theme (Carbon + Gemini tone) */
.echo-chat-host {
    --echo-blue-60: #0f62fe;
    --echo-blue-70: #0043ce;
    --echo-gray-10: #f4f4f4;
    --echo-gray-20: #e0e0e0;
    --echo-gray-30: #c6c6c6;
    --echo-gray-60: #525252;
    --echo-gray-80: #393939;
    --echo-user-bubble-bg: linear-gradient(135deg, #edf5ff 0%, #dbe9ff 100%);
    --echo-assistant-bubble-bg: #ffffff;
    --echo-bubble-border: #d0d7e2;
    --echo-thinking-bg: #f8f9fb;
    --echo-orch-planner-bg: #fff4de;
    --echo-orch-planner-border: #f1c98b;
    --echo-orch-execute-bg: #edf4ff;
    --echo-orch-execute-border: #b8d3ff;
    --echo-orch-done-border: #24a148;
    --echo-orch-error-bg: #fff1f1;
    --echo-orch-error-border: #da1e28;
    --echo-code-bg: #161616;
    --echo-code-border: #393939;
    --echo-code-text: #f4f4f4;
    background: radial-gradient(1200px 520px at 100% 0%, #edf4ff 0%, #f8fbff 45%, #ffffff 100%);
}

.echo-chat-host .dock-content {
/*    background: linear-gradient(180deg, rgba(255, 255, 255, 0.6) 0%, rgba(255, 255, 255, 1) 30%);*/
    background-color: var(--cds-field, #ffffff);
}

.echo-chat-message-row--user {
    display: flex;
    justify-content: flex-end;
}

.echo-chat-message-row--assistant {
    display: flex;
    justify-content: flex-start;
}
.echo-chat-body-container .echo-new-chat .carbon-icon {
    background: linear-gradient(to left, #0f62feb0, #0f62fe7d 50%, #0f62fed9 75%, #0f62fe 75%) !important;
}
.echo-chat-body-container .echo-new-chat {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height:220px;
}


.echo-chat-bubble {
    max-width: min(92%, 960px);
    /*    border: 1px solid var(--echo-bubble-border, #d0d7e2) !important;*/
    /*    border-radius: 12px !important;*/
}

.echo-chat-bubble.card .card-body {
    padding: 12px 14px !important;
}

.echo-chat-bubble--user {
    background-color: var(--cds-echo-bubble, #f4f4f4);
    
}

.echo-chat-bubble--assistant {
    background: var(--echo-assistant-bubble-bg, #ffffff);
}

.echo-chat-plain {
    margin: 0;
    white-space: pre-wrap;
    font-family: "IBM Plex Sans", "Pretendard Variable", "Segoe UI", sans-serif;
    color: var(--cds-text-primary, #161616);
}

.echo-response-metrics {
    margin-top: 8px;
    order: 4;
}

.echo-response-metrics__row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    /*    color: var(--cds-text-secondary, #525252);*/
    color: var(--text-gray-400, #9ca3af);
    font-size: 12px;
    line-height: 1.2;
}

.echo-response-metrics__item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.echo-thinking-block {
    margin-bottom: 8px;
    margin-left: 16px;
    padding: 0px 10px;
    border-left: 1px solid var(--cds-border-subtle-01, #e0e0e0);
    padding-left: 16px;
    white-space: pre-wrap;
    font-size: 12px;
    line-height: 1.45;
    color: var(--cds-text-secondary, #525252);
}

.echo-orch-feed {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 10px;
}

.echo-progress-panel {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    margin: 0 0 12px 16px;
    padding-left: 16px;
    border-left: 1px solid var(--cds-border-subtle-01, #e0e0e0);
}

.echo-progress-panel__headline {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    width: fit-content;
    max-width: 100%;
    min-height: 36px;
    padding: 7px 14px 7px 12px;
    border-radius: 999px;
    border: 1px solid rgba(114, 158, 255, 0.5);
    background: linear-gradient(135deg, rgba(15, 98, 254, 0.15) 0%, rgba(36, 99, 235, 0.08) 100%);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
    color: var(--cds-text-primary, #161616);
    transition: opacity 180ms ease, transform 180ms ease, color 180ms ease;
}

.echo-progress-panel__headline.is-live .echo-progress-panel__headline-text {
    background: linear-gradient(90deg, #dbeafe 0%, #ffffff 50%, #bfdbfe 100%);
    background-size: 220% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: echoProgressTextSweep 1.6s linear infinite;
}

.echo-progress-panel__headline.is-error {
    border-color: rgba(218, 30, 40, 0.6);
    background: rgba(218, 30, 40, 0.08);
}

.echo-progress-panel__headline-icon {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    flex: none;
    background: var(--echo-blue-60, #0f62fe);
    box-shadow: 0 0 0 0 rgba(15, 98, 254, 0);
}

.echo-progress-panel__headline.is-live .echo-progress-panel__headline-icon {
    animation: echoProgressPulse 1.15s ease-in-out infinite;
}

.echo-progress-panel__headline.is-error .echo-progress-panel__headline-icon {
    background: var(--echo-orch-error-border, #da1e28);
}

.echo-progress-panel__headline-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.echo-progress-panel__detail {
    padding-left: 6px;
    color: var(--cds-text-secondary, #9ca3af);
    font-size: 12px;
    line-height: 1.45;
    opacity: 0.88;
}

.echo-progress-panel__detail.is-error {
    color: var(--echo-orch-error-border, #da1e28);
}

.echo-progress-panel__detail-text {
    display: block;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-style: italic;
    letter-spacing: 0.01em;
}

.echo-progress-panel__detail.is-live .echo-progress-panel__detail-text {
    animation: echoProgressDetailFade 1.2s ease-in-out infinite;
}

.echo-orch-item {
    position: relative;
    display: block;
    padding: 4px 10px 4px 0px;
    white-space: pre-wrap;
    font-size: 0.8rem;
    line-height: 1.45;
    font-family: "IBM Plex Sans", "Pretendard Variable", "Segoe UI", sans-serif;
}
/*
.echo-orch-item::before {
    content: "";
    position: absolute;
    left: 8px;
    top: 12px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #8d8d8d;
}
*/
/*.echo-orch-item--planner {
    background: var(--echo-orch-planner-bg);
    border-color: var(--echo-orch-planner-border);
}*/


/*.echo-orch-item--running {
    box-shadow: inset 3px 0 0 var(--echo-blue-60);
}*/

/*.echo-orch-item--running::before {
    background: var(--echo-blue-60);
}*/

/*.echo-orch-item--done {
    border-color: var(--echo-orch-done-border);
    box-shadow: inset 3px 0 0 var(--echo-orch-done-border);
}*/

/*.echo-orch-item--done::before {
    background: var(--echo-orch-done-border);
}*/

.echo-orch-item--error {
    background: var(--echo-orch-error-bg);
    border-color: var(--echo-orch-error-border);
    box-shadow: inset 3px 0 0 var(--echo-orch-error-border);
}

.echo-orch-item--error::before {
    background: var(--echo-orch-error-border);
}

.echo-orch-item__text {
    display: inline;
    font-size: 12px;
    color: var(--cds-text-secondary, #525252);
}

.echo-orch-item__meta {
    display: flex;
    flex-direction: row;
    align-items: start;
    gap: 16px;
}

.echo-orch-badge {
    display: inline-flex;
    align-items: center;
    padding: 1px 6px;
    border-radius: 10px;
    font-size: 10px;
    line-height: 1.3;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.echo-orch-badge--phase {
    background: #dbeafe;
    color: #1e3a8a;
    border: 1px solid #bfdbfe;
}

.echo-orch-badge--status {
    background: #e5e7eb;
    color: #374151;
    border: 1px solid #d1d5db;
}

.echo-orch-item__raw {
    margin-top: 4px;
    padding: 4px 6px;
    border-radius: 6px;
    border: 1px dashed #cbd5e1;
    background: #f8fafc;
    color: #64748b;
    font-family: "IBM Plex Mono", "D2Coding", Consolas, monospace;
    font-size: 11px;
    line-height: 1.4;
    white-space: pre-wrap;
    word-break: break-word;
}

/* Planner hint: no card look, auto-hide when answer content starts rendering */
.echo-orch-item--transient {
    border: 0;
    background: transparent;
    box-shadow: none;
    padding: 2px 0 2px 2px;
    font-size: 12px;
    color: #6f6f6f;
}

.echo-orch-item--transient::before {
    display: none;
}

.echo-chat-bubble--assistant.has-main-content .echo-orch-item--transient {
    display: none;
}

/* Orchestration / Thinking / Response stage controls */
.echo-chat-bubble--assistant .card-body {
    display: flex;
    flex-direction: column;
}

.echo-phase--mcp {
    order: 1;
}

.echo-phase--thinking {
    order: 2;
}

.echo-phase--response {
    order: 3;
}

.echo-phase-card {
/*    border: 1px solid var(--cds-border-subtle-01, #e0e0e0);
    background: var(--cds-field-03, #f4f4f4) !important;*/
}

.echo-phase-card__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 34px;
    margin-left: 16px;
    padding-bottom:4px;
}

.echo-phase-card__title {
    font-size: 12px;
    color: var(--cds-text-primary, #161616);
    padding: 0px 12px;
}

.echo-phase-card__toggle {
    border: 0;
    border-radius: 20px;
    background-color: var(--cds-layer-03, #fafafa);
    padding: 0 12px;
    font-size: 12px;
    color: var(--cds-text-primary, #161616);
}
    .echo-phase-card__toggle:hover {
        background-color: var(--cds-layer-hover, #e8e8e8);
    }

    .echo-phase-card__body {
        margin-top: 8px;
        padding: 10px 14px;
        border-radius: 4px;
    }
        /* 실제 텍스트가 들어가는 div */
        .echo-phase-card__body > div {
            /* 3줄 제한 핵심 코드 */
            max-height: 4.5em; /* line-height(1.5) * 3줄 = 4.5em */
            line-height: 1.5;
            overflow-y: auto; /* 세로 스크롤 활성화 */
            font-size: 14px;
            color: var(--cds-text-secondary, #525252);
            white-space: pre-wrap; /* 줄바꿈 허용 */
            word-break: break-all;
        }

.echo-phase-card.is-collapsed .echo-phase-card__body {
    display: none;
}

.echo-phase-card.is-active .echo-phase-card__head {
    border-bottom: 0;
}

.echo-phase-card--mcp .echo-orch-feed {
    margin-bottom: 0;
}

.echo-orch-feed {
    margin-bottom: 0;
    margin-left: 16px;
    border-left: 1px solid var(--cds-border-subtle-01, #e0e0e0);
    padding-left: 16px;
}

/*.echo-chat-host.mode-normal .echo-thinking-block--preview {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 68px;
}
*/
.echo-chat-host.mode-normal .echo-thinking-block--preview.is-active {
    margin-bottom: 8px;
    padding: 8px 10px;
    border-left: 1px solid var(--cds-border-subtle-01, #e0e0e0);
    padding-left: 16px;
    white-space: pre-wrap;
    font-size: 12px;
    line-height: 1.45;
    color: var(--cds-text-secondary, #525252);
}

.echo-chat-host.mode-debug .echo-phase--mcp,
.echo-chat-host.mode-debug .echo-phase--thinking {
    display: block;
    opacity: 1;
    max-height: none;
}

/* Markdown + code styling for Echo host */
.echo-chat-host .markdown-body {
    font-family: "IBM Plex Sans", "Pretendard Variable", "Segoe UI", sans-serif;
    color: var(--cds-text-primary, #161616);
    font-size: 14px;
    line-height: 24px;
}

.echo-chat-host .markdown-body p {
    margin-bottom: 8px;
    margin-top: 8px;
}

.echo-chat-host .markdown-body p:last-child {
    margin-top: 0;
    margin-bottom: 0;
}

.echo-chat-host .markdown-body h1,
.echo-chat-host .markdown-body h2,
.echo-chat-host .markdown-body h3,
.echo-chat-host .markdown-body h4 {
    margin-top: 8px;
    margin-bottom: 6px;
    font-family: "IBM Plex Sans", "Pretendard Variable", "Segoe UI", sans-serif;
    font-weight: 600;
}

.echo-chat-host .markdown-body ul,
.echo-chat-host .markdown-body ol {
    margin-top:8px;
    margin-bottom: 8px;
    padding-left: 1.2rem;
}


.echo-chat-host .markdown-body .table-responsive {
    margin-top: 12px;
    margin-bottom: 16px
}

.echo-chat-host .markdown-body blockquote {
    margin: 0.65rem 0;
    border-left: 3px solid var(--echo-blue-60);
    background: #f6f9ff;
    color: #374151;
    border-radius: 0 8px 8px 0;
}

.echo-chat-host .markdown-body a {
    color: var(--echo-blue-70);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.echo-chat-host .markdown-body :not(pre) > code {
    background: none;
    color: var(--cds-text-primary, #161616);
/*    border: 1px solid #d6e3ff;*/
/*    border-radius: 6px;*/
/*    padding: 0.12rem 0.38rem;*/
/*    font-family: "IBM Plex Mono", "D2Coding", Consolas, monospace;*/
    font-size: 12px;
    box-shadow: none;
    font-weight: 600;
    margin: 0;
    padding: 0;
}

.echo-chat-host .markdown-body .code-block {
    display: flex;
    flex-direction: column;
    margin: 10px 0 16px !important;
    overflow: hidden;
}

.echo-chat-host .markdown-body .code-block .code-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #161616;
    color: #ffffff;
    border-top-left-radius:2px;
    border-top-right-radius:2px;
}

.echo-chat-host .markdown-body .code-block .code-header .text-muted {
    color: #ffffff !important;
    font-family: "IBM Plex Mono", Consolas, monospace;
    font-size: 12px;
}

.echo-chat-host .markdown-body .code-block .cds-code-body {
    background: var(--echo-code-bg) !important;
    margin: 0 !important;
    padding: 12px 10px !important;
    overflow-x: auto;
}

.echo-chat-host .markdown-body .code-block pre,
.echo-chat-host .markdown-body pre[class*="language-"] {
    background: var(--echo-code-bg) !important;
    margin: 0 !important;
    padding: 0 !important;
}

.echo-chat-host .markdown-body .code-block code,
.echo-chat-host .markdown-body code[class*="language-"] {
    background: transparent !important;
    color: var(--echo-code-text) !important;
    font-family: "IBM Plex Mono", "D2Coding", Consolas, monospace;
    font-size: 12px;
    line-height: 1.58;
    text-shadow: none !important;
}

.echo-chat-host .markdown-body .code-block .copy-btn {
    border: 1px solid #6f6f6f;
    border-radius: 6px;
    background: transparent;
    color: #d0d0d0;
    width: 26px;
    height: 26px;
}

.echo-chat-host .markdown-body .code-block .copy-btn:hover {
    border-color: #a8a8a8;
    background: #393939;
    color: #f4f4f4;
}

.echo-chat-host .request-content .echo-chat-stop-btn {
    min-width: 64px;
    height: 36px;
    padding: 0 12px;
    border-radius: 10px;
    font-size: 0.78rem;
    line-height: 1;
}

/* Prism token palette */
.echo-chat-host .markdown-body .token.comment,
.echo-chat-host .markdown-body .token.prolog,
.echo-chat-host .markdown-body .token.doctype,
.echo-chat-host .markdown-body .token.cdata {
    color: #8d8d8d;
}

.echo-chat-host .markdown-body .token.punctuation {
    color: #c6c6c6;
}

.echo-chat-host .markdown-body .token.property,
.echo-chat-host .markdown-body .token.tag,
.echo-chat-host .markdown-body .token.constant,
.echo-chat-host .markdown-body .token.symbol,
.echo-chat-host .markdown-body .token.deleted {
    color: #78a9ff;
}

.echo-chat-host .markdown-body .token.boolean,
.echo-chat-host .markdown-body .token.number {
    color: #ff8389;
}

.echo-chat-host .markdown-body .token.selector,
.echo-chat-host .markdown-body .token.attr-name,
.echo-chat-host .markdown-body .token.string,
.echo-chat-host .markdown-body .token.char,
.echo-chat-host .markdown-body .token.builtin,
.echo-chat-host .markdown-body .token.inserted {
    color: #42be65;
}

.echo-chat-host .markdown-body .token.operator,
.echo-chat-host .markdown-body .token.entity,
.echo-chat-host .markdown-body .token.url,
.echo-chat-host .markdown-body .language-css .token.string,
.echo-chat-host .markdown-body .style .token.string {
    color: #a6c8ff;
}

.echo-chat-host .markdown-body .token.atrule,
.echo-chat-host .markdown-body .token.attr-value,
.echo-chat-host .markdown-body .token.keyword {
    color: #be95ff;
}

.echo-chat-host .markdown-body .token.function,
.echo-chat-host .markdown-body .token.class-name {
    color: #08bdba;
}

.echo-chat-host .markdown-body .token.regex,
.echo-chat-host .markdown-body .token.important,
.echo-chat-host .markdown-body .token.variable {
    color: #f1c21b;
}

@media (max-width: 768px) {
    .echo-chat-bubble {
        max-width: 100%;
        border-radius: 10px !important;
    }

    .echo-chat-bubble.card .card-body {
        padding: 10px 11px !important;
    }

    .echo-chat-host .markdown-body .code-block .cds-code-body {
        padding: 0.72rem 0.75rem;
    }
}

/* V2 /echohost/general option panel */
.v2-general-page {
    background-color: var(--cds-field, #FFFFFF);
}

.v2-general-side {
    width: 430px;
    overflow: auto;
    background-color: var(--cds-field, #FFFFFF);
}

.v2-general-title {
    margin-bottom: 2px;
    font-size: 14px;
    font-weight: 600;
    color: var(--cds-text-primary, #161616);
}

.v2-general-subtitle {
    margin-bottom: 12px;
    font-size: 12px;
    color: var(--cds-text-secondary, #525252);
}

.v2-general-status {
    border: 1px solid #d0d7e2;
    padding: 6px 8px;
    font-size: 12px;
    margin-bottom: 12px;
}

.v2-general-status--info {
    background: #edf5ff;
    color: #003a6d;
}

.v2-general-status--success {
    background: #edf8f1;
    color: #0e6027;
    border-color: #a7f0ba;
}

.v2-general-status--error {
    background: #fff1f1;
    color: #a2191f;
    border-color: #ffd7d9;
}

.v2-general-card {
/*    border: 1px solid #dfe3eb;*/
    background-color: var(--cds-field-01, #f4f4f4);
    padding: 12px;
    margin-bottom: 10px;
}

.v2-general-card-title {
    margin-bottom: 10px;
    font-size: 16px;
    font-weight: 600;
    color: var(--cds-text-primary, #161616);
}

.v2-general-field {
    margin-bottom: 10px;
}

.v2-general-field .form-label,
.v2-general-field .cds-label {
    margin-bottom: 4px;
    font-size: 12px;
    color: var(--cds-text-secondary, #525252);
}

.v2-general-field .cds-combobox,
.v2-general-field .carbon-textbox {
    height: 32px;
}

.v2-general-switch-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 10px;
}

.v2-general-switch-item {
    border: 1px solid var(--cds-border-subtle-01, #e0e0e0);
    padding: 8px;
    background-color: var( --cds-layer-03, #fafafa);
}

.v2-general-btn-row {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.v2-general-btn-row .cds-btn {
    flex: 1 1 0;
    min-width: 0;
}

.v2-general-check-row {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.v2-general-textarea {
    min-height: 82px;
    resize: vertical;
}

.v2-general-help {
    margin-top: 6px;
    font-size: 12px;
    color: var(--cds-text-secondary, #525252);
}

.v2-general-statusbar {
    padding: 8px 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.v2-general-chip {
    display: inline-flex;
    align-items: center;
    height: 24px;
    border: 1px solid #d0d7e2;
    border-radius: 999px;
    background: #f3f7ff;
    color: #334155;
    padding: 0 10px;
    font-size: 12px;
    line-height: 1;
}

/* V2 general chat tuning (v1 structure + Gemini user bubble) */
.v2-general-page .echo-chat-host {
    background-color: var(--cds-field, #ffffff);
}

.v2-general-page .echo-chat-host > .dock-content.rx-scroll {
    padding: 14px clamp(12px, 2.2vw, 28px) 20px !important;
}

.v2-general-page .echo-chat-host .echo-chat-message-row--assistant,
.v2-general-page .echo-chat-host .chat-assistant-container {
    justify-content: center;
    width: 100%;
}

    .v2-general-page .echo-chat-host .echo-chat-bubble--assistant {
        width: min(100%, 920px);
        max-width: min(100%, 920px);
        box-shadow: none;
        background: transparent;
    }

.v2-general-page .echo-chat-host .echo-chat-bubble--assistant .card-body {
    padding: 0 !important;
}

.v2-general-page .echo-chat-host .echo-chat-message-row--user {
    justify-content: flex-end;
}

    .v2-general-page .echo-chat-host .echo-chat-bubble--user {
        position: relative;
        width: fit-content;
        font-size: 14px;
        max-width: min(72%, 680px);
        border-color: #c7d8ff !important;
        border-radius: 25px 4px 25px 25px !important;
        /*    background: linear-gradient(180deg, #edf3ff 0%, #e7efff 100%);*/
        background-color: var(--cds-echo-bubble, #f4f4f4);
    }


.v2-general-page .echo-chat-host .dock-bottom.request-container {
    position: relative;
    left: auto;
    right: auto;
    bottom: auto;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 10px clamp(12px, 2.2vw, 28px) 12px !important;
    z-index: 2;
    background: linear-gradient(180deg, rgba(247, 248, 251, 0) 0%, rgba(247, 248, 251, 0.94) 26%, rgba(247, 248, 251, 1) 100%);
}

.v2-general-page .echo-chat-host .dock-bottom.request-container .request-content {
    width: min(100%, 920px);
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 50px;
    border: 1px solid #d9dde6;
    border-radius: 14px;
    background: #ffffff;
    padding: 4px 6px 4px 14px;
    box-sizing: border-box;
    overflow: hidden;
}

.v2-general-page .echo-chat-host .dock-bottom.request-container .request-input {
    flex: 1 1 auto;
    min-width: 0;
    height: 40px !important;
    line-height: 40px;
    padding: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

.v2-general-page .echo-chat-host .dock-bottom.request-container .request-content .cds-icon-only-btn {
    width: 36px;
    height: 36px;
    min-width: 36px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    background: #eef3fb;
    color: #334155;
}

.v2-general-page .echo-chat-host .dock-bottom.request-container .request-content .cds-icon-only-btn:hover {
    background: #e2eaf8 !important;
}

.v2-general-page .echo-chat-host .dock-bottom.request-container .request-content .cds-icon-only-btn:disabled {
    opacity: 0.55;
}

.v2-general-page .echo-chat-host .dock-bottom.request-container .request-content .echo-chat-stop-btn {
    min-width: 72px;
    height: 36px;
    padding: 0 12px;
    border-radius: 10px;
}

.v2-general-page .request-container .cds-popover-wrap .rx-popover-container .rx-popover-content {
    top: -172px !important;
    left: 0 !important;
    background-color: var(--cds-field, #ffffff) !important;
}
    .v2-general-page .request-container .cds-popover-wrap .rx-popover-container .rx-popover-content .cds-popover-item {
        font-size: 14px !important;
        gap: 16px !important;
        align-items: center;
    }


/* 반짝이는 효과를 가질 부모 요소 */
.echo-phase-card--mcp.is-active, .echo-phase-card--thinking.is-active {
    position: relative;
    overflow: hidden;
    display: inline-block; /* 텍스트 너비만큼만 잡히도록 설정 (필요시 수정) */
    color: #555; /* 글자색은 적절히 조정하세요 */
}

    /* 반짝이는 레이어 (유저님이 주신 코드 기반) */
    .echo-phase-card--mcp.is-active::after, .echo-phase-card--thinking.is-active::after {
        content: "";
        position: absolute;
        inset: 0;
        transform: translateX(-120%);
        background: linear-gradient( 90deg, transparent 0%, rgba(255, 255, 255, 0) 35%, rgba(255, 255, 255, 0.55) 50%, rgba(255, 255, 255, 0) 65%, transparent 100% );
        mix-blend-mode: screen;
        animation: thinkingSweep 1.3s ease-in-out infinite;
        pointer-events: none;
    }

/* 애니메이션 정의 (누락되었던 부분 추가) */
@keyframes thinkingSweep {
    0% {
        transform: translateX(-120%);
    }

    100% {
        transform: translateX(120%);
    }
}

/* 로딩 스피너 */
/* 기본: 모든 assistant 메시지는 아이콘만 보이게 */
.chat-assistant-container .echo-message-icon .spinner-border {
    display: none;
}

.chat-assistant-container .echo-message-icon .carbon-icon {
    display: inline-block;
}

/* 마지막 assistant 메시지에서만,
            "아이콘에 IsLoading 클래스가 붙어있을 때" 스피너만 보이게 */
.chat-assistant-container:last-of-type
.echo-message-icon:has(.carbon-icon.is-loading) .spinner-border {
    display: inline-block;
}

.chat-assistant-container:last-of-type
.echo-message-icon:has(.carbon-icon.is-loading) .carbon-icon {
    display: none;
}




/* 이미지 업로드 */
.v2-general-page .request-content {
    position: relative;
    z-index: 10;
}

.v2-general-page .image-preview-section {
    background-color: var(--cds-field, #ffffff) !important;
    border-bottom: none !important;
    position: absolute;
    bottom: 45px;
    padding-bottom: 18px !important;
    width: 100%;
    z-index:9;
}

.v2-general-page .image-preview-item {
    border: none !important;
    padding: 0 !important;
}
.v2-general-page .image-info {
    background-color: var(--cds-layer-02, #e0e0e0) !important;
    color: var(--cds-text-primary, #161616) !important;
    left: 0 !important;
    right: 0 !important;
    word-break: break-all;
    padding: 2px 18px 2px 6px;
}

/* V1 AI mode switcher */
.ai-mode-selector-bottom {
    background-color: #f8f9fa;
    border-top: 1px solid #dee2e6;
    padding: 8px 16px;
}

.ai-mode-toggle-group {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.ai-mode-toggle-group .btn {
    min-width: 60px;
    border-radius: 0;
    border-color: #dee2e6;
    font-size: 11px;
    padding: 6px 12px;
    transition: all 0.2s ease;
}

.ai-mode-toggle-group .btn:first-child {
    border-top-left-radius: 8px;
    border-bottom-left-radius: 8px;
}

.ai-mode-toggle-group .btn:last-child {
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
}

.ai-mode-toggle-group .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    z-index: 2;
}

.ai-mode-toggle-group .btn-primary {
    background-color: #007bff;
    border-color: #007bff;
    color: #ffffff;
    font-weight: 500;
}

.ai-mode-toggle-group .btn-outline-primary {
    background-color: #ffffff;
    border-color: #dee2e6;
    color: #6c757d;
}

.ai-mode-toggle-group .btn-outline-primary:hover {
    background-color: #e3f2fd;
    border-color: #007bff;
    color: #007bff;
}

@media (max-width: 1280px) {
    .v2-general-side {
        width: 380px;
    }

    .v2-general-page .request-container .cds-popover-wrap .rx-popover-container .rx-popover-content {
        top: -163px !important;
        left: 0 !important;
    }
}

@media (max-width: 992px) {
    .v2-general-side {
        width: 340px;
    }

    .v2-general-chip {
        font-size: 0.7rem;
    }

    .v2-general-page .echo-chat-host .echo-chat-bubble--user {
        max-width: 82%;
    }

    .v2-general-page .echo-chat-host .dock-bottom.request-container {
        padding-left: 10px !important;
        padding-right: 10px !important;
    }
}

@media (max-width: 768px) {
    .ai-mode-toggle-group .btn {
        min-width: 50px;
        font-size: 10px;
        padding: 4px 8px;
    }

    .ai-mode-selector-bottom {
        padding: 6px 12px;
    }
}

@keyframes echoProgressPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(15, 98, 254, 0.28);
        transform: scale(1);
    }

    70% {
        box-shadow: 0 0 0 8px rgba(15, 98, 254, 0);
        transform: scale(1.08);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(15, 98, 254, 0);
        transform: scale(1);
    }
}
