/* Forms only. Shared button styling lives in assets/css/foundation/buttons.css. */

/* Keep shared field defaults intentionally low-specificity so component-level
   form treatments can override them through the normal cascade. */
:where(
  input:not([type="button"]):not([type="reset"]):not([type="submit"]):not([type="checkbox"]):not([type="radio"]),
  textarea,
  select
) {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--mws-input-border);
  border-radius: var(--mws-form-control-radius, var(--mws-radius-sm));
  padding: .7rem .85rem;
  background: var(--mws-color-bg);
  color: var(--mws-color-text);
  font-family: var(--mws-font-body);
  font-size: var(--mws-font-size-body);
}


/* Standard single-value selects use one theme-owned indicator so arrow size
   and edge inset stay consistent across browsers and WooCommerce contexts. */
:where(select:not([multiple]):not([size])) {
  -webkit-appearance: none;
  appearance: none;
  padding-inline-end: 2.75rem;
  background-image:
    linear-gradient(45deg, transparent 50%, currentColor 50%),
    linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position:
    calc(100% - 18px) calc(50% - 2px),
    calc(100% - 13px) calc(50% - 2px);
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

[dir="rtl"] :where(select:not([multiple]):not([size])) {
  background-position:
    18px calc(50% - 2px),
    13px calc(50% - 2px);
}

label {
  display: block;
  margin-bottom: var(--mws-space-xs);
  font-weight: 700;
}

/* Focus defaults follow the same low-specificity contract. Components may
   provide their own focus treatment without !important or selector escalation. */
:where(
  input:not([type="button"]):not([type="reset"]):not([type="submit"]):not([type="checkbox"]):not([type="radio"]),
  textarea,
  select
):focus {
  outline: 2px solid var(--mws-input-focus);
  outline-offset: 2px;
}


/* Standard WordPress comment form. */
.mws-comment-respond {
  margin-top: var(--mws-space-xl);
}

.mws-comment-form {
  display: grid;
  gap: var(--mws-space-md);
}

.mws-comment-form p {
  margin: 0;
}

.mws-comment-form label {
  display: block;
  margin-bottom: var(--mws-space-xs);
  font-weight: 700;
}

.mws-comment-form input:not([type="checkbox"]),
.mws-comment-form textarea {
  width: 100%;
}

.mws-comment-form textarea {
  min-height: 10rem;
  resize: vertical;
}

.mws-comment-form .comment-form-cookies-consent {
  display: flex;
  align-items: flex-start;
  gap: var(--mws-space-sm);
}

.mws-comment-form .comment-form-cookies-consent label {
  margin: 0;
  font-weight: 400;
}

.mws-comment-form .form-submit {
  margin-top: var(--mws-space-sm);
}
