/* Styles for forms built by forms.js. Uses the colors and sizes defined in styles.css. */
.pf { display: flex; flex-direction: column; gap: 22px; }
.pf [hidden] { display: none !important; }

.pf-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.pf-label, .pf-sublabel { font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
.pf-req { color: var(--blue); }
.pf-required-note { margin: 0; font-size: 13.5px; color: var(--muted); }
.pf-heading { margin: 12px 0 -6px; padding-top: 22px; border-top: 1px solid var(--line); font-size: 20px; font-weight: 700; letter-spacing: -0.02em; }
.pf-help { margin: 0; font-size: 14px; line-height: 1.5; color: var(--muted); white-space: pre-line; max-width: 68ch; }
.pf-flag { margin: 0; font-size: 13px; color: var(--amber); background: var(--amber-tint); border-radius: 8px; padding: 6px 10px; }
.pf-error { margin: 0; font-size: 13.5px; font-weight: 500; color: #b42318; }
.pf-error:empty { display: none; }

.pf-in { width: 100%; min-height: 48px; padding: 0 14px; border: 1px solid var(--line-2); border-radius: 10px; font: inherit; font-size: 16px; color: var(--ink); background: #fff; }
textarea.pf-in { padding: 12px 14px; resize: vertical; line-height: 1.5; }
select.pf-in { appearance: none; -webkit-appearance: none; padding-right: 40px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14' fill='none'%3E%3Cpath d='M3 5l4 4 4-4' stroke='%235f6672' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; }
.pf-in:focus { outline: 2px solid var(--blue); outline-offset: 1px; border-color: transparent; }
.pf-bad > .pf-in, .pf-bad > .pf-radios .pf-radio { border-color: #b42318; }

.pf-radios { display: flex; flex-wrap: wrap; gap: 10px; }
.pf-radio { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 16px; border: 1.5px solid var(--line-2); border-radius: 10px; background: #fff; font-size: 16px; font-weight: 500; cursor: pointer; }
.pf-radio:hover { border-color: #a9bfee; }
.pf-radio input { width: 18px; height: 18px; margin: 0; accent-color: var(--blue); }
.pf-radio:has(input:checked) { border-color: var(--blue); background: #f7faff; box-shadow: 0 0 0 3px rgba(26, 86, 219, 0.12); }
.pf-radio:has(input:focus-visible) { outline: 2px solid var(--blue); outline-offset: 2px; }

.pf-use-agent { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 10px; align-items: start; padding: 12px 14px; border-radius: 10px; background: var(--tint); cursor: pointer; }
.pf-use-agent b { display: block; font-size: 15px; }
.pf-use-agent small { display: block; color: var(--ink-2); font-size: 14px; margin-top: 2px; }
.pf-use-agent .pf-check { margin-top: 1px; }
.pf-inline { flex-direction: row; align-items: center; gap: 10px; flex-wrap: wrap; }
.pf-inline .pf-label { font-size: 15px; font-weight: 500; color: var(--ink); cursor: pointer; }
.pf-check { width: 20px; height: 20px; margin: 0; accent-color: var(--ink); }

.pf-group { margin: 0; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.pf-legend { padding: 0 6px; margin-left: -6px; font-size: 17px; font-weight: 700; letter-spacing: -0.015em; color: var(--ink); }
.pf-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 12px; }
.pf-span { grid-column: 1 / -1; }
.pf-sub { display: flex; flex-direction: column; gap: 10px; padding-top: 4px; }

.pf-items { display: flex; flex-direction: column; gap: 14px; }
.pf-item { background: var(--soft); border-radius: 12px; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.pf-item-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 28px; }
.pf-item-title { font-size: 15px; }
.pf-add, .pf-remove { font: inherit; font-size: 14.5px; font-weight: 600; border: 0; background: transparent; cursor: pointer; border-radius: 8px; padding: 6px 8px; }
.pf-add { color: var(--blue); align-self: flex-start; margin-left: -8px; }
.pf-add::before { content: "+ "; }
.pf-remove { color: var(--muted); }
.pf-add:hover, .pf-remove:hover { background: var(--tint); }

@media (max-width: 560px) {
  .pf-grid { grid-template-columns: minmax(0, 1fr); }
  .pf-group { padding: 16px; }
}
