/* NSEG Forms. Themes restyle forms by setting these properties on .nsegf-container. */
.nsegf-container {
  --nsegf-accent: #2e3192;
  --nsegf-accent-hover: #232571;
  --nsegf-accent-text: #fff;
  --nsegf-text: #1f1d1a;
  --nsegf-muted: #5f5a53;
  --nsegf-border: #c9c3b8;
  --nsegf-border-hover: #8a8378;
  --nsegf-field-bg: #fff;
  --nsegf-error: #b42318;
  --nsegf-error-bg: #fdf0ee;
  --nsegf-success-bg: #e8f4ec;
  --nsegf-success-border: #2f7d4a;
  --nsegf-focus: #4549c7;
  --nsegf-radius: 6px;
  --nsegf-gap: 20px;
  --nsegf-input-height: 46px;
  --nsegf-font: inherit;
  font-family: var(--nsegf-font);
  color: var(--nsegf-text);
}
.nsegf-container *, .nsegf-container *::before, .nsegf-container *::after { box-sizing: border-box; }
.nsegf-form { margin: 0; }
.nsegf-title { margin: 0 0 8px; }
.nsegf-form-desc { margin: 0 0 var(--nsegf-gap); color: var(--nsegf-muted); }

.nsegf-fields { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: var(--nsegf-gap) 16px; }
.nsegf-field { grid-column: 1 / -1; display: grid; gap: 6px; align-content: start; min-width: 0; margin: 0; }
.nsegf-field[hidden] { display: none; }
@media (min-width: 600px) {
  .nsegf-w--half { grid-column: span 3; }
  .nsegf-w--third { grid-column: span 2; }
  .nsegf-w--two-thirds { grid-column: span 4; }
}

.nsegf-label { display: block; font-weight: 600; font-size: 15px; line-height: 1.35; padding: 0; margin: 0; }
.nsegf-req { color: var(--nsegf-error); margin-inline-start: 2px; }
.nsegf-desc, .nsegf-hint { margin: 0; font-size: 13.5px; line-height: 1.45; color: var(--nsegf-muted); }
.nsegf-desc a { color: var(--nsegf-accent); }
.nsegf-error { margin: 0; font-size: 14px; font-weight: 600; color: var(--nsegf-error); }
.nsegf-error[hidden] { display: none; }
.nsegf-error::before { content: "! "; }

.nsegf-input {
  width: 100%; min-height: var(--nsegf-input-height); padding: 10px 14px; margin: 0;
  border: 1px solid var(--nsegf-border); border-radius: var(--nsegf-radius); background: var(--nsegf-field-bg);
  color: var(--nsegf-text); font: inherit; font-size: 16px; line-height: 1.4;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}
textarea.nsegf-input { min-height: 120px; resize: vertical; }
select.nsegf-input { appearance: none; padding-inline-end: 40px; background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
.nsegf-input:hover:not(:focus) { border-color: var(--nsegf-border-hover); }
.nsegf-input:focus { outline: none; border-color: var(--nsegf-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--nsegf-focus) 28%, transparent); }
.nsegf-has-error .nsegf-input { border-color: var(--nsegf-error); background: var(--nsegf-error-bg); }
input[type="file"].nsegf-input { padding: 9px 10px; min-height: auto; cursor: pointer; }
input[type="file"].nsegf-input::file-selector-button { margin-inline-end: 12px; padding: 7px 14px; border: 1px solid var(--nsegf-border); border-radius: var(--nsegf-radius); background: #f6f4f0; color: var(--nsegf-text); font: inherit; font-size: 14px; cursor: pointer; }

.nsegf-group { border: 0; padding: 0; margin: 0; min-width: 0; display: grid; gap: 8px; }
.nsegf-group > legend { margin-bottom: 8px; float: left; width: 100%; }
.nsegf-group > legend + * { clear: both; }
.nsegf-choices { display: grid; gap: 8px; }
.nsegf-choices--inline { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.nsegf-choice { display: flex; align-items: flex-start; gap: 10px; font-size: 15.5px; line-height: 1.45; cursor: pointer; margin: 0; }
.nsegf-choice input { flex: none; width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--nsegf-accent); cursor: pointer; }
.nsegf-choice input:focus-visible { outline: 2px solid var(--nsegf-focus); outline-offset: 2px; }

.nsegf-name-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px 16px; }
.nsegf-name-part { display: grid; gap: 4px; }
.nsegf-sublabel { font-size: 13px; color: var(--nsegf-muted); }

.nsegf-count { margin: 0; font-size: 13px; color: var(--nsegf-muted); }
.nsegf-count--over { color: var(--nsegf-error); font-weight: 600; }

.nsegf-field--section { padding-top: 12px; border-top: 1px solid var(--nsegf-border); gap: 4px; }
.nsegf-fields > .nsegf-field--section:first-child { padding-top: 0; border-top: 0; }
.nsegf-section-title { margin: 0; font-size: 20px; line-height: 1.25; }
.nsegf-section-text { color: var(--nsegf-muted); font-size: 15px; }
.nsegf-section-text p { margin: 0 0 6px; }

.nsegf-summary { margin: 0 0 var(--nsegf-gap); padding: 16px 20px; border: 1px solid var(--nsegf-error); border-inline-start-width: 4px; border-radius: var(--nsegf-radius); background: var(--nsegf-error-bg); }
.nsegf-summary[hidden] { display: none; }
.nsegf-summary:focus { outline: 2px solid var(--nsegf-focus); outline-offset: 2px; }
.nsegf-summary h3 { margin: 0 0 6px; font-size: 16px; color: var(--nsegf-error); }
.nsegf-summary ul { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 0; padding: 0; list-style: none; font-size: 14px; }
.nsegf-summary li { margin: 0; }
.nsegf-summary a { color: var(--nsegf-error); }

.nsegf-submit { display: flex; align-items: center; gap: 12px; margin-top: calc(var(--nsegf-gap) + 4px); }
.nsegf-button {
  min-height: 48px; min-width: 180px; padding: 0 24px; border: 1px solid var(--nsegf-accent-hover); border-radius: var(--nsegf-radius);
  background: var(--nsegf-accent); color: var(--nsegf-accent-text); font: inherit; font-size: 16px; font-weight: 600; cursor: pointer;
  transition: background-color 120ms ease, transform 120ms ease;
}
.nsegf-button:hover { background: var(--nsegf-accent-hover); }
.nsegf-button:active { transform: translateY(1px); }
.nsegf-button:focus-visible { outline: 2px solid var(--nsegf-focus); outline-offset: 2px; }
.nsegf-button[disabled] { opacity: 0.7; cursor: progress; }
.nsegf-sending { width: 18px; height: 18px; border: 2px solid var(--nsegf-border); border-top-color: var(--nsegf-accent); border-radius: 50%; animation: nsegf-spin 0.8s linear infinite; }
.nsegf-sending[hidden] { display: none; }
@keyframes nsegf-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .nsegf-sending { animation: none; } .nsegf-input, .nsegf-button { transition: none; } }

.nsegf-confirmation { padding: 20px 24px; border: 1px solid var(--nsegf-success-border); border-radius: var(--nsegf-radius); background: var(--nsegf-success-bg); color: var(--nsegf-text); }
.nsegf-confirmation:focus { outline: 2px solid var(--nsegf-focus); outline-offset: 2px; }
.nsegf-confirmation p { margin: 0 0 8px; }
.nsegf-confirmation p:last-child { margin-bottom: 0; }
.nsegf-confirmation a { color: var(--nsegf-accent); font-weight: 600; }

.nsegf-hp { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; overflow: hidden; }
.nsegf-container .visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.nsegf-missing { padding: 12px 16px; border: 1px dashed #b7791f; border-radius: 6px; background: #fff7e6; }
