/* ============================================================
   nauyaca-waiver-form.css
   Mobile-first. Elementor global CSS vars as primary values,
   hardcoded fallbacks for contexts where Elementor isn't loaded.
   ============================================================ */

.nw-form-wrap {
  --nw-green: var(--e-global-color-primary, #0a8a42);
  --nw-green-dark: var(--e-global-color-secondary, #045400);
  --nw-accent: var(--e-global-color-accent, #ffdd00);
  --nw-text: var(--e-global-color-text, #323232);
  --nw-border: #e0e0e0;
  --nw-error: #dc2626;

  max-width: 560px;
  margin: 0 auto;
  border-radius: 10px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12);
  overflow: hidden;
  font-family: "Work Sans", sans-serif;
  color: var(--nw-text);
}

/* ---- Header ---- */
.nw-header {
  background: linear-gradient(135deg, var(--nw-green-dark), var(--nw-green));
  padding: 24px;
  color: #fff;
}

.nw-header-top {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 14px;
}

.nw-title {
  font-family: "Pill Gothic 300mg", sans-serif;
  font-weight: 900;
  font-size: 1.5rem;
  margin: 0 0 6px;
  line-height: 1.2;
  color: #fff;
}

.nw-subtitle {
  margin: 0;
  font-size: 0.9rem;
  opacity: 0.85;
  color: #fff;
}

/* ---- Lang toggle ---- */
.nw-lang-toggle {
  display: flex;
  gap: 6px;
}

.nw-lang-btn {
  background: transparent;
  color: rgba(255, 255, 255, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition:
    background 0.15s ease,
    color 0.15s ease;
}

.nw-lang-btn.active {
  background: var(--nw-accent);
  color: #1a1a1a;
  border-color: var(--nw-accent);
}

.nw-lang-btn:hover:not(.active) {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

/* ---- Body ---- */
.nw-body {
  background: #fff;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ---- Fields ---- */
.nw-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nw-field label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--nw-text);
}

.nw-field input[type="text"],
.nw-field input[type="email"],
.nw-field input[type="date"],
.nw-field select {
  border: 1.5px solid var(--nw-border);
  border-radius: 6px;
  padding: 9px 12px;
  font-size: 0.95rem;
  font-family: "Work Sans", sans-serif;
  color: var(--nw-text);
  background: #fafafa;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;
  width: 100%;
  box-sizing: border-box;
}

.nw-field input:focus,
.nw-field select:focus {
  outline: none;
  border-color: var(--nw-green);
  box-shadow: 0 0 0 3px rgba(10, 138, 66, 0.15);
  background: #fff;
}

.nw-field input[readonly] {
  background: #f0f0f0;
  cursor: not-allowed;
  color: #666;
}

.nw-field-row {
  display: flex;
  gap: 12px;
}

.nw-field-row > .nw-field {
  flex: 1;
  min-width: 0;
}

/* ---- Signature ---- */
.nw-sig-instructions {
  font-size: 0.8rem;
  color: #666;
  margin: 0;
}

.nw-signature-wrap {
  border: 2px dashed var(--nw-border);
  border-radius: 6px;
  overflow: hidden;
  background: #fff;
  touch-action: none;
}

#nw-signature-canvas {
  display: block;
  width: 100%;
  height: 200px;
  cursor: crosshair;
}

.nw-clear-sig {
  align-self: flex-start;
  background: transparent;
  border: 1px solid var(--nw-border);
  border-radius: 4px;
  padding: 4px 10px;
  font-size: 0.75rem;
  cursor: pointer;
  color: #555;
  transition:
    border-color 0.15s ease,
    color 0.15s ease;
}

.nw-clear-sig:hover {
  border-color: var(--nw-green);
  color: var(--nw-green);
}

/* ---- Terms ---- */
.nw-terms-text {
  background: #f5f8f5;
  border-left: 3px solid var(--nw-green);
  border-radius: 4px;
  padding: 12px 14px;
  font-size: 0.82rem;
  line-height: 1.5;
  color: #555;
}

.nw-field-checkbox label {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-weight: 400;
  font-size: 0.9rem;
  cursor: pointer;
}

.nw-field-checkbox input[type="checkbox"] {
  margin-top: 2px;
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  accent-color: var(--nw-green);
  cursor: pointer;
}

/* ---- Error messages ---- */
.nw-error-msg {
  font-size: 0.78rem;
  color: var(--nw-error);
  min-height: 1.1em;
}

/* ---- Submit button ---- */
#nw-submit {
  width: 100%;
  background: var(--nw-green);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 13px;
  font-family: "Roboto", sans-serif;
  font-weight: 500;
  font-size: 1rem;
  cursor: pointer;
  transition:
    background 0.15s ease,
    opacity 0.15s ease;
  margin-top: 4px;
}

#nw-submit:hover:not(:disabled) {
  background: var(--nw-green-dark);
}

#nw-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ---- Success screen ---- */
.nw-success {
  background: #fff;
  padding: 48px 24px;
  text-align: center;
}

.nw-success-icon {
  width: 56px;
  height: 56px;
  background: var(--nw-green);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  margin: 0 auto 16px;
}

.nw-success-title {
  font-family: "Pill Gothic 300mg", sans-serif;
  font-weight: 900;
  color: var(--nw-green);
  margin: 0 0 8px;
}

.nw-success-body {
  color: #555;
  margin: 0;
}

/* ---- Responsive ---- */
@media (max-width: 480px) {
  .nw-form-wrap {
    border-radius: 0 !important;
  }
  .nw-header {
    padding: 16px;
  }
  .nw-body {
    padding: 16px;
  }
  .nw-title {
    font-size: 1.25rem;
  }
  .nw-field-row {
    flex-direction: column;
  }
}
