/* ─────────────────────────────────────────────────────────────────
 * forms-base.css — shared form input styling for being3 pages
 *
 * Goal: every Brilly-facing page (events/add, wallets, profile,
 * lana-discount, lashes, donate, pay, etc.) uses the SAME visual
 * language for inputs, selects and textareas. The native browser
 * styles for date/time inputs are particularly ugly and inconsistent
 * across Chrome / Safari / Firefox — this file normalises them.
 *
 * Each page already declares its own --bg, --ink, --line, --accent
 * CSS custom properties, so this file just reads from them and
 * doesn't need to know which palette is active.
 * ───────────────────────────────────────────────────────────────── */

input[type="text"],
input[type="number"],
input[type="url"],
input[type="date"],
input[type="time"],
input[type="datetime-local"],
input[type="email"],
input[type="search"],
input[type="tel"],
input[type="password"],
select,
textarea {
  width: 100%;
  padding: 11px 13px;
  border-radius: 10px;
  border: 1px solid var(--line, #d8ceb1);
  background: var(--bg, #f4ead0);
  color: var(--ink, #2a2620);
  font-size: .94rem;
  font-family: inherit;
  line-height: 1.4;
  min-height: 44px;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color .12s ease, box-shadow .12s ease;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent, #b78845);
  box-shadow: 0 0 0 3px rgba(183, 136, 69, .18);
}

textarea {
  min-height: 140px;
  resize: vertical;
}

/* Native calendar/clock dropdown icon — themed for both light + dark.
   Chrome/Edge expose ::-webkit-calendar-picker-indicator. In night
   mode we invert the icon so it stays visible on the dark background. */
input[type="date"]::-webkit-calendar-picker-indicator,
input[type="time"]::-webkit-calendar-picker-indicator,
input[type="datetime-local"]::-webkit-calendar-picker-indicator {
  cursor: pointer;
  opacity: .65;
  padding: 4px;
  border-radius: 6px;
  transition: opacity .12s, background .12s;
}
input[type="date"]:hover::-webkit-calendar-picker-indicator,
input[type="time"]:hover::-webkit-calendar-picker-indicator,
input[type="datetime-local"]:hover::-webkit-calendar-picker-indicator {
  opacity: 1;
  background: rgba(0, 0, 0, .06);
}
html[data-theme="night"] input[type="date"]::-webkit-calendar-picker-indicator,
html[data-theme="night"] input[type="time"]::-webkit-calendar-picker-indicator,
html[data-theme="night"] input[type="datetime-local"]::-webkit-calendar-picker-indicator {
  filter: invert(1);
}
html[data-theme="night"] input[type="date"]:hover::-webkit-calendar-picker-indicator,
html[data-theme="night"] input[type="time"]:hover::-webkit-calendar-picker-indicator,
html[data-theme="night"] input[type="datetime-local"]:hover::-webkit-calendar-picker-indicator {
  background: rgba(255, 255, 255, .08);
}

/* Custom select chevron — replaces the native one with a themed SVG.
   ink-3 color (#877f70) is the muted-text token used across pages.
   Falls back to a neutral gray on pages that don't declare --ink-3. */
select {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23877f70' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 38px;
}

/* Disabled / read-only — clearly distinct from active state */
input:disabled,
select:disabled,
textarea:disabled,
input[readonly] {
  opacity: .55;
  cursor: not-allowed;
  background: var(--bg-soft, var(--bg, #ede1c0));
}

::placeholder {
  color: var(--ink-3, #877f70);
  opacity: .8;
}

/* Number input — remove the up/down spinner that varies wildly across
   browsers; users can still type freely. */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
input[type="number"] {
  -moz-appearance: textfield;
}

/* Mono-style identifier fields (pubkeys, wallets, txids). Pages that
   need a monospace look can apply class="mono" to the input. */
input.mono,
.mono input,
textarea.mono {
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .88rem;
}

/* Standard form label spacing — pages that want their own should
   define `label` AFTER linking this file. */
form label,
.form-label {
  display: block;
  color: var(--ink-2, var(--ink, #5a544a));
  font-size: .85rem;
  margin: 12px 0 6px;
}
