/* backgrounds.css — canvas placement + settings-tab preview grid */

#app-bg-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  /* Behind positive-layer content but above the root background. */
  z-index: -1;
  pointer-events: none;
}

/* ─── Settings panel: Background tab ───────────────────────────────────── */
.bg-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
  padding: 4px 0 6px;
}

.bg-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 0;
  margin: 0;
  background: transparent;
  border: 1px solid rgba(211,32,39, 0.18);
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  font-family: inherit;
  color: inherit;
  transition: border-color 0.15s ease-out, transform 0.1s ease-out,
              box-shadow 0.15s ease-out;
}
.bg-card:hover {
  border-color: rgba(211,32,39, 0.55);
  transform: translateY(-1px);
}
.bg-card.active {
  border-color: rgba(211,32,39, 1);
  box-shadow: 0 0 0 1px rgba(211,32,39, 0.5),
              0 4px 14px rgba(211,32,39, 0.15);
}

.bg-thumb {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.bg-label {
  display: block;
  padding: 6px 8px;
  font-size: 11px;
  text-align: center;
  background: rgba(18, 24, 40, 0.88);
  color: #e6e7ea;
  letter-spacing: 0.3px;
  font-weight: 500;
}

/* Solid-color picker row (shown only when Solid is selected) */
.bg-color-row {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(211,32,39, 0.12);
}
.bg-color-row label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 0;
  font-size: 12px;
  color: #e6e7ea;
}
.bg-color-row input[type="color"] {
  width: 54px;
  height: 30px;
  padding: 0;
  border: 1px solid rgba(211,32,39, 0.25);
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
}
.bg-color-row input[type="color"]::-webkit-color-swatch-wrapper { padding: 2px; }
.bg-color-row input[type="color"]::-webkit-color-swatch { border-radius: 4px; border: none; }
