/* Vacancy-wide note drawer. Kept isolated from the workspace layout. */
.workspace-general-note {
  --workspace-note-width: min(390px, calc(100vw - 24px));
  position: fixed;
  inset: 0;
  z-index: 118;
  pointer-events: none;
}

.workspace-general-note[hidden] {
  display: none !important;
}

body.workspace-note-open {
  overflow: hidden;
  overscroll-behavior: none;
}

.workspace-general-note__tab {
  position: fixed;
  right: -2px;
  top: 84px;
  z-index: 2;
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 2px solid #111111;
  border-radius: 12px 0 0 12px;
  background: #111111;
  color: #ffffff;
  box-shadow: none;
  cursor: pointer;
  pointer-events: auto;
  transform-origin: right center;
  transition: transform 0.14s ease, opacity 0.16s ease;
}

.workspace-general-note__tab svg {
  width: 21px;
  height: 21px;
  stroke-width: 2.1;
}

.workspace-general-note__tab:hover {
  background: #111111;
  color: #ffffff;
}

.workspace-general-note__tab:active {
  transform: scale(0.96);
}

.workspace-general-note.is-open .workspace-general-note__tab {
  opacity: 0;
  visibility: hidden;
  transform: none;
  pointer-events: none;
}

.workspace-general-note__backdrop {
  position: fixed;
  inset: 0;
  z-index: 0;
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: rgba(17, 17, 17, 0.38);
  box-shadow: none;
  cursor: default;
  pointer-events: auto;
}

.workspace-general-note__backdrop[hidden] {
  display: none !important;
}

.workspace-general-note__panel {
  position: fixed;
  right: 12px;
  top: 76px;
  z-index: 1;
  width: var(--workspace-note-width);
  min-width: 0;
  display: flex;
  flex-direction: column;
  max-height: calc(100dvh - 88px);
  padding: 17px;
  overflow-x: hidden;
  overflow-y: auto;
  border: 2px solid #111111;
  border-radius: 0;
  background: #ffffff;
  color: #111111;
  box-shadow: none;
  opacity: 0;
  visibility: hidden;
  transform: translateX(110%);
  pointer-events: none;
  scrollbar-width: thin;
  scrollbar-color: rgba(17, 17, 17, 0.3) transparent;
  transition: transform 0.2s ease, opacity 0.16s ease, visibility 0s linear 0.2s;
}

.workspace-general-note.is-open .workspace-general-note__panel {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
  pointer-events: auto;
  transition-delay: 0s;
}

.workspace-general-note__panel::-webkit-scrollbar,
.workspace-general-note__editor::-webkit-scrollbar {
  display: block;
  width: 7px;
}

.workspace-general-note__panel::-webkit-scrollbar-track,
.workspace-general-note__editor::-webkit-scrollbar-track {
  background: transparent;
}

.workspace-general-note__panel::-webkit-scrollbar-thumb,
.workspace-general-note__editor::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 999px;
  background: rgba(17, 17, 17, 0.3);
  background-clip: content-box;
}

.workspace-general-note__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.workspace-general-note__header > div {
  min-width: 0;
}

.workspace-general-note__header h2 {
  margin: 0;
  color: #111111;
  font-size: 25px;
  font-weight: 900;
  line-height: 1.05;
}

.workspace-general-note__close {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  padding: 0;
  border: 2px solid #111111;
  border-radius: 0;
  background: #111111;
  color: #ffffff;
  box-shadow: none;
  cursor: pointer;
  transition: transform 0.14s ease;
}

.workspace-general-note__close:hover {
  background: #111111;
  color: #ffffff;
}

.workspace-general-note__close svg {
  width: 16px;
  height: 16px;
}

.workspace-general-note__close:active {
  transform: translateY(1px);
}

.workspace-general-note__description {
  margin: 10px 0 0;
  color: #626975;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.45;
}

.workspace-general-note__toolbar {
  display: flex;
  align-items: center;
  gap: 5px;
  margin: 13px 0 9px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.workspace-general-note__toolbar button {
  width: 27px;
  height: 27px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  padding: 0;
  border: 1px solid #111111;
  border-radius: 0;
  background: #ffffff;
  color: #343942;
  box-shadow: none;
  cursor: pointer;
}

.workspace-general-note__toolbar button svg {
  width: 14px;
  height: 14px;
}

.workspace-general-note__toolbar button:hover:not(:disabled),
.workspace-general-note__toolbar button.is-active {
  background: #111111;
  color: #ffffff;
}

.workspace-general-note__toolbar button:disabled {
  color: #9da3ac;
  cursor: default;
  opacity: 0.65;
}

.workspace-general-note__toolbar-divider {
  width: 1px;
  height: 18px;
  margin: 0 2px;
  flex: 0 0 auto;
  background: #c8ced6;
}

.workspace-general-note__editor-wrap {
  position: relative;
  height: 260px;
  min-height: 260px;
  max-height: 260px;
}

.workspace-general-note__editor {
  width: 100%;
  height: 260px;
  min-height: 260px;
  max-height: 260px;
  padding: 13px 13px 31px;
  overflow-x: hidden;
  overflow-y: auto;
  border: 1px solid #c5ccd5;
  border-radius: 0;
  background: #ffffff;
  color: #111111;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.55;
  overflow-wrap: anywhere;
  box-shadow: none;
  outline: 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(17, 17, 17, 0.32) transparent;
  transition: border-color 0.14s ease;
}

.workspace-general-note__editor:empty::before {
  color: #9298a1;
  content: attr(data-placeholder);
  pointer-events: none;
}

.workspace-general-note__editor:focus {
  border-color: #c5ccd5;
  box-shadow: none;
  outline: 0;
}

.workspace-general-note__editor[contenteditable="false"] {
  background: #f3f5f7;
  color: #565d68;
  cursor: default;
}

.workspace-general-note__editor ul,
.workspace-general-note__editor ol {
  margin: 4px 0;
  padding-left: 22px;
}

.workspace-general-note__counter {
  position: absolute;
  right: 9px;
  bottom: 8px;
  padding: 2px 4px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.9);
  color: #68707d;
  font-size: 10px;
  font-weight: 900;
  line-height: 1.2;
  pointer-events: none;
}

.workspace-general-note__save {
  width: 100%;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 12px;
  padding: 10px 16px;
  border: 2px solid #111111;
  border-radius: 0;
  background: #494d55;
  color: #ffffff;
  font: inherit;
  font-size: 12px;
  font-weight: 900;
  box-shadow: 3px 3px 0 #111111;
  cursor: pointer;
  transition: background-color 0.16s ease, transform 0.16s ease, box-shadow 0.16s ease;
}

.workspace-general-note__save:hover:not(:disabled) {
  background: #32363c;
  color: #ffffff;
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0 #111111;
}

.workspace-general-note__save:active:not(:disabled) {
  background: #111111;
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 0 #111111;
}

.workspace-general-note__save:disabled {
  border-color: #111111;
  background: #e0e5eb;
  color: #111111;
  box-shadow: 4px 4px 0 #111111;
  cursor: default;
  opacity: 1;
}

@media (max-width: 760px) {
  .workspace-general-note {
    --workspace-note-width: calc(100vw - 16px);
  }

  .workspace-general-note__panel {
    right: 8px;
    top: 68px;
    max-height: calc(100dvh - 76px);
    padding: 16px;
    border-radius: 0;
  }

  .workspace-general-note__tab {
    right: -2px;
    top: 76px;
  }

  .workspace-general-note__editor-wrap,
  .workspace-general-note__editor {
    height: 242px;
    min-height: 242px;
    max-height: 242px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .workspace-general-note__panel,
  .workspace-general-note__tab,
  .workspace-general-note__save {
    transition: none;
  }
}
