/* =====================================================================
   UUID / ULID Generator Pro — app.css
   Extends the shared design system (base.css). Colors derive ONLY from
   base.css CSS variables so dark + light themes both work.
   ===================================================================== */

/* ---- Theme toggle icon swap (sun in dark, moon in light) ---- */
[data-theme="light"] .icon-sun { display: none; }
.icon-moon { display: none; }
[data-theme="light"] .icon-moon { display: inline-block; }

/* ===================== Status badge ===================== */
#statusBadge .status-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--text-muted); flex: none;
  transition: background var(--dur-2), box-shadow var(--dur-2);
}
#statusBadge.is-valid {
  background: var(--success-soft); color: var(--success); border-color: transparent;
}
#statusBadge.is-valid .status-dot { background: var(--success); box-shadow: 0 0 10px var(--success); }

/* ===================== Controls panel ===================== */
.controls-panel { padding: var(--space-4) var(--space-5); }
.controls-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3) var(--space-4);
}
.controls-row + .controls-row { margin-top: var(--space-3); }

.field-inline { display: inline-flex; align-items: center; gap: var(--space-2); }
.field-inline label { white-space: nowrap; }
.field-inline input[type=number] { width: 100px; padding-top: 8px; padding-bottom: 8px; }

.check { font-size: 13px; }

/* ===================== Output panel ===================== */
.output-panel { margin-top: var(--space-5); position: relative; }
.output-scroll { position: relative; }
#output {
  width: 100%;
  min-height: 320px;
  font-size: 13.5px;
  line-height: 1.7;
  resize: vertical;
  white-space: pre;
  tab-size: 2;
}
#output:focus { box-shadow: none; }

.output-empty {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  pointer-events: none;
  background: transparent;
}
.output-empty button { pointer-events: auto; margin-top: var(--space-2); }
.output-empty p { margin: 0; }
.output-empty.is-hidden { display: none; }

/* ===================== Individual ID list ===================== */
.list-panel { margin-top: var(--space-5); }
.id-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  max-height: 360px;
  overflow-y: auto;
}
.id-list li {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 8px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}
.id-list .id-value {
  flex: 1;
  min-width: 0;
  font-family: var(--font-mono);
  font-size: 13px;
  overflow-x: auto;
  white-space: nowrap;
}
.id-list .id-copy {
  flex: none;
  width: 32px;
  height: 32px;
  padding: 0;
}

/* ===================== Shortcuts modal table ===================== */
.shortcut-table { width: 100%; border-collapse: collapse; }
.shortcut-table td {
  padding: 10px 4px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}
.shortcut-table tr:last-child td { border-bottom: none; }
.shortcut-table td:last-child { text-align: right; white-space: nowrap; }
.shortcut-table kbd + kbd { margin-left: 4px; }

/* ===================== Responsive ===================== */
@media (max-width: 720px) {
  #statusBadge { display: none; }
  .controls-row { width: 100%; }
  .field-inline { width: 100%; }
  .field-inline input[type=number] { flex: 1; width: auto; }
  #btnGenerate { width: 100%; }
}

@media (max-width: 460px) {
  .toolbar-group .btn { flex: 1; }
}
