/* Fancy form styles (scoped). Only applies inside .ff containers. */
.ff input[type="text"],
.ff input[type="email"],
.ff input[type="password"],
.ff input[type="tel"],
.ff input[type="url"],
.ff input[type="search"],
.ff input[type="number"],
.ff input[type="date"],
.ff input[type="time"],
.ff input[type="datetime-local"],
.ff textarea,
.ff select {
  width: 100%;
  border: 1px solid rgba(0,0,0,.18);
  background: rgba(0,0,0,.03);
  color: inherit;                 /* inherit existing text color */
  border-radius: 6px;
  padding: 5px 6px;
  font: inherit;
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease, transform .06s ease, background .2s ease;
}

.ff input::placeholder,
.ff textarea::placeholder { color: color-mix(in oklab, currentColor, #000 45%); opacity:.8; }

.ff input:hover,
.ff textarea:hover,
.ff select:hover { border-color: rgba(0,0,0,.28); }

.ff input:focus,
.ff textarea:focus,
.ff select:focus {
  border-color: currentColor;
  box-shadow: 0 0 0 4px color-mix(in oklab, #4AFA32, #fff 70%);
  background: rgba(0,0,0,.02);
}

/* Make HTML size=".." effective by removing fixed width in those cases */
.ff input[size] { width: auto; }

/* invalid state (toggle with class 'is-invalid' on the control) */
.ff .is-invalid {
  border-color: #e11d48 !important;
  box-shadow: 0 0 0 4px rgba(225,29,72,.25) !important;
}

/* Submit buttons (only inside .ff) */
.ff button[type="submit"],
.ff input[type="submit"] {
  --h: 36px;
  display: inline-grid;
  place-items: center;
  height: var(--h);
  padding: 0 9px;
  border-radius: 6px;
  border: 0;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  color: #fff;
  background: #4AFA32; /* solid brand color */
  box-shadow: 0 10px 22px rgba(74, 250, 50, .35);
  transition: transform .08s ease, box-shadow .25s ease, opacity .2s ease;
}

.ff button[type="submit"]:hover,
.ff input[type="submit"]:hover { transform: translateY(-1px); }

.ff button[type="submit"]:active,
.ff input[type="submit"]:active { transform: translateY(0); }

.ff button[type="submit"]:focus-visible,
.ff input[type="submit"]:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px color-mix(in oklab, #4AFA32, #fff 70%);
}

/* Optional ghost button variant */
.ff .btn-ghost {
  background: transparent;
  color: inherit;
  border: 1px solid rgba(0,0,0,.18);
  box-shadow: none;
  border-radius: 6px;
  padding: 10px 16px;
}

/* Stronger specificity for forms inside tables */
table form.ff input[type="text"],
table form.ff input[type="email"],
table form.ff input[type="password"],
table form.ff input[type="tel"],
table form.ff input[type="url"],
table form.ff input[type="search"],
table form.ff input[type="number"],
table form.ff input[type="date"],
table form.ff input[type="time"],
table form.ff input[type="datetime-local"],
table form.ff textarea,
table form.ff select {
  padding: 5px 6px !important;
  border-radius: 6px !important;
  border: 1px solid rgba(0,0,0,.18) !important;
  background: rgba(0,0,0,.03) !important;
  color: inherit !important;
}

/* Submit button inside tables */
table form.ff button[type="submit"],
table form.ff input[type="submit"] {
  height: 36px !important;
  padding: 0 9px !important;
  border-radius: 6px !important;
  background: #4AFA32 !important;
  color: #000 !important;
  font-weight: 400 !important;
  box-shadow: 0 10px 22px rgba(74, 250, 50, .35) !important;
}



/* Ensure submit button text is black and not bold inside .ff */
.ff button[type="submit"],
.ff input[type="submit"] {
  color: #000 !important;
  font-weight: 400 !important;
}




/* Robust inline behavior and spacing */
.ff input.inline,
.ff select.inline,
.ff textarea.inline,
.ff button.inline {
  width: auto !important;
  display: inline-block !important;
  vertical-align: middle;
  margin-right: 8px;
}

.ff input.inline:last-child,
.ff select.inline:last-child,
.ff textarea.inline:last-child,
.ff button.inline:last-child { margin-right: 0; }

/* If only the second control is inline or lacks the class, add left margin */
.ff .inline + .inline,
.ff .inline + input,
.ff .inline + select,
.ff .inline + textarea,
.ff .inline + button {
  margin-left: 8px;
}



/* Unified vertical spacing: 12px between stacked form elements */
.ff input[type="text"],
.ff input[type="email"],
.ff input[type="password"],
.ff input[type="tel"],
.ff input[type="url"],
.ff input[type="search"],
.ff input[type="number"],
.ff input[type="date"],
.ff input[type="time"],
.ff input[type="datetime-local"],
.ff textarea,
.ff select,
.ff button[type="submit"],
.ff input[type="submit"] {
  margin-top: 0;
  margin-bottom: 6px;
}
