/* Draw & Sketch — full Display Panel split (request module | canvas) */

.client-portal-display-body.cp-ds-display-split,
.client-portal-display-body:has(> .cp-ds-split) {
  overflow: hidden;
  padding: 12px;
}

.cp-ds-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
  align-items: stretch;
}

.cp-ds-split.is-maximized {
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
}

.cp-ds-split.is-maximized > :not([data-cp-ds-panel]) {
  display: none;
}

.cp-ds-split > .cp-ds-request-col,
.cp-ds-split > [data-cp-np-draft],
.cp-ds-split > [data-cp-rev-panel] {
  min-width: 0;
  min-height: 0;
  height: 100%;
  overflow: auto;
}

.cp-ds-split .cp-np-editor-host,
.cp-ds-split .cp-np-editor {
  min-width: 0;
}

.cp-ds-panel {
  min-width: 0;
  min-height: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: #16191d;
  overflow: hidden;
}

.cp-ds-panel-inner {
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
}

.cp-ds-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 8px 4px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  background: #101214;
  flex: 0 0 auto;
  min-height: 34px;
  flex-wrap: nowrap;
  overflow: visible;
}

.cp-ds-eyebrow {
  margin: 0;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #9fd7ef;
  white-space: nowrap;
  flex: 0 0 auto;
}

.cp-ds-title {
  margin: 2px 0 0;
  font-size: 13px;
  font-weight: 800;
}

.cp-ds-head-end {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  flex: 0 1 auto;
  min-width: 0;
  justify-content: flex-end;
}

.cp-ds-form-sketch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  max-width: 100%;
}

.cp-ds-form-sketch .cp-ds-attach {
  border: 1px solid rgba(159, 215, 239, 0.45);
  background: transparent;
  color: #f2f5f8;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  padding: 4px 8px;
  border-radius: 4px;
  white-space: nowrap;
  cursor: pointer;
  flex: 0 0 auto;
}

.cp-ds-form-sketch .cp-ds-attach:disabled {
  opacity: 0.45;
  cursor: default;
}

.cp-ds-form-sketch .cp-ds-attach:focus-visible {
  outline: 2px solid #9fd7ef;
  outline-offset: 2px;
}

.cp-ds-sketch-status {
  min-width: 0;
  max-width: 11rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
  line-height: 1.2;
  color: #9fd7ef;
}

.cp-ds-sketch-status[data-state="error"] {
  color: #f0b4b0;
}

.cp-ds-maximize,
.cp-ds-close {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
  color: #f2f5f8;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  flex: 0 0 auto;
}

.cp-ds-close {
  font-size: 18px;
}

.cp-ds-maximize:hover,
.cp-ds-maximize.is-on {
  background: rgba(255, 255, 255, 0.18);
}

.cp-ds-close:hover {
  background: rgba(217, 83, 79, 0.4);
}

[data-cp-ds-standalone] .cp-ds-maximize {
  display: none;
}

.cp-ds-menubar {
  display: flex;
  align-items: stretch;
  gap: 0;
  min-width: 0;
  flex: 1 1 auto;
  overflow: visible;
}

.cp-ds-menu {
  position: relative;
}

.cp-ds-menu-trigger {
  border: 0;
  background: transparent;
  color: rgba(242, 245, 248, 0.92);
  font-size: 12px;
  font-weight: 700;
  padding: 6px 10px;
  cursor: pointer;
  border-radius: 4px;
  line-height: 1.2;
}

.cp-ds-menu-trigger::after {
  content: " ▾";
  font-size: 9px;
  opacity: 0.65;
}

.cp-ds-menu-trigger:hover,
.cp-ds-menu.is-open .cp-ds-menu-trigger,
.cp-ds-menu-trigger.is-on {
  background: rgba(255, 255, 255, 0.1);
}

.cp-ds-menu-list {
  position: absolute;
  top: calc(100% + 2px);
  left: 0;
  z-index: 40;
  min-width: 228px;
  padding: 6px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: #1c2026;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
}

.cp-ds-menu[data-cp-ds-menu-root="export"] .cp-ds-menu-list,
.cp-ds-menu[data-cp-ds-menu-root="view"] .cp-ds-menu-list,
.cp-ds-menu[data-cp-ds-menu-root="organize"] .cp-ds-menu-list {
  left: auto;
  right: 0;
}

.cp-ds-menu-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  border: 0;
  background: transparent;
  color: #f2f5f8;
  font-size: 12px;
  font-weight: 600;
  text-align: left;
  padding: 7px 8px;
  border-radius: 5px;
  cursor: pointer;
}

.cp-ds-menu-item:hover,
.cp-ds-menu-item.is-on {
  background: rgba(79, 176, 220, 0.22);
}

.cp-ds-kbd {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: rgba(242, 245, 248, 0.45);
}

.cp-ds-menu-sep {
  height: 1px;
  margin: 4px 6px;
  background: rgba(255, 255, 255, 0.1);
}

.cp-ds-tools {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: #0e1012;
  flex: 0 0 auto;
  overflow-x: auto;
}

.cp-ds-tool-cluster {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 3px;
}

.cp-ds-tool-cluster + .cp-ds-tool-cluster {
  padding-left: 6px;
  border-left: 1px solid rgba(255, 255, 255, 0.12);
}

.cp-ds-tool-zoom {
  margin-left: auto;
}

.cp-ds-btn {
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.06);
  color: #f2f5f8;
  font-size: 10px;
  font-weight: 700;
  padding: 4px 7px;
  cursor: pointer;
  white-space: nowrap;
}

.cp-ds-btn.is-on {
  border-color: rgba(126, 227, 164, 0.65);
  background: rgba(67, 176, 106, 0.28);
}

.cp-ds-props {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  padding: 6px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 10px;
  font-weight: 700;
  color: rgba(242, 245, 248, 0.78);
  flex: 0 0 auto;
}

.cp-ds-props label,
.cp-ds-check {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.cp-ds-props input[type="color"] {
  width: 22px;
  height: 18px;
  padding: 0;
  border: 0;
  background: transparent;
}

.cp-ds-props input[type="range"] {
  width: 72px;
}

.cp-ds-props input[data-cp-ds-width-num] {
  width: 42px;
}

.cp-ds-prop-val {
  min-width: 22px;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  color: #f2f5f8;
}

.cp-ds-props input[type="number"],
.cp-ds-props select,
.cp-ds-meta select {
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 4px;
  background: #16191d;
  color: #f2f5f8;
  font-size: 11px;
  padding: 2px 4px;
}

.cp-ds-stage-wrap {
  flex: 1 1 auto;
  min-height: 220px;
  display: flex;
  position: relative;
}

.cp-ds-stage {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 220px;
  position: relative;
  overflow: hidden;
  background: #ffffff;
}

.cp-ds-stage.is-dragover {
  outline: 2px dashed #4fb0dc;
  outline-offset: -4px;
}

.cp-ds-stage .canvas-container {
  position: absolute !important;
  left: 0;
  top: 0;
}

.cp-ds-stage .canvas-container canvas {
  left: 0 !important;
  top: 0 !important;
}

.cp-ds-dim-editor {
  position: absolute;
  z-index: 30;
  margin: 0;
  min-width: 2.8em;
  padding: 1px 6px;
  border: 1px solid #4fb0dc;
  border-radius: 3px;
  background: #ffffff;
  color: #1a1d21;
  text-align: center;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
  transform-origin: center center;
}

.cp-ds-note-editor {
  position: absolute;
  z-index: 31;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  overflow: hidden;
  background: #ffff88;
  box-shadow: 2px 4px 10px rgba(0, 0, 0, 0.22);
  border-radius: 0;
}

.cp-ds-note-editor-band {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  height: 16px;
  padding: 0 6px;
  box-sizing: border-box;
  background: #f3e15c;
}

.cp-ds-note-swatches,
.cp-ds-note-colorbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  padding: 0 6px;
  box-sizing: border-box;
}

.cp-ds-note-colorbar {
  position: absolute;
  z-index: 32;
  pointer-events: none;
}

.cp-ds-note-swatch {
  width: 12px;
  height: 12px;
  padding: 0;
  border: 1px solid rgba(61, 58, 42, 0.35);
  border-radius: 50%;
  cursor: pointer;
  flex: 0 0 auto;
  pointer-events: auto;
}

.cp-ds-note-swatch.is-active {
  outline: 2px solid rgba(61, 58, 42, 0.8);
  outline-offset: 1px;
}

.cp-ds-note-editor textarea {
  flex: 1 1 auto;
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  min-height: 0;
  max-width: 100%;
  margin: 0;
  border: 0;
  outline: none;
  resize: none;
  overflow-x: hidden;
  overflow-y: hidden;
  background: transparent;
  color: #3d3a2a;
  font-family: Arial, sans-serif;
  font-size: 14px;
  line-height: 1.35;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.cp-ds-layers {
  width: 160px;
  flex: 0 0 160px;
  border-left: 1px solid rgba(255, 255, 255, 0.12);
  background: #101214;
  overflow: auto;
  padding: 8px;
}

.cp-ds-layers h4 {
  margin: 0 0 8px;
  font-size: 10px;
  letter-spacing: 0.06em;
}

.cp-ds-layers-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 4px;
}

.cp-ds-layer {
  display: flex;
  gap: 4px;
  align-items: center;
  cursor: grab;
}

.cp-ds-layer.is-dragging {
  opacity: 0.4;
}

.cp-ds-layer.is-drop-before {
  box-shadow: inset 0 2px 0 #7ee3a4;
}

.cp-ds-layer.is-drop-after {
  box-shadow: inset 0 -2px 0 #7ee3a4;
}

.cp-ds-layer-handle {
  flex: 0 0 auto;
  color: rgba(242, 245, 248, 0.42);
  font-size: 11px;
  letter-spacing: -2px;
  user-select: none;
  cursor: grab;
}

.cp-ds-layer.is-active [data-cp-ds-layer-select] {
  border-color: rgba(126, 227, 164, 0.6);
}

.cp-ds-layer button {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: #f2f5f8;
  font-size: 10px;
  padding: 4px 6px;
  cursor: pointer;
}

.cp-ds-layer [data-cp-ds-layer-select] {
  flex: 1;
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cp-ds-layers-empty {
  margin: 0;
  font-size: 11px;
  color: rgba(242, 245, 248, 0.5);
}

.cp-ds-help {
  width: 280px;
  flex: 0 0 280px;
  border-left: 1px solid rgba(255, 255, 255, 0.12);
  background: #101214;
  overflow: auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.cp-ds-help.hidden,
.cp-ds-layers.hidden,
.cp-ds-room-presets.hidden {
  display: none;
}

.cp-ds-help-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  flex: 0 0 auto;
}

.cp-ds-help-head h4 {
  margin: 0;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.cp-ds-help-close {
  width: 22px;
  height: 22px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
  color: #f2f5f8;
  cursor: pointer;
  line-height: 1;
}

.cp-ds-help-body {
  padding: 10px 12px 16px;
  font-size: 11px;
  line-height: 1.45;
  color: rgba(242, 245, 248, 0.82);
}

.cp-ds-help-body h5 {
  margin: 14px 0 6px;
  font-size: 10px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #9fd7ef;
}

.cp-ds-help-body p,
.cp-ds-help-body ul {
  margin: 0 0 8px;
  padding: 0;
}

.cp-ds-help-body ul {
  padding-left: 16px;
}

.cp-ds-help-body li {
  margin: 0 0 6px;
}

.cp-ds-help-body strong {
  color: #f2f5f8;
}

.cp-ds-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 10px;
  color: rgba(242, 245, 248, 0.7);
  flex: 0 0 auto;
}

.cp-ds-panel-inner.is-readonly [disabled] {
  opacity: 0.45;
  cursor: not-allowed;
}

.cp-ds-missing {
  margin: 16px;
  color: #ffb4b4;
}

.cp-ds-room-presets {
  width: 272px;
  flex: 0 0 272px;
  border-left: 1px solid rgba(255, 255, 255, 0.12);
  background: #101214;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
}

.cp-ds-room-presets-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  flex: 0 0 auto;
}

.cp-ds-room-presets-head h4 {
  margin: 0;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.cp-ds-room-presets-toolbar {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px;
  flex: 0 0 auto;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.cp-ds-room-presets-search input {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 4px;
  background: #16191d;
  color: #f2f5f8;
  font-size: 11px;
  padding: 5px 7px;
}

.cp-ds-room-presets-modes {
  display: flex;
  gap: 4px;
}

.cp-ds-room-presets-modes .cp-ds-btn {
  flex: 1;
}

.cp-ds-room-presets-body {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 8px;
  scrollbar-gutter: stable;
}

.cp-ds-room-presets-empty {
  margin: 0;
  font-size: 11px;
  color: rgba(242, 245, 248, 0.5);
}

.cp-ds-room-presets-error {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.cp-ds-room-presets-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.cp-ds-room-presets-list.is-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
  width: 100%;
}

.cp-ds-room-presets-list.is-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cp-ds-room-preset {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  padding: 6px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  cursor: grab;
}

.cp-ds-room-preset:active {
  cursor: grabbing;
}

.cp-ds-room-preset-thumb {
  aspect-ratio: 1;
  width: 100%;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border-radius: 4px;
  overflow: hidden;
}

.cp-ds-room-preset-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}

.cp-ds-room-preset-name {
  margin: 0;
  font-size: 10px;
  line-height: 1.3;
  color: #f2f5f8;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cp-ds-room-preset .cp-ds-btn {
  width: 100%;
}

.cp-ds-room-preset--list {
  flex-direction: row;
  align-items: center;
  padding: 4px 6px;
}

.cp-ds-room-preset--list .cp-ds-room-preset-name {
  flex: 1 1 auto;
  min-width: 0;
}

.cp-ds-room-preset--list .cp-ds-btn {
  width: auto;
  flex: 0 0 auto;
}

.cp-ds-room-presets.hidden {
  display: none;
}

@media (max-width: 720px) {
  .cp-ds-split {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
}
