.chat-sidebar {
    position: fixed;
    top: 0;
    right: 0;
    width: var(--chat-width);
    height: 100vh;
    background: var(--bg-primary);
    border-left: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    z-index: 1000;
}

.chat-container {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.chat-header {
    padding: 0;
    border-bottom: none;
    background: var(--bg-primary);
    position: relative;
    height: auto;
    z-index: 10;
}

.chat-header h3 {
    margin: 0;
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 600;
}

.chat-content {
    position: relative;
    top: auto;
    left: auto;
    right: auto;
    bottom: auto;
    flex: 1;
    display: none;
    background: var(--bg-primary);
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 0;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
}

.message {
    padding: 12px 16px;
    border-radius: 12px;
    width: 100%;
    max-width: 100%;
    font-size: 13px;
    line-height: 1.5;
    white-space: pre-wrap;
    position: relative;
}

.message-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.user-message {
    background: rgba(0, 119, 237, 0.1);
    border: 1px solid rgba(0, 119, 237, 0.2);
    color: #fff;
}

.ai-message {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
}

/* Code block styles */
.message.code-block {
    background: rgba(0, 0, 0, 0.3);
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 12px;
    line-height: 1.4;
    padding: 40px 16px 12px;
    tab-size: 4;
    overflow-x: auto;
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin: 4px 0;
}

/* Code block header */
.code-block-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    border-top-left-radius: 11px;
    border-top-right-radius: 11px;
    height: 32px;
}

.code-language {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.6);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.copy-code-button {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 11px;
    padding: 4px 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s ease;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.copy-code-button:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.25);
}

.copy-code-button.copied {
    background: rgba(46, 160, 67, 0.3);
    border-color: rgba(46, 160, 67, 0.4);
}

.copy-code-button svg {
    width: 12px;
    height: 12px;
    stroke: currentColor;
}

/* Code content */
.code-content {
    display: block;
    width: 100%;
}

/* Add subtle visual separation between messages */
.message + .message {
    margin-top: 4px;
}

/* Scrollbar styling for code blocks */
.message.code-block::-webkit-scrollbar {
    height: 6px;
    background-color: rgba(0, 0, 0, 0.1);
}

.message.code-block::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.message.code-block::-webkit-scrollbar-thumb:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

/* Adjust chat input for centered layout */
.chat-input-container {
    position: sticky;
    bottom: 0;
    background: var(--bg-primary);
    padding: 20px;
    border-top: 1px solid var(--border-color);
    z-index: 5;
    max-width: 900px;
    margin: 0 auto;
    width: 100%;
}

.chat-input-wrapper {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.chat-input-wrapper:focus-within {
    border-color: rgba(0, 119, 237, 0.4);
    box-shadow: 0 0 0 2px rgba(0, 119, 237, 0.2);
    background: rgba(255, 255, 255, 0.07);
}

.selected-context-files {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 12px 16px 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.2);
}

.selected-context-files:empty {
    display: none;
}

.selected-context-file {
    background: rgba(0, 119, 237, 0.1);
    border: 1px solid rgba(0, 119, 237, 0.2);
    border-radius: 6px;
    padding: 4px 8px;
    font-size: 12px;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.selected-context-file:hover {
    background: rgba(0, 119, 237, 0.15);
    border-color: rgba(0, 119, 237, 0.3);
}

.selected-context-file .remove-file {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    padding: 0 2px;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 2px;
    transition: all 0.2s ease;
    border-radius: 3px;
}

.selected-context-file .remove-file:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.chat-input {
    width: 100%;
    padding: 14px 16px;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 14px;
    line-height: 1.5;
    resize: none;
    transition: all 0.2s ease;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.chat-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.chat-input:focus {
    outline: none;
}

/* Settings Modal Styles */
.settings-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    z-index: 1001;
    display: none;
}

.settings-modal.visible {
    display: block;
}

.settings-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: none;
}

.settings-overlay.visible {
    display: block;
}

.settings-modal h2 {
    margin: 0 0 20px;
    color: var(--text-primary);
    font-size: 20px;
    font-weight: 600;
}

.settings-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 24px;
    cursor: pointer;
    padding: 4px;
    line-height: 1;
}

.settings-modal-close:hover {
    color: var(--text-primary);
}

.settings-sections {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.settings-section {
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
}

.settings-section h3 {
    margin: 0 0 16px;
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 600;
}

.api-key-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.settings-api-key,
.settings-model-selector {
    width: 100%;
    padding: 12px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 14px;
    transition: all 0.2s ease;
}

.settings-api-key:focus,
.settings-model-selector:focus {
    outline: none;
    border-color: rgba(0, 119, 237, 0.4);
    box-shadow: 0 0 0 2px rgba(0, 119, 237, 0.2);
}

.settings-model-selector {
    cursor: pointer;
}

.settings-save-btn {
    background: #0077ED;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.settings-save-btn:hover {
    background: #0066cc;
}

.settings-save-btn:disabled {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.4);
    cursor: not-allowed;
}

/* Settings Button */
.settings-button {
    background: none;
    border: none;
    color: var(--text-secondary);
    padding: 8px;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s ease;
    margin-left: auto;
}

.settings-button:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.settings-button svg {
    width: 20px;
    height: 20px;
}
 