/* Borda e moldura — tool-only (shell lives in image-studio-shell.css) */

.bm-viewport {
  display: none;
  position: relative;
  max-width: 100%;
  max-height: 100%;
  margin: auto;
  user-select: none;
  width: 100%;
}

.istudio-app:not(.is-empty) .bm-viewport {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 auto;
  min-height: 0;
}

.bm-viewport canvas {
  display: block;
  max-width: 100%;
  max-height: min(72vh, 100%);
  width: auto;
  height: auto;
  border-radius: 2px;
  box-shadow: var(--is-canvas-shadow, 0 8px 28px rgba(15, 23, 42, 0.28));
}

.bm-presets {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.bm-preset {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 5px;
  padding: 6px;
  border: 1px solid var(--is-line);
  border-radius: 10px;
  background: var(--is-input);
  color: var(--is-text);
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.bm-preset:hover {
  border-color: var(--is-accent);
}

.bm-preset.is-active {
  border-color: var(--is-accent);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--is-accent) 28%, transparent);
}

.bm-preset-swatch {
  display: block;
  height: 36px;
  border-radius: 6px;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.bm-preset-swatch--solida {
  background: linear-gradient(#111 0 18%, #ddd 18% 82%, #111 82% 100%);
  box-shadow: inset 18% 0 0 #111, inset -18% 0 0 #111;
}
.bm-preset-swatch--dupla {
  background: #111;
  box-shadow: inset 0 0 0 5px #111, inset 0 0 0 8px #fff, inset 0 0 0 10px #ddd;
}
.bm-preset-swatch--polaroid {
  background: linear-gradient(#efece6 0 12%, #c8c4bc 12% 72%, #efece6 72% 100%);
  box-shadow: inset 10% 0 0 #efece6, inset -10% 0 0 #efece6;
}
.bm-preset-swatch--cinema {
  background: #141414;
  box-shadow: inset 0 0 0 6px #141414, inset 0 0 0 8px #c9a227;
}
.bm-preset-swatch--produto {
  background: #fff;
  box-shadow: inset 0 0 0 7px #fff, inset 0 0 0 8px #ddd;
}
.bm-preset-swatch--social {
  background: linear-gradient(135deg, #f58529, #dd2a7b 50%, #8134af);
  box-shadow: inset 0 0 0 8px transparent;
}

.bm-preset-name {
  font-size: 0.75rem;
  font-weight: 750;
  line-height: 1.2;
}

.bm-color-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.bm-color-row input[type="color"] {
  width: 40px;
  height: 34px;
  padding: 2px;
  border: 1px solid var(--is-line);
  border-radius: 8px;
  background: var(--is-input);
  cursor: pointer;
}

.bm-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.bm-swatch {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.15);
  padding: 0;
  cursor: pointer;
}

.bm-swatch.is-active {
  outline: 2px solid var(--is-accent);
  outline-offset: 1px;
}

.bm-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin: 18px 0 8px;
}

.bm-feature {
  padding: 12px 14px;
  border: 1px solid var(--dica-border, #e5e7eb);
  border-radius: 12px;
  background: var(--dica-surface, #fff);
}

.bm-feature-title {
  margin: 0 0 6px;
  font-size: 0.95rem;
}

.bm-feature-text {
  margin: 0;
  font-size: 0.88rem;
  color: var(--dica-muted, #667085);
  line-height: 1.45;
}

@media (max-width: 860px) {
  .bm-presets {
    grid-template-columns: 1fr 1fr 1fr;
  }
  .bm-viewport canvas {
    max-height: min(56vh, 100%);
  }
}
