/* PatternX Editor — styles */

.pxe-wrap {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  max-width: 1600px;
  margin: 24px auto;
  padding: 16px;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
}

.pxe-header {
  display: flex;
  gap: 12px;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.pxe-title {
  font-size: 20px;
  font-weight: 700;
}

.pxe-sub {
  font-size: 13px;
  color: #6b7280;
}

.pxe-grid {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 16px;
}

@media (max-width: 960px) {
  .pxe-grid {
    grid-template-columns: 1fr;
  }

  .pxe-canvascol {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 12px;
    align-items: start;
  }
}

.pxe-panel {
  border: 1px solid #eef2f7;
  border-radius: 16px;
  padding: 12px;
  background: #fafafa;
}

.pxe-section {
  border: 1px solid #eef2f7;
  border-radius: 14px;
  padding: 10px;
  background: #fff;
  margin-bottom: 10px;
}

.pxe-section-title {
  font-size: 12px;
  font-weight: 700;
  color: #111827;
  margin-bottom: 8px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.pxe-row {
  display: flex;
  gap: 10px;
  align-items: center;
  margin: 8px 0;
}

.pxe-row label {
  flex: 1;
  font-size: 13px;
  color: #111827;
}

.pxe-input {
  flex: 1;
  min-width: 0;
}

.pxe-badge {
  font-size: 12px;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  padding: 2px 8px;
  color: #111827;
}

.pxe-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.pxe-btn {
  cursor: pointer;
  border: 1px solid #111827;
  background: #111827;
  color: #fff;
  padding: 8px 10px;
  border-radius: 12px;
  font-size: 13px;
}

.pxe-btn:hover {
  filter: brightness(1.05);
}

.pxe-btn-ghost {
  background: #fff;
  color: #111827;
}

.pxe-btn-ghost:hover {
  background: #f9fafb;
}

.pxe-layerlist {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pxe-layer {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 8px;
  background: #fff;
}

.pxe-layer-top {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
}

.pxe-layer-name {
  font-size: 13px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 210px;
}

.pxe-layer-controls {
  display: flex;
  gap: 6px;
  align-items: center;
}

.pxe-mini {
  border: 1px solid #e5e7eb;
  background: #fff;
  border-radius: 10px;
  padding: 6px 8px;
  font-size: 12px;
  cursor: pointer;
}

.pxe-mini:hover {
  background: #f9fafb;
}

.pxe-layer.selected {
  outline: 2px solid #111827;
}

.pxe-canvascol {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pxe-canvaswrap {
  border: 1px solid #eef2f7;
  border-radius: 16px;
  padding: 10px;
  background: #fff;
}

.pxe-canvaslabel {
  font-size: 12px;
  color: #6b7280;
  margin-bottom: 6px;
}

.pxe-canvas {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  background: repeating-conic-gradient(
      #0000 0% 25%,
      #00000008 0% 50%
    )
    50% / 24px 24px;
}

.pxe-hint {
  font-size: 12px;
  color: #6b7280;
  line-height: 1.4;
}
