/* panel-apariencia.css: the Apariencia tab: the profile gradient and its
   palettes, every color field (code and eyedropper, public/campo-color.js),
   the glow settings, the avatar ring colors and the tab icon.

   GENERATED: do not edit public/panel-apariencia.css by hand. It is the files of
   estilos/panel/apariencia/ joined in name order by scripts/unir-estilos.mjs, so
   the dashboard still loads one file and the cascade keeps this order. */

/* Cosméticos → Paleta de Colores → Degradado del perfil (public/degradado.js):
   the switch, a bar showing the gradient, both colors with an editable code
   and an eyedropper, and the direction. */
.gradient-box {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 18px;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid var(--card-border);
  background: rgba(255, 255, 255, 0.02);
}

.gradient-switch .switch-label {
  font-weight: 600;
}

.gradient-bar {
  height: 34px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(135deg, #e11d48, var(--panel-gris-oscuro));
  transition: opacity 0.2s ease;
}

.gradient-colors {
  display: grid;
  /* One column when two would cut the color code ("#E11D4"). */
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
  gap: 12px;
}

.gradient-color {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.gradient-color label {
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.gradient-color-field {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 42px;
  padding: 0 8px 0 12px;
  border-radius: 10px;
  border: 1px solid var(--card-border);
  background: rgba(0, 0, 0, 0.25);
}

.gradient-color-field:focus-within,
.color-field:focus-within {
  border-color: var(--accent-color);
}

.gradient-color-field input[type="color"] {
  -webkit-appearance: none;
  appearance: none;
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
}

.gradient-color-field input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }

.gradient-color-field input[type="color"]::-webkit-color-swatch {
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.gradient-color-field input[type="color"]::-moz-color-swatch {
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.settings-group .color-field input.color-hex,
.settings-group .color-field input.color-hex:focus,
.color-field input.color-hex,
.color-field input.color-hex:focus {
  flex: 1;
  border-radius: 0;
  background: transparent;
  border: none;
}

.color-hex {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  color: var(--text-primary);
  font-family: var(--font-title);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  outline: none;
  padding: 0;
  height: auto;
  box-shadow: none;
}

.color-hex[aria-invalid="true"] {
  color: #fca5a5;
}

.color-eyedropper {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
}

.color-eyedropper svg {
  width: 16px;
  height: 16px;
}

.color-eyedropper:hover,
.color-eyedropper:focus-visible {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
}

.gradient-direction {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
}

.gradient-direction-label {
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.gradient-direction-options {
  display: flex;
  gap: 6px;
}

.gradient-dir-btn {
  width: 38px;
  height: 34px;
  border-radius: 9px;
  border: 1px solid var(--card-border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-secondary);
  font-size: 1.05rem;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.gradient-dir-btn:hover,
.gradient-dir-btn:focus-visible {
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.2);
}

.gradient-dir-btn[aria-pressed="true"] {
  color: #ffffff;
  border-color: var(--accent-color);
  background: color-mix(in srgb, var(--accent-color) 18%, transparent);
}

.gradient-hint {
  margin: 0;
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.gradient-hint.hidden { display: none; }

/* Off: the colors stay editable (the profile uses the primary elsewhere),
   but the bar and the direction show they do not paint the card. */
.gradient-box.is-off .gradient-bar,
.gradient-box.is-off .gradient-direction {
  opacity: 0.4;
}

@media (max-width: 480px) {
  .gradient-colors { grid-template-columns: 1fr; }
}

/* Degradado del perfil: the palettes and the extra options. */
/* As many columns as fit with the longest name ("Medianoche") inside its tile. */
.gradient-palettes {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(86px, 1fr));
  gap: 8px;
}

.gradient-palette {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 6px;
  border-radius: 10px;
  border: 1px solid var(--card-border);
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-secondary);
  font: inherit;
  font-size: 0.75rem;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.gradient-palette:hover,
.gradient-palette:focus-visible {
  border-color: rgba(255, 255, 255, 0.25);
  color: var(--text-primary);
}

.gradient-palette-swatch {
  height: 26px;
  border-radius: 7px;
}

.gradient-section-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.gradient-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.gradient-options .switch-label {
  gap: 6px;
}

.gradient-third-field.hidden { display: none; }

.gradient-palettes-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.palette-launcher-row {
  padding: 10px 12px;
  border: 1px solid var(--card-border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
}

.palette-gallery-btn {
  padding: 6px 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.palette-gallery-btn:hover,
.palette-gallery-btn:focus-visible {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.12);
}

.palettes-dialog {
  width: min(600px, 94vw);
}

.palettes-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.palette-filter-btn {
  padding: 5px 12px;
  border: 1px solid var(--card-border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-secondary);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.palette-filter-btn:hover,
.palette-filter-btn:focus-visible {
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.2);
}

.palette-filter-btn[aria-pressed="true"] {
  color: #fff;
  border-color: var(--accent-color);
  background: color-mix(in srgb, var(--accent-color) 20%, transparent);
}

.palettes-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
}

.palettes-section.hidden {
  display: none;
}

.palettes-section-title {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.palettes-save-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.palettes-save-row input {
  flex: 1;
  min-width: 0;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid var(--card-border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
  font: inherit;
  font-size: 0.84rem;
}

.palettes-empty {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.palettes-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(116px, 1fr));
  gap: 8px;
}

.palette-tile-wrap {
  position: relative;
}

.palette-tile-wrap .gradient-palette {
  width: 100%;
  gap: 6px;
  padding: 7px;
}

.palette-tile-wrap .gradient-palette-swatch {
  height: 30px;
}

.palette-dots {
  display: flex;
  align-items: center;
  gap: 4px;
}

.palette-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.22);
  flex-shrink: 0;
}

.palette-tile-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: left;
  font-weight: 600;
  color: var(--text-primary);
}

.palette-delete-btn {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 6px;
  background: rgba(8, 9, 12, 0.82);
  color: var(--text-primary);
  font-size: 0.9rem;
  line-height: 1;
  cursor: pointer;
}

.palette-delete-btn:hover {
  border-color: rgba(248, 113, 113, 0.6);
  color: #fca5a5;
}

@media (max-width: 480px) {
  .gradient-palettes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .palettes-save-row { flex-direction: column; align-items: stretch; }
}

/* Every color picker in the dashboard (public/campo-color.js): the swatch, its
   code as an editable field, and an eyedropper where the browser has one. */
.color-field {
  padding-right: 6px;
}

.color-field .color-hex {
  font-size: 0.8rem;
  width: auto;
  min-width: 0;
}

.field-label-row,
.switch-label-row {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.field-label-row label {
  margin: 0;
}

/* Dashboard: the three glow toggles. */
.glow-settings {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.04);
  background: rgba(255, 255, 255, 0.02);
}

.glow-settings-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-primary);
}

.glow-toggles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.glow-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid var(--card-border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-secondary);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.glow-toggle svg {
  width: 15px;
  height: 15px;
}

.glow-toggle:hover,
.glow-toggle:focus-visible {
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.2);
}

.glow-toggle[aria-pressed="true"] {
  color: #fff;
  border-color: var(--accent-color);
  background: color-mix(in srgb, var(--accent-color) 18%, transparent);
  box-shadow: 0 0 12px color-mix(in srgb, var(--accent-color) 35%, transparent);
}

.glow-settings.is-off .glow-toggles {
  opacity: 0.45;
}

/* In the "Ajustes de brillo" window (#glow-dialog). */
.glow-dialog .glow-settings {
  margin: 14px 0 18px;
}

.glow-off-note {
  margin: 10px 0 0;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid rgba(251, 191, 36, 0.4);
  background: rgba(251, 191, 36, 0.08);
  color: #fde68a;
  font-size: 0.82rem;
}

.glow-off-note[hidden] {
  display: none;
}

.glow-toggle {
  min-width: 0;
  padding: 0 8px;
  white-space: nowrap;
}

@media (max-width: 480px) {
  .glow-toggles { grid-template-columns: 1fr; }
}

/* "Colores del aro" (public/aro-avatar.js). */
.deco-preview {
  position: relative;
  width: 84px;
  height: 84px;
  margin: 14px auto 18px;
}

.deco-preview-ring {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  background: linear-gradient(45deg, var(--deco-1, var(--accent-color)), var(--deco-2, var(--primary-color)), var(--deco-3, #3b82f6), var(--deco-1, var(--accent-color)));
  background-size: 400% 400%;
  animation: decoRotate 5s linear infinite;
}

.deco-preview-avatar {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: #1e2230 radial-gradient(circle at 50% 38%, var(--panel-gris-suave) 0 18%, transparent 19%) no-repeat;
  border: 2px solid #111218;
}

.deco-preview-avatar::after {
  content: "";
  position: absolute;
  left: 22%;
  right: 22%;
  bottom: 0;
  height: 34%;
  border-radius: 50% 50% 0 0;
  background: var(--panel-gris-suave);
}

.deco-preview-avatar {
  overflow: hidden;
}

.deco-option {
  margin-bottom: 12px;
}

.deco-colors {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
  transition: opacity 0.2s ease;
}

.deco-colors.is-off {
  opacity: 0.45;
}

.deco-color {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}

.deco-color label {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

@media (prefers-reduced-motion: reduce) {
  .deco-preview-ring { animation: none; }
}

/* Bio → Meta Tags / SEO → "Icono de la pestaña" (public/settings.js). */
.tab-icon-field {
  margin: 14px 0 6px;
}

.tab-icon-label {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.tab-icon-options {
  display: flex;
  gap: 6px;
  margin-top: 8px;
  padding: 5px;
  border: 1px solid var(--card-border);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.25);
}

.tab-icon-option {
  flex: 1;
  position: relative;
  cursor: pointer;
}

.tab-icon-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.tab-icon-option span {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 36px;
  padding: 6px 8px;
  border-radius: 8px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  transition: background 0.15s, color 0.15s;
}

.tab-icon-option span img {
  width: 16px;
  height: 16px;
  flex: none;
}

.tab-icon-avatar {
  border-radius: 50%;
  object-fit: cover;
}

.tab-icon-option:hover span {
  color: var(--text-primary);
}

.tab-icon-option input:checked + span {
  background: var(--accent-color);
  color: #fff;
  font-weight: 600;
}

.tab-icon-option input:focus-visible + span {
  outline: 2px solid var(--accent-color);
  outline-offset: 2px;
}

.tab-icon-emoji-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}

.tab-icon-emoji-row.is-disabled {
  opacity: 0.45;
}

.settings-group input.tab-icon-emoji-input,
.tab-icon-emoji-input {
  width: 56px;
  flex: none;
  margin: 0;
  padding: 6px;
  text-align: center;
  font-size: 1.3rem;
}

.tab-icon-emoji-hint {
  font-size: 0.78rem;
  color: var(--text-secondary);
}

/* The font picker (selector-fuente.js): the button, "Así se vería tu bio"
   under it and the list, each font in its own letters. */
/* The value holder, in a hidden box. A block, as it was when it showed, so
   its panel-styles entry (which only Linux can rebuild) stays the same. */
#select-font {
  display: block;
}

.font-picker-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-height: 44px;
  padding: 8px 14px;
  border: 1px solid var(--card-border);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-primary);
  font: inherit;
  font-size: 1rem;
  text-align: left;
  cursor: pointer;
}

.font-picker-button svg {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  color: var(--text-secondary);
}

.font-picker-button:focus-visible,
.font-picker-button[aria-expanded="true"] {
  border-color: var(--accent-color);
  outline: 2px solid var(--accent-color);
  outline-offset: 1px;
}

.font-sample {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid var(--card-border);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
}

.font-sample-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

/* A fixed height, so the list under it does not jump from font to font. */
.font-sample-name {
  height: 36px;
  overflow: hidden;
  color: var(--text-primary);
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 36px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.font-sample-bio {
  height: 44px;
  overflow: hidden;
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 22px;
  overflow-wrap: anywhere;
}

.font-picker-list {
  max-height: min(340px, 45vh);
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid var(--card-border);
  border-radius: 10px;
  background: #0d0f17;
}

.font-group-title {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 8px 14px 5px;
  background: #141722;
  color: var(--text-secondary);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.font-option {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 4px 14px;
  /* Clear of the sticky title when the keys scroll to it. */
  scroll-margin-top: 32px;
  color: var(--text-primary);
  cursor: pointer;
}

.font-option-name {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 1.2rem;
}

/* A pixel font is far wider at the same size. */
.font-option[data-value="Press Start 2P"] .font-option-name {
  font-size: 0.8rem;
}

.font-option-note {
  color: var(--text-secondary);
  font-size: 0.72rem;
}

.font-option.is-active {
  background: rgba(255, 255, 255, 0.08);
}

.font-option[aria-selected="true"] {
  background: #2a1020;
}

.font-option[aria-selected="true"].is-active {
  background: #3a1529;
}

.font-option[aria-selected="true"]::after {
  content: "✓";
  content: "✓" / "";
  margin-left: auto;
  color: #fb7185;
}

/* Each group of Apariencia has its icon before its name, white on a small
   gradient square like the menu's (panel-base.css), so a group is known at a
   glance while scrolling. */
.collapsible-header .group-icon {
  flex-shrink: 0;
  box-sizing: border-box;
  width: 28px;
  height: 28px;
  padding: 5px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--group-a, #64748b), var(--group-b, #334155));
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.collapsible-header .group-icon ~ .collapsible-header-title {
  flex: 1;
}

#group-colors { --group-a: #ef4444; --group-b: #f97316; }
#group-background { --group-a: #0ea5e9; --group-b: #6366f1; }
#group-avatar { --group-a: #8b5cf6; --group-b: #ec4899; }
#group-font { --group-a: #eab308; --group-b: #f97316; }
#group-username-effects { --group-a: #06b6d4; --group-b: #8b5cf6; }
#group-card-style { --group-a: #10b981; --group-b: #0ea5e9; }
#group-socials-style { --group-a: #3b82f6; --group-b: #06b6d4; }
#group-display { --group-a: #f59e0b; --group-b: #ef4444; }
#group-layout { --group-a: #6366f1; --group-b: #a855f7; }
