/* NWBC Varroa Watch — Submit Check form
   Form-specific styles. Builds on tokens.css + base.css + varroa.css.
   Mobile-first, single-screen, touch-friendly. */

/* ---------- page chrome ---------- */

.vws-page {
  min-height: 100vh;
  background: var(--al-paper);
  background-image: radial-gradient(
    rgba(122, 87, 10, 0.05) 1px,
    transparent 1px
  );
  background-size: 4px 4px;
}

.vws-wrap {
  max-width: 640px;
  margin: 0 auto;
  padding: 28px 20px 120px;
}

@media (min-width: 720px) {
  .vws-wrap {
    padding: 48px 32px 64px;
  }
}

/* ---------- header band ---------- */

.vws-header {
  margin-bottom: 18px;
}

.vws-header__kicker {
  font-family: var(--ff-body);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--al-honey-deep);
  font-weight: 700;
  margin-bottom: 6px;
}

.vws-header__title {
  font-family: var(--ff-display);
  font-size: 30px;
  line-height: 1.1;
  color: var(--al-ink);
  margin: 0 0 6px;
  font-weight: 600;
}

.vws-header__lead {
  color: var(--al-ink-soft);
  font-size: 15px;
  line-height: 1.5;
  margin: 0;
}

@media (min-width: 720px) {
  .vws-header__title {
    font-size: 38px;
  }
}

/* ---------- form layout ---------- */

.vws-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 18px;
}

.vws-field {
  background: #fff;
  border: 1px solid var(--vw-border);
  border-radius: var(--vw-radius);
  padding: 14px 16px;
  box-shadow: var(--vw-shadow-soft);
}

.vws-field__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.vws-label {
  font-family: var(--ff-body);
  font-size: 14px;
  font-weight: 700;
  color: var(--al-ink);
  display: block;
  letter-spacing: 0.01em;
}

.vws-label__opt {
  font-weight: 500;
  color: var(--al-ink-muted);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.vws-hint {
  font-size: 13px;
  color: var(--al-ink-muted);
  margin-top: 6px;
  line-height: 1.4;
}

.vws-hint--error {
  color: #b91c1c;
}

/* ---------- inputs ---------- */

.vws-input,
.vws-textarea,
.vws-select {
  width: 100%;
  font-family: var(--ff-body);
  font-size: 16px; /* prevents iOS zoom on focus */
  padding: 12px 14px;
  border: 1px solid var(--vw-border);
  border-radius: var(--vw-radius-sm);
  background: #fffdf6;
  color: var(--al-ink);
  min-height: 44px;
  -webkit-appearance: none;
  appearance: none;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

.vws-input:focus,
.vws-textarea:focus,
.vws-select:focus {
  outline: none;
  border-color: var(--al-honey);
  box-shadow: 0 0 0 3px rgba(200, 150, 28, 0.18);
}

.vws-textarea {
  min-height: 84px;
  resize: vertical;
  line-height: 1.45;
}

.vws-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

@media (max-width: 420px) {
  .vws-row {
    grid-template-columns: 1fr;
  }
}

/* ---------- method pills (styled radio) ---------- */

.vws-methods {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

@media (min-width: 560px) {
  .vws-methods {
    grid-template-columns: repeat(3, 1fr);
  }
}

.vws-method {
  position: relative;
}

.vws-method input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.vws-method__label {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid var(--vw-border);
  border-radius: var(--vw-radius-sm);
  background: #fffdf6;
  font-size: 14px;
  font-weight: 500;
  color: var(--al-ink);
  cursor: pointer;
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

.vws-method input:checked + .vws-method__label {
  background: #fdf3d6;
  border-color: var(--al-honey);
  color: var(--al-honey-deep);
  font-weight: 700;
  box-shadow: inset 0 0 0 1px var(--al-honey);
}

.vws-method input:focus-visible + .vws-method__label {
  outline: 2px solid var(--al-honey);
  outline-offset: 2px;
}

/* ---------- toggle switch ---------- */

.vws-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.vws-toggle__copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.vws-toggle__title {
  font-weight: 700;
  font-size: 14px;
  color: var(--al-ink);
}

.vws-toggle__sub {
  font-size: 13px;
  color: var(--al-ink-muted);
}

.vws-switch {
  position: relative;
  width: 52px;
  height: 30px;
  flex: 0 0 52px;
}

.vws-switch input {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
}

.vws-switch__track {
  position: absolute;
  inset: 0;
  background: #d4cba7;
  border-radius: 999px;
  transition: background 0.2s ease;
}

.vws-switch__thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 24px;
  height: 24px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s ease;
}

.vws-switch input:checked ~ .vws-switch__track {
  background: var(--al-honey);
}

.vws-switch input:checked ~ .vws-switch__thumb {
  transform: translateX(22px);
}

.vws-switch input:focus-visible ~ .vws-switch__track {
  box-shadow: 0 0 0 3px rgba(200, 150, 28, 0.35);
}

/* ---------- location block ---------- */

.vws-loc__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}

.vws-loc__readout {
  margin-top: 10px;
  padding: 10px 12px;
  background: #fdf7e6;
  border-radius: var(--vw-radius-sm);
  border: 1px solid var(--al-rule-soft);
  font-size: 13px;
  color: var(--al-ink-soft);
  line-height: 1.5;
}

.vws-loc__readout strong {
  color: var(--al-ink);
  font-weight: 700;
}

.vws-loc__coords {
  display: block;
  font-family: var(--ff-mono);
  font-size: 12px;
  color: var(--al-ink-muted);
  margin-top: 4px;
  letter-spacing: 0.01em;
}

.vws-map {
  width: 100%;
  height: 240px;
  border-radius: var(--vw-radius-sm);
  margin-top: 10px;
  border: 1px solid var(--vw-border);
  background: #ede3c5;
}

.vws-map.is-hidden {
  display: none;
}

/* ---------- mite live readout ---------- */

.vws-readout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--vw-radius-sm);
  background: #fdf7e6;
  border: 1px solid var(--al-rule-soft);
  margin-top: 10px;
}

.vws-readout__main {
  font-family: var(--ff-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--al-ink);
  line-height: 1.1;
}

.vws-readout__sub {
  font-size: 12px;
  color: var(--al-ink-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-top: 2px;
}

.vws-band {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #1d1605;
  background: var(--vw-band-empty);
}

.vws-band__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.25);
}

/* ---------- photo upload ---------- */

.vws-photo {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.vws-photo__input {
  display: none;
}

.vws-photo__drop {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 60px;
  padding: 14px 16px;
  background: #fffdf6;
  border: 1px dashed var(--al-rule);
  border-radius: var(--vw-radius-sm);
  color: var(--al-honey-deep);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  text-align: center;
  -webkit-tap-highlight-color: transparent;
}

.vws-photo__drop:hover,
.vws-photo__drop:focus-visible {
  background: #fdf3d6;
  border-color: var(--al-honey);
  outline: none;
}

.vws-photo__preview {
  position: relative;
  border-radius: var(--vw-radius-sm);
  overflow: hidden;
  background: #ede3c5;
  display: none;
}

.vws-photo__preview.is-visible {
  display: block;
}

.vws-photo__preview img {
  display: block;
  width: 100%;
  max-height: 280px;
  object-fit: cover;
}

.vws-photo__clear {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(20, 12, 4, 0.78);
  color: #fff;
  border: none;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---------- submit + sticky ---------- */

.vws-submit-row {
  margin-top: 8px;
}

@media (max-width: 720px) {
  .vws-submit-row {
    display: none;
  }
}

.vws-sticky {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
  background: rgba(246, 239, 220, 0.96);
  border-top: 1px solid var(--vw-border);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 800;
  display: none;
}

@media (max-width: 720px) {
  .vws-sticky {
    display: block;
  }
  body.vws-page--sticky {
    padding-bottom: 80px;
  }
}

/* ---------- success / membership cards ---------- */

.vws-result {
  margin-top: 24px;
}

.vws-result__title {
  font-family: var(--ff-display);
  font-size: 24px;
  margin: 0 0 6px;
  color: var(--al-ink);
  font-weight: 600;
}

.vws-result__body {
  font-size: 15px;
  color: var(--al-ink-soft);
  line-height: 1.5;
}

.vws-result__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.vws-memcard {
  margin-top: 18px;
  padding: 18px;
  background: #fffdf6;
  border: 1px solid var(--vw-border);
  border-radius: var(--vw-radius);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.vws-memcard__title {
  font-family: var(--ff-display);
  font-size: 20px;
  color: var(--al-ink);
  margin: 0;
  font-weight: 600;
}

.vws-memcard__body {
  font-size: 14px;
  color: var(--al-ink-soft);
  line-height: 1.5;
  margin: 0;
}

.vws-memcard__form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

@media (min-width: 540px) {
  .vws-memcard__form {
    flex-direction: row;
  }
  .vws-memcard__form .vws-input {
    flex: 1;
  }
}

/* ---------- footer ---------- */

.vws-footer {
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid var(--al-rule-soft);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 13px;
  color: var(--al-ink-muted);
}

.vws-footer a {
  color: var(--al-honey-deep);
  text-decoration: none;
  font-weight: 600;
}

.vws-footer a:hover {
  text-decoration: underline;
}

/* ---------- reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  .vws-switch__track,
  .vws-switch__thumb,
  .vws-method__label,
  .vws-input,
  .vws-textarea,
  .vw-toast {
    transition: none !important;
  }
}
