/* Site-wide button system: white controls with clear black labels and borders. */
:where(
  button,
  input[type="button"],
  input[type="submit"],
  a.button,
  a.primary,
  a.secondary,
  a.outline-button,
  a.intake-btn,
  a.project-files-btn,
  a.reserve-email,
  .billing-cart-toggle,
  .industry-resource-links a,
  .demo-grid a,
  .admin-project-review
) {
  background-color: #fff !important;
  background-image: none !important;
  border: 1px solid #171717 !important;
  color: #111 !important;
  box-shadow: none !important;
  font-weight: 600 !important;
}

:where(
  button,
  input[type="button"],
  input[type="submit"],
  a.button,
  a.primary,
  a.secondary,
  a.outline-button,
  a.intake-btn,
  a.project-files-btn,
  a.reserve-email,
  .billing-cart-toggle,
  .industry-resource-links a,
  .demo-grid a,
  .admin-project-review
):hover {
  background-color: #f3f3f3 !important;
  border-color: #000 !important;
  color: #000 !important;
}

:where(
  button,
  input[type="button"],
  input[type="submit"],
  a.button,
  a.primary,
  a.secondary,
  a.outline-button,
  a.intake-btn,
  a.project-files-btn,
  a.reserve-email,
  .billing-cart-toggle,
  .industry-resource-links a,
  .demo-grid a,
  .admin-project-review
):focus-visible {
  background-color: #fff !important;
  border-color: #000 !important;
  color: #000 !important;
  outline: 3px solid #0003 !important;
  outline-offset: 2px;
}

button:is(.active, .selected, [aria-pressed="true"], [aria-expanded="true"]),
[role="tab"][aria-selected="true"] {
  background-color: #fff !important;
  border: 2px solid #000 !important;
  color: #000 !important;
  box-shadow: inset 0 -3px 0 #000 !important;
}

button:disabled,
input[type="button"]:disabled,
input[type="submit"]:disabled {
  background-color: #fff !important;
  border-color: #999 !important;
  color: #777 !important;
  cursor: not-allowed !important;
  opacity: .65 !important;
}

input::file-selector-button {
  background: #fff !important;
  border: 1px solid #171717 !important;
  color: #111 !important;
  font-weight: 600 !important;
}

/* High-specificity reinforcement for older page rules that also use !important. */
html body button:not(#keep-brand-button-color),
html body input[type="button"]:not(#keep-brand-button-color),
html body input[type="submit"]:not(#keep-brand-button-color),
html body a.button:not(#keep-brand-button-color),
html body a.primary:not(#keep-brand-button-color),
html body a.secondary:not(#keep-brand-button-color),
html body a.outline-button:not(#keep-brand-button-color),
html body a.intake-btn:not(#keep-brand-button-color),
html body a.project-files-btn:not(#keep-brand-button-color),
html body a.reserve-email:not(#keep-brand-button-color),
html body .billing-cart-toggle:not(#keep-brand-button-color),
html body .industry-resource-links a:not(#keep-brand-button-color),
html body .demo-grid a:not(#keep-brand-button-color),
html body .admin-project-review:not(#keep-brand-button-color),
html body.portal-projects input.project-due-date-input:not(#keep-brand-button-color) {
  background-color: #fff !important;
  background-image: none !important;
  border: 1px solid #171717 !important;
  color: #111 !important;
  box-shadow: none !important;
  font-weight: 600 !important;
}

html body button:not(#keep-brand-button-color):hover,
html body input[type="button"]:not(#keep-brand-button-color):hover,
html body input[type="submit"]:not(#keep-brand-button-color):hover,
html body a.button:not(#keep-brand-button-color):hover,
html body a.primary:not(#keep-brand-button-color):hover,
html body a.secondary:not(#keep-brand-button-color):hover,
html body a.outline-button:not(#keep-brand-button-color):hover,
html body a.intake-btn:not(#keep-brand-button-color):hover,
html body a.project-files-btn:not(#keep-brand-button-color):hover,
html body a.reserve-email:not(#keep-brand-button-color):hover,
html body.portal-projects input.project-due-date-input:not(#keep-brand-button-color):hover {
  background-color: #f3f3f3 !important;
  border-color: #000 !important;
  color: #000 !important;
}

html body button:not(#keep-brand-button-color):focus-visible,
html body input[type="button"]:not(#keep-brand-button-color):focus-visible,
html body input[type="submit"]:not(#keep-brand-button-color):focus-visible,
html body a.button:not(#keep-brand-button-color):focus-visible,
html body a.primary:not(#keep-brand-button-color):focus-visible,
html body a.secondary:not(#keep-brand-button-color):focus-visible,
html body a.outline-button:not(#keep-brand-button-color):focus-visible,
html body a.intake-btn:not(#keep-brand-button-color):focus-visible,
html body a.project-files-btn:not(#keep-brand-button-color):focus-visible,
html body a.reserve-email:not(#keep-brand-button-color):focus-visible,
html body.portal-projects input.project-due-date-input:not(#keep-brand-button-color):focus-visible {
  background-color: #fff !important;
  border-color: #000 !important;
  color: #000 !important;
  outline: 3px solid #0003 !important;
  outline-offset: 2px;
}

html body button:not(#keep-brand-button-color):is(.active, .selected, [aria-pressed="true"], [aria-expanded="true"]),
html body [role="tab"]:not(#keep-brand-button-color)[aria-selected="true"] {
  background-color: #fff !important;
  border: 2px solid #000 !important;
  color: #000 !important;
  box-shadow: inset 0 -3px 0 #000 !important;
}

html body button:not(#keep-brand-button-color):disabled,
html body input[type="button"]:not(#keep-brand-button-color):disabled,
html body input[type="submit"]:not(#keep-brand-button-color):disabled {
  background-color: #fff !important;
  border-color: #999 !important;
  color: #777 !important;
  cursor: not-allowed !important;
  opacity: .65 !important;
}

html body.portal-projects input.project-due-date-input:not(#keep-brand-button-color)::-webkit-calendar-picker-indicator {
  filter: none !important;
  opacity: 1 !important;
}

html body .portal-projects button#new-project:not(#keep-brand-button-color) {
  background-color: #fff !important;
  background-image: none !important;
  border: 1px solid #171717 !important;
  color: #111 !important;
  box-shadow: none !important;
}

html body .portal-projects button#new-project:not(#keep-brand-button-color):hover {
  background-color: #f3f3f3 !important;
  border-color: #000 !important;
  color: #000 !important;
}
