/* ============================================================
   editor-sweep.css: phase C additions on top of editor.css.
   Floating address toolbar, mobile bottom sheet, elements grid,
   placeholder polish.
   ============================================================ */

/* ---------- welcoming placeholder label ---------- */
.preview-stage__placeholder {
  font-family: var(--sans);
  font-size: 15px;
  color: var(--ink-muted);
  text-align: center;
  padding: 32px 24px;
  max-width: 360px;
  line-height: 1.55;
}

/* ---------- elements card buttons: 3 column grid ---------- */
.elements-card__actions {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.elements-card__actions .btn {
  width: 100%;
  min-height: 36px;
  font-size: 12.5px;
}
.elements-card__actions .btn svg {
  width: 12px;
  height: 12px;
}

/* ---------- popover bottom sheet on mobile ---------- */
@media (max-width: 760px) {
  .toolbar__dropdown.is-open > .popover {
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    top: auto !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    max-height: 75vh !important;
    border-radius: 18px 18px 0 0 !important;
    border: 1px solid var(--border-strong) !important;
    border-bottom: none !important;
    box-shadow: var(--shadow-lg) !important;
    overflow: hidden !important;
    animation: popoverSlideUpSheet 0.22s ease-out;
  }
  .toolbar__dropdown.is-open > .popover::before {
    content: "";
    display: block;
    width: 36px;
    height: 4px;
    border-radius: 999px;
    background: var(--border-strong);
    margin: 10px auto 4px;
  }
  .popover__body {
    max-height: calc(75vh - 28px) !important;
  }
  @keyframes popoverSlideUpSheet {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
  }
}

/* ---------- mobile sticky footer with primary actions ---------- */
@media (max-width: 760px) {
  .editor {
    grid-template-columns: 1fr !important;
  }
  .labels-panel {
    display: none !important;
  }
  .canvas {
    padding: 16px !important;
  }
}

/* ---------- typography polish ---------- */
.toolbar { font-family: var(--sans); }
.popover, .modal { font-family: var(--sans); }

/* ---------- focus rings on the new accent ---------- */
.toolbar__btn:focus-visible,
.popover__action:focus-visible,
.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 8px;
}

/* ---------- canvas element palette ---------- */
.canvas { position: relative; }

.canvas-palette {
  position: absolute;
  left: 20px;
  bottom: 20px;
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
  padding: 6px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  z-index: 50;
}
.canvas-palette__btn {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--ink-muted);
  cursor: pointer;
  transition: background 120ms ease, color 120ms ease, border-color 120ms ease;
}
.canvas-palette__btn:hover {
  background: var(--surface-2);
  color: var(--ink);
}
.canvas-palette__btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.canvas-palette__btn svg {
  width: 18px;
  height: 18px;
  stroke-width: 1.8;
}

@media (max-width: 760px) {
  .canvas-palette {
    flex-direction: row;
    left: 50%;
    bottom: 12px;
    transform: translateX(-50%);
  }
}
