/*
 * Styling for the Personalize form (#ph-settings, built by js/placeholders.js).
 * Uses Material's CSS custom properties so it tracks the light/dark/system palette.
 * This is the site's only stylesheet — keep it small and scoped to .ph-* classes.
 */

.ph-settings {
  margin: 1rem 0 2rem;
}

/* --- sections --- */
.ph-section {
  margin: 1.25rem 0;
  padding: 1rem 1.1rem;
  border-radius: 0.3rem;
}

.ph-section h2 {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
}

.ph-note {
  margin: 0 0 0.9rem;
  color: var(--md-default-fg-color--light);
  font-size: 0.8rem;
}

/* Required block: accent border + tinted background so it reads as "act here". */
.ph-section--required {
  border: 1px solid var(--md-primary-fg-color);
  border-left-width: 4px;
  background: var(--md-primary-fg-color--transparent, rgba(0, 0, 0, 0.03));
}

/* Advanced block: a quiet, collapsed disclosure. */
.ph-section--advanced {
  border: 1px solid var(--md-default-fg-color--lightest);
}

.ph-section--advanced > summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--md-default-fg-color--light);
}

.ph-section--advanced[open] > summary {
  margin-bottom: 0.75rem;
}

/* --- individual fields --- */
.ph-field {
  margin: 0.6rem 0;
}

.ph-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.ph-key {
  font-family: var(--md-code-font-family, monospace);
  font-size: 0.82rem;
  min-width: 11rem;
}

.ph-input {
  flex: 1 1 16rem;
  min-width: 12rem;
  padding: 0.35rem 0.5rem;
  border: 1px solid var(--md-default-fg-color--lighter);
  border-radius: 0.2rem;
  background: var(--md-default-bg-color);
  color: var(--md-default-fg-color);
  font-family: var(--md-code-font-family, monospace);
  font-size: 0.82rem;
}

.ph-input:focus {
  outline: none;
  border-color: var(--md-primary-fg-color);
  box-shadow: 0 0 0 2px var(--md-primary-fg-color--transparent, rgba(0, 0, 0, 0.1));
}

/* The <your-…> sentinel / live default shown as placeholder text — muted + italic. */
.ph-input::placeholder {
  color: var(--md-default-fg-color--light);
  font-style: italic;
  opacity: 0.8;
}

.ph-badge {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.08rem 0.4rem;
  border-radius: 0.6rem;
  color: var(--md-primary-bg-color);
  background: var(--md-primary-fg-color);
}

.ph-help {
  display: block;
  margin: 0.2rem 0 0 0;
  color: var(--md-default-fg-color--light);
  font-size: 0.72rem;
}

/* --- action bar --- */
.ph-actions {
  position: sticky;
  bottom: 0;
  display: flex;
  gap: 0.6rem;
  margin-top: 1.25rem;
  padding: 0.75rem 0;
  background: var(--md-default-bg-color);
  border-top: 1px solid var(--md-default-fg-color--lightest);
  z-index: 1;
}

/* .md-button is Material's button; keep Reset as the quiet secondary. */
.ph-actions .ph-reset {
  border-color: var(--md-default-fg-color--lighter);
}
