/* ST Workwear 2.6 – Frontend only.
 * Consistent separation between solid CTAs and adjacent editorial links;
 * readable white links on the brand's dark-blue/photo backgrounds.
 * Orange comes exclusively from --accent; Gutenberg editor is unchanged.
 */

/* A primary CTA followed by an outline/text link needs breathing room.
   Use flex gap so wrapping works without a stray margin on mobile. */
body :is(.st-premium-home,.st-editorial-page) .wp-block-buttons:has(> .wp-block-button:not(.is-style-outline) ~ .wp-block-button.is-style-outline) {
    column-gap: clamp(30px, 3.9vw, 58px) !important;
    row-gap: 16px !important;
    align-items: center;
}
/* Also cover a plain inline link following a Gutenberg button. */
body :is(.st-premium-home,.st-editorial-page) .wp-block-buttons:has(> .wp-block-button + a) {
    column-gap: clamp(30px, 3.9vw, 58px) !important;
    row-gap: 16px !important;
    align-items: center;
}

/* Dark sections – ordinary text links (not filled primary buttons) stay white.
   For hover, retain the white text and animate a subtle accent underline. */
body :is(.st-premium-home,.st-editorial-page) :is(
    .st-gb-contact,
    .st-gb-editorial-copy,
    .st-gb-overlay-text,
    .st-gb-inner-hero,
    .st-gb-banner,
    .st-gb-photo,
    .st-premium-shop-outro,
    .has-navy-background-color,
    .has-blue-background-color,
    .has-dark-background-color,
    .has-background[style*="#1b405f" i],
    .has-background[style*="#367198" i],
    .wp-block-cover:not(.is-light)
) a:not(.wp-block-button__link):not(.st-premium-button):not(.button) {
    color: #fff !important;
    text-decoration-color: var(--accent);
    text-underline-offset: .24em;
}
body :is(.st-premium-home,.st-editorial-page) :is(
    .st-gb-contact,
    .st-gb-editorial-copy,
    .st-gb-overlay-text,
    .st-gb-inner-hero,
    .st-gb-banner,
    .st-gb-photo,
    .st-premium-shop-outro,
    .has-navy-background-color,
    .has-blue-background-color,
    .has-dark-background-color,
    .has-background[style*="#1b405f" i],
    .has-background[style*="#367198" i],
    .wp-block-cover:not(.is-light)
) a:not(.wp-block-button__link):not(.st-premium-button):not(.button):is(:hover,:focus-visible) {
    color: #fff !important;
    text-decoration-color: var(--accent);
}

/* Editor-style outline buttons need exactly the same contrast on blue surfaces. */
body :is(.st-premium-home,.st-editorial-page) :is(
    .st-gb-contact,
    .st-gb-editorial-copy,
    .st-gb-overlay-text,
    .st-gb-inner-hero,
    .st-gb-banner,
    .st-gb-photo,
    .has-navy-background-color,
    .has-blue-background-color,
    .has-dark-background-color,
    .has-background[style*="#1b405f" i],
    .has-background[style*="#367198" i],
    .wp-block-cover:not(.is-light)
) .wp-block-button.is-style-outline > .wp-block-button__link,
body :is(.st-premium-home,.st-editorial-page) :is(
    .st-gb-contact,
    .st-gb-editorial-copy,
    .st-gb-overlay-text,
    .st-gb-inner-hero,
    .st-gb-banner,
    .st-gb-photo,
    .has-navy-background-color,
    .has-blue-background-color,
    .has-dark-background-color,
    .wp-block-cover:not(.is-light)
) .wp-block-button.is-style-outline > .wp-block-button__link:is(:hover,:focus-visible) {
    color: #fff !important;
}
body :is(.st-premium-home,.st-editorial-page) :is(
    .st-gb-contact,
    .st-gb-editorial-copy,
    .st-gb-overlay-text,
    .st-gb-inner-hero,
    .st-gb-banner,
    .st-gb-photo,
    .has-navy-background-color,
    .has-blue-background-color,
    .has-dark-background-color,
    .wp-block-cover:not(.is-light)
) .wp-block-button.is-style-outline > .wp-block-button__link::after {
    background: var(--accent) !important;
}

@media (prefers-reduced-motion: reduce) {
    body :is(.st-premium-home,.st-editorial-page) .wp-block-button__link::after { transition: none !important; }
}


/* 2.6 — Dark/photo cover CTAs: orange background + white text, including hover.
   Never let older Gutenberg or home overrides produce orange-on-navy lettering. */
body :is(.st-premium-home,.st-editorial-page) :is(
  .st-gb-contact,
  .st-gb-banner,
  .st-gb-photo,
  .st-gb-inner-hero,
  .st-gb-overlay-text,
  .has-navy-background-color,
  .has-blue-background-color,
  .has-dark-background-color,
  .has-background[style*="#1b405f" i],
  .has-background[style*="#367198" i],
  .wp-block-cover:not(.is-light)
) .wp-block-button:not(.is-style-outline) > .wp-block-button__link,
body :is(.st-premium-home,.st-editorial-page) :is(
  .st-gb-contact,
  .st-gb-banner,
  .st-gb-photo,
  .st-gb-inner-hero,
  .st-gb-overlay-text,
  .has-navy-background-color,
  .has-blue-background-color,
  .has-dark-background-color,
  .has-background[style*="#1b405f" i],
  .has-background[style*="#367198" i],
  .wp-block-cover:not(.is-light)
) .wp-block-button:not(.is-style-outline) > .wp-block-button__link:is(:hover,:focus-visible) {
  background:var(--accent)!important;
  border-color:var(--accent)!important;
  color:#fff!important;
  text-decoration:none!important;
}
body :is(.st-premium-home,.st-editorial-page) :is(
  .st-gb-contact,.st-gb-banner,.st-gb-photo,.st-gb-inner-hero,
  .st-gb-overlay-text,.has-navy-background-color,.has-blue-background-color,
  .has-dark-background-color,.has-background[style*="#1b405f" i],
  .has-background[style*="#367198" i],.wp-block-cover:not(.is-light)
) .wp-block-button:not(.is-style-outline) > .wp-block-button__link:hover {
  filter:brightness(.93);transform:translateY(-2px);
}
/* Text-style links on dark sections: one WHITE underline; no blue/orange line. */
body :is(.st-premium-home,.st-editorial-page) :is(
  .st-gb-contact,.st-gb-editorial-copy,.st-gb-overlay-text,.st-gb-inner-hero,
  .st-gb-banner,.st-gb-photo,.has-navy-background-color,.has-blue-background-color,
  .has-dark-background-color,.has-background[style*="#1b405f" i],
  .has-background[style*="#367198" i],.wp-block-cover:not(.is-light)
) .wp-block-button.is-style-outline > .wp-block-button__link {
  background:transparent!important;color:#fff!important;
  border-bottom:0!important;text-decoration:none!important;
}
body :is(.st-premium-home,.st-editorial-page) :is(
  .st-gb-contact,.st-gb-editorial-copy,.st-gb-overlay-text,.st-gb-inner-hero,
  .st-gb-banner,.st-gb-photo,.has-navy-background-color,.has-blue-background-color,
  .has-dark-background-color,.has-background[style*="#1b405f" i],
  .has-background[style*="#367198" i],.wp-block-cover:not(.is-light)
) .wp-block-button.is-style-outline > .wp-block-button__link::after {
  background:#fff!important;border-color:#fff!important;
}
body :is(.st-premium-home,.st-editorial-page) :is(
  .st-gb-contact,.st-gb-editorial-copy,.st-gb-overlay-text,.st-gb-inner-hero,
  .st-gb-banner,.st-gb-photo,.has-navy-background-color,.has-blue-background-color,
  .has-dark-background-color,.has-background[style*="#1b405f" i],
  .has-background[style*="#367198" i],.wp-block-cover:not(.is-light)
) a:not(.wp-block-button__link):not(.st-premium-button):not(.button) {
  text-decoration-color:#fff!important;
}
/* Contrast also persists on hover/focus; keyboard focus retains a visible ring. */
body :is(.st-premium-home,.st-editorial-page) :is(
  .st-gb-contact,.st-gb-editorial-copy,.st-gb-overlay-text,.st-gb-inner-hero,
  .st-gb-banner,.st-gb-photo,.has-navy-background-color,.has-blue-background-color,
  .has-dark-background-color,.wp-block-cover:not(.is-light)
) .wp-block-button.is-style-outline > .wp-block-button__link:is(:hover,:focus-visible) {
  color:#fff!important;
}
