/* ============================================================
   popovers.css — floating panels attached to toolbar buttons
   ============================================================ */

.color-popover {
  position: fixed;
  z-index: 100;
  background: var(--bg-sidebar);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 12px;
  box-shadow: var(--shadow-lg);
  width: 254px;
}
.color-popover[hidden] {
  display: none;
}

.color-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  margin-bottom: 10px;
}
.color-swatch {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 6px;
  border: 1.5px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
  padding: 0;
  transition:
    transform 0.1s ease,
    border-color 0.1s ease;
}
.color-swatch:hover {
  transform: scale(1.18);
  border-color: #fff;
}
.color-swatch-default {
  background: var(--bg-card);
  color: var(--text-muted);
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.color-custom-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--border-color);
  font-size: 12px;
  color: var(--text-muted);
}
.color-custom-row input[type='color'] {
  width: 42px;
  height: 24px;
  padding: 0;
  border: 1px solid var(--border-color);
  border-radius: 5px;
  background: transparent;
  cursor: pointer;
}
