/* =============================================
   LuxTool — /generators/color-palette/color-palette.css
   Tool-specific styles unique to this tool. Site chrome and
   every shared building block used on this page come from
   /style.css, which this page also loads.
   ============================================= */

/* ── COLOR PALETTE ── */
.cp-swatch {
  border-radius: .7rem;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .1);
  cursor: pointer;
  transition: .2s;
}

.cp-swatch:hover {
  transform: scale(1.04);
  box-shadow: 0 6px 20px rgba(0, 0, 0, .3)
}

.cp-color-block {
  height: 80px
}

.cp-info {
  background: rgba(15, 23, 42, .9);
  padding: .6rem;
  text-align: center
}

.cp-hex {
  font-family: monospace;
  font-size: .82rem;
  color: var(--text);
  font-weight: 600
}

.cp-copied {
  font-size: .7rem;
  color: #a7f3d0;
  margin-top: .2rem;
  min-height: .9rem
}

/* ── COLOR PALETTE ENGINE STYLES ── */
.cp-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.8rem;
  margin-bottom: 1.5rem;
}

.cp-swatch {
  position: relative;
  border-radius: 0.8rem;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface2);
  transition: 0.2s;
  cursor: pointer;
}

.cp-swatch:hover {
  border-color: var(--gold);
}

.cp-swatch-color {
  height: 100px;
  width: 100%;
  transition: background 0.3s;
}

.cp-swatch-info {
  padding: 0.6rem;
  text-align: center;
}

.cp-swatch-hex {
  font-family: monospace;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text);
}

.cp-swatch-lock {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.4rem;
  padding: 0.3rem;
  font-size: 0.8rem;
  cursor: pointer;
  opacity: 0.6;
  transition: 0.2s;
}

.cp-swatch-lock.locked {
  opacity: 1;
  color: var(--gold);
  border-color: var(--gold);
  background: rgba(251, 191, 36, 0.1);
}

.cp-swatch-wcag {
  margin-top: 0.3rem;
  font-size: 0.65rem;
  padding: 0.15rem 0.4rem;
  border-radius: 99px;
  display: inline-block;
}

.wcag-pass {
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
}

.wcag-fail {
  background: rgba(248, 113, 113, 0.15);
  color: #fca5a5;
}

.cp-controls-row {
  display: grid;
  grid-template-columns: 80px 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.cp-color-input {
  width: 100%;
  height: 42px;
  border-radius: 0.6rem;
  border: 1px solid var(--gold-dim);
  cursor: pointer;
}

.cp-design-preview {
  padding: 1.5rem;
  border-radius: 1rem;
  border: 1px solid var(--border);
  margin-top: 0.5rem;
  transition: background 0.3s;
}

.cp-preview-card {
  max-width: 400px;
  padding: 1.2rem;
  border-radius: 0.8rem;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
}

.cp-preview-header {
  font-size: 1.2rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.cp-preview-body {
  font-size: 0.85rem;
  opacity: 0.8;
  line-height: 1.5;
  margin-bottom: 1.2rem;
}

.cp-preview-btn {
  padding: 0.6rem 1.2rem;
  border-radius: 0.6rem;
  border: none;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
}

.cp-export-chips {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

.cp-export-btn {
  padding: 0.4rem 0.8rem;
  background: rgba(30, 41, 59, 0.5);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  color: var(--muted);
  font-size: 0.75rem;
  cursor: pointer;
  transition: 0.2s;
}

.cp-export-btn:hover {
  border-color: var(--gold);
  color: var(--gold);
}

@media (max-width: 640px) {
  .cp-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .cp-controls-row {
    grid-template-columns: 1fr;
  }
}

.ug-item:hover,
.bio-item:hover {
  border-color: var(--gold-dim)
}

.ug-name {
  font-family: monospace;
  font-size: .95rem;
  color: var(--text);
  font-weight: 600;
  overflow-wrap: anywhere
}

.ug-item-actions {
  display: flex;
  align-items: center;
  gap: .45rem;
  flex-shrink: 0
}

.ug-lists {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: .2rem
}

.ug-lists section {
  min-width: 0;
  padding: .85rem;
  background: rgba(15, 23, 42, .42);
  border: 1px solid var(--border);
  border-radius: .7rem;
}

.ug-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  color: var(--gold);
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: .65rem
}

.ug-mini-list {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  min-height: 2.1rem;
  align-items: flex-start
}

.ug-mini-name {
  border: 1px solid var(--border);
  background: rgba(30, 41, 59, .58);
  color: var(--text);
  border-radius: 999px;
  padding: .35rem .65rem;
  font-family: monospace;
  font-size: .78rem;
  cursor: pointer;
  transition: .2s;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.ug-mini-name:hover {
  border-color: var(--gold-dim);
  color: var(--gold);
  background: rgba(251, 191, 36, .1)
}

.ug-empty {
  font-size: .82rem;
  color: var(--muted);
  line-height: 1.4
}

.bio-item {
  animation: bioFadeUp .35s ease-out forwards;
  white-space: pre-line;
}

@keyframes bioFadeUp {
  from {
    opacity: 0;
    transform: translateY(12px)
  }

  to {
    opacity: 1;
    transform: translateY(0)
  }
}

.bio-text {
  font-size: .9rem;
  color: var(--text);
  line-height: 1.6;
  flex: 1;
  padding-right: .8rem;
  font-weight: 450
}

.copy-small {
  padding: .3rem .65rem;
  background: rgba(251, 191, 36, .12);
  border: 1px solid var(--gold-dim);
  border-radius: .4rem;
  color: var(--gold);
  cursor: pointer;
  font-size: .75rem;
  white-space: nowrap;
  transition: .2s;
  font-family: inherit
}

.copy-small:hover {
  background: rgba(251, 191, 36, .25)
}

html.theme-light .cp-swatch {
  border-color: rgba(15, 23, 42, .12)
}

html.theme-light .cp-info {
  background: rgba(255, 255, 255, .95)
}
