/*
 * GoodFood customer UI foundation.
 * All account, authentication, workshop and recipe surfaces inherit this file.
 * Update shared form controls here before adding flow-specific overrides.
 */
:is(.gf-auth, .gf-account, .gf-workshop, .gf-recipe) {
  --gf-red: #c51f2a;
  --gf-red-bright: #dc2632;
  --gf-red-dark: #970b14;
  --gf-ink: #171717;
  --gf-muted: #676767;
  --gf-line: #dedede;
  --gf-field: #f8f8f8;
  --gf-radius-dialog: 24px;
  --gf-radius-control: 10px;
  color: var(--gf-ink);
  font-family: inherit;
}

:is(.gf-auth, .gf-account, .gf-workshop, .gf-recipe) * { box-sizing: border-box; }
:is(.gf-auth, .gf-account, .gf-workshop, .gf-recipe)[hidden] { display: none !important; }
:is(.gf-auth, .gf-account, .gf-workshop, .gf-recipe) [hidden] { display: none !important; }

:is(.gf-auth__form, .gf-account__form, .gf-workshop__form, .gf-recipe__form) {
  display: grid;
  gap: 17px;
}

:is(.gf-auth__form, .gf-account__form, .gf-workshop__form, .gf-recipe__form) label {
  color: var(--gf-ink);
  display: grid;
  font-size: 14px;
  font-weight: 680;
  gap: 8px;
  line-height: 1.4;
}

:is(.gf-auth__form, .gf-account__form, .gf-workshop__form, .gf-recipe__form)
  :is(input[type="text"], input[type="tel"], input[type="email"], input[type="url"], input[type="password"], select) {
  appearance: none;
  background: var(--gf-field) !important;
  border: 1px solid var(--gf-line) !important;
  border-radius: var(--gf-radius-control) !important;
  box-shadow: none !important;
  color: var(--gf-ink) !important;
  font: inherit;
  font-size: 16px !important;
  min-height: 50px;
  padding: 11px 14px !important;
  transition: background .2s ease, border-color .2s ease, box-shadow .2s ease;
  width: 100%;
}

:is(.gf-auth__form, .gf-account__form, .gf-workshop__form, .gf-recipe__form)
  :is(input, select):focus {
  background: #fff !important;
  border-color: var(--gf-red) !important;
  box-shadow: 0 0 0 4px rgba(197, 31, 42, .1) !important;
  outline: 0;
}

:is(.gf-auth__form, .gf-account__form, .gf-workshop__form, .gf-recipe__form)
  :is(input, select)[aria-invalid="true"] {
  border-color: #b42318 !important;
}

:is(.gf-auth__field-error, .gf-account__field-error, .gf-workshop__field-error, .gf-recipe__field-error) {
  color: #962e27;
  font-size: 13px;
  font-weight: 600;
}

:is(.gf-auth__tabs, .gf-account__tabs, .gf-workshop__tabs, .gf-recipe__tabs) {
  background: #f4f4f4;
  border: 1px solid #ededed;
  border-radius: 12px;
  display: grid;
  gap: 4px;
  grid-template-columns: 1fr 1fr;
  margin: 0 0 28px;
  padding: 4px;
}

:is(.gf-auth, .gf-account, .gf-workshop, .gf-recipe)
  :is(.gf-auth__tabs, .gf-account__tabs, .gf-workshop__tabs, .gf-recipe__tabs) button {
  background: transparent !important;
  border: 0 !important;
  border-radius: 9px !important;
  box-shadow: none !important;
  color: #686868 !important;
  cursor: pointer;
  font-size: 15px !important;
  font-weight: 700;
  min-height: 44px;
  padding: 9px 12px !important;
}

:is(.gf-auth, .gf-account, .gf-workshop, .gf-recipe)
  :is(.gf-auth__tabs, .gf-account__tabs, .gf-workshop__tabs, .gf-recipe__tabs) button.is-active {
  background: #fff !important;
  box-shadow: 0 3px 12px rgba(0, 0, 0, .08) !important;
  color: var(--gf-red) !important;
}

:is(.gf-auth, .gf-account, .gf-workshop, .gf-recipe)
  :is(.gf-auth__primary, .gf-account__primary, .gf-workshop__primary, .gf-recipe__primary) {
  background: linear-gradient(135deg, var(--gf-red-bright), var(--gf-red)) !important;
  border: 1px solid var(--gf-red) !important;
  border-radius: var(--gf-radius-control) !important;
  box-shadow: 0 10px 22px rgba(197, 31, 42, .22) !important;
  color: #fff !important;
  cursor: pointer;
  font-size: 15px !important;
  font-weight: 750;
  min-height: 50px;
  padding: 11px 20px !important;
  width: 100%;
}

:is(.gf-auth, .gf-account, .gf-workshop, .gf-recipe)
  :is(.gf-auth__primary, .gf-account__primary, .gf-workshop__primary, .gf-recipe__primary):hover {
  background: linear-gradient(135deg, var(--gf-red), var(--gf-red-dark)) !important;
  box-shadow: 0 12px 26px rgba(151, 11, 20, .26) !important;
  transform: translateY(-1px);
}

:is(.gf-auth__notice, .gf-account__notice, .gf-workshop__notice, .gf-recipe__notice) {
  border-radius: 10px;
  font-size: 14px;
  line-height: 1.5;
  margin: 0 0 18px;
  padding: 12px 14px;
}

:is(.gf-auth__notice, .gf-account__notice, .gf-workshop__notice, .gf-recipe__notice)[data-kind="error"],
.gf-recipe__notice[data-type="error"] { background: #fff0f0; color: #971c23; }

:is(.gf-auth__notice, .gf-account__notice, .gf-workshop__notice, .gf-recipe__notice)[data-kind="success"],
.gf-recipe__notice[data-type="success"] { background: #f8eeee; color: var(--gf-red-dark); }

@media (max-width: 760px) {
  :is(.gf-auth, .gf-workshop, .gf-recipe) { padding: 10px; }
  :is(.gf-auth, .gf-account, .gf-workshop, .gf-recipe)
    :is(.gf-auth__tabs, .gf-account__tabs, .gf-workshop__tabs, .gf-recipe__tabs) button {
    font-size: 14px !important;
  }
}
