/* VS Code Theme Variables */
:root {
    --vscode-background: #1e1e1e;
    --vscode-foreground: #cccccc;
    --vscode-titlebar-bg: #3c3c3c;
    --vscode-titlebar-fg: #cccccc;
    --vscode-activitybar-bg: #333333;
    --vscode-activitybar-fg: #ffffff;
    --vscode-activitybar-inactive: #858585;
    --vscode-sidebar-bg: #252526;
    --vscode-sidebar-fg: #cccccc;
    --vscode-sidebar-header-bg: #252526;
    --vscode-editor-bg: #1e1e1e;
    --vscode-editor-fg: #d4d4d4;
    --vscode-statusbar-bg: #007acc;
    --vscode-statusbar-fg: #ffffff;
    --vscode-tab-active-bg: #1e1e1e;
    --vscode-tab-inactive-bg: #2d2d2d;
    --vscode-tab-border: #252526;
    --vscode-border: #474747;
    --vscode-input-bg: #3c3c3c;
    --vscode-input-fg: #cccccc;
    --vscode-input-border: #3c3c3c;
    --vscode-button-bg: #0e639c;
    --vscode-button-fg: #ffffff;
    --vscode-link-fg: #3794ff;
    --vscode-list-hover-bg: #2a2d2e;
    --vscode-list-active-bg: #094771;
    --vscode-scrollbar: #424242;
    --vscode-highlight: #0078d4;
    --vscode-panel-bg: #1e1e1e;
    --vscode-chat-bg: #1e1e1e;
}

/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 13px;
    background-color: var(--vscode-background);
    color: var(--vscode-foreground);
    overflow: hidden;
    height: 100vh;
    display: flex;
    flex-direction: column;
    user-select: none;
    /* Scale down 10% for better fit */
    transform: scale(0.9);
    transform-origin: top left;
    width: 111.11%; /* 100/0.9 to compensate for scale */
    height: 111.11vh;
}

/* Title Bar */
.titlebar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 30px;
    background-color: var(--vscode-titlebar-bg);
    color: var(--vscode-titlebar-fg);
    padding: 0 8px;
    -webkit-app-region: drag;
    flex-shrink: 0;
}

.titlebar-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.app-icon {
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.app-icon svg {
    width: 16px;
    height: 16px;
}

.menu-bar {
    display: flex;
    gap: 4px;
    -webkit-app-region: no-drag;
}

.menu-item {
    padding: 4px 8px;
    cursor: pointer;
    border-radius: 4px;
    font-size: 12px;
}

.menu-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.titlebar-center {
    flex: 1;
    display: flex;
    justify-content: center;
}

.search-box {
    display: flex;
    align-items: center;
    gap: 6px;
    background-color: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    padding: 3px 80px 3px 10px;
    font-size: 12px;
    color: #999;
    cursor: pointer;
    -webkit-app-region: no-drag;
}

.search-box:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.titlebar-right {
    display: flex;
    align-items: center;
    gap: 8px;
    -webkit-app-region: no-drag;
}

.layout-controls {
    display: flex;
    gap: 4px;
}

.layout-controls i {
    padding: 4px;
    cursor: pointer;
    border-radius: 4px;
}

.layout-controls i:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.window-controls {
    display: flex;
}

.window-btn {
    width: 46px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.window-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.window-btn.close:hover {
    background-color: #e81123;
}

/* Main Container */
.main-container {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* Activity Bar */
.activity-bar {
    width: 48px;
    background-color: var(--vscode-activitybar-bg);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex-shrink: 0;
}

.activity-bar-top,
.activity-bar-bottom {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.activity-item {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--vscode-activitybar-inactive);
    position: relative;
}

.activity-item:hover {
    color: var(--vscode-activitybar-fg);
}

.activity-item.active {
    color: var(--vscode-activitybar-fg);
}

.activity-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background-color: var(--vscode-activitybar-fg);
}

.activity-item i {
    font-size: 22px !important;
}

.activity-icon-img {
    width: 30px;
    height: 30px;
}

/* Sidebar */
.sidebar {
    width: 240px;
    background-color: var(--vscode-sidebar-bg);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    border-right: 1px solid var(--vscode-border);
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: #bbbbbb;
}

.sidebar-actions i {
    cursor: pointer;
    padding: 2px;
}

.sidebar-content {
    flex: 1;
    overflow-y: auto;
    padding: 0 0 8px 0;
}

.tree-item {
    display: flex;
    align-items: center;
    padding: 4px 8px;
    cursor: pointer;
    font-size: 13px;
    gap: 4px;
}

.tree-item:hover {
    background-color: var(--vscode-list-hover-bg);
}

.tree-item.indent-1 {
    padding-left: 28px;
}

.tree-item i {
    font-size: 16px;
    flex-shrink: 0;
}

.folder-name {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 11px;
}

.sidebar-section {
    border-top: 1px solid var(--vscode-border);
}

.section-header {
    display: flex;
    align-items: center;
    padding: 8px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: #bbbbbb;
    cursor: pointer;
    gap: 4px;
}

.section-header:hover {
    background-color: var(--vscode-list-hover-bg);
}

/* Editor Area */
.editor-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    background-color: var(--vscode-editor-bg);
    min-width: 0;
}

.tabs-container {
    display: flex;
    background-color: var(--vscode-tab-inactive-bg);
    border-bottom: 1px solid var(--vscode-tab-border);
    height: 35px;
    flex-shrink: 0;
}

.tabs-container::after {
    content: '';
    display: block;
    width: 1px;
    height: 100%;
    background-color: var(--vscode-border);
    margin-left: 0;
}

.tab {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 12px;
    background-color: var(--vscode-tab-inactive-bg);
    border-right: 1px solid var(--vscode-tab-border);
    cursor: pointer;
    font-size: 13px;
    height: 100%;
}

.tab.active {
    background-color: #1a1a1a;
    border-bottom: 1px solid #1a1a1a;
    margin-bottom: -1px;
}

.tab-close {
    font-size: 14px;
    opacity: 0.7;
    padding: 2px;
    border-radius: 4px;
}

.tab:hover .tab-close {
    opacity: 1;
}

.tab-close:hover {
    background-color: rgba(255, 255, 255, 0.1);
    opacity: 1 !important;
}

/* Editor Content */
.editor-content {
    flex: 1;
    overflow: auto;
    padding: 20px;
}

/* Welcome Page */
.welcome-page {
    background-color: var(--vscode-editor-bg);
}

.welcome-container {
    display: flex;
    max-width: 800px;
    margin: 0 auto;
    gap: 60px;
}

.welcome-left {
    flex: 1;
}

.welcome-right {
    width: 260px;
}

.welcome-header {
    margin-bottom: 32px;
}

.welcome-header h1 {
    font-size: 26px;
    font-weight: 400;
    color: var(--vscode-foreground);
    margin-bottom: 4px;
}

.welcome-subtitle {
    font-size: 14px;
    color: #888;
}

.welcome-section {
    margin-bottom: 24px;
}

.welcome-section h2 {
    font-size: 13px;
    font-weight: 600;
    color: var(--vscode-foreground);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.welcome-list {
    list-style: none;
}

.welcome-list li {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
}

.welcome-list li i {
    color: var(--vscode-link-fg);
    font-size: 16px;
    width: 20px;
}

.welcome-list li a {
    color: var(--vscode-link-fg);
    text-decoration: none;
}

.welcome-list li a:hover {
    text-decoration: underline;
}

.welcome-list.recent li {
    flex-direction: column;
    align-items: flex-start;
    padding: 4px 0;
}

.recent-item {
    color: var(--vscode-link-fg) !important;
}

.recent-path {
    font-size: 11px;
    color: #888;
    margin-top: 2px;
}

.more-link {
    color: var(--vscode-link-fg);
    text-decoration: none;
    font-size: 12px;
}

.more-link:hover {
    text-decoration: underline;
}

.walkthrough-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-radius: 6px;
    margin-bottom: 8px;
    cursor: pointer;
}

.walkthrough-item:hover {
    background-color: var(--vscode-list-hover-bg);
}

.walkthrough-item.highlighted {
    background-color: rgba(0, 120, 212, 0.2);
    border: 1px solid rgba(0, 120, 212, 0.4);
}

.walkthrough-item i,
.walkthrough-item svg {
    color: var(--vscode-link-fg);
    font-size: 16px;
}

.copilot-icon {
    width: 16px;
    height: 16px;
    fill: var(--vscode-link-fg);
}

.badge {
    background-color: var(--vscode-highlight);
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: 8px;
}

.welcome-footer {
    position: fixed;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #888;
    cursor: pointer;
}

.checkbox-label input {
    accent-color: var(--vscode-highlight);
}

/* Chat Panel */
.chat-panel {
    width: 360px;
    min-width: 280px;
    max-width: 600px;
    resize: horizontal;
    overflow: hidden;
    direction: rtl;
    background-color: #181818;
    border-left: 1px solid var(--vscode-border);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    height: 100%;
}

.chat-panel > * {
    direction: ltr;
}

.chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 8px;
    height: 35px;
    flex-shrink: 0;
}

.chat-title {
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #bbbbbb;
}

.chat-header-actions {
    display: flex;
    align-items: center;
    gap: 2px;
}

.chat-header-btn {
    display: flex;
    align-items: center;
    padding: 4px;
    border-radius: 5px;
    cursor: pointer;
    color: #cccccc;
}

.chat-header-btn:hover {
    background-color: rgba(90, 93, 94, 0.31);
}

.chat-header-btn i {
    font-size: 16px;
}

.chat-header-btn .btn-dropdown {
    font-size: 12px;
    margin-left: -2px;
}

.header-separator {
    color: #5a5a5a;
    margin: 0 4px;
    font-weight: 300;
}

.chat-content {
    flex: 1 1 auto;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    padding: 12px;
    gap: 8px;
    min-height: 0; /* Critical for flex overflow scroll to work */
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on mobile */
}

.chat-content.empty {
    align-items: center;
    justify-content: center;
}

/* MCP Server Call Styles */
.chat-message {
    display: flex;
    flex-direction: column;
    gap: 8px;
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.ai-response-text {
    font-size: 13px;
    color: #cccccc;
    line-height: 1.5;
}

.file-reference {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background-color: transparent;
    padding: 2px 6px;
    border-radius: 3px;
    border: 1px solid #3c3c3c;
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: 12px;
    color: #cccccc;
}

/* File modification container - wraps filename and stats */
.file-modify-container {
    display: inline-flex;
    align-items: center;
    gap: 0;
    background-color: transparent;
    border: 1px solid #3c3c3c;
    border-radius: 3px;
    overflow: hidden;
}

.file-modify-container .file-name {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 6px;
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: 12px;
    color: #cccccc;
}

.file-modify-container .file-name i {
    font-size: 14px;
    color: #cccccc;
}

.file-modify-container .file-stats {
    display: flex;
    gap: 6px;
    padding: 2px 6px;
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: 12px;
}

.file-modify-container .stat-added {
    color: #3fb950;
}

.file-modify-container .stat-deleted {
    color: #f85149;
}

.file-reference i {
    font-size: 14px;
    color: #cccccc;
}

.mcp-server-call {
    background-color: rgba(45, 45, 48, 0.6);
    border: 1px solid #3c3c3c;
    border-radius: 4px;
    overflow: visible;
    margin: 0;
    padding: 8px 10px;
    margin-bottom: 2px;
}

.mcp-call-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 0;
    background-color: transparent;
    gap: 8px;
}

.mcp-call-left {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    flex: 1;
}

.mcp-chevron {
    color: #808080;
    font-size: 14px;
    margin-top: 2px;
    flex-shrink: 0;
}

.mcp-call-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.mcp-call-title {
    font-size: 13px;
    color: #cccccc;
    line-height: 1.4;
}

.mcp-call-title .command-name {
    display: inline-block;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid #3c3c3c;
    padding: 1px 6px;
    border-radius: 3px;
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: 12px;
    color: #cccccc;
    margin: 0 4px;
}

.mcp-call-subtitle {
    font-size: 13px;
    color: #cccccc;
}

.mcp-call-check {
    color: #4ec9b0;
    font-size: 16px;
    margin-top: 2px;
    flex-shrink: 0;
}

.mcp-auto-approved {
    padding: 0;
    font-size: 12px;
    color: #808080;
    font-style: italic;
    margin-top: 4px;
    margin-bottom: 6px;
}

.mcp-auto-approved code {
    background-color: rgba(58, 58, 58, 0.6);
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: 11px;
    color: #4fc1ff;
    font-style: normal;
}

.mcp-thinking {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    color: #808080;
    font-size: 12px;
}

.mcp-thinking-dots {
    display: flex;
    gap: 3px;
}

.mcp-thinking-dots span {
    width: 4px;
    height: 4px;
    background-color: #808080;
    border-radius: 50%;
    animation: bounce 1.4s infinite ease-in-out both;
}

.mcp-thinking-dots span:nth-child(1) { animation-delay: -0.32s; }
.mcp-thinking-dots span:nth-child(2) { animation-delay: -0.16s; }
.mcp-thinking-dots span:nth-child(3) { animation-delay: 0s; }

@keyframes bounce {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

.chat-welcome {
    text-align: center;
    max-width: 280px;
}

.chat-welcome-icon {
    margin-bottom: 16px;
    display: flex;
    justify-content: center;
}

.chat-welcome-icon svg {
    opacity: 0.6;
}

.chat-sparkle-icon {
    font-size: 60px !important;
    color: #858585;
    opacity: 0.8;
}

.chat-welcome-title {
    font-size: 18px;
    font-weight: 400;
    margin-bottom: 8px;
    color: #cccccc;
}

.chat-welcome-subtitle {
    font-size: 12px;
    color: #858585;
    margin-bottom: 12px;
}

.chat-welcome-subtitle a {
    color: #3794ff;
    text-decoration: none;
}

.chat-welcome-subtitle a:hover {
    text-decoration: underline;
}

.agent-instructions-link {
    font-size: 12px;
    color: #858585;
    text-decoration: none;
    display: block;
    line-height: 1.5;
}

.agent-instructions-link .link-text {
    color: #3794ff;
}

.agent-instructions-link:hover .link-text {
    text-decoration: underline;
}

/* Chat Bottom Container - Connected files bar and input */
.chat-bottom-container {
    display: flex;
    flex-direction: column;
    margin: 8px;
    border-radius: 4px;
    flex-shrink: 0;
    flex-grow: 0;
    overflow: visible;
    margin-top: auto; /* Push to bottom */
}

/* Files Changed Bar */
.files-changed-bar {
    display: none;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background-color: #1a1a1a;
    border-radius: 4px 4px 0 0;
    margin-bottom: 0;
}

.files-changed-bar.visible {
    display: flex;
}

/* Chat Input - Matches exact Copilot structure */
.chat-input-container {
    background-color: rgba(45, 45, 48, 0.9);
    padding: 0;
    border: 1px solid transparent;
    border-radius: 4px;
    outline: none;
    transition: border-color 0.15s ease;
}

.chat-input-container:focus-within {
    border-color: #0078d4;
}

.files-changed-chevron {
    color: #808080;
    font-size: 14px;
}

.files-changed-text {
    color: #cccccc;
    font-size: 12px;
}

.files-changed-stats {
    font-size: 12px;
    font-family: 'Consolas', 'Courier New', monospace;
    display: flex;
    gap: 8px;
}

.files-changed-stats .added {
    color: #3fb950;
}

.files-changed-stats .deleted {
    color: #f85149;
}

.files-changed-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
}

.files-action-btn {
    padding: 3px 10px;
    border-radius: 3px;
    border: none;
    font-size: 11px;
    cursor: pointer;
    font-family: inherit;
}

.files-action-btn.keep-btn {
    background-color: #0078d4;
    color: #ffffff;
}

.files-action-btn.keep-btn:hover {
    background-color: #1a8ae6;
}

.files-action-btn.undo-btn {
    background-color: transparent;
    color: #cccccc;
    border: 1px solid #5a5a5a;
}

.files-action-btn.undo-btn:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.files-action-btn.icon-btn {
    background-color: transparent;
    color: #cccccc;
    padding: 3px 6px;
    border: 1px solid #5a5a5a;
}

.files-action-btn.icon-btn:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.chat-attachments-container {
    padding: 6px 8px 0 8px;
}

.add-context-btn {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 3px 7px;
    border-radius: 3px;
    cursor: pointer;
    color: #cccccc;
    border: 1px solid rgba(204, 204, 204, 0.3);
    background: transparent;
    font-size: 11px;
    font-family: inherit;
}

.add-context-btn:hover {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: rgba(204, 204, 204, 0.5);
}

.add-context-btn i {
    font-size: 10.4px;
}

.chat-editor-container {
    padding: 4px 12px;
}

.chat-input-editor {
    width: 100%;
}

.chat-input {
    width: 100%;
    background-color: transparent;
    border: none;
    padding: 8px 0;
    color: #cccccc;
    font-family: "Segoe WPC", "Segoe UI", sans-serif;
    font-size: 13px;
    resize: none;
    min-height: 20px;
    outline: none;
    line-height: 20px;
}

.chat-input::placeholder {
    color: #6e6e6e;
}

.chat-input-toolbars {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4px 8px 8px 8px;
}

.chat-input-toolbar {
    display: flex;
    align-items: center;
    gap: 2px;
}

.chat-execute-toolbar {
    display: flex;
    align-items: center;
    gap: 2px;
}

.chat-mode-selector,
.chat-model-selector {
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 3px 5px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 11px;
    text-decoration: none;
}

.chat-model-label {
    font-size: 11px;
}

.chat-mode-selector {
    background-color: transparent;
    color: #cccccc;
}

.chat-model-selector {
    color: #cccccc;
}

.chat-mode-selector i,
.chat-model-selector i {
    font-size: 12px;
}

.chat-mode-selector:hover {
    background-color: rgba(90, 93, 94, 0.31);
}

.chat-model-selector:hover {
    background-color: rgba(90, 93, 94, 0.31);
}

.toolbar-action {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 5px;
    cursor: pointer;
    color: #cccccc;
    text-decoration: none;
}

.toolbar-action:hover {
    background-color: rgba(90, 93, 94, 0.31);
}

.toolbar-action i {
    font-size: 16px;
}

.toolbar-action.disabled {
    color: #5a5a5a;
    cursor: default;
}

.toolbar-action.disabled:hover {
    background-color: transparent;
}

.toolbar-action.send-action {
    color: #cccccc;
}

.toolbar-action.send-action:hover {
    color: #ffffff;
    background-color: rgba(90, 93, 94, 0.31);
}

/* Status Bar */
.status-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 22px;
    background-color: var(--vscode-statusbar-bg);
    color: var(--vscode-statusbar-fg);
    padding: 0 8px;
    font-size: 12px;
    flex-shrink: 0;
}

.status-bar-left,
.status-bar-right {
    display: flex;
    align-items: center;
    gap: 2px;
}

.status-item {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 0 6px;
    height: 22px;
    cursor: pointer;
}

.status-item:hover {
    background-color: rgba(255, 255, 255, 0.12);
}

.status-item i {
    font-size: 16px;
}

.copilot-small-icon {
    width: 18px;
    height: 18px;
}

.status-copilot-icon {
    font-size: 18px;
}

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

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

::-webkit-scrollbar-thumb {
    background: var(--vscode-scrollbar);
    border-radius: 5px;
}

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

/* SayDeploy Sidebar Styles */
.saydeploy-sidebar {
    background-color: var(--vscode-sidebar-bg);
    width: 320px;
    min-width: 200px;
    max-width: 600px;
    resize: horizontal;
    overflow: auto;
}

/* SayDeploy Sidebar - Exact Match */
.saydeploy-sidebar {
    background-color: #1e1e1e;
    display: flex;
    flex-direction: column;
}

.sd-header {
    padding: 12px 16px 14px 16px;
    border-bottom: 1px solid var(--vscode-border);
}

.sd-header-title {
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 0.5px;
    color: #bbbbbb;
    text-transform: uppercase;
}

/* SayDeploy Toolbar */
.sd-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    margin: 0;
    background-color: rgba(60, 60, 60, 0.4);
    border-radius: 0;
    border-bottom: 1px solid var(--vscode-border);
}

.sd-toolbar-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.sd-toolbar-icon {
    width: 22px;
    height: 22px;
}

.sd-toolbar-name {
    font-size: 13px;
    color: #cccccc;
    font-weight: 400;
}

.sd-toolbar-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.sd-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    background: rgba(90, 93, 94, 0.31);
    border: none;
    border-radius: 5px;
    cursor: pointer;
    color: #cccccc;
}

.sd-action-btn:hover {
    background-color: rgba(90, 93, 94, 0.5);
}

.sd-action-btn i {
    font-size: 16px;
}

.saydeploy-content {
    flex: 1;
    overflow-y: auto;
    padding: 0;
}

/* SayDeploy Section */
.sd-section {
    padding: 12px 16px 16px 16px;
    border-bottom: none;
}

.sd-section-header {
    display: flex;
    align-items: center;
    margin-bottom: 4px;
}

.sd-section-title {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: #cccccc;
    text-transform: uppercase;
}

.sd-section-subtitle {
    font-size: 11px;
    color: #6e6e6e;
    margin-bottom: 12px;
}

.sd-section-content {
    padding: 0;
}

/* SayDeploy Service Item */
.sd-service-item {
    display: flex;
    align-items: center;
    padding: 10px 8px;
    border-radius: 4px;
    cursor: pointer;
    gap: 12px;
    margin-bottom: 2px;
}

.sd-service-item:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.sd-service-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
}

.sd-service-icon img {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.sd-badge {
    position: absolute;
    top: -4px;
    left: -4px;
    background: #0e639c;
    color: white;
    font-size: 10px;
    font-weight: 600;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sd-service-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
}

.sd-service-name {
    font-size: 13px;
    color: #cccccc;
    font-weight: 400;
}

.sd-service-status {
    font-size: 12px;
    color: #6e6e6e;
}

.sd-service-status .connected,
span.connected {
    color: #50fa7b;
}

.sd-arrow {
    color: #6e6e6e;
    font-size: 14px;
    flex-shrink: 0;
}

/* SayDeploy Footer */
.saydeploy-footer {
    padding: 16px;
    text-align: center;
}

.sd-version {
    font-size: 12px;
    color: #6e6e6e;
}

/* ProDev Bar */
.sd-prodev-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background-color: #1a1a1a;
    border-top: 1px solid var(--vscode-border);
    cursor: pointer;
}

.sd-prodev-bar:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.sd-prodev-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sd-prodev-icon {
    width: 18px;
    height: 18px;
}

.sd-prodev-text {
    font-size: 13px;
    color: #cccccc;
    font-weight: 500;
}

/* Codicon Font Size Fix */
.codicon {
    font-size: 16px;
}

/* ========================================
   RESPONSIVE DESIGN - Mobile Friendly
   Makes the demo TALLER while keeping sidebar+chat SIDE BY SIDE
   ======================================== */

/* Tablet - Hide activity bar and editor, keep sidebar+chat side by side */
@media (max-width: 1024px) {
    /* Hide the activity bar */
    .activity-bar {
        display: none !important;
    }
    
    /* Hide the welcome/editor area */
    .editor-area {
        display: none !important;
    }
    
    /* SayDeploy sidebar - 50% width */
    .saydeploy-sidebar {
        width: 50% !important;
        max-width: none !important;
        min-width: auto !important;
        flex: 1 !important;
    }
    
    /* Chat panel - 50% width */
    .chat-panel {
        width: 50% !important;
        max-width: none !important;
        min-width: auto !important;
        flex: 1 !important;
    }
}

/* Smaller tablets / large phones - still side by side, just taller via container */
@media (max-width: 768px) {
    /* Scale down slightly for fit */
    body {
        transform: scale(0.9);
        width: 111.11%; /* 100/0.9 */
    }
    
    .main-container {
        min-height: calc(100vh / 0.9);
    }
}

/* Small mobile - show ONLY chat, hide sidebar */
@media (max-width: 480px) {
    body {
        height: 100vh;
        min-height: 100vh;
        max-height: 100vh;
        transform: scale(0.88);
        width: 113.64%; /* 100/0.88 */
        overflow: hidden;
    }
    
    /* Main container stays horizontal */
    .main-container {
        flex-direction: row !important;
        height: calc(100vh / 0.88);
        min-height: calc(100vh / 0.88);
        max-height: calc(100vh / 0.88);
        overflow: hidden;
    }
    
    /* Hide the activity bar */
    .activity-bar {
        display: none !important;
    }
    
    /* Hide the editor area */
    .editor-area {
        display: none !important;
    }
    
    /* Hide the SayDeploy sidebar on mobile - show ONLY chat */
    .saydeploy-sidebar {
        display: none !important;
    }
    
    /* Chat panel - takes full width, proper flex column layout */
    .chat-panel {
        width: 100% !important;
        height: 100% !important;
        max-width: none !important;
        min-width: none !important;
        flex: 1 !important;
        resize: none !important;
        border-left: none !important;
        display: flex !important;
        flex-direction: column !important;
        overflow: hidden !important;
    }
    
    /* Chat header fixed at top */
    .chat-header {
        padding: 0 10px;
        height: 36px;
        flex-shrink: 0 !important;
        flex-grow: 0 !important;
    }
    
    .chat-title {
        font-size: 11px;
    }
    
    /* Chat content - MUST expand to fill available space */
    .chat-content {
        flex: 1 1 auto !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        padding: 12px;
        gap: 8px;
        min-height: 0 !important; /* Allow shrinking */
        -webkit-overflow-scrolling: touch !important;
    }
    
    /* Chat input container - FIXED at bottom, never grows */
    .chat-bottom-container {
        margin: 8px;
        margin-top: 0 !important; /* Remove auto margin - flexbox handles position */
        flex-shrink: 0 !important;
        flex-grow: 0 !important;
    }
    
    .chat-input {
        font-size: 14px;
    }
    
    .chat-model-label {
        font-size: 10px;
    }
}

/* Extra small - iPhone SE etc */
@media (max-width: 380px) {
    body {
        transform: scale(0.8);
        width: 125%; /* 100/0.8 */
        height: 100vh;
        min-height: 100vh;
        max-height: 100vh;
        overflow: hidden;
    }
    
    .main-container {
        height: calc(100vh / 0.8);
        min-height: calc(100vh / 0.8);
        max-height: calc(100vh / 0.8);
        overflow: hidden;
    }
    
    /* Sidebar stays hidden */
    .saydeploy-sidebar {
        display: none !important;
    }
    
    /* Chat panel takes full space */
    .chat-panel {
        width: 100% !important;
        height: 100% !important;
    }
    
    .chat-header-actions {
        display: none;
    }
    
    .chat-input {
        font-size: 13px;
    }
}
