/**
 * OW Onboarding Tool v0.97.0
 * Review-Drag-and-drop, Kommentar-Threads, Veröffentlichungszeiträume,
 * gemeinsame Editor-/Review-Anordnung und vollständig sichtbare Titel.
 */

/* --------------------------------------------------------------------------
   Vollständige Titel und dynamisch messbare Mindmap-Karten
   -------------------------------------------------------------------------- */
.cm-node-root,
.cmp-node-root,
.cm-node-cluster,
.cmp-node-cluster,
.cm-node-page,
.cm-node-opportunity,
.cmp-node-page,
.cmp-node-opportunity {
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
}

.cm-node-root,
.cmp-node-root {
  min-height: 104px !important;
}

.cm-node-cluster,
.cmp-node-cluster {
  min-height: 90px !important;
}

.cm-node-page,
.cm-node-opportunity,
.cmp-node-page,
.cmp-node-opportunity {
  min-height: 116px !important;
}

.cm-node-root h2,
.cmp-node-root h2,
.cm-node-cluster h3,
.cmp-node-cluster h3,
.cm-node-page h3,
.cm-node-opportunity h3,
.cmp-node-page h3,
.cmp-node-opportunity h3 {
  min-height: 0 !important;
  max-height: none !important;
  height: auto !important;
  flex: 0 0 auto !important;
  display: block !important;
  overflow: visible !important;
  text-overflow: clip !important;
  white-space: normal !important;
  overflow-wrap: anywhere;
  word-break: normal;
  -webkit-box-orient: initial !important;
  -webkit-line-clamp: unset !important;
  line-clamp: unset !important;
}

.cm-node-root h2,
.cmp-node-root h2 {
  margin-right: 2px !important;
}

.cm-node-cluster h3,
.cmp-node-cluster h3 {
  margin-bottom: 7px !important;
}

.cm-node-page h3,
.cm-node-opportunity h3,
.cmp-node-page h3,
.cmp-node-opportunity h3 {
  margin-bottom: 7px !important;
}

.cm-node-page > .cm-content-head,
.cm-node-opportunity > .cm-content-head,
.cmp-node-page > .cmp-content-head,
.cmp-node-opportunity > .cmp-content-head {
  min-height: 18px !important;
  max-height: none !important;
  height: auto !important;
  flex: 0 0 auto !important;
  overflow: visible !important;
  flex-wrap: wrap;
  row-gap: 5px;
}

.cm-content-footer,
.cmp-content-footer {
  margin-top: auto !important;
}

/* Auch in Listen, Details und Review-Verläufen keine Ellipsis. */
.cm-sidebar-content-copy strong,
.cm-cluster-overview-copy strong,
.owr-item-copy strong,
.owr-cluster-content-copy strong,
.owr-cluster-overview-card strong,
.owr-detail-head h1,
.owr-submitted-row-head strong,
.cm-review-comment-row h4,
.cm-review-comment-main > header strong {
  min-width: 0;
  max-width: 100%;
  display: block !important;
  overflow: visible !important;
  text-overflow: clip !important;
  white-space: normal !important;
  overflow-wrap: anywhere;
  word-break: normal;
  -webkit-box-orient: initial !important;
  -webkit-line-clamp: unset !important;
  line-clamp: unset !important;
}

.cm-sidebar-content-item,
.cm-cluster-overview-card,
.owr-sidebar-item,
.owr-cluster-content-item,
.owr-cluster-overview-card {
  height: auto !important;
  max-height: none !important;
}

.cm-sidebar-content-copy small,
.owr-item-copy small,
.owr-cluster-content-copy small,
.owr-detail-head p,
.owr-page-url span,
.owr-reference-link a span,
.cm-review-comment-row p,
.cm-review-reply-row p {
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* --------------------------------------------------------------------------
   Optionaler Veröffentlichungszeitraum geplanter Inhalte
   -------------------------------------------------------------------------- */
.cm-planned-period {
  min-width: 0;
  min-height: 20px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 7px;
  border: 1px solid #bad8c5;
  border-radius: 999px;
  background: #f0f8f3;
  color: #286b43;
  font-size: 9px;
  line-height: 1.1;
  font-weight: 650;
  white-space: nowrap;
}

.cm-planned-period svg {
  width: 11px;
  height: 11px;
  flex: 0 0 11px;
}

.cm-planned-period.map {
  margin-left: auto;
}

/* --------------------------------------------------------------------------
   Review: Ziehen, Zielzustände und Speichern
   -------------------------------------------------------------------------- */
body.content-review-mode [draggable="true"][data-review-drag-key] {
  cursor: grab;
  user-select: none;
}

body.content-review-mode [draggable="true"][data-review-drag-key]:active,
body.content-review-mode .owr-stage.dragging-node {
  cursor: grabbing;
}

body.content-review-mode .owr-dragging {
  opacity: .48 !important;
  transform: scale(.985) !important;
}

body.content-review-mode .owr-stage.dragging-node .cm-node.dragging {
  z-index: 30 !important;
  opacity: .82;
  cursor: grabbing;
  pointer-events: none;
  box-shadow: 0 18px 42px rgba(35, 35, 31, .18) !important;
}

body.owr-content-drag-active [data-review-drop-cluster],
body.owr-content-drag-active [data-review-drop-parent-key],
body.content-review-mode .owr-stage.dragging-node [data-review-drop-cluster],
body.content-review-mode .owr-stage.dragging-node [data-review-drop-parent-key] {
  transition: border-color .15s ease, background .15s ease, box-shadow .15s ease, transform .15s ease;
}

body.content-review-mode .owr-drop-hover,
body.owr-content-drag-active .owr-drop-hover {
  position: relative;
  z-index: 24 !important;
  border-color: color-mix(in srgb, var(--node-color, var(--cluster, #3157d5)) 72%, #ffffff) !important;
  background: color-mix(in srgb, var(--node-color, var(--cluster, #3157d5)) 8%, #ffffff) !important;
  box-shadow:
    0 0 0 3px color-mix(in srgb, var(--node-color, var(--cluster, #3157d5)) 16%, transparent),
    0 14px 30px rgba(35, 35, 31, .12) !important;
}

body.content-review-mode .owr-structure-status {
  min-width: 0;
  max-width: 180px;
  color: #777772;
  font-size: 10px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

body.content-review-mode .owr-structure-status.busy {
  color: #3157d5;
}

body.content-review-mode .owr-structure-status.error {
  color: #a84646;
}

/* --------------------------------------------------------------------------
   Öffentlicher Review: übersichtliche Kommentar-Threads
   -------------------------------------------------------------------------- */
body.content-review-mode .owr-comment-thread {
  min-width: 0;
  margin-top: 12px;
}

body.content-review-mode .owr-comment-thread:first-of-type {
  margin-top: 10px;
}

body.content-review-mode .owr-comment-thread > .owr-comment {
  margin-top: 0;
}

body.content-review-mode .owr-comment-replies {
  min-width: 0;
  margin: 8px 0 0 16px;
  padding-left: 13px;
  display: grid;
  gap: 8px;
  border-left: 2px solid #deded9;
}

body.content-review-mode .owr-comment.is-reply {
  margin-top: 0;
  border-left-color: #3157d5;
  background: #f8f9fc;
}

body.content-review-mode .owr-comment p {
  overflow-wrap: anywhere;
  word-break: break-word;
}

body.content-review-mode .owr-comment footer {
  min-width: 0;
  align-items: flex-start;
  flex-wrap: wrap;
}

body.content-review-mode .owr-comment footer > span:first-child {
  min-width: 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
}

body.content-review-mode .owr-comment footer strong {
  color: #555550;
  font-size: 9px;
}

body.content-review-mode .owr-comment footer em,
.cm-review-comment-row em.role-client,
.cm-review-comment-row em.role-team,
.cm-review-reply-row em,
.owr-submitted-row-head em.role-client,
.owr-submitted-row-head em.role-team {
  min-height: 18px;
  display: inline-flex;
  align-items: center;
  padding: 0 6px;
  border-radius: 999px;
  font-size: 8px;
  line-height: 1;
  font-style: normal;
  font-weight: 700;
  white-space: nowrap;
}

body.content-review-mode .owr-comment footer em.role-client,
.cm-review-comment-row em.role-client,
.cm-review-reply-row em.role-client,
.owr-submitted-row-head em.role-client {
  background: #f0f0ed;
  color: #676762;
}

body.content-review-mode .owr-comment footer em.role-team,
.cm-review-comment-row em.role-team,
.cm-review-reply-row em.role-team,
.owr-submitted-row-head em.role-team {
  background: #edf2ff;
  color: #3157a8;
}

body.content-review-mode .owr-comment-reply-button {
  min-height: 30px;
  margin-top: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0 9px;
  border: 1px solid #deded9;
  border-radius: 8px;
  background: #ffffff;
  color: #555550;
  font: inherit;
  font-size: 10px;
  font-weight: 650;
  cursor: pointer;
}

body.content-review-mode .owr-comment-reply-button:hover {
  border-color: #b8b8b2;
  color: #292929;
}

body.content-review-mode .owr-comment-reply-button svg {
  width: 12px;
  height: 12px;
}

body.content-review-mode .owr-reply-form {
  min-width: 0;
  margin: 10px 0 0 16px;
  padding: 12px;
  border: 1px solid #d8dce8;
  border-radius: 12px;
  background: #f7f9ff;
}

body.content-review-mode .owr-reply-form > div:first-child {
  min-width: 0;
  display: flex;
  align-items: flex-start;
  gap: 9px;
}

body.content-review-mode .owr-reply-form > div:first-child > span {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #ffffff;
  color: #3157a8;
}

body.content-review-mode .owr-reply-form > div:first-child svg {
  width: 13px;
  height: 13px;
}

body.content-review-mode .owr-reply-form > div:first-child > div {
  min-width: 0;
}

body.content-review-mode .owr-reply-form strong,
body.content-review-mode .owr-reply-form small {
  display: block;
  overflow-wrap: anywhere;
}

body.content-review-mode .owr-reply-form strong {
  color: #353532;
  font-size: 11px;
}

body.content-review-mode .owr-reply-form small {
  margin-top: 2px;
  color: #85857f;
  font-size: 9px;
  line-height: 1.35;
}

body.content-review-mode .owr-reply-form label {
  display: block;
  margin-top: 10px;
}

body.content-review-mode .owr-reply-form label > span {
  display: block;
  margin-bottom: 5px;
  color: #71716c;
  font-size: 9px;
  font-weight: 650;
}

body.content-review-mode .owr-reply-form input,
body.content-review-mode .owr-reply-form textarea {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  border: 1px solid #d7d9e0;
  border-radius: 9px;
  background: #ffffff;
  padding: 9px 10px;
  color: #292929;
  font: inherit;
  font-size: 11px;
  line-height: 1.45;
  outline: none;
}

body.content-review-mode .owr-reply-form textarea {
  min-height: 86px;
  resize: vertical;
}

body.content-review-mode .owr-reply-form input:focus,
body.content-review-mode .owr-reply-form textarea:focus {
  border-color: #8898c7;
  box-shadow: 0 0 0 3px rgba(49, 87, 213, .08);
}

body.content-review-mode .owr-reply-actions {
  margin-top: 10px;
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 7px;
}

body.content-review-mode .owr-reply-actions button {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 11px;
  border: 1px solid #d7d7d2;
  border-radius: 9px;
  background: #ffffff;
  color: #555550;
  font: inherit;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
}

body.content-review-mode .owr-reply-actions button.primary {
  border-color: #292929;
  background: #292929;
  color: #ffffff;
}

body.content-review-mode .owr-reply-actions button:disabled {
  opacity: .55;
  cursor: wait;
}

body.content-review-mode .owr-reply-actions svg {
  width: 12px;
  height: 12px;
}

/* Eingereichte Kommentare werden ebenfalls als Threads dargestellt. */
body.content-review-mode .owr-submitted-thread {
  min-width: 0;
  margin-bottom: 12px;
}

body.content-review-mode .owr-submitted-thread > .owr-submitted-row {
  margin-bottom: 0;
}

body.content-review-mode .owr-submitted-thread-replies {
  min-width: 0;
  margin: 8px 0 0 18px;
  padding-left: 12px;
  display: grid;
  gap: 8px;
  border-left: 2px solid #deded9;
}

body.content-review-mode .owr-submitted-thread-replies .owr-submitted-row {
  margin-bottom: 0;
  background: #f8f9fc;
}

body.content-review-mode .owr-submitted-row-head {
  align-items: flex-start;
  flex-wrap: wrap;
}

body.content-review-mode .owr-submitted-row-head strong {
  flex: 1 1 180px;
}

body.content-review-mode .owr-submitted-row footer {
  align-items: flex-start;
  flex-wrap: wrap;
}

/* --------------------------------------------------------------------------
   Editor: direkte Antworten und responsive Kommentarverwaltung
   -------------------------------------------------------------------------- */
.cm-review-modal {
  width: min(1120px, calc(100vw - 32px));
  max-height: min(880px, calc(100dvh - 32px));
}

.cm-review-body,
.cm-review-comment-list,
.cm-review-thread,
.cm-review-comment-row,
.cm-review-comment-main,
.cm-review-thread-replies,
.cm-review-reply-row,
.cm-review-reply-form {
  min-width: 0;
}

.cm-review-thread {
  display: grid;
  gap: 9px;
}

.cm-review-thread + .cm-review-thread {
  margin-top: 3px;
}

.cm-review-thread-replies {
  margin-left: 24px;
  padding-left: 14px;
  display: grid;
  gap: 8px;
  border-left: 2px solid #deded9;
}

.cm-review-reply-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 32px;
  align-items: start;
  gap: 10px;
  padding: 11px 12px;
  border: 1px solid #dfe2ea;
  border-radius: 11px;
  background: #f8f9fc;
}

.cm-review-reply-row > div {
  min-width: 0;
}

.cm-review-reply-row header {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.cm-review-reply-row h4 {
  margin: 7px 0 4px;
  color: #3f3f3b;
  font-size: 12px;
}

.cm-review-reply-row p {
  margin: 0;
  color: #555550;
  font-size: 12px;
  line-height: 1.5;
  white-space: pre-wrap;
}

.cm-review-reply-row footer {
  margin-top: 8px;
  color: #8a8a84;
  font-size: 9px;
}

.cm-review-reply-row > button {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 1px solid #deded9;
  border-radius: 8px;
  background: #ffffff;
  color: #a84646;
  cursor: pointer;
}

.cm-review-reply-row > button svg {
  width: 13px;
  height: 13px;
}

.cm-review-reply-form {
  margin-left: 24px;
  padding: 13px;
  display: grid;
  gap: 10px;
  border: 1px solid #cfd6ec;
  border-radius: 12px;
  background: #f7f9ff;
}

.cm-review-reply-form > div:first-child {
  min-width: 0;
  display: flex;
  align-items: flex-start;
  gap: 9px;
}

.cm-review-reply-form > div:first-child > span {
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #ffffff;
  color: #3157a8;
}

.cm-review-reply-form > div:first-child > span svg {
  width: 13px;
  height: 13px;
}

.cm-review-reply-form > div:first-child > div {
  min-width: 0;
}

.cm-review-reply-form strong,
.cm-review-reply-form small {
  display: block;
  overflow-wrap: anywhere;
}

.cm-review-reply-form strong {
  font-size: 11px;
}

.cm-review-reply-form small {
  margin-top: 2px;
  color: #85857f;
  font-size: 9px;
  line-height: 1.4;
}

.cm-review-reply-form textarea {
  width: 100%;
  min-width: 0;
  min-height: 90px;
  box-sizing: border-box;
  resize: vertical;
  border: 1px solid #d5d8e1;
  border-radius: 9px;
  background: #ffffff;
  padding: 9px 10px;
  color: #292929;
  font: inherit;
  font-size: 11px;
  line-height: 1.5;
  outline: none;
}

.cm-review-reply-form textarea:focus {
  border-color: #8898c7;
  box-shadow: 0 0 0 3px rgba(49, 87, 213, .08);
}

.cm-review-reply-form > footer {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 7px;
}

.cm-review-reply-error {
  margin: 0;
  color: #963f3f;
  font-size: 10px;
}

.cm-review-comment-main > header {
  min-width: 0;
  flex-wrap: wrap;
}

.cm-review-comment-main > header strong {
  flex: 1 1 220px;
}

.cm-review-comments-toolbar {
  min-width: 0;
  flex-wrap: wrap;
  align-items: flex-start;
}

.cm-review-comments-toolbar > div {
  min-width: 0;
  flex-wrap: wrap;
  align-items: center;
}

.cm-review-comments-toolbar > div:last-child {
  justify-content: flex-end;
}

.cm-review-comments-toolbar > div:last-child > span {
  min-width: 0;
  max-width: min(420px, 52vw);
  overflow-wrap: anywhere;
  text-align: right;
}

.cm-review-url-row input {
  overflow: hidden;
  text-overflow: ellipsis;
}

/* --------------------------------------------------------------------------
   Responsive Korrekturen
   -------------------------------------------------------------------------- */
@media (max-width: 930px) {
  .cm-review-modal {
    width: min(100vw - 20px, 900px);
    max-height: calc(100dvh - 20px);
  }

  .cm-review-comment-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  body.content-review-mode .owr-detail-head {
    flex-wrap: wrap;
  }

  body.content-review-mode .owr-detail-head > div {
    flex: 1 1 260px;
  }
}

@media (max-width: 760px) {
  .cm-review-modal > header {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .cm-review-modal-title {
    min-width: 0;
    flex: 1 1 calc(100% - 48px);
  }

  .cm-review-modal-title > div {
    min-width: 0;
  }

  .cm-review-modal-title h2,
  .cm-review-modal-title p {
    overflow-wrap: anywhere;
  }

  .cm-review-tabs {
    order: 3;
    width: 100%;
    margin: 8px 0 0;
  }

  .cm-review-tabs button {
    flex: 1 1 0;
  }

  .cm-review-body {
    padding: 15px;
  }

  .cm-review-comment-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }

  .cm-review-comment-actions {
    justify-content: flex-start;
  }

  .cm-review-decision-bar > div {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .cm-review-decision-bar button {
    width: 100%;
    min-width: 0;
    padding-inline: 7px;
  }

  .cm-review-change-tools,
  .cm-review-change-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .cm-review-thread-replies,
  .cm-review-reply-form {
    margin-left: 12px;
    padding-left: 10px;
  }

  body.content-review-mode .owr-comment-replies,
  body.content-review-mode .owr-reply-form,
  body.content-review-mode .owr-submitted-thread-replies {
    margin-left: 10px;
    padding-left: 10px;
  }

  body.content-review-mode .owr-submitted-panel > header {
    padding: 17px;
  }

  body.content-review-mode .owr-submitted-list {
    padding: 12px;
  }
}

@media (max-width: 560px) {
  .cm-node-page,
  .cm-node-opportunity,
  .cmp-node-page,
  .cmp-node-opportunity {
    width: 236px !important;
    min-width: 236px !important;
    max-width: 236px !important;
  }

  .cm-node-cluster,
  .cmp-node-cluster {
    width: 220px !important;
    min-width: 220px !important;
    max-width: 220px !important;
  }

  .cm-review-body {
    padding: 11px;
  }

  .cm-review-comments-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .cm-review-comments-toolbar > div,
  .cm-review-comments-toolbar > div:last-child {
    width: 100%;
    justify-content: flex-start;
  }

  .cm-review-comments-toolbar > div:last-child > span {
    max-width: 100%;
    text-align: left;
  }

  .cm-review-decision-bar > div {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cm-review-decision-bar button span {
    display: inline;
  }

  .cm-review-thread-replies,
  .cm-review-reply-form {
    margin-left: 5px;
    padding-left: 8px;
  }

  .cm-review-reply-form > footer,
  body.content-review-mode .owr-reply-actions,
  body.content-review-mode .owr-submitted-edit-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .cm-review-reply-form > footer button,
  body.content-review-mode .owr-reply-actions button,
  body.content-review-mode .owr-submitted-edit-actions button {
    width: 100%;
  }

  body.content-review-mode .owr-comments,
  body.content-review-mode .owr-comment-form,
  body.content-review-mode .owr-content-card,
  body.content-review-mode .owr-facts {
    padding: 12px;
  }

  body.content-review-mode .owr-comments-head {
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 7px;
  }

  body.content-review-mode .owr-comments-head strong {
    width: auto;
    min-width: 24px;
    height: auto;
    min-height: 24px;
    padding: 4px 8px;
    border-radius: 8px;
    text-align: right;
  }

  body.content-review-mode .owr-comment footer {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  body.content-review-mode .owr-comment-replies,
  body.content-review-mode .owr-reply-form,
  body.content-review-mode .owr-submitted-thread-replies {
    margin-left: 5px;
    padding-left: 8px;
  }

  body.content-review-mode .owr-submitted-row footer > div {
    width: 100%;
    justify-content: flex-start;
  }

  body.content-review-mode .owr-zoom {
    left: 8px;
    right: 8px;
    bottom: 8px;
    max-width: none;
    justify-content: center;
  }

  body.content-review-mode .owr-structure-status {
    flex: 1 1 100%;
    max-width: none;
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.content-review-mode .owr-dragging,
  body.content-review-mode .owr-drop-hover,
  body.owr-content-drag-active [data-review-drop-cluster],
  body.owr-content-drag-active [data-review-drop-parent-key] {
    transition: none !important;
  }
}
