/* Context Limits Styles */
.claudian-context-limits-container {
  margin-top: 16px;
}

.claudian-context-limits-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  margin-top: 16px;
  padding: 0 12px;
}

.claudian-context-limits-label {
  font-size: var(--font-ui-small);
  color: var(--text-muted);
  font-weight: var(--font-medium);
}

.claudian-context-limits-desc {
  font-size: var(--font-ui-smaller);
  color: var(--text-muted);
  padding: 0 12px;
  margin-bottom: 8px;
}

.claudian-context-limits-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}

.claudian-context-limits-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px;
  background: var(--background-secondary);
  border-radius: 6px;
  transition: background-color 0.2s;
}

.claudian-context-limits-item:hover {
  background: var(--background-modifier-hover);
}

.claudian-context-limits-model {
  font-family: var(--font-monospace);
  font-size: var(--font-ui-small);
  color: var(--text-normal);
  flex: 1;
  min-width: 0;
  word-break: break-all;
}

.claudian-context-limits-input-wrapper {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  margin-left: 16px;
  flex-shrink: 0;
}

.claudian-context-limits-input {
  width: 80px;
  padding: 4px 8px;
  font-size: var(--font-ui-small);
  border: 1px solid var(--background-modifier-border);
  border-radius: 4px;
  background: var(--background-primary);
  color: var(--text-normal);
}

.claudian-context-limits-input:focus {
  border-color: var(--interactive-accent);
  outline: none;
}

.claudian-context-limits-input.claudian-input-error {
  border-color: var(--text-error);
}

.claudian-context-limit-validation {
  display: none;
  font-size: var(--font-ui-smaller);
  color: var(--text-error);
  margin-top: 4px;
}

/* Environment Snippets Styles */
.claudian-env-snippets-container {
  margin-top: 16px;
}

.claudian-snippet-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  margin-top: 16px;
  padding: 0 12px;
}

.claudian-snippet-label {
  font-size: var(--font-ui-small);
  color: var(--text-muted);
  font-weight: var(--font-medium);
}

.claudian-save-env-btn {
  padding: 6px 16px;
  font-size: 13px;
  background: var(--interactive-accent);
  color: var(--text-on-accent);
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: opacity 0.2s;
}

.claudian-save-env-btn:hover {
  opacity: 0.9;
}

.claudian-snippet-empty {
  padding: 20px;
  text-align: center;
  color: var(--text-muted);
  background: var(--background-secondary);
  border-radius: 6px;
  margin-top: 8px;
}

.claudian-snippet-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}

.claudian-snippet-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px;
  background: var(--background-secondary);
  border-radius: 6px;
  transition: background-color 0.2s;
}

.claudian-snippet-item:hover {
  background: var(--background-modifier-hover);
}

.claudian-snippet-info {
  flex: 1;
  min-width: 0;
}

.claudian-snippet-name {
  font-weight: 600;
  margin-bottom: 4px;
  word-break: break-word;
}

.claudian-snippet-description {
  font-size: 13px;
  color: var(--text-muted);
}

.claudian-snippet-actions {
  display: flex;
  gap: 4px;
  margin-left: 16px;
  flex-shrink: 0;
}

.claudian-restore-snippet-btn {
  padding: 4px 12px;
  font-size: 12px;
  background: var(--interactive-accent);
  color: var(--text-on-accent);
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.claudian-restore-snippet-btn:hover {
  opacity: 0.9;
}

.claudian-edit-snippet-btn {
  padding: 4px 12px;
  font-size: 12px;
  background: var(--background-modifier-border);
  color: var(--text-normal);
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.claudian-edit-snippet-btn:hover {
  background: var(--background-modifier-border-hover);
}

.claudian-delete-snippet-btn {
  padding: 4px 12px;
  font-size: 12px;
  background: var(--background-modifier-error);
  color: var(--text-on-accent);
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.claudian-delete-snippet-btn:hover {
  opacity: 0.9;
}

/* Env Snippet Modal */
.claudian-env-snippet-modal .modal-content {
  max-width: 550px;
  width: 550px;
  padding: 16px;
}

.claudian-env-snippet-modal h2 {
  margin: 0 0 16px 0;
}

.claudian-env-snippet-modal .setting-item {
  padding: 8px 0;
  margin: 0;
}

.claudian-env-snippet-modal .setting-item-info {
  margin-bottom: 4px;
}

/* Full-width env vars textarea setting */
.claudian-env-snippet-setting {
  flex-direction: column;
  align-items: flex-start;
}

.claudian-env-snippet-setting .setting-item-info {
  width: 100%;
  margin-bottom: 8px;
}

.claudian-env-snippet-control {
  width: 100%;
}

.claudian-env-snippet-control textarea {
  width: 100%;
  min-width: 100%;
  font-family: var(--font-monospace);
  font-size: 12px;
  resize: vertical;
}

.claudian-snippet-preview {
  margin: 8px 0;
  padding: 6px;
  background: var(--background-secondary);
  border-radius: 6px;
}

.claudian-env-preview {
  background: var(--background-primary);
  padding: 6px;
  border-radius: 4px;
  font-family: var(--font-monospace);
  font-size: 11px;
  line-height: 1.3;
  white-space: pre-wrap;
  word-break: break-all;
  color: var(--text-muted);
  max-height: 120px;
  overflow-y: auto;
  margin: 0;
}

.claudian-snippet-buttons {
  display: flex;
  gap: 8px;
  margin-top: 16px;
  justify-content: flex-end;
}

.claudian-cancel-btn,
.claudian-save-btn {
  padding: 6px 16px;
  font-size: 13px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.claudian-cancel-btn {
  background: var(--background-modifier-border);
  color: var(--text-normal);
}

.claudian-cancel-btn:hover {
  background: var(--background-modifier-border-hover);
}

.claudian-save-btn {
  background: var(--interactive-accent);
  color: var(--text-on-accent);
}

.claudian-save-btn:hover {
  opacity: 0.9;
}

/* Context limits section in snippet modal */
.claudian-snippet-context-limits {
  margin-top: 1em;
}

.claudian-snippet-context-limits .setting-item-description {
  margin-bottom: 0.5em;
}

.claudian-snippet-limit-row {
  display: flex;
  align-items: center;
  gap: 0.5em;
  margin-bottom: 0.25em;
}

.claudian-snippet-limit-model {
  font-family: var(--font-monospace);
  font-size: var(--font-ui-small);
}

.claudian-snippet-limit-spacer {
  flex: 1;
}

.claudian-snippet-limit-input {
  width: 80px;
}
