/* Custom Resolution Preview */

.custom-resolution-preview {
  position: relative;
  width: 370px;
  aspect-ratio: 1 / 1;
  background: #0a0a0a;
  border-radius: 6px;
  margin: 16px auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.stripe {
  background-image: repeating-linear-gradient(45deg, #06b6d4, #06b6d4 10px, transparent 10px, transparent 20px);
}

.custom-resolution-preview-rect {
  opacity: 0.5;
background: #1a1a1a57;
    position: absolute;
    border: 1px solid hsl(from var(--modal-primary-color) h s calc(l + 15));
    /* border-radius: 5px; */
    box-sizing: border-box;
    /* transition: all 0.3s ease-in-out; */
    background-image: repeating-linear-gradient(45deg, #1c1c1c48, #1c1c1c48 5px, #0d0d0d 5px, #0d0d0d 10px);
    transition: opacity 0.3s;
}

.custom-resolution-preview-rect:hover {
 opacity: 1;
}

.custom-resolution-preview-label {
  position: absolute;
  bottom: 8px;
  right: 10px;
  font-size: 10px;
  color: rgba(255, 255, 255, 0.25);
  font-family: inherit;
  pointer-events: none;
}

/* Reference resolution guides */
.custom-resolution-guide {
  position: absolute;
  border: 1px dashed rgba(255, 255, 255, 0.07);
  box-sizing: border-box;
  pointer-events: none;
}

.custom-resolution-guide-label {
  position: absolute;
  bottom: 2px;
  right: 4px;
  font-size: 9px;
  color: rgba(255, 255, 255, 0.15);
  font-family: inherit;
  line-height: 1;
}

/* Resize handles */
.custom-resolution-handle {
  position: absolute;
  width: 10px;
  height: 10px;
  background: rgba(255, 255, 255, 0.5);
  /* border: 1px solid rgba(255, 255, 255, 0.8); */
  box-sizing: border-box;
  z-index: 1;
}

.custom-resolution-handle:hover,
.custom-resolution-handle.active {
  background: rgba(255, 255, 255, 0.9);
}

/* Corner handles */
.custom-resolution-handle[data-dir="nw"] { cursor: nwse-resize; top: -5px; left: -5px; }
.custom-resolution-handle[data-dir="ne"] { cursor: nesw-resize; top: -5px; right: -5px; }
.custom-resolution-handle[data-dir="sw"] { cursor: nesw-resize; bottom: -5px; left: -5px; }
.custom-resolution-handle[data-dir="se"] { cursor: nwse-resize; bottom: -5px; right: -5px; }

/* Edge midpoint handles */
.custom-resolution-handle[data-dir="n"] { cursor: ns-resize; top: -5px; left: 50%; transform: translateX(-50%); }
.custom-resolution-handle[data-dir="s"] { cursor: ns-resize; bottom: -5px; left: 50%; transform: translateX(-50%); }
.custom-resolution-handle[data-dir="w"] { cursor: ew-resize; left: -5px; top: 50%; transform: translateY(-50%); }
.custom-resolution-handle[data-dir="e"] { cursor: ew-resize; right: -5px; top: 50%; transform: translateY(-50%); }
