/* Modal dialog styling */
.sage-ai-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.sage-ai-dialog {
  background-color: var(--jp-layout-color1);
  padding: 20px;
  border-radius: 5px;
  width: 50%;
  max-width: 500px;
  box-sizing: border-box;
}

/* Override width for snippet form modal */
.sage-ai-dialog.sage-ai-snippet-form-modal {
  width: 90%;
  max-width: 600px;
}

/* Custom styling for snippet modal in dark mode */
[data-jp-theme-name='JupyterLab Dark'] .sage-ai-custom-snippet-modal .modal-content {
  border-radius: 12px;
  border: 1px solid var(--Border-Border, #383838);
  background: var(--BG-main, #111);
  box-shadow: 0 8px 17.1px 0 rgba(208, 208, 208, 0.09);
}

/* Custom styling for form inputs in snippet modal - dark mode only */
[data-jp-theme-name='JupyterLab Dark'] .sage-ai-custom-snippet-modal .form-control {
  border-radius: 8px;
  border: 0.8px solid var(--Border-Border, #383838);
  background: var(--Prompt-box-bg-default, #141414);
}

.sage-ai-dialog-title {
  margin-top: 0;
}

.sage-ai-dialog-label {
  display: block;
  margin: 10px 0;
}

/* Checkbox styling consistent with the autorun checkbox */
.sage-ai-dialog-checkbox-container {
  display: flex;
  align-items: center;
  margin: 15px 0;
}

.sage-ai-dialog-checkbox {
  margin-right: 8px;
  cursor: pointer;
}

.sage-ai-dialog-checkbox-label {
  font-size: var(--jp-ui-font-size1);
  color: var(--jp-ui-font-color1);
  cursor: pointer;
  user-select: none;
}

.sage-ai-dialog-textarea {
  width: 100%;
  height: 100px;
  margin-bottom: 15px;
  padding: 8px;
  box-sizing: border-box;
}

.sage-ai-dialog-button-container {
  display: flex;
  justify-content: flex-end;
}

.sage-ai-dialog-submit-button {
  padding: 8px 16px;
  background-color: var(--jp-brand-color1);
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

/* Revert-and-send button styling in modal context */
.sage-ai-revert-send-button-modal {
  padding: 8px 16px;
  background-color: var(--jp-warn-color1);
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  margin-right: 10px;
}

.sage-ai-revert-send-button-modal:hover {
  background-color: var(--jp-warn-color0);
}

.sage-ai-revert-send-button-modal:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Code confirmation styling */
.sage-ai-code-confirmation {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px;
  margin: 15px 0;
  border: 2px solid var(--jp-border-color1);
  border-radius: 8px;
  background-color: var(--jp-layout-color2);
}

.sage-ai-confirmation-button-container {
  display: flex;
  gap: 4px;
}

.sage-ai-reject-button {
  padding: 8px 16px;
  background-color: var(--jp-warn-color1);
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.sage-ai-confirm-button {
  padding: 8px 16px;
  background-color: var(--jp-brand-color1);
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

/* Post-cancellation dialog styling */
.sage-ai-post-cancel-dialog {
  padding: 15px;
  margin: 15px 0;
  border: 1px solid var(--jp-border-color1);
  border-radius: 4px;
  background-color: var(--jp-layout-color1);
  text-align: center;
}

.sage-ai-post-cancel-heading {
  margin: 0 0 15px 0;
  color: var(--jp-ui-font-color1);
  font-weight: bold;
}

/* Thread selector dropdown styling - additional styles */
.sage-ai-thread-dropdown-container {
  position: relative;
  display: inline-block;
}

.sage-ai-thread-dropdown-header {
  border-bottom: 1px solid var(--jp-border-color1);
  padding: 8px 12px;
  font-weight: bold;
  color: var(--jp-ui-font-color0);
}

.sage-ai-thread-dropdown-footer {
  border-top: 1px solid var(--jp-border-color1);
  padding: 8px 12px;
  text-align: center;
}

.sage-ai-thread-dropdown-empty {
  padding: 12px;
  font-style: italic;
  color: var(--jp-ui-font-color2);
  text-align: center;
}

/* Enhanced button styling for thread items */
.sage-ai-thread-item-button {
  background: none;
  border: none;
  color: var(--jp-warn-color1);
  cursor: pointer;
  padding: 2px 4px;
  font-size: var(--jp-ui-font-size0);
  visibility: hidden;
  float: right;
}

.sage-ai-thread-item:hover .sage-ai-thread-item-button {
  visibility: visible;
}

.sage-ai-thread-item-button:hover {
  color: var(--jp-warn-color0);
  background-color: var(--jp-warn-color3);
  border-radius: 2px;
}

/* Context display styling */
.sage-ai-context-display {
  margin: 15px 0;
  padding: 12px;
  border: 1px solid var(--jp-border-color1);
  border-radius: 4px;
  background-color: var(--jp-layout-color0);
}

.sage-ai-context-display-header {
  font-weight: bold;
  color: var(--jp-ui-font-color0);
  margin-bottom: 8px;
  font-size: var(--jp-ui-font-size1);
}

.sage-ai-context-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  border-bottom: 1px solid var(--jp-border-color2);
}

.sage-ai-context-item:last-child {
  border-bottom: none;
}

.sage-ai-context-item-icon {
  font-size: 14px;
  width: 20px;
  text-align: center;
}

.sage-ai-context-item-info {
  flex: 1;
}

.sage-ai-context-item-name {
  font-weight: 500;
  color: var(--jp-ui-font-color0);
  font-size: var(--jp-ui-font-size0);
}

.sage-ai-context-item-preview {
  color: var(--jp-ui-font-color2);
  font-size: var(--jp-ui-font-size0);
  font-style: italic;
}

.sage-ai-context-empty {
  color: var(--jp-ui-font-color2);
  font-style: italic;
  text-align: center;
  padding: 8px;
}

[data-jp-theme-name='JupyterLab Dark'] .form-control {
  border-radius: 8px;
border: 0.8px solid var(--Border-Border, #383838);
background: var(--Prompt-box-bg-default, #141414);
color: var(--Text-text-secondary, #949494) !important;

/* Subtle/Medium */
font-family: Geist;
font-size: 13px;
font-style: normal;
font-weight: 500;
line-height: 155%; /* 20.15px */
}
