/*
 * Default text color per background contrast (lfdk-35q3.36).
 *
 * theme.json's styles.elements.button sets text color to var(--primary), which
 * is unreadable on darker palette backgrounds. WP emits that rule via
 * `:where(.wp-element-button)` (specificity 0,0,0), so the utility-class
 * overrides below at specificity 0,2,0 win cleanly — no !important needed.
 *
 * Only dark backgrounds need the override; light backgrounds keep the
 * inherited primary teal text (brand intent, contrast acceptable).
 *
 * Other button styling (CTA hover bg, link-section dashed border, square
 * corners, hover text-decoration overrides) lives in theme.json under
 * `styles.blocks.core/button.variations.{cta-primary,cta-secondary,link-section}`.
 * Utility-class overrides cannot move there — they're conditional on runtime
 * user-applied classes (`has-X-background-color`), not on the variation slug.
 */
.wp-element-button.has-contrast-d-background-color,
.wp-element-button.has-contrast-background-color,
.wp-element-button.has-contrast-1-background-color,
.wp-element-button.has-primary-background-color,
.wp-element-button.has-primary-d-background-color,
.wp-element-button.has-primary-1-background-color,
.wp-element-button.has-secondary-background-color,
.wp-element-button.has-secondary-d-background-color,
.wp-element-button.has-secondary-1-background-color {
  color: var(--wp--preset--color--base);
}

/*
 * CTA hover underline override.
 *
 * The cta-primary / cta-secondary variations declare
 * :hover.typography.textDecoration:"none" in theme.json, but WP 6.9 does not
 * emit that property in a variation's hover ruleset — only color.background
 * comes through. The inherited styles.elements.button:hover underline
 * therefore bleeds into CTAs. Explicit CSS at the variation selector wins
 * the cascade.
 */
.wp-block-button.is-style-cta-primary .wp-block-button__link:hover,
.wp-block-button.is-style-cta-secondary .wp-block-button__link:hover,
.wp-block-button.is-style-cta-outline .wp-block-button__link:hover,
.wp-block-button.is-style-outline .wp-block-button__link:hover {
  text-decoration: none;
}

.wp-block-button.is-style-cta-outline .wp-block-button__link,
.wp-block-button.is-style-outline .wp-block-button__link {
  border-color: var(--wp--preset--color--primary);
  border-radius: 9999px;
  border-style: solid;
  border-width: 1px;
  color: var(--wp--preset--color--primary);
  font-size: var(--wp--preset--font-size--medium);
  font-weight: 700;
  line-height: 1.4;
  padding: 12px 16px;
}

.wp-block-button.is-style-cta-outline .wp-block-button__link:hover,
.wp-block-button.is-style-outline .wp-block-button__link:hover {
  background-color: var(--wp--preset--color--primary-3);
}

:is(
.wp-block-button[data-lfdk-icon-start],
.wp-block-button[data-lfdk-icon-end],
.block-editor-block-list__block.has-lfdk-icon-start,
.block-editor-block-list__block.has-lfdk-icon-end
) .wp-block-button__link {
  align-items: center;
  display: inline-flex;
  gap: 0.5em;
}

:is(
.wp-block-button[data-lfdk-icon-start],
.block-editor-block-list__block.has-lfdk-icon-start
) .wp-block-button__link::before,
:is(
.wp-block-button[data-lfdk-icon-end],
.block-editor-block-list__block.has-lfdk-icon-end
) .wp-block-button__link::after {
  background-color: currentcolor;
  content: "";
  display: inline-block;
  flex-shrink: 0;
  height: 1.15em;
  mask-position: center;
  mask-repeat: no-repeat;
  mask-size: contain;
  width: 1.15em;
  -webkit-mask-position: center;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-size: contain;
}

:is(
.wp-block-button[data-lfdk-icon-start="download"],
.block-editor-block-list__block[data-lfdk-icon-start="download"]
) .wp-block-button__link::before {
  mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 12 12' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11.75 7.375V11.375C11.75 11.4745 11.7105 11.5698 11.6402 11.6402C11.5698 11.7105 11.4745 11.75 11.375 11.75H0.375C0.275544 11.75 0.180161 11.7105 0.109835 11.6402C0.0395088 11.5698 0 11.4745 0 11.375V7.375C0 7.27554 0.0395088 7.18016 0.109835 7.10983C0.180161 7.03951 0.275544 7 0.375 7C0.474456 7 0.569839 7.03951 0.640165 7.10983C0.710491 7.18016 0.75 7.27554 0.75 7.375V11H11V7.375C11 7.27554 11.0395 7.18016 11.1098 7.10983C11.1802 7.03951 11.2755 7 11.375 7C11.4745 7 11.5698 7.03951 11.6402 7.10983C11.7105 7.18016 11.75 7.27554 11.75 7.375ZM5.61 7.64C5.68031 7.71023 5.77562 7.74967 5.875 7.74967C5.97438 7.74967 6.06969 7.71023 6.14 7.64L8.64 5.14C8.70624 5.06891 8.7423 4.97489 8.74059 4.87774C8.73887 4.78059 8.69952 4.6879 8.63081 4.61919C8.5621 4.55048 8.46941 4.51113 8.37226 4.50941C8.27511 4.5077 8.18109 4.54376 8.11 4.61L6.25 6.46937V0.375C6.25 0.275544 6.21049 0.180161 6.14017 0.109835C6.06984 0.0395088 5.97446 0 5.875 0C5.77554 0 5.68016 0.0395088 5.60984 0.109835C5.53951 0.180161 5.5 0.275544 5.5 0.375V6.46937L3.64 4.61C3.56891 4.54376 3.47489 4.5077 3.37774 4.50941C3.28059 4.51113 3.1879 4.55048 3.11919 4.61919C3.05048 4.6879 3.01113 4.78059 3.00941 4.87774C3.0077 4.97489 3.04376 5.06891 3.11 5.14L5.61 7.64Z' fill='black'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 12 12' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11.75 7.375V11.375C11.75 11.4745 11.7105 11.5698 11.6402 11.6402C11.5698 11.7105 11.4745 11.75 11.375 11.75H0.375C0.275544 11.75 0.180161 11.7105 0.109835 11.6402C0.0395088 11.5698 0 11.4745 0 11.375V7.375C0 7.27554 0.0395088 7.18016 0.109835 7.10983C0.180161 7.03951 0.275544 7 0.375 7C0.474456 7 0.569839 7.03951 0.640165 7.10983C0.710491 7.18016 0.75 7.27554 0.75 7.375V11H11V7.375C11 7.27554 11.0395 7.18016 11.1098 7.10983C11.1802 7.03951 11.2755 7 11.375 7C11.4745 7 11.5698 7.03951 11.6402 7.10983C11.7105 7.18016 11.75 7.27554 11.75 7.375ZM5.61 7.64C5.68031 7.71023 5.77562 7.74967 5.875 7.74967C5.97438 7.74967 6.06969 7.71023 6.14 7.64L8.64 5.14C8.70624 5.06891 8.7423 4.97489 8.74059 4.87774C8.73887 4.78059 8.69952 4.6879 8.63081 4.61919C8.5621 4.55048 8.46941 4.51113 8.37226 4.50941C8.27511 4.5077 8.18109 4.54376 8.11 4.61L6.25 6.46937V0.375C6.25 0.275544 6.21049 0.180161 6.14017 0.109835C6.06984 0.0395088 5.97446 0 5.875 0C5.77554 0 5.68016 0.0395088 5.60984 0.109835C5.53951 0.180161 5.5 0.275544 5.5 0.375V6.46937L3.64 4.61C3.56891 4.54376 3.47489 4.5077 3.37774 4.50941C3.28059 4.51113 3.1879 4.55048 3.11919 4.61919C3.05048 4.6879 3.01113 4.78059 3.00941 4.87774C3.0077 4.97489 3.04376 5.06891 3.11 5.14L5.61 7.64Z' fill='black'/%3E%3C/svg%3E");
}

:is(
.wp-block-button[data-lfdk-icon-end="arrow"],
.block-editor-block-list__block[data-lfdk-icon-end="arrow"]
) .wp-block-button__link::after {
  mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M21.0459 12.796L14.2959 19.546C14.0846 19.7573 13.7979 19.8761 13.4991 19.8761C13.2002 19.8761 12.9135 19.7573 12.7022 19.546C12.4908 19.3346 12.3721 19.048 12.3721 18.7491C12.3721 18.4502 12.4908 18.1636 12.7022 17.9522L17.5312 13.125H3.75C3.45163 13.125 3.16548 13.0065 2.9545 12.7955C2.74353 12.5846 2.625 12.2984 2.625 12C2.625 11.7017 2.74353 11.4155 2.9545 11.2045C3.16548 10.9936 3.45163 10.875 3.75 10.875H17.5312L12.7041 6.04504C12.4927 5.8337 12.374 5.54705 12.374 5.24817C12.374 4.94928 12.4927 4.66264 12.7041 4.45129C12.9154 4.23995 13.2021 4.12122 13.5009 4.12122C13.7998 4.12122 14.0865 4.23995 14.2978 4.45129L21.0478 11.2013C21.1527 11.3059 21.2359 11.4303 21.2926 11.5672C21.3493 11.7041 21.3784 11.8508 21.3782 11.999C21.3781 12.1472 21.3486 12.2939 21.2916 12.4307C21.2346 12.5674 21.1511 12.6916 21.0459 12.796Z' fill='black'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M21.0459 12.796L14.2959 19.546C14.0846 19.7573 13.7979 19.8761 13.4991 19.8761C13.2002 19.8761 12.9135 19.7573 12.7022 19.546C12.4908 19.3346 12.3721 19.048 12.3721 18.7491C12.3721 18.4502 12.4908 18.1636 12.7022 17.9522L17.5312 13.125H3.75C3.45163 13.125 3.16548 13.0065 2.9545 12.7955C2.74353 12.5846 2.625 12.2984 2.625 12C2.625 11.7017 2.74353 11.4155 2.9545 11.2045C3.16548 10.9936 3.45163 10.875 3.75 10.875H17.5312L12.7041 6.04504C12.4927 5.8337 12.374 5.54705 12.374 5.24817C12.374 4.94928 12.4927 4.66264 12.7041 4.45129C12.9154 4.23995 13.2021 4.12122 13.5009 4.12122C13.7998 4.12122 14.0865 4.23995 14.2978 4.45129L21.0478 11.2013C21.1527 11.3059 21.2359 11.4303 21.2926 11.5672C21.3493 11.7041 21.3784 11.8508 21.3782 11.999C21.3781 12.1472 21.3486 12.2939 21.2916 12.4307C21.2346 12.5674 21.1511 12.6916 21.0459 12.796Z' fill='black'/%3E%3C/svg%3E");
}

:is(
.wp-block-button[data-lfdk-icon-end="arrow-external"],
.block-editor-block-list__block[data-lfdk-icon-end="arrow-external"]
) .wp-block-button__link::after {
  mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M18.5624 6V15.75C18.5624 15.8992 18.5031 16.0423 18.3976 16.1477C18.2921 16.2532 18.1491 16.3125 17.9999 16.3125C17.8507 16.3125 17.7076 16.2532 17.6021 16.1477C17.4966 16.0423 17.4374 15.8992 17.4374 15.75V7.3575L6.39738 18.3975C6.29075 18.4969 6.14972 18.551 6.00399 18.5484C5.85827 18.5458 5.71923 18.4868 5.61617 18.3837C5.51311 18.2807 5.45407 18.1416 5.4515 17.9959C5.44893 17.8502 5.50302 17.7091 5.60238 17.6025L16.6424 6.5625H8.24988C8.1007 6.5625 7.95763 6.50324 7.85214 6.39775C7.74665 6.29226 7.68738 6.14918 7.68738 6C7.68738 5.85082 7.74665 5.70774 7.85214 5.60225C7.95763 5.49676 8.1007 5.4375 8.24988 5.4375H17.9999C18.1491 5.4375 18.2921 5.49676 18.3976 5.60225C18.5031 5.70774 18.5624 5.85082 18.5624 6Z' fill='black'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M18.5624 6V15.75C18.5624 15.8992 18.5031 16.0423 18.3976 16.1477C18.2921 16.2532 18.1491 16.3125 17.9999 16.3125C17.8507 16.3125 17.7076 16.2532 17.6021 16.1477C17.4966 16.0423 17.4374 15.8992 17.4374 15.75V7.3575L6.39738 18.3975C6.29075 18.4969 6.14972 18.551 6.00399 18.5484C5.85827 18.5458 5.71923 18.4868 5.61617 18.3837C5.51311 18.2807 5.45407 18.1416 5.4515 17.9959C5.44893 17.8502 5.50302 17.7091 5.60238 17.6025L16.6424 6.5625H8.24988C8.1007 6.5625 7.95763 6.50324 7.85214 6.39775C7.74665 6.29226 7.68738 6.14918 7.68738 6C7.68738 5.85082 7.74665 5.70774 7.85214 5.60225C7.95763 5.49676 8.1007 5.4375 8.24988 5.4375H17.9999C18.1491 5.4375 18.2921 5.49676 18.3976 5.60225C18.5031 5.70774 18.5624 5.85082 18.5624 6Z' fill='black'/%3E%3C/svg%3E");
}

.wp-block-button.lfdk-filter-reset .wp-block-button__link.wp-element-button,
.wp-block-button.lfdk-filter-reset .wp-block-button__link.wp-element-button:visited {
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  color: var(--wp--preset--color--contrast-1);
  font: inherit;
  font-size: 18px;
  line-height: inherit;
  min-height: 0;
  padding: 0;
  text-transform: uppercase;
}

.wp-block-button.lfdk-filter-reset .wp-block-button__link.wp-element-button:hover,
.wp-block-button.lfdk-filter-reset .wp-block-button__link.wp-element-button:focus {
  background: transparent;
  color: var(--wp--preset--color--contrast);
  text-decoration: underline;
}
