/*
 * Trinity Buttons: the site's button on the block editor's Button block and
 * on the File block's download button.
 *
 * Values are the Oxygen classes': .button-yellow (gold #dfa425, hover
 * #efb943, 6px 24px, 0.9rem, weight 500, uppercase, 75px radius) and the
 * site blues (#006db6, #004073).
 */

/* ---------- shape and lettering: every button ---------- */
.wp-block-button > .wp-block-button__link,
.wp-block-file .wp-block-file__button {
  padding: 6px 24px;
  border: 1px solid transparent;
  border-radius: 75px;
  font-family: Montserrat, sans-serif;
  font-weight: 500;
  line-height: 1.4;
  text-transform: uppercase;
  text-decoration: none;
  box-shadow: none;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
/* A size chosen in the editor wins. */
.wp-block-button:not(.has-custom-font-size) > .wp-block-button__link:not(.has-custom-font-size),
.wp-block-file .wp-block-file__button {
  font-size: 0.9rem;
}

/* ---------- gold: the default ---------- */
.wp-block-button:not(.is-style-outline) > .wp-block-button__link:not(.has-background),
.wp-block-file .wp-block-file__button:not(.has-background) {
  background-color: #dfa425;
  border-color: #dfa425;
}
.wp-block-button:not(.is-style-outline) > .wp-block-button__link:not(.has-background):hover,
.wp-block-button:not(.is-style-outline) > .wp-block-button__link:not(.has-background):focus,
.wp-block-file .wp-block-file__button:not(.has-background):hover,
.wp-block-file .wp-block-file__button:not(.has-background):focus {
  background-color: #efb943;
  border-color: #efb943;
}

/* ---------- blue: Styles panel > Blue ---------- */
.wp-block-button.is-style-trinity-blue > .wp-block-button__link:not(.has-background) {
  background-color: #006db6;
  border-color: #006db6;
}
.wp-block-button.is-style-trinity-blue > .wp-block-button__link:not(.has-background):hover,
.wp-block-button.is-style-trinity-blue > .wp-block-button__link:not(.has-background):focus {
  background-color: #004073;
  border-color: #004073;
}

/* ---------- text stays white ----------
   The site's "a:hover" turned it dark blue. A text colour chosen in the
   editor is left alone. */
.wp-block-button:not(.is-style-outline) > .wp-block-button__link:not(.has-text-color),
.wp-block-button:not(.is-style-outline) > .wp-block-button__link:not(.has-text-color):hover,
.wp-block-button:not(.is-style-outline) > .wp-block-button__link:not(.has-text-color):focus,
.wp-block-button:not(.is-style-outline) > .wp-block-button__link:not(.has-text-color):visited,
.wp-block-file .wp-block-file__button:not(.has-text-color),
.wp-block-file .wp-block-file__button:not(.has-text-color):hover,
.wp-block-file .wp-block-file__button:not(.has-text-color):focus,
.wp-block-file .wp-block-file__button:not(.has-text-color):visited {
  color: #ffffff;
  opacity: 1;
}

/* ---------- outline: Styles panel > Outline ---------- */
.wp-block-button.is-style-outline > .wp-block-button__link:not(.has-text-color) {
  border-color: #006db6;
  color: #006db6;
}
.wp-block-button.is-style-outline > .wp-block-button__link:not(.has-text-color):hover,
.wp-block-button.is-style-outline > .wp-block-button__link:not(.has-text-color):focus {
  border-color: #004073;
  color: #004073;
}
.wp-block-button.is-style-outline > .wp-block-button__link {
  padding: 6px 24px;
  border-width: 1px;
}

/* ---------- keyboard focus ---------- */
.wp-block-button > .wp-block-button__link:focus-visible,
.wp-block-file .wp-block-file__button:focus-visible {
  outline: 2px solid #004073;
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .wp-block-button > .wp-block-button__link,
  .wp-block-file .wp-block-file__button {
    transition: none;
  }
}
