/* IEUM Web UI Styles */

/* Global font - Pretendard for Korean */
body {
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* VS Code style tooltip */
[data-tooltip] {
    position: relative;
}

[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 6px;
    padding: 4px 8px;
    background: #21252b;
    border: 1px solid #3a3f4b;
    border-radius: 4px;
    color: #abb2bf;
    font-size: 11px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.15s, visibility 0.15s;
    z-index: 1000;
    pointer-events: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

[data-tooltip]:hover::after {
    opacity: 1;
    visibility: visible;
}

/* Tooltip position variants */
[data-tooltip-pos="top"]::after {
    top: auto;
    bottom: 100%;
    margin-top: 0;
    margin-bottom: 6px;
}

[data-tooltip-pos="left"]::after {
    top: 50%;
    left: auto;
    right: 100%;
    transform: translateY(-50%);
    margin-top: 0;
    margin-right: 6px;
}

[data-tooltip-pos="right"]::after {
    top: 50%;
    left: 100%;
    transform: translateY(-50%);
    margin-top: 0;
    margin-left: 6px;
}

/* Light mode overrides */
body.light {
    background: #f8fafc !important;
    color: #1e293b !important;
}

body.light aside {
    background: #ffffff !important;
    border-color: #e2e8f0 !important;
}

body.light header {
    background: #ffffff !important;
    border-color: #e2e8f0 !important;
}

body.light .bg-dark-900 {
    background: #ffffff !important;
}

body.light .bg-dark-800 {
    background: #f1f5f9 !important;
}

body.light .bg-dark-950 {
    background: #f8fafc !important;
}

body.light .border-dark-800,
body.light .border-dark-700 {
    border-color: #e2e8f0 !important;
}

body.light .text-white {
    color: #0f172a !important;
}

body.light .text-dark-100 {
    color: #1e293b !important;
}

body.light .text-dark-200 {
    color: #334155 !important;
}

body.light .text-dark-400 {
    color: #64748b !important;
}

body.light .text-dark-500 {
    color: #94a3b8 !important;
}

body.light #messageInput {
    background: #f1f5f9 !important;
    border-color: #e2e8f0 !important;
    color: #0f172a !important;
}

body.light #messageInput::placeholder {
    color: #94a3b8 !important;
}

body.light #sendBtn {
    background: #0f172a !important;
    color: #ffffff !important;
}

body.light .session-item:hover {
    background: #e2e8f0 !important;
}

body.light .session-item.active {
    background: #3b82f6 !important;
    color: #ffffff !important;
}

body.light .file-item:hover {
    background: #f1f5f9 !important;
}

body.light .code-block {
    background: #f1f5f9 !important;
    border-color: #e2e8f0 !important;
}

body.light .code-header {
    background: #e2e8f0 !important;
    border-color: #cbd5e1 !important;
    color: #475569 !important;
}

body.light .code-content {
    color: #1e293b !important;
}

body.light .tool-block {
    background: #f8fafc !important;
    border-color: #e2e8f0 !important;
}

body.light .tool-header {
    background: #f1f5f9 !important;
}

body.light .tool-header:hover {
    background: #e2e8f0 !important;
}

body.light .toast {
    background: #ffffff !important;
    border-color: #e2e8f0 !important;
    color: #1e293b !important;
}

body.light .markdown-content h1,
body.light .markdown-content h2,
body.light .markdown-content h3 {
    color: #0f172a !important;
}

body.light .markdown-content code:not(pre code) {
    background: #f1f5f9 !important;
    color: #db2777 !important;
}

body.light .message-user > div {
    background: #e2e8f0 !important;
}

body.light .message-user p {
    color: #0f172a !important;
}

body.light .message-assistant > div {
    background: #ffffff !important;
    border-color: #e2e8f0 !important;
}

body.light ::-webkit-scrollbar-thumb {
    background: #cbd5e1;
}

body.light ::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

body.light #autoApproveToggleBtn {
    background: #cbd5e1 !important;
}

body.light #autoApproveToggleBtn.active {
    background: #22c55e !important;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #334155;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #475569;
}

/* Textarea auto-resize */
#messageInput {
    min-height: 48px;
    max-height: 200px;
    line-height: 1.5;
}

/* Message styles - Gemini-like */
.message {
    width: 100%;
    margin-bottom: 1.5rem;
}

.message-wrapper {
    display: flex;
    gap: 0.75rem;
    max-width: 100%;
}

.message-wrapper.user-wrapper {
    flex-direction: row-reverse;
}

.message-wrapper.assistant-wrapper {
    flex-direction: row;
}

.message-avatar {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.message-avatar.user-avatar {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    color: white;
}

.message-avatar.assistant-avatar {
    background: linear-gradient(135deg, #10b981, #06b6d4);
    color: white;
}

.message-body {
    flex: 1;
    min-width: 0;
    max-width: 85%;
}

.message-wrapper.user-wrapper .message-body {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.message-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.375rem;
}

.message-wrapper.user-wrapper .message-header {
    flex-direction: row-reverse;
}

.message-sender {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #e2e8f0;
}

.message-time {
    font-size: 0.6875rem;
    color: #64748b;
}

.message-bubble {
    padding: 0.875rem 1rem;
    border-radius: 1.25rem;
    word-break: break-word;
}

.message-bubble.user-bubble {
    background: linear-gradient(135deg, #3b82f6, #6366f1);
    color: white;
    border-bottom-right-radius: 0.375rem;
}

.message-bubble.assistant-bubble {
    background: #1e293b;
    border: 1px solid #334155;
    color: #e2e8f0;
    border-bottom-left-radius: 0.375rem;
}

.message-content {
    word-break: break-word;
}

/* Light mode message styles */
body.light .message-sender {
    color: #1e293b;
}

body.light .message-time {
    color: #94a3b8;
}

body.light .message-bubble.assistant-bubble {
    background: #ffffff;
    border-color: #e2e8f0;
    color: #334155;
}

/* Code blocks */
.code-block {
    position: relative;
    background: #0f172a;
    border: 1px solid #1e293b;
    border-radius: 0.5rem;
    overflow: hidden;
}

.code-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 1rem;
    background: #1e293b;
    border-bottom: 1px solid #334155;
    font-size: 0.75rem;
    color: #94a3b8;
}

.code-content {
    padding: 1rem;
    overflow-x: auto;
    font-family: 'D2Coding', 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
    font-size: 0.875rem;
    line-height: 1.6;
}

.code-content pre {
    margin: 0;
}

/* Copy button */
.copy-btn {
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    background: transparent;
    color: #64748b;
    transition: all 0.15s;
    cursor: pointer;
    border: none;
}

.copy-btn:hover {
    background: #334155;
    color: #e2e8f0;
}

/* Tool execution */
.tool-block {
    border: 1px solid #1e293b;
    border-radius: 0.75rem;
    overflow: hidden;
    background: #0f172a;
}

.tool-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: #1e293b;
    cursor: pointer;
}

.tool-header:hover {
    background: #334155;
}

.tool-icon {
    width: 1.25rem;
    height: 1.25rem;
    color: #64748b;
}

.tool-name {
    font-size: 0.875rem;
    font-weight: 500;
    color: #e2e8f0;
}

.tool-status {
    margin-left: auto;
    font-size: 0.75rem;
    padding: 0.125rem 0.5rem;
    border-radius: 9999px;
}

.tool-status.running {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
}

.tool-status.success {
    background: rgba(34, 197, 94, 0.2);
    color: #4ade80;
}

.tool-status.error {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
}

.tool-content {
    padding: 1rem;
    font-size: 0.875rem;
    color: #94a3b8;
    display: none;
}

.tool-content.expanded {
    display: block;
}

/* Diff view */
.diff-line {
    font-family: 'D2Coding', 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 0.8125rem;
    line-height: 1.6;
    padding: 0 1rem;
}

.diff-add {
    background: rgba(34, 197, 94, 0.15);
    color: #4ade80;
}

.diff-remove {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
}

.diff-context {
    color: #64748b;
}

/* File tree */
.file-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.5rem;
    border-radius: 0.375rem;
    cursor: pointer;
    color: #94a3b8;
    transition: all 0.15s;
}

.file-item:hover {
    background: #1e293b;
    color: #e2e8f0;
}

.file-item.selected {
    background: #334155;
    color: #ffffff;
}

.file-icon {
    width: 1rem;
    height: 1rem;
    flex-shrink: 0;
}

.file-name {
    font-size: 0.8125rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.folder-children {
    margin-left: 1rem;
}

/* Session item */
.session-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    cursor: pointer;
    color: #94a3b8;
    transition: all 0.15s;
}

.session-item:hover {
    background: #334155;
    color: #e2e8f0;
}

.session-item.active {
    background: #3b82f6;
    color: #ffffff;
}

/* Loading spinner */
.spinner {
    width: 1rem;
    height: 1rem;
    border: 2px solid #334155;
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Typing indicator */
.typing-indicator {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.75rem 1rem;
}

.typing-dot {
    width: 0.5rem;
    height: 0.5rem;
    background: #64748b;
    border-radius: 50%;
    animation: typing 1.4s infinite;
}

.typing-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.4;
    }
    30% {
        transform: translateY(-0.25rem);
        opacity: 1;
    }
}

/* Toast notifications */
.toast {
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    background: #1e293b;
    border: 1px solid #334155;
    color: #e2e8f0;
    font-size: 0.875rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s ease;
}

.toast.success {
    border-color: #22c55e;
}

.toast.error {
    border-color: #ef4444;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Markdown content */
.markdown-content h1,
.markdown-content h2,
.markdown-content h3 {
    color: #ffffff;
    font-weight: 600;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.markdown-content h1 { font-size: 1.5rem; }
.markdown-content h2 { font-size: 1.25rem; }
.markdown-content h3 { font-size: 1.125rem; }

.markdown-content p {
    margin-bottom: 0.75rem;
    line-height: 1.7;
}

.markdown-content ul,
.markdown-content ol {
    margin-bottom: 0.75rem;
    padding-left: 1.5rem;
}

.markdown-content li {
    margin-bottom: 0.25rem;
}

.markdown-content code:not(pre code) {
    background: #1e293b;
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
    font-size: 0.875em;
    color: #f472b6;
}

.markdown-content a {
    color: #60a5fa;
    text-decoration: none;
}

.markdown-content a:hover {
    text-decoration: underline;
}

.markdown-content blockquote {
    border-left: 3px solid #334155;
    padding-left: 1rem;
    color: #94a3b8;
    font-style: italic;
}

/* Modal animations */
#settingsModal {
    transition: opacity 0.2s ease;
}

#settingsModal > div {
    animation: modalSlide 0.3s ease;
}

@keyframes modalSlide {
    from {
        transform: scale(0.95);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Focus styles */
button:focus-visible,
textarea:focus-visible {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Selection */
::selection {
    background: #3b82f6;
    color: white;
}

/* Thinking indicator (for reasoning models like GPT-OSS, Qwen) */
.thinking-indicator {
    color: #94a3b8;
}

.thinking-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.thinking-icon {
    color: #60a5fa;
}

.thinking-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #60a5fa;
}

.thinking-dots {
    display: inline-flex;
    gap: 0.125rem;
}

.thinking-dots span {
    animation: thinkingDot 1.4s infinite;
    color: #60a5fa;
}

.thinking-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.thinking-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes thinkingDot {
    0%, 60%, 100% {
        opacity: 0.3;
    }
    30% {
        opacity: 1;
    }
}

.thinking-content {
    font-family: 'D2Coding', 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
    font-size: 0.8125rem;
    line-height: 1.6;
    max-height: 200px;
    overflow-y: auto;
    white-space: pre-wrap;
    word-break: break-word;
    padding: 0.75rem;
    background: #0f172a;
    border-radius: 0.5rem;
    border: 1px solid #1e293b;
}

/* Light mode thinking styles */
body.light .thinking-indicator {
    color: #64748b;
}

body.light .thinking-icon,
body.light .thinking-label,
body.light .thinking-dots span {
    color: #3b82f6;
}

body.light .thinking-content {
    background: #f1f5f9;
    border-color: #e2e8f0;
    color: #475569;
}

/* Connection banner */
.connection-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0.75rem;
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 0.5rem;
    margin: 0.5rem;
    font-size: 0.8125rem;
    color: #f87171;
    animation: fadeIn 0.3s ease;
}

.connection-banner button {
    padding: 0.25rem 0.75rem;
    border-radius: 0.25rem;
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.4);
    font-size: 0.75rem;
    cursor: pointer;
    transition: background 0.15s;
}

.connection-banner button:hover {
    background: rgba(239, 68, 68, 0.35);
}

.connection-banner .banner-close {
    padding: 0.25rem;
    background: transparent;
    border: none;
    color: #f87171;
    cursor: pointer;
    opacity: 0.7;
}

.connection-banner .banner-close:hover {
    opacity: 1;
}

/* Welcome message in chat */
.welcome-message {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    text-align: center;
    color: #5c6370;
}

.welcome-message h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #abb2bf;
    margin-bottom: 0.75rem;
}

.welcome-message p {
    font-size: 0.8125rem;
    line-height: 1.6;
    margin-bottom: 0.25rem;
}

.welcome-message .shortcuts-hint {
    margin-top: 1rem;
    padding: 0.75rem;
    background: rgba(44, 49, 58, 0.5);
    border-radius: 0.5rem;
    font-size: 0.75rem;
    text-align: left;
    width: 100%;
    max-width: 280px;
}

.welcome-message .shortcuts-hint div {
    display: flex;
    justify-content: space-between;
    padding: 0.125rem 0;
}

.welcome-message .shortcuts-hint kbd {
    font-family: 'D2Coding', 'JetBrains Mono', monospace;
    font-size: 0.6875rem;
    padding: 0.0625rem 0.375rem;
    background: #1e2632;
    border: 1px solid #3a3f4b;
    border-radius: 0.25rem;
    color: #abb2bf;
}

/* Keyboard shortcuts modal */
.shortcuts-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 60;
    animation: fadeIn 0.15s ease;
}

.shortcuts-modal {
    background: #21252b;
    border: 1px solid #3a3f4b;
    border-radius: 0.5rem;
    padding: 1.25rem;
    max-width: 420px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.shortcuts-modal h3 {
    font-size: 0.9375rem;
    font-weight: 600;
    color: #e2e8f0;
    margin-bottom: 1rem;
}

.shortcuts-modal .shortcut-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.375rem 0;
    font-size: 0.8125rem;
    color: #abb2bf;
    border-bottom: 1px solid rgba(58, 63, 75, 0.4);
}

.shortcuts-modal .shortcut-row:last-child {
    border-bottom: none;
}

.shortcuts-modal kbd {
    font-family: 'D2Coding', 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    padding: 0.125rem 0.5rem;
    background: #1e2632;
    border: 1px solid #3a3f4b;
    border-radius: 0.25rem;
    color: #e2e8f0;
}

.shortcuts-modal .shortcut-section {
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    color: #5c6370;
    margin-top: 0.75rem;
    margin-bottom: 0.25rem;
    letter-spacing: 0.05em;
}

/* Approval buttons class */
.approval-buttons {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* ===== W01: Mobile Responsive Layout ===== */

/* Mobile navigation bar - hidden by default on desktop */
.mobile-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 40;
    background: #21252b;
    border-top: 1px solid #3a3f4b;
    height: 48px;
    align-items: center;
    justify-content: space-around;
}

.mobile-nav-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 6px 0;
    color: #5c6370;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 10px;
    transition: color 0.15s;
}

.mobile-nav-btn.active {
    color: #4d8fcc;
}

.mobile-nav-btn svg {
    width: 20px;
    height: 20px;
}

/* Hamburger toggle for file tree on tablet/mobile */
.mobile-explorer-toggle {
    display: none;
    position: fixed;
    top: 8px;
    left: 8px;
    z-index: 45;
    background: #21252b;
    border: 1px solid #3a3f4b;
    border-radius: 6px;
    padding: 6px;
    color: #abb2bf;
    cursor: pointer;
}

.mobile-explorer-toggle:hover {
    background: #2c313a;
    color: #ffffff;
}

/* Overlay backdrop for mobile panels */
.mobile-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 29;
}

.mobile-overlay.active {
    display: block;
}

/* Tablet: 768px - 1024px (2-column: editor + chat, file tree hidden) */
@media (max-width: 1024px) {
    /* Hide file explorer by default on tablet */
    #explorerPanel {
        display: none;
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        z-index: 30;
        width: 260px !important;
        box-shadow: 4px 0 12px rgba(0, 0, 0, 0.3);
    }

    #explorerPanel.mobile-active {
        display: flex;
    }

    /* Hide the explorer resizer */
    #explorerResizer {
        display: none;
    }

    /* Show hamburger toggle */
    .mobile-explorer-toggle {
        display: flex;
    }

    /* Adjust chat panel width for tablet */
    #chatPanel {
        min-width: 240px !important;
        max-width: 320px !important;
    }
}

/* Mobile: < 768px (single column with tab navigation) */
@media (max-width: 768px) {
    /* Show mobile nav */
    .mobile-nav {
        display: flex;
    }

    /* Main layout becomes column-based */
    .main-layout {
        flex-direction: column;
    }

    /* Hide both resizers */
    #chatResizer,
    #explorerResizer {
        display: none;
    }

    /* Chat panel: full-width, default visible */
    #chatPanel {
        width: 100% !important;
        min-width: 0 !important;
        max-width: none !important;
        border-right: none !important;
        flex: 1;
        display: flex;
    }

    #chatPanel.mobile-hidden {
        display: none !important;
    }

    /* Editor section: full-width, hidden by default */
    .editor-section {
        width: 100% !important;
        flex: 1;
        display: none;
    }

    .editor-section.mobile-active {
        display: flex !important;
    }

    /* File explorer: fixed overlay on mobile */
    #explorerPanel {
        display: none;
        position: fixed;
        left: 0;
        top: 0;
        bottom: 48px; /* above mobile nav */
        z-index: 30;
        width: 280px !important;
        box-shadow: 4px 0 12px rgba(0, 0, 0, 0.3);
    }

    #explorerPanel.mobile-active {
        display: flex;
    }

    /* Show hamburger toggle */
    .mobile-explorer-toggle {
        display: flex;
    }

    /* Adjust status bar to leave room for mobile nav */
    footer.status-bar {
        display: none;
    }

    /* Chat input: ensure accessibility above mobile nav */
    #chatPanel .p-3.border-t {
        padding-bottom: 12px;
    }

    /* Settings modal: adjust for mobile */
    #settingsModal > div {
        max-width: 100%;
        margin: 8px;
        max-height: 90vh;
    }

    /* Toast: position above mobile nav */
    #toastContainer {
        bottom: 60px !important;
    }
}

/* Desktop: > 1024px (keep all default styles) */
@media (min-width: 1025px) {
    .mobile-nav {
        display: none !important;
    }

    .mobile-explorer-toggle {
        display: none !important;
    }

    .mobile-overlay {
        display: none !important;
    }
}

/* Light mode mobile nav */
body.light .mobile-nav {
    background: #ffffff;
    border-top-color: #e2e8f0;
}

body.light .mobile-nav-btn {
    color: #94a3b8;
}

body.light .mobile-nav-btn.active {
    color: #3b82f6;
}

body.light .mobile-explorer-toggle {
    background: #ffffff;
    border-color: #e2e8f0;
    color: #64748b;
}

body.light .mobile-explorer-toggle:hover {
    background: #f1f5f9;
    color: #1e293b;
}

/* Tool output truncation (E05) */
.tool-output-wrapper {
    margin-top: 0.5rem;
    max-height: 300px;
    overflow-y: auto;
}

.tool-output-content {
    font-family: 'D2Coding', 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
    font-size: 0.75rem;
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-word;
    color: #94a3b8;
    padding: 0.5rem;
    background: #0f172a;
    border-radius: 0.375rem;
    border: 1px solid #1e293b;
}

.tool-output-truncated {
    color: #64748b;
    font-size: 0.6875rem;
    font-style: italic;
    margin-top: 0.25rem;
}

.tool-output-copy-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.125rem 0.5rem;
    margin-top: 0.25rem;
    font-size: 0.6875rem;
    color: #60a5fa;
    background: transparent;
    border: 1px solid #334155;
    border-radius: 0.25rem;
    cursor: pointer;
    transition: all 0.15s;
}

.tool-output-copy-btn:hover {
    background: #334155;
    color: #e2e8f0;
}

body.light .tool-output-content {
    background: #f1f5f9;
    border-color: #e2e8f0;
    color: #475569;
}

body.light .tool-output-copy-btn {
    color: #3b82f6;
    border-color: #e2e8f0;
}

body.light .tool-output-copy-btn:hover {
    background: #e2e8f0;
    color: #1e293b;
}
