/*
 * OS Framework — Formulaires natifs
 *
 * Les styles de ce fichier sont volontairement limités aux vrais contextes
 * de formulaire. Ils ne doivent pas modifier les labels ou contrôles utilisés
 * comme composants d'interface en dehors d'un formulaire (menu mobile,
 * interrupteurs de layout, panneaux, etc.).
 */

body:not(.woocommerce-checkout) :where(form, .os-form) input[type="text"],
body:not(.woocommerce-checkout) :where(form, .os-form) input[type="email"],
body:not(.woocommerce-checkout) :where(form, .os-form) input[type="tel"],
body:not(.woocommerce-checkout) :where(form, .os-form) input[type="url"],
body:not(.woocommerce-checkout) :where(form, .os-form) input[type="password"],
body:not(.woocommerce-checkout) :where(form, .os-form) input[type="number"]:not(.qty),
body:not(.woocommerce-checkout) :where(form, .os-form) input[type="search"],
body:not(.woocommerce-checkout) :where(form, .os-form) input[type="date"],
body:not(.woocommerce-checkout) :where(form, .os-form) input[type="time"],
body:not(.woocommerce-checkout) :where(form, .os-form) select,
body:not(.woocommerce-checkout) :where(form, .os-form) textarea {
  width: 100%;
  min-height: 46px;
  padding: .75rem .9rem;
  background: var(--os-field-bg);
  color: var(--os-text);
  border: 1px solid var(--os-border);
  border-radius: var(--os-radius-sm);
}

body:not(.woocommerce-checkout) :where(form, .os-form) textarea {
  min-height: 140px;
  resize: vertical;
}

body:not(.woocommerce-checkout) :where(form, .os-form) input::placeholder,
body:not(.woocommerce-checkout) :where(form, .os-form) textarea::placeholder {
  color: var(--os-muted);
  opacity: .8;
}

body:not(.woocommerce-checkout) :where(form, .os-form) input:focus-visible,
body:not(.woocommerce-checkout) :where(form, .os-form) select:focus-visible,
body:not(.woocommerce-checkout) :where(form, .os-form) textarea:focus-visible,
body:not(.woocommerce-checkout) :where(form, .os-form) button:focus-visible,
body:not(.woocommerce-checkout) :where(form, .os-form) a:focus-visible {
  outline: 3px solid var(--os-focus-ring);
  outline-offset: 2px;
}

body:not(.woocommerce-checkout) :where(form, .os-form) input:focus,
body:not(.woocommerce-checkout) :where(form, .os-form) select:focus,
body:not(.woocommerce-checkout) :where(form, .os-form) textarea:focus {
  border-color: var(--os-primary);
  box-shadow: 0 0 0 3px var(--os-focus-ring);
  outline: 0;
}

body:not(.woocommerce-checkout) :where(form, .os-form) input:disabled,
body:not(.woocommerce-checkout) :where(form, .os-form) select:disabled,
body:not(.woocommerce-checkout) :where(form, .os-form) textarea:disabled,
body:not(.woocommerce-checkout) :where(form, .os-form) input[readonly],
body:not(.woocommerce-checkout) :where(form, .os-form) textarea[readonly] {
  cursor: not-allowed;
  background: var(--os-surface);
  opacity: .7;
}

body:not(.woocommerce-checkout) :where(form, .os-form) label {
  display: block;
  margin-bottom: .4rem;
  font-weight: 700;
}

body:not(.woocommerce-checkout) :where(form, .os-form) fieldset {
  min-width: 0;
  margin: 0 0 1.5rem;
  padding: 1rem;
  border: 1px solid var(--os-border);
  border-radius: var(--os-radius);
}

body:not(.woocommerce-checkout) :where(form, .os-form) legend {
  padding: 0 .35rem;
  font-weight: 800;
}

body:not(.woocommerce-checkout) :where(form, .os-form) input[type="checkbox"],
body:not(.woocommerce-checkout) :where(form, .os-form) input[type="radio"] {
  inline-size: 1.1rem;
  block-size: 1.1rem;
  margin: 0 .45rem 0 0;
  accent-color: var(--os-primary);
  vertical-align: -.15em;
}

body:not(.woocommerce-checkout) :where(form, .os-form) input[type="file"] {
  max-width: 100%;
  padding: .65rem;
  background: var(--os-field-bg);
  border: 1px solid var(--os-border);
  border-radius: var(--os-radius-sm);
}

body:not(.woocommerce-checkout) :where(form, .os-form) .os-form-error,
body:not(.woocommerce-checkout) :where(form, .os-form) .woocommerce-invalid label {
  color: var(--os-danger);
}

body:not(.woocommerce-checkout) :where(form, .os-form) .woocommerce-invalid input,
body:not(.woocommerce-checkout) :where(form, .os-form) .woocommerce-invalid select,
body:not(.woocommerce-checkout) :where(form, .os-form) .woocommerce-invalid textarea {
  border-color: var(--os-danger);
}

body:not(.woocommerce-checkout) :where(form, .os-form) .woocommerce-validated input,
body:not(.woocommerce-checkout) :where(form, .os-form) .woocommerce-validated select,
body:not(.woocommerce-checkout) :where(form, .os-form) .woocommerce-validated textarea {
  border-color: var(--os-success);
}

body:not(.woocommerce-checkout) :where(form, .os-form) .select2-container .select2-selection--single {
  min-height: 46px;
  border-color: var(--os-border);
  border-radius: var(--os-radius-sm);
}

body:not(.woocommerce-checkout) :where(form, .os-form) .select2-container .select2-selection--single .select2-selection__rendered {
  line-height: 44px;
  padding-left: .9rem;
}

body:not(.woocommerce-checkout) :where(form, .os-form) .select2-container .select2-selection--single .select2-selection__arrow {
  height: 44px;
}
