/* Site Toolkit forms. Each form sets its own --stkf-* variables (accent, text, field, border, radius, gap, max, bg). */
.stk-form {
  --stkf-accent: #111827;
  --stkf-text: #1f2937;
  --stkf-field: #fff;
  --stkf-border: #d1d5db;
  --stkf-radius: 8px;
  --stkf-gap: 18px;
  --stkf-max: 720px;
  --stkf-error: #dc2626;
  box-sizing: border-box;
  width: 100%;
  max-width: var(--stkf-max);
  margin: 0 auto;
  color: var(--stkf-text);
  font: inherit;
  text-align: left;
}
.stk-form *, .stk-form *::before, .stk-form *::after { box-sizing: border-box; }
.stk-form.stkf-has-bg {
  padding: clamp(18px, 4vw, 36px);
  border: 1px solid var(--stkf-border);
  border-radius: calc(var(--stkf-radius) + 6px);
  background: var(--stkf-bg);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .06);
}
.stk-form .stkf-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--stkf-gap) 16px; }
.stk-form .stkf-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; grid-column: 1 / -1; }
.stk-form .stkf-w-half { grid-column: auto; }
@media (max-width: 600px) { .stk-form .stkf-w-half { grid-column: 1 / -1; } }

.stk-form .stkf-label { margin: 0; font-size: 14px; font-weight: 600; line-height: 1.4; }
.stk-form .stkf-req { margin-left: 3px; color: var(--stkf-error); }
.stk-form.stkf-labels-hidden .stkf-label:not(.stkf-label-group) {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}
.stk-form .stkf-heading { margin: 8px 0 0; font-size: 1.15em; font-weight: 700; line-height: 1.3; }
.stk-form .stkf-intro { margin: 0; opacity: .8; font-size: 14px; }
.stk-form .stkf-help { opacity: .7; font-size: 12.5px; line-height: 1.4; }

.stk-form input[type="text"], .stk-form input[type="email"], .stk-form input[type="tel"], .stk-form input[type="number"],
.stk-form input[type="date"], .stk-form input[type="url"], .stk-form select, .stk-form textarea {
  display: block;
  width: 100%;
  min-height: 46px;
  margin: 0;
  padding: 11px 14px;
  border: 1px solid var(--stkf-border);
  border-radius: var(--stkf-radius);
  background: var(--stkf-field);
  color: var(--stkf-text);
  font: inherit;
  font-size: 15px;
  line-height: 1.4;
  box-shadow: none;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
  appearance: none;
  -webkit-appearance: none;
}
.stk-form textarea { min-height: 130px; resize: vertical; }
.stk-form select {
  padding-right: 38px;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 19px) 50%, calc(100% - 14px) 50%;
  background-size: 5px 5px;
  background-repeat: no-repeat;
}
.stk-form input::placeholder, .stk-form textarea::placeholder { color: currentColor; opacity: .45; }
.stk-form input:focus, .stk-form select:focus, .stk-form textarea:focus {
  border-color: var(--stkf-accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--stkf-accent) 18%, transparent);
}

.stk-form .stkf-choices { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.stk-form .stkf-choice { display: inline-flex; align-items: flex-start; gap: 8px; margin: 0; font-size: 14.5px; font-weight: 400; line-height: 1.4; cursor: pointer; }
.stk-form .stkf-choice input { flex: none; width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--stkf-accent); }

.stk-form .stkf-field.is-invalid input, .stk-form .stkf-field.is-invalid select, .stk-form .stkf-field.is-invalid textarea { border-color: var(--stkf-error); }
.stk-form .stkf-error { color: var(--stkf-error); font-size: 12.5px; }

.stk-form .stkf-actions { margin-top: calc(var(--stkf-gap) + 4px); }
.stk-form .stkf-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  margin: 0;
  padding: 12px 28px;
  border: 1px solid var(--stkf-accent);
  border-radius: var(--stkf-radius);
  background: var(--stkf-accent);
  color: #fff;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .01em;
  cursor: pointer;
  transition: opacity .15s, transform .15s;
}
.stk-form.stkf-btn-outline .stkf-submit { background: transparent; color: var(--stkf-accent); }
.stk-form.stkf-btnwide-full .stkf-submit { width: 100%; }
.stk-form .stkf-submit:hover { opacity: .88; }
.stk-form .stkf-submit:active { transform: translateY(1px); }
.stk-form .stkf-submit[disabled] { opacity: .6; cursor: default; }
.stk-form.is-busy .stkf-submit::after {
  content: ""; width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%;
  animation: stkf-spin .7s linear infinite;
}
@keyframes stkf-spin { to { transform: rotate(360deg); } }

.stk-form .stkf-msg { margin-top: var(--stkf-gap); padding: 12px 16px; border-radius: var(--stkf-radius); font-size: 14.5px; line-height: 1.5; }
.stk-form .stkf-msg[data-state="ok"] { background: color-mix(in srgb, #16a34a 12%, transparent); color: #15803d; }
.stk-form .stkf-msg[data-state="error"] { background: color-mix(in srgb, var(--stkf-error) 10%, transparent); color: var(--stkf-error); }
.stk-form.is-sent .stkf-grid, .stk-form.is-sent .stkf-actions { display: none; }

.stk-form .stkf-trap { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

/* searchable select */
.stk-form .stkf-combo { position: relative; }
.stk-form .stkf-combo__native { position: absolute !important; width: 1px !important; height: 1px !important; min-height: 0 !important; padding: 0 !important; overflow: hidden; clip: rect(0 0 0 0); border: 0 !important; opacity: 0; pointer-events: none; }
.stk-form .stkf-combo__input { padding-right: 38px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='6.5'/%3E%3Cpath d='m20 20-4.2-4.2'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: calc(100% - 13px) 50%; background-size: 16px 16px; }
.stk-form .stkf-combo__list { position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 50; max-height: 264px; margin: 0; padding: 4px; overflow-y: auto; list-style: none; border: 1px solid var(--stkf-border); border-radius: var(--stkf-radius); background: var(--stkf-field, #fff); box-shadow: 0 14px 30px rgba(0, 0, 0, .12); }
.stk-form .stkf-combo__list[hidden] { display: none; }
.stk-form .stkf-combo__list li { padding: 8px 10px; border-radius: calc(var(--stkf-radius) * .6); color: var(--stkf-text); font-size: 14.5px; line-height: 1.35; cursor: pointer; }
.stk-form .stkf-combo__list li.is-active { background: color-mix(in srgb, var(--stkf-accent) 12%, transparent); }
.stk-form .stkf-combo__list li.is-chosen { font-weight: 700; }
.stk-form .stkf-combo__list li.stkf-combo__empty { opacity: .55; cursor: default; }
.stk-form .stkf-field.is-invalid .stkf-combo__input { border-color: var(--stkf-error); }
