/* Playground "Secrets" section: domain / name / value rows sent as the
   /v1/tasks "secrets" field (setupPgSecrets in app.js). Inputs reuse the
   .pg-field input styling; this file only lays out the rows. Tokens only,
   so dark and light themes both follow the shared variables. */

#pg-secrets .pg-sec-head,
#pg-secrets .pg-sec-row {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) minmax(0, 1.1fr) 32px;
  gap: 8px;
  align-items: center;
}
#pg-secrets .pg-sec-head {
  margin-bottom: -6px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .07em;
}
#pg-secrets .pg-sec-rows { display: flex; flex-direction: column; gap: 8px; }
#pg-secrets .pg-sec-row input {
  width: 100%;
  min-width: 0;
  padding: 8px 10px;
  font-size: 12.5px;
}
#pg-secrets .pg-sec-domain,
#pg-secrets .pg-sec-name { font-family: var(--font-mono); }

#pg-secrets .pg-sec-del {
  appearance: none;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-muted);
  font: 500 16px/1 var(--font-sans);
  cursor: pointer;
  transition: color 120ms ease, border-color 120ms ease;
}
#pg-secrets .pg-sec-del:hover { color: var(--text); border-color: var(--border-strong); }
#pg-secrets .pg-sec-del:focus-visible { outline: none; box-shadow: var(--vercel-focus); }

#pg-secrets .pg-sec-add {
  align-self: flex-start;
  appearance: none;
  background: transparent;
  border: 0;
  padding: 2px 0;
  color: var(--emerald-2);
  font: 500 12.5px/1.4 var(--font-sans);
  cursor: pointer;
}
#pg-secrets .pg-sec-add:hover { color: var(--text); }
#pg-secrets .pg-sec-add:disabled { color: var(--text-dim); cursor: default; }
#pg-secrets .pg-sec-add:focus-visible { outline: none; box-shadow: var(--vercel-focus); border-radius: 4px; }
:root[data-theme="light"] #pg-secrets .pg-sec-add { color: var(--accent); }
:root[data-theme="light"] #pg-secrets .pg-sec-add:hover { color: var(--text); }

/* Phones: domain on its own line, then name, value and remove. */
@media (max-width: 560px) {
  #pg-secrets .pg-sec-head { display: none; }
  #pg-secrets .pg-sec-row {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 32px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
  }
  #pg-secrets .pg-sec-row:last-child { padding-bottom: 0; border-bottom: 0; }
  #pg-secrets .pg-sec-domain { grid-column: 1 / -1; }
}
