/* ==========================================================================
   Feselle custom date picker (three selects)
   Replaces native <input type="date"> with three <select> dropdowns
   (day / month / year, Finnish order). The native input is hidden as a hidden
   YYYY-MM-DD carrier; the .feselle-datepicker__select elements drive it.
   Styling matches the auth form fields (see style.css:573-611) so the three
   selects read as one system with the other inputs.
   ========================================================================== */

.feselle-datepicker {
  position: relative;
  display: block;
  width: 100%;
}

/* Hidden carrier — still submits its name/value with the form. */
.feselle-datepicker__native {
  display: none !important;
}

/* Row of three selects. */
.feselle-datepicker__selects {
  display: flex;
  gap: 8px;
  width: 100%;
}

/* Each select — mirrors the auth input look (48px, #d8dee4 border, green focus). */
.feselle-datepicker__select {
  flex: 1 1 0;
  min-width: 0;
  box-sizing: border-box;
  width: 100%;
  height: 48px;
  min-height: 48px;
  padding: 0 10px;
  border: 1px solid #d8dee4;
  border-radius: var(--feselle-radius-md, 6px);
  background: #fff;
  color: #1e293b;
  font-size: 0.95rem;
  cursor: pointer;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

.feselle-datepicker__select:hover {
  border-color: #b9c4cc;
}

.feselle-datepicker__select:focus,
.feselle-datepicker__select:focus-visible {
  outline: none;
  border-color: var(--feselle-brand-green-700, #2d5a44);
  box-shadow: 0 0 0 3px rgba(45, 90, 68, 0.14);
}

/* Disabled months/days (underage gating) — best-effort cross-browser. */
.feselle-datepicker__select option:disabled {
  color: #94a3b8;
}

/* Larger tap targets on touch / small screens (matches style.css:985-999). */
@media (max-width: 479px) {
  .feselle-datepicker__select {
    min-height: 50px;
  }
  .feselle-datepicker__selects {
    gap: 6px;
  }
}

/* Respect reduced motion. */
@media (prefers-reduced-motion: reduce) {
  .feselle-datepicker__select {
    transition: none;
  }
}