/* ===== ORBE Design Mode — UI do editor ===== */

.orbe-dm-launch {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 99998;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: linear-gradient(120deg, #ff2d78, #8b5cff);
  color: #fff;
  font: 600 14px/1 "Inter", system-ui, sans-serif;
  cursor: pointer;
  box-shadow: 0 14px 40px rgba(139, 92, 255, 0.4);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.orbe-dm-launch:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 50px rgba(255, 45, 120, 0.45);
}
.orbe-dm-launch svg {
  width: 18px;
  height: 18px;
}

/* Estado ativo */
body.orbe-dm-active {
  cursor: crosshair;
}
body.orbe-dm-active .orbe-dm-launch {
  display: none;
}

/* Realce do elemento sob o cursor */
.orbe-dm-hover-outline {
  outline: 2px dashed rgba(255, 45, 120, 0.9) !important;
  outline-offset: 1px !important;
}
/* Realce do elemento selecionado */
.orbe-dm-selected-outline {
  outline: 2px solid #8b5cff !important;
  outline-offset: 1px !important;
}

/* Barra superior do modo design */
.orbe-dm-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
  background: rgba(10, 9, 16, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  font-family: "Inter", system-ui, sans-serif;
}
.orbe-dm-bar-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 14px;
}
.orbe-dm-bar-title .orbe-dm-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #ff2d78;
  box-shadow: 0 0 10px #ff2d78;
}
.orbe-dm-bar-hint {
  color: rgba(255, 255, 255, 0.6);
  font-size: 12px;
  font-weight: 400;
}
.orbe-dm-bar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.orbe-dm-btn {
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 10px;
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font: 600 13px/1 "Inter", system-ui, sans-serif;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
}
.orbe-dm-btn:hover {
  background: rgba(255, 255, 255, 0.12);
}
.orbe-dm-btn[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
}
.orbe-dm-btn-primary {
  border-color: transparent;
  background: linear-gradient(120deg, #ff2d78, #8b5cff);
}
.orbe-dm-btn-primary:hover {
  background: linear-gradient(120deg, #ff448a, #9a78ff);
}

/* Painel lateral de propriedades */
.orbe-dm-panel {
  position: fixed;
  top: 56px;
  right: 16px;
  bottom: 16px;
  width: 320px;
  z-index: 99999;
  display: none;
  flex-direction: column;
  background: rgba(13, 11, 20, 0.97);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
  color: #fff;
  font-family: "Inter", system-ui, sans-serif;
  overflow: hidden;
}
.orbe-dm-panel.is-open {
  display: flex;
}
.orbe-dm-panel-head {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.orbe-dm-panel-head h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
}
.orbe-dm-panel-target {
  margin: 4px 0 0;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.5);
  word-break: break-all;
}
.orbe-dm-panel-body {
  padding: 14px 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.orbe-dm-empty {
  color: rgba(255, 255, 255, 0.5);
  font-size: 13px;
  line-height: 1.6;
  text-align: center;
  padding: 30px 10px;
}
.orbe-dm-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.orbe-dm-field > label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.55);
  font-weight: 600;
}
.orbe-dm-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.orbe-dm-input,
.orbe-dm-select {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 9px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  font-size: 13px;
  font-family: inherit;
}
.orbe-dm-input:focus,
.orbe-dm-select:focus {
  outline: none;
  border-color: #8b5cff;
}
.orbe-dm-color {
  width: 38px;
  height: 36px;
  padding: 2px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 9px;
  background: transparent;
  cursor: pointer;
  flex: 0 0 auto;
}
.orbe-dm-range {
  flex: 1 1 auto;
}
.orbe-dm-unit {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
  min-width: 54px;
  text-align: right;
}
.orbe-dm-seg {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
}
.orbe-dm-seg button {
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  padding: 7px 0;
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.7);
  font-size: 12px;
  cursor: pointer;
}
.orbe-dm-seg button.is-active {
  background: linear-gradient(120deg, #ff2d78, #8b5cff);
  border-color: transparent;
  color: #fff;
}
.orbe-dm-panel-foot {
  padding: 12px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  gap: 8px;
}
.orbe-dm-panel-foot .orbe-dm-btn {
  flex: 1 1 auto;
  text-align: center;
}

/* Toast de confirmação */
.orbe-dm-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  z-index: 100000;
  padding: 12px 20px;
  border-radius: 12px;
  background: rgba(20, 18, 28, 0.97);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #fff;
  font: 600 13px/1 "Inter", system-ui, sans-serif;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.orbe-dm-toast.is-show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.orbe-dm-toast.is-error {
  border-color: rgba(255, 90, 90, 0.6);
}

@media (max-width: 520px) {
  .orbe-dm-panel {
    width: auto;
    left: 12px;
    right: 12px;
  }
}
