.emalm-colors-page {
  min-width: 0;
  color: var(--emalm-ui-text);
}

.emalm-colors-page .emalm-colors-toolbar {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
}

.emalm-colors-toolbar label {
  margin: 0;
}

.emalm-colors-page #colors-theme-select {
  background: var(--emalm-ui-surface-1);
  border: 1px solid var(--emalm-ui-border-strong);
  border-radius: 4px;
  color: var(--emalm-ui-surface-text);
  max-width: 100%;
  padding: 0.45rem 0.65rem;
}

.emalm-colors-page .emalm-colors-help,
.emalm-colors-page .emalm-color-description,
.emalm-colors-page #colors-active-theme {
  color: var(--emalm-ui-readable-muted);
}

.emalm-colors-help {
  margin-top: 0.65rem;
}

.emalm-colors-sections {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  margin: 1.25rem 0;
}

.emalm-colors-page .emalm-colors-sections a {
  color: var(--emalm-ui-readable-link);
}

.emalm-colors-section {
  margin-top: 1.75rem;
  scroll-margin-top: 1rem;
}

.emalm-colors-grid {
  display: grid;
  gap: 0.85rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
}

.emalm-colors-page .emalm-color-card {
  background: var(--emalm-ui-surface-1);
  border: 1px solid var(--emalm-ui-border);
  border-radius: 6px;
  color: var(--emalm-ui-surface-text);
  min-width: 0;
  overflow: hidden;
  position: relative;
}

.emalm-color-swatch-frame {
  background-color: var(--emalm-ui-surface-1);
  background-image: conic-gradient(var(--emalm-ui-surface-3) 25%, transparent 0 50%, var(--emalm-ui-surface-3) 0 75%, transparent 0);
  background-size: 16px 16px;
  border-bottom: 1px solid var(--emalm-ui-border);
}

.emalm-color-swatch {
  height: 64px;
}

.emalm-color-meta {
  padding: 0.75rem;
}

.emalm-color-meta strong {
  display: block;
  margin-bottom: 0.3rem;
}

.emalm-colors-page .emalm-color-meta code,
.emalm-colors-page .emalm-color-example-value {
  background: var(--emalm-ui-surface-2);
  border: 0;
  color: var(--emalm-ui-surface-text);
  display: block;
  font-size: 0.9em;
  overflow-wrap: anywhere;
  padding: 0.2rem 0.3rem;
  white-space: normal;
}

.emalm-color-meta .emalm-color-description {
  font-size: 0.95em;
  margin: 0.6rem 0;
}

.emalm-color-shadow-stage {
  align-items: center;
  display: flex;
  height: 64px;
  justify-content: center;
}

.emalm-color-shadow {
  background: var(--emalm-ui-surface-1);
  border: 1px solid var(--emalm-ui-border);
  border-radius: 4px;
  height: 26px;
  width: 65%;
}

.emalm-color-source {
  height: 1px;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
  position: absolute;
  width: 1px;
}

.emalm-colors-examples {
  display: grid;
  gap: 0.85rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 310px), 1fr));
}

.emalm-colors-page .emalm-colors-example-panel {
  background: var(--emalm-ui-surface-1);
  border: 1px solid var(--emalm-ui-border);
  border-radius: 6px;
  color: var(--emalm-ui-surface-text);
  min-width: 0;
  padding: 0.9rem;
}

.emalm-colors-example-panel .notice {
  border-style: solid;
  border-width: 1px;
  border-radius: 4px;
  margin: 0 0 0.65rem;
  padding: 0.65rem;
}

.emalm-colors-example-panel .notice:last-child {
  margin-bottom: 0;
}

.emalm-colors-example-panel input {
  background: var(--form-input-background);
  border: 1px solid var(--form-input-border-color);
  color: var(--emalm-ui-surface-text);
  display: block;
  margin-top: 0.35rem;
  max-width: 100%;
  padding: 0.5rem;
  width: 100%;
  box-sizing: border-box;
}

.emalm-colors-example-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1rem;
}

.emalm-colors-example-actions .btn {
  border: 1px solid var(--emalm-ui-accent-strong);
  border-radius: 4px;
  padding: 0.4rem 0.7rem;
}

.emalm-color-favorite-example {
  align-items: center;
  display: grid;
  gap: 0.6rem;
  grid-template-columns: max-content 1fr;
  margin-top: 1rem;
}

.emalm-color-favorite-example .emalm-color-example-value {
  grid-column: 1 / -1;
  min-width: 0;
}
