/*
 * PlayTVX brand switch: pink/red brand token -> gold.
 *
 * The token itself changes in the ACF site settings (brand_color_red=#e8c35b,
 * brand_color_red_dark=#d4a937), so every var(--color-ptvx-red[-dark]) becomes gold
 * by itself. This file fixes what a token swap cannot: text on gold surfaces
 * (navy, 8.2:1; white on gold is only 1.7:1), pink text on light backgrounds
 * (navy, with underlined links), hardcoded old-red shadow tints and focus rings.
 * Dark sections keep gold text (gold on navy is 8.2:1).
 *
 * Loaded after every parent and child stylesheet. Selectors match the parent's
 * specificity or exceed it; !important only where commerce.css already uses it.
 *
 * Groups: 1 Announcement bar, 2 Buttons, 3 Badges, 4 Links, 5 Text accents,
 *         6 Dark sections, 7 Shadows, 8 Focus.
 */

:root {
	--ptvx-bg-navy: var(--color-ptvx-navy, #023047);
	--ptvx-bg-gold: var(--color-ptvx-red, #e8c35b);
	--ptvx-bg-gold-dark: var(--color-ptvx-red-dark, #d4a937);
	--ptvx-bg-gold-tint: color-mix(in srgb, var(--color-ptvx-red, #e8c35b) 22%, #fff);
}

/* ------------------------------------------------------------------ */
/* 1. Announcement bar: gold surface, navy text and check icons        */
/* ------------------------------------------------------------------ */
body.ptvx-site .ptvx-announcement,
body.ptvx-site .ptvx-announcement a,
body.ptvx-site .ptvx-announcement__item {
	color: var(--ptvx-bg-navy);
}

body.ptvx-site .ptvx-announcement__item i {
	color: var(--ptvx-bg-navy);
}

/* ------------------------------------------------------------------ */
/* 2. Buttons: gold fill, navy text, darker gold on hover              */
/* ------------------------------------------------------------------ */
body.ptvx-site .ptvx-button:not(.ptvx-button--ghost, .ptvx-button--dark) {
	border-color: var(--ptvx-bg-gold);
	background: var(--ptvx-bg-gold);
	color: var(--ptvx-bg-navy);
}

body.ptvx-site .ptvx-button:not(.ptvx-button--ghost, .ptvx-button--dark):hover {
	border-color: var(--ptvx-bg-gold-dark);
	background: var(--ptvx-bg-gold-dark);
	color: var(--ptvx-bg-navy);
}

/* Gold call-to-action band keeps its navy button (gold on gold would vanish). */
body.ptvx-site .ptvx-cta--gold .ptvx-button:not(.ptvx-button--ghost) {
	border-color: var(--ptvx-bg-navy);
	background: var(--ptvx-bg-navy);
	color: #fff;
}

body.ptvx-site .ptvx-cta--gold .ptvx-button:not(.ptvx-button--ghost):hover {
	border-color: #112e54;
	background: #112e54;
	color: #fff;
}

/* Buttons that are really inline text links keep link treatment (group 4). */
body.ptvx-site .ptvx-icon-cards .ptvx-button.ptvx-icon-cards__link,
body.ptvx-site .ptvx-icon-cards .ptvx-button.ptvx-icon-cards__link:hover {
	border: 0;
	background: none;
	color: inherit;
}

/* Card section buttons and chips. */
body.ptvx-site .ptvx-card-section a.ptvx-card-section__link {
	border-color: var(--ptvx-bg-gold-dark);
	color: var(--ptvx-bg-navy);
}

body.ptvx-site .ptvx-card-section a.ptvx-card-section__link:hover,
body.ptvx-site .ptvx-card-section a.ptvx-card-section__link:focus-visible {
	border-color: var(--ptvx-bg-gold);
	background: var(--ptvx-bg-gold);
	color: var(--ptvx-bg-navy);
}

body.ptvx-site .ptvx-card-section a.ptvx-card-section__link--button {
	border-color: var(--ptvx-bg-gold);
	background: var(--ptvx-bg-gold);
	color: var(--ptvx-bg-navy);
}

body.ptvx-site .ptvx-card-section a.ptvx-card-section__link--button:hover,
body.ptvx-site .ptvx-card-section a.ptvx-card-section__link--button:focus-visible {
	border-color: var(--ptvx-bg-gold-dark);
	background: var(--ptvx-bg-gold-dark);
	color: var(--ptvx-bg-navy);
}

/* WooCommerce and WooCommerce Blocks buttons (parent commerce.css uses !important). */
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.wc-block-components-button:not(.is-link) {
	border-color: var(--ptvx-bg-gold) !important;
	background: var(--ptvx-bg-gold) !important;
	color: var(--ptvx-bg-navy) !important;
}

.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover,
.wc-block-components-button:not(.is-link):hover {
	border-color: var(--ptvx-bg-gold-dark) !important;
	background: var(--ptvx-bg-gold-dark) !important;
	color: var(--ptvx-bg-navy) !important;
}

/* Gutenberg buttons (theme.json button element uses the highlight preset + white text). */
body.ptvx-site .wp-block-button:not(.is-style-outline, .is-style-ptvx-dark) > .wp-block-button__link:not(.has-background, .has-text-color),
body.ptvx-site .wp-element-button:not(.has-background, .has-text-color) {
	border-color: var(--ptvx-bg-gold);
	background: var(--ptvx-bg-gold);
	color: var(--ptvx-bg-navy);
}

body.ptvx-site .wp-block-button:not(.is-style-outline, .is-style-ptvx-dark) > .wp-block-button__link:not(.has-background, .has-text-color):hover,
body.ptvx-site .wp-element-button:not(.has-background, .has-text-color):hover {
	border-color: var(--ptvx-bg-gold-dark);
	background: var(--ptvx-bg-gold-dark);
	color: var(--ptvx-bg-navy);
}

body.ptvx-site .wp-block-button.is-style-outline > .wp-block-button__link:not(.has-text-color) {
	border-color: var(--ptvx-bg-navy);
	color: var(--ptvx-bg-navy);
}

body.ptvx-site .wp-block-button.is-style-outline > .wp-block-button__link:not(.has-text-color):hover {
	border-color: var(--ptvx-bg-gold);
	background: var(--ptvx-bg-gold);
	color: var(--ptvx-bg-navy);
}

/* Pagination current/hover. */
.ptvx-pagination .page-numbers.current,
.ptvx-pagination a.page-numbers:hover,
.ptvx-page-links .post-page-numbers.current,
.ptvx-page-links a.post-page-numbers:hover {
	border-color: var(--ptvx-bg-gold);
	background: var(--ptvx-bg-gold);
	color: var(--ptvx-bg-navy);
}

/* ------------------------------------------------------------------ */
/* 3. Badges: gold fill, navy text                                     */
/* ------------------------------------------------------------------ */
body.ptvx-site .ptvx-plan__badge,
body.ptvx-site .ptvx-plan__saving,
body.ptvx-site .ptvx-card-section__badge,
body.ptvx-site .ptvx-card-section__pill,
body.ptvx-site .ptvx-card-section__label,
body.ptvx-site .ptvx-card-section--plan_fit .ptvx-card-section__item.is-highlighted .ptvx-card-section__label,
body.ptvx-site .ptvx-card-section__strip-items li {
	background: var(--ptvx-bg-gold);
	color: var(--ptvx-bg-navy);
}

/* Timeline/criteria lists use plain text items; keep them transparent. */
body.ptvx-site .ptvx-card-section--timeline .ptvx-card-section__strip-items li,
body.ptvx-site .ptvx-card-section--criteria .ptvx-card-section__strip-items li {
	background: none;
	color: var(--color-ptvx-ink, #34445a);
}

/* Timeline numbers: gold disc with navy numeral. */
body.ptvx-site .ptvx-card-section--timeline .ptvx-card-section__num {
	background: var(--ptvx-bg-gold);
	color: var(--ptvx-bg-navy);
}

/* Blog category pill. */
.ptvx-blog-card__category:hover {
	background: var(--ptvx-bg-gold);
	color: var(--ptvx-bg-navy);
}

/* Highlighted plan card and card-section highlight rings. */
.ptvx-plan--highlighted {
	border-color: var(--ptvx-bg-gold);
}

.ptvx-card-section--plan_fit .ptvx-card-section__item.is-highlighted .ptvx-card-section__card {
	border-color: var(--ptvx-bg-gold-dark);
	box-shadow: 0 0 0 2px var(--ptvx-bg-gold-dark), 0 14px 32px rgb(8 23 44 / 12%);
}

/* Icon tiles: light gold tint, navy glyph. */
.ptvx-icon-cards__icon,
.ptvx-card-section__icon {
	background: var(--ptvx-bg-gold-tint);
	color: var(--ptvx-bg-navy);
}

/* Decorative dots, rings and rules. */
.ptvx-split__feature::before {
	background: var(--ptvx-bg-gold);
}

.ptvx-trial-offer__step::before {
	border-color: var(--ptvx-bg-gold);
}

.ptvx-article-content blockquote {
	border-left-color: var(--ptvx-bg-gold);
}

/* ------------------------------------------------------------------ */
/* 4. Links on light backgrounds: navy, bold, underlined               */
/* ------------------------------------------------------------------ */
body.ptvx-site .ptvx-rich-text a,
body.ptvx-site .ptvx-article-content :where(a:not(.ptvx-button)),
body.ptvx-site .entry-content :is(p, li, td, figcaption, blockquote) a:not(.wp-block-button__link, .wp-element-button),
body.ptvx-site .ptvx-trial-offer__note a,
body.ptvx-site .ptvx-card-section__answer a,
body.ptvx-site .ptvx-device-guides__link,
body.ptvx-site .ptvx-resource-card:not(.ptvx-resource-card--offer) > a,
body.ptvx-site .ptvx-related-posts__header > a,
body.ptvx-site .ptvx-blog-card__read-more,
body.ptvx-site .ptvx-post-card__read-more,
body.ptvx-site .ptvx-icon-cards .ptvx-icon-cards__link {
	color: var(--ptvx-bg-navy);
	font-weight: 600;
	text-decoration: underline;
	text-decoration-thickness: 1.5px;
	text-underline-offset: 3px;
}

body.ptvx-site .ptvx-device-guides__link,
body.ptvx-site .ptvx-resource-card:not(.ptvx-resource-card--offer) > a,
body.ptvx-site .ptvx-icon-cards .ptvx-icon-cards__link {
	font-weight: 700;
}

body.ptvx-site .ptvx-rich-text a:hover,
body.ptvx-site .ptvx-article-content :where(a:not(.ptvx-button)):hover,
body.ptvx-site .entry-content :is(p, li, td, figcaption, blockquote) a:not(.wp-block-button__link, .wp-element-button):hover,
body.ptvx-site .ptvx-trial-offer__note a:hover,
body.ptvx-site .ptvx-card-section__answer a:hover,
body.ptvx-site .ptvx-device-guides__link:hover,
body.ptvx-site .ptvx-resource-card:not(.ptvx-resource-card--offer) > a:hover,
body.ptvx-site .ptvx-related-posts__header > a:hover,
body.ptvx-site .ptvx-blog-card__read-more:hover,
body.ptvx-site .ptvx-post-card__read-more:hover,
body.ptvx-site .ptvx-icon-cards .ptvx-icon-cards__link:hover {
	color: var(--ptvx-bg-navy);
	text-decoration-color: var(--ptvx-bg-gold-dark);
	text-decoration-thickness: 3px;
}

/* Arrow glyphs inside those links follow the link colour. */
body.ptvx-site .ptvx-device-guides__link span,
body.ptvx-site .ptvx-icon-cards__link-wrap {
	color: var(--ptvx-bg-navy);
}

/* Hover-only pink links: navy with an underline. */
body.ptvx-site .ptvx-blog-card__title a:hover,
body.ptvx-site .ptvx-post-card__title a:hover,
.ptvx-breadcrumb a:hover,
body.ptvx-site .wp-block-post-title a:hover {
	color: var(--ptvx-bg-navy);
	text-decoration: underline;
	text-decoration-color: var(--ptvx-bg-gold-dark);
	text-decoration-thickness: 2px;
	text-underline-offset: 3px;
}

.ptvx-filter-nav__link:hover {
	border-color: var(--ptvx-bg-gold-dark);
	background: var(--ptvx-bg-gold-tint);
	color: var(--ptvx-bg-navy);
}

.ptvx-post-navigation a:hover {
	border-color: var(--ptvx-bg-gold-dark);
}

/* ------------------------------------------------------------------ */
/* 5. Text accents formerly pink: navy, no underline                   */
/* ------------------------------------------------------------------ */
body.ptvx-site .ptvx-eyebrow:not(.ptvx-eyebrow--inverse),
body.ptvx-site p.is-style-ptvx-eyebrow,
body.ptvx-site .ptvx-blog-card__category,
body.ptvx-site .ptvx-stat-row:not(.ptvx-stat-row--hero) .ptvx-stat-row__value,
body.ptvx-site .ptvx-faq__question::after,
body.ptvx-site .ptvx-plan__name,
body.ptvx-site .ptvx-plan__you-save,
body.ptvx-site .ptvx-plans__monthly-nudge,
body.ptvx-site .ptvx-steps li::before,
body.ptvx-site .ptvx-trial-offer__price,
body.ptvx-site .ptvx-trial-offer__time,
body.ptvx-site .ptvx-key-facts__row dd > span {
	color: var(--ptvx-bg-navy);
}

.ptvx-article-content li::marker {
	color: var(--ptvx-bg-navy);
}

/* ------------------------------------------------------------------ */
/* 6. Dark sections: gold text stays gold (gold on navy is 8.2:1)      */
/* ------------------------------------------------------------------ */
body.ptvx-site .ptvx-eyebrow--inverse,
body.ptvx-site .ptvx-hero .ptvx-eyebrow,
body.ptvx-site .ptvx-article-hero .ptvx-eyebrow,
body.ptvx-site .ptvx-cta--navy .ptvx-eyebrow,
body.ptvx-site .ptvx-image-cta .ptvx-eyebrow,
body.ptvx-site .ptvx-resource-card--offer .ptvx-eyebrow,
body.ptvx-site .ptvx-footer .ptvx-eyebrow {
	color: var(--ptvx-bg-gold);
}

/* Chat-proof dark section keeps its light-gold eyebrow and stat values. */
body.ptvx-site .ptvx-chat-proof--dark .ptvx-eyebrow,
body.ptvx-site .ptvx-chat-proof--dark .ptvx-stat-row .ptvx-stat-row__value {
	color: var(--color-ptvx-gold-light, #f4e3bc);
}

/* ------------------------------------------------------------------ */
/* 7. Shadows: old red tints -> gold                                   */
/* ------------------------------------------------------------------ */
body.ptvx-site .ptvx-button:not(.ptvx-button--ghost, .ptvx-button--dark) {
	box-shadow: 0 9px 22px rgb(232 195 91 / 18%);
}

body.ptvx-site .ptvx-button:not(.ptvx-button--ghost, .ptvx-button--dark):hover {
	box-shadow: 0 12px 28px rgb(232 195 91 / 30%);
}

.ptvx-plan--highlighted {
	box-shadow: 0 24px 56px rgb(232 195 91 / 16%);
}

.ptvx-not-found__background {
	background: radial-gradient(circle at 50% 25%, rgb(232 195 91 / 22%), transparent 28%), radial-gradient(circle at 15% 90%, rgb(232 195 91 / 20%), transparent 28%);
}

/* ------------------------------------------------------------------ */
/* 8. Focus: the global gold ring vanishes on gold buttons             */
/* ------------------------------------------------------------------ */
body.ptvx-site .ptvx-button:focus-visible,
body.ptvx-site .wp-block-button__link:focus-visible,
body.ptvx-site .wp-element-button:focus-visible,
body.ptvx-site .ptvx-card-section a.ptvx-card-section__link--button:focus-visible,
.woocommerce a.button:focus-visible,
.woocommerce button.button:focus-visible,
.wc-block-components-button:focus-visible {
	outline: 3px solid var(--ptvx-bg-navy);
	outline-offset: 3px;
}

/* On navy surfaces a navy ring would disappear, so use white there. */
body.ptvx-site .ptvx-header .ptvx-button:focus-visible,
body.ptvx-site .ptvx-footer .ptvx-button:focus-visible,
body.ptvx-site .ptvx-hero .ptvx-button:focus-visible,
body.ptvx-site .ptvx-article-hero .ptvx-button:focus-visible,
body.ptvx-site .ptvx-cta--navy .ptvx-button:focus-visible,
body.ptvx-site .ptvx-image-cta .ptvx-button:focus-visible,
body.ptvx-site .ptvx-resource-card--offer .ptvx-button:focus-visible {
	outline-color: #fff;
}
