/**
 * Comment Input Box Styles
 */

.CommentPlugin_CommentInputBox {
  display: block;
  position: absolute;
  width: 250px;
  min-height: 80px;
  max-height: calc(100vh - 40px); /* Leave space for margins */
  overflow-y: auto;
  background-color: var(--theme-input-bg);
  box-shadow: 0 0 5px 0 rgba(0, 0, 0, 0.1);
  border-radius: 5px;
  z-index: 24;
  animation: show-input-box 0.4s ease;
}

.CommentPlugin_CommentInputBox::before {
  content: '';
  position: absolute;
  width: 0;
  height: 0;
  margin-left: 0.5em;
  right: -1em;
  top: 0;
  left: calc(50% + 0.25em);
  box-sizing: border-box;
  border: 0.5em solid black;
  border-color: transparent transparent var(--theme-input-bg);
  transform-origin: 0 0;
  transform: rotate(135deg);
  box-shadow: -3px 3px 3px 0 rgba(0, 0, 0, 0.05);
}

@keyframes show-input-box {
  0% {
    opacity: 0;
    transform: translateY(50px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.CommentPlugin_CommentInputBox_Buttons {
  display: flex;
  flex-direction: row;
  padding: 0 10px 10px 10px;
  gap: 10px;
}

.CommentPlugin_CommentInputBox_Button {
  flex: 1;
  padding: 8px 12px;
  border: none;
  border-radius: 4px;
  background-color: var(--theme-elevation-100, #f3f3f3);
  color: var(--theme-elevation-800, #333333);
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s ease;
}

.CommentPlugin_CommentInputBox_Button:hover {
  background-color: var(--theme-elevation-150, #e6e6e6);
}

.CommentPlugin_CommentInputBox_Button.primary {
  background-color: var(--theme-brand, rgb(66, 135, 245));
  font-weight: bold;
  color: white;
}

.CommentPlugin_CommentInputBox_Button.primary:hover {
  background-color: var(--theme-brand-dark, rgb(53, 114, 211));
}

.CommentPlugin_CommentInputBox_Button[disabled] {
  background-color: var(--theme-elevation-200, #e9e9e9);
  color: var(--theme-elevation-800, #333333);
  cursor: not-allowed;
  font-weight: normal;
  opacity: 0.5;
}

.CommentPlugin_CommentInputBox_Button[disabled]:hover {
  background-color: var(--theme-elevation-200, #e9e9e9);
  color: var(--theme-elevation-800, #333333);
}

.CommentPlugin_CommentInputBox_EditorContainer {
  position: relative;
  margin: 10px;
  border-radius: 5px;
}

.CommentPlugin_CommentInputBox_Editor {
  position: relative;
  max-height: calc(100vh - 200px); /* Leave space for buttons and margins */
  border: 1px solid var(--theme-elevation-200, #e0e0e0);
  background-color: var(--theme-input-bg, #fff);
  border-radius: 5px;
  font-size: 15px;
  caret-color: rgb(5, 5, 5);
  display: block;
  padding: 9px 10px 10px 9px;
  min-height: 80px;
  width: 100%;
  resize: vertical;
  font-family: inherit;
}

.CommentPlugin_CommentInputBox_Editor:focus {
  outline: 1px solid rgb(66, 135, 245);
}
