.pf-chatbot__code-modal {
  .pf-v6-c-code-editor {
    --pf-v6-c-code-editor__main--BackgroundColor: #1f1f1f;
    --pf-v6-c-code-editor__main--BorderEndStartRadius: 0;
    --pf-v6-c-code-editor__main--BorderEndEndRadius: 0;
    --pf-v6-c-code-editor__tab--BorderStartEndRadius: var(--pf-t--global--border--radius--small);
    --pf-v6-c-code-editor--m-read-only__main--BackgroundColor: #1f1f1f;
  }
  .pf-v6-c-code-editor__header {
    --pf-v6-c-code-editor__header--BorderWidth: 0;
    background: #1f1f1f !important;
    /** this is for the attachment editor header */
    border-start-start-radius: var(--pf-t--global--border--radius--small);
    border-start-end-radius: var(--pf-t--global--border--radius--small);
  }
  .pf-chatbot__code-modal-body {
    gap: var(--pf-t--global--spacer--lg);
  }
  .pf-chatbot__code-modal--controls > .pf-v6-c-code-editor__header {
    flex-direction: row-reverse;
    border-radius: var(--pf-t--global--border--radius--small);
  }
  .pf-v6-c-code-editor__header::before {
    border-block-end: none;
  }
  .pf-v6-c-code-editor__header-content {
    --pf-v6-c-code-editor__header-content--BackgroundColor: #1f1f1f;
    --pf-v6-c-code-editor__header-content--m-plain--BackgroundColor: #1f1f1f;
    --pf-v6-c-code-editor__header-content--BorderStartStartRadius: var(
      --pf-t--global--border--radius--small
    ) !important;
    --pf-v6-c-code-editor__header-content--PaddingInlineEnd: 0;
    justify-content: flex-end;
  }
  .pf-chatbot__code-modal--controls > .pf-v6-c-code-editor__header > .pf-v6-c-code-editor__header-content {
    --pf-v6-c-code-editor__header-content--BorderStartStartRadius: 0;
    border-start-end-radius: var(--pf-t--global--border--radius--small);
  }
  .pf-v6-c-code-editor__tab {
    --pf-v6-c-code-editor__tab--BackgroundColor: #1f1f1f;
    --pf-v6-c-code-editor__tab--Color: #fff;
    border: none;
    --pf-v6-c-code-editor__tab--BorderStartEndRadius: 0;
    border-start-start-radius: var(--pf-t--global--border--radius--small);
    --pf-t--global--font--weight--body--default: var(--pf-t--global--font--weight--body--bold);
    margin-inline-start: unset;
  }
  .pf-v6-c-code-editor__tab-icon {
    display: none;
  }
  .pf-v6-c-code-editor__main {
    border: unset;
    --pf-v6-c-code-editor__main--BorderEndStartRadius: var(--pf-t--global--border--radius--small);
    --pf-v6-c-code-editor__main--BorderEndEndRadius: var(--pf-t--global--border--radius--small);
  }
  .pf-v6-c-code-editor__controls {
    padding-right: var(--pf-t--global--spacer--sm);
  }
  .pf-v6-c-code-editor__controls > div > .pf-v6-c-button {
    --pf-v6-c-button--m-plain__icon--Color: #fff;
    --pf-v6-c-button--hover__icon--Color: #fff;
  }
  .pf-v6-c-code-editor__header-main {
    display: none;
  }
  .pf-v6-c-modal-box__close {
    .pf-v6-c-button.pf-m-plain {
      --pf-v6-c-button__icon--Color: var(--pf-t--global--icon--color--subtle);
    }
  }
}

// ============================================================================
// Dark theme
// ============================================================================
.pf-v6-theme-dark {
  .pf-chatbot__code-modal {
    .pf-v6-c-code-editor__controls > div > button {
      --pf-v6-c-button--m-plain__icon--Color: #c7c7c7;
      --pf-v6-c-button--hover__icon--Color: #c7c7c7;
    }
  }
}

.pf-chatbot__code-modal-editor {
  flex: 1;
}

.pf-chatbot__code-modal--fullscreen {
  height: inherit !important; // override shared modal so code editor works in full screen
}

.pf-chatbot__code-modal.pf-m-compact {
  .pf-chatbot__code-modal-body {
    gap: var(--pf-t--global--spacer--md);
  }
}
