/**
 * Nexo Page Kit — CTA Section Canvas.
 */

.nexo-cta-section--engine-canvas .nexo-cta-section__container {
  display: flex;
  justify-content: center;
}

.nexo-cta-section-canvas {
  position: relative;
  width: var(--nexo-cta-canvas-width, 1100px);
  max-width: 100%;
  height: var(--nexo-cta-canvas-height, 360px);
  overflow: var(--nexo-cta-canvas-overflow, hidden);
  background: var(--nexo-cta-canvas-background, #0f1514);
  border-radius: var(--nexo-cta-canvas-radius, 6px);
}

.nexo-cta-section-canvas,
.nexo-cta-section-canvas * {
  box-sizing: border-box;
}

.nexo-cta-section-canvas__stage {
  position: relative;
  width: 100%;
  height: 100%;
}

.nexo-cta-section-canvas__element {
  position: absolute;
  top: var(--nexo-cta-canvas-el-y, 0);
  left: var(--nexo-cta-canvas-el-x, 0);
  z-index: var(--nexo-cta-canvas-el-z, 1);
  width: var(--nexo-cta-canvas-el-width, 1px);
  height: var(--nexo-cta-canvas-el-height, 1px);
  opacity: var(--nexo-cta-canvas-el-opacity, 1);
}

.nexo-cta-section-canvas__element--image {
  margin: 0;
  overflow: hidden;
}

.nexo-cta-section-canvas__element--image img {
  display: block;
  width: 100%;
  height: 100%;
}

.nexo-cta-section-canvas__element--heading,
.nexo-cta-section-canvas__element--rich-text {
  margin: 0;
  overflow: hidden;
  color: var(--nexo-cta-canvas-el-color, #fff);
  font-family: var(--nexo-cta-canvas-el-font-family, inherit);
  font-size: var(--nexo-cta-canvas-el-font-size, 16px);
  font-style: var(--nexo-cta-canvas-el-font-style, normal);
  font-weight: var(--nexo-cta-canvas-el-font-weight, 400);
  line-height: var(--nexo-cta-canvas-el-line-height, 1.4);
  letter-spacing: var(--nexo-cta-canvas-el-letter-spacing, 0);
  text-align: var(--nexo-cta-canvas-el-text-align, left);
  text-transform: var(--nexo-cta-canvas-el-text-transform, none);
}

.nexo-cta-section-canvas__heading-line {
  display: block;
}

.nexo-cta-section-canvas__element--rich-text p {
  margin: 0 0 0.75em;
}

.nexo-cta-section-canvas__element--rich-text p:last-child {
  margin-bottom: 0;
}

.nexo-cta-section-canvas__element--button {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  color: var(--nexo-cta-canvas-el-color, #000);
  font-family: var(--nexo-cta-canvas-el-font-family, inherit);
  font-size: var(--nexo-cta-canvas-el-font-size, 14px);
  font-style: var(--nexo-cta-canvas-el-font-style, normal);
  font-weight: var(--nexo-cta-canvas-el-font-weight, 900);
  line-height: var(--nexo-cta-canvas-el-line-height, 1);
  letter-spacing: var(--nexo-cta-canvas-el-letter-spacing, 0);
  text-align: center;
  text-decoration: none;
  text-transform: var(--nexo-cta-canvas-el-text-transform, uppercase);
  background: var(--nexo-cta-canvas-el-background, #f75c00);
  border-radius: var(--nexo-cta-canvas-el-radius, 7px);
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.nexo-cta-section-canvas__element--button:hover,
.nexo-cta-section-canvas__element--button:focus-visible {
  color: var(--nexo-cta-canvas-el-color, #000);
  background: var(--nexo-cta-canvas-el-hover-background, #d94f00);
}

.nexo-cta-section-canvas-builder {
  display: grid;
  gap: 16px;
}

.nexo-cta-section-canvas-builder__toolbar,
.nexo-cta-section-canvas-builder__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: end;
}

.nexo-cta-section-canvas-builder__toolbar label {
  display: grid;
  gap: 4px;
  min-width: 120px;
  font-weight: 700;
}

.nexo-cta-section-canvas-builder__breakpoints {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 12px;
  background: #f6f7f7;
  border: 1px solid #dcdcde;
  border-radius: 8px;
}

.nexo-cta-section-canvas-builder__breakpoints .button.is-active {
  color: #fff;
  background: #2271b1;
  border-color: #2271b1;
}

.nexo-cta-section-canvas-builder__workspace {
  display: grid;
  gap: 18px;
}

.nexo-cta-section-canvas-builder__stage-wrap {
  overflow: auto;
  padding: 16px;
  background: #f3f4f6;
  border: 1px solid #dcdcde;
  border-radius: 8px;
  overscroll-behavior: contain;
}

.nexo-cta-section-canvas-builder__stage {
  position: relative;
  width: 1100px;
  height: 360px;
  overflow: hidden;
  background: #0f1514;
  border-radius: 6px;
  box-shadow: 0 18px 44px rgba(17, 24, 39, 0.12);
}

.nexo-cta-section-canvas-builder__element {
  position: absolute;
  cursor: move;
  outline: 1px solid rgba(34, 113, 177, 0.35);
  outline-offset: -1px;
  touch-action: none;
}

.nexo-cta-section-canvas-builder__element.is-selected {
  outline: 2px solid #2271b1;
}

.nexo-cta-section-canvas-builder__element.is-hidden-breakpoint {
  display: none;
}

.nexo-cta-section-canvas-builder__element.is-ghost {
  opacity: 0.55;
  pointer-events: none;
}

.nexo-cta-section-canvas-builder__placeholder {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  color: #4b5563;
  font-size: 12px;
  background: #e5e7eb;
}

.nexo-cta-section-canvas-builder__rich-preview p,
.nexo-cta-section-canvas-builder__rich-preview ul,
.nexo-cta-section-canvas-builder__rich-preview ol,
.nexo-cta-section-canvas-builder__rich-preview li {
  font-size: inherit;
  line-height: inherit;
}

.nexo-cta-section-canvas-builder__resize-handle {
  display: none;
  position: absolute;
  z-index: 5;
  width: 10px;
  height: 10px;
  background: #2271b1;
  border: 1px solid #fff;
  border-radius: 999px;
}

.nexo-cta-section-canvas-builder__element.is-selected .nexo-cta-section-canvas-builder__resize-handle {
  display: block;
}

.nexo-cta-section-canvas-builder__resize-handle[data-direction="nw"],
.nexo-cta-section-canvas-builder__resize-handle[data-direction="n"],
.nexo-cta-section-canvas-builder__resize-handle[data-direction="ne"] {
  top: -5px;
}

.nexo-cta-section-canvas-builder__resize-handle[data-direction="sw"],
.nexo-cta-section-canvas-builder__resize-handle[data-direction="s"],
.nexo-cta-section-canvas-builder__resize-handle[data-direction="se"] {
  bottom: -5px;
}

.nexo-cta-section-canvas-builder__resize-handle[data-direction="nw"],
.nexo-cta-section-canvas-builder__resize-handle[data-direction="w"],
.nexo-cta-section-canvas-builder__resize-handle[data-direction="sw"] {
  left: -5px;
}

.nexo-cta-section-canvas-builder__resize-handle[data-direction="ne"],
.nexo-cta-section-canvas-builder__resize-handle[data-direction="e"],
.nexo-cta-section-canvas-builder__resize-handle[data-direction="se"] {
  right: -5px;
}

.nexo-cta-section-canvas-builder__resize-handle[data-direction="n"],
.nexo-cta-section-canvas-builder__resize-handle[data-direction="s"] {
  left: calc(50% - 5px);
}

.nexo-cta-section-canvas-builder__resize-handle[data-direction="e"],
.nexo-cta-section-canvas-builder__resize-handle[data-direction="w"] {
  top: calc(50% - 5px);
}

.nexo-cta-section-canvas-builder__resize-handle[data-direction="nw"],
.nexo-cta-section-canvas-builder__resize-handle[data-direction="se"] {
  cursor: nwse-resize;
}

.nexo-cta-section-canvas-builder__resize-handle[data-direction="ne"],
.nexo-cta-section-canvas-builder__resize-handle[data-direction="sw"] {
  cursor: nesw-resize;
}

.nexo-cta-section-canvas-builder__resize-handle[data-direction="n"],
.nexo-cta-section-canvas-builder__resize-handle[data-direction="s"] {
  cursor: ns-resize;
}

.nexo-cta-section-canvas-builder__resize-handle[data-direction="e"],
.nexo-cta-section-canvas-builder__resize-handle[data-direction="w"] {
  cursor: ew-resize;
}

.nexo-cta-section-canvas-builder__panels {
  display: grid;
  grid-template-columns: minmax(220px, 0.7fr) minmax(0, 2fr);
  gap: 14px;
  align-items: start;
}

.nexo-cta-section-canvas-builder__panel {
  padding: 14px;
  background: #fff;
  border: 1px solid #dcdcde;
  border-radius: 8px;
}

.nexo-cta-section-canvas-builder__element-list,
.nexo-cta-section-canvas-builder__properties {
  display: grid;
  gap: 8px;
}

.nexo-cta-section-canvas-builder__element-list-item {
  justify-content: flex-start;
  width: 100%;
  text-align: left;
}

.nexo-cta-section-canvas-builder__element-list-item.is-selected {
  color: #fff;
  background: #2271b1;
  border-color: #2271b1;
}

.nexo-cta-section-canvas-builder__properties {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.nexo-cta-section-canvas-builder__property,
.nexo-cta-section-canvas-builder__rich-editor {
  display: grid;
  gap: 6px;
  margin: 0;
}

.nexo-cta-section-canvas-builder__property > span,
.nexo-cta-section-canvas-builder__rich-editor > span {
  font-weight: 700;
}

.nexo-cta-section-canvas-builder__property-heading {
  padding: 10px 12px;
  font-weight: 800;
  color: #1d2327;
  background: #f6f7f7;
  border-radius: 6px;
}

.nexo-cta-section-canvas-builder__visibility {
  padding: 12px;
  background: #f6f7f7;
  border: 1px solid #dcdcde;
  border-radius: 8px;
}

.nexo-cta-section-canvas-builder__visibility label {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  margin-right: 14px;
}

.nexo-cta-section-canvas-builder__property.is-full,
.nexo-cta-section-canvas-builder__property-heading.is-full,
.nexo-cta-section-canvas-builder__rich-editor.is-full,
.nexo-cta-section-canvas-builder__remove.is-full,
.nexo-cta-section-canvas-builder__media-control.is-full {
  grid-column: 1 / -1;
}

.nexo-cta-section-canvas-builder__rich-editor-toolbar,
.nexo-cta-section-canvas-builder__media-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.nexo-cta-section-canvas-builder__rich-editor-area {
  min-height: 132px;
  padding: 10px;
  overflow: auto;
  background: #fff;
  border: 1px solid #8c8f94;
  border-radius: 4px;
}

.nexo-cta-section-canvas-builder__media-control {
  padding: 12px;
  background: #f6f7f7;
  border: 1px solid #dcdcde;
  border-radius: 8px;
}

.nexo-cta-section-canvas-builder__media-preview {
  display: block;
  width: min(220px, 100%);
  height: auto;
  max-height: 160px;
  object-fit: contain;
  padding: 6px;
  background: #fff;
  border: 1px solid #dcdcde;
  border-radius: 6px;
}

.nexo-cta-section-canvas-builder__json {
  width: 100%;
  font-family: monospace;
}

@media (max-width: 1100px) {
  .nexo-cta-section-canvas-builder__panels {
    grid-template-columns: 1fr;
  }

  .nexo-cta-section-canvas-builder__properties {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 782px) {
  .nexo-cta-section-canvas-builder__properties {
    grid-template-columns: 1fr;
  }
}
