/* TSD QA fixes (site-wide, loaded after style.css). Owned by the page-by-page QA pass.
   Each block says what it fixes. Header/nav/home/gym-page styles live elsewhere. */

/* 1. Builder rows like "1fr 10fr 1fr": the empty side columns used to be hidden, so the content column fell into the
      first 1fr track and showed as a thin vertical strip (e.g. "5-STAR RATED ON GOOGLE" stacked letter by letter). */
@media (min-width: 900px) {
	.wp-block-post-content .tt-row--cols > .tt-col:empty { display: block !important; visibility: hidden; }
}

/* 2. Full-width "block" buttons added their padding on top of width:100% and pushed the page sideways (SIGN UP NOW). */
.tt-btn--block { box-sizing: border-box; max-width: 100%; justify-content: center; text-align: center; }
.tt-btn { max-width: 100%; }

/* 3. Announcement bar: white on gold was 1.7:1. Dark text on gold is 10.9:1. */
#tsd-topbar { color: #111 !important; }
#tsd-topbar .tsd-topbar__msg a { color: #111 !important; text-decoration: underline; }
#tsd-topbar .tsd-topbar__btn { background: #111 !important; color: #ffb81c !important; padding: 6px 12px !important; min-height: 32px; box-sizing: border-box; }
#tsd-topbar .tsd-topbar__btn:hover, #tsd-topbar .tsd-topbar__btn:focus-visible { background: #000 !important; color: #fff !important; opacity: 1; }
#tsd-topbar .tsd-topbar__close { min-width: 32px; min-height: 32px; }
#tsd-topbar .tsd-topbar__msg, #tsd-topbar .tsd-topbar__btn { line-height: 1.3; }

/* 4. Gold text on white/light sections (inline colour from the old builder) was 1.7:1. A deeper gold passes AA (5.2:1).
      On dark sections the bright gold stays. Elements that have their own background (buttons) are left alone. */
.wp-block-post-content [style*="#ffb81c" i]:not([style*="background"]),
.wp-block-post-content [style*="255, 184, 28"]:not([style*="background"]),
.wp-block-post-content [style*="255,184,28"]:not([style*="background"]) { color: #946200 !important; }
.tt-scheme-dark [style*="#ffb81c" i]:not([style*="background"]), .tt-scheme-dark [style*="255, 184, 28"]:not([style*="background"]),
.tt-hero [style*="#ffb81c" i]:not([style*="background"]), .tt-hero [style*="255, 184, 28"]:not([style*="background"]),
.has-bg [style*="#ffb81c" i]:not([style*="background"]), .has-bg [style*="255, 184, 28"]:not([style*="background"]),
.has-black-background-color [style*="#ffb81c" i], .has-charcoal-background-color [style*="#ffb81c" i],
.tt-hero__kicker [style*="color"], .tt-hero__sub [style*="color"] { color: #ffb81c !important; }

/* 4b. "Back to menu" / shortcode buttons (Shortcodes Ultimate look): white 10px text on gold was 1.7:1 and too small to tap. */
.su-button, a.su-button { display: inline-flex !important; align-items: center; min-height: 40px; color: #111 !important; }
.su-button span, a.su-button span { color: #111 !important; font-size: 13px !important; font-weight: 700; padding: 8px 14px !important; }
.su-button[style*="background-color:#ffb81c" i] { color: #111 !important; }

/* 4c. WooCommerce "Sale!" badge: white on olive was 3.4:1. Brand red is 7:1. */
.woocommerce span.onsale, span.onsale, .onsale { background: #b30000 !important; color: #fff !important; }

/* 5. Keyboard focus: gold ring is invisible on white. Dark ring on light areas, gold on dark areas. */
.tt-main :focus-visible, .wp-block-post-content :focus-visible { outline: 3px solid #111; outline-offset: 3px; }
.tt-scheme-dark :focus-visible, .tt-hero :focus-visible, .tt-site-header :focus-visible, .tt-site-footer :focus-visible,
.has-black-background-color :focus-visible { outline-color: #ffb81c; }

/* 6. Post meta strip (category / date / author): tiny 7px "By", author name wrapped into three lines on phones. */
.tt-postmeta { padding-bottom: .5rem; }
.tt-postmeta > .wp-block-group { align-items: center; row-gap: .35rem; column-gap: 1.1rem; }
.tt-postmeta .wp-block-post-author { flex: 0 0 auto; }
.tt-postmeta .wp-block-post-author__content { display: flex; gap: .3em; align-items: baseline; white-space: nowrap; }
.tt-postmeta .wp-block-post-author__byline { font-size: inherit !important; opacity: .75; margin: 0; }
.tt-postmeta .wp-block-post-author__name { margin: 0; }
.tt-postmeta .wp-block-post-date { color: #555; }
.tt-postmeta .taxonomy-category a { font-weight: 700; text-decoration: none; text-transform: uppercase; letter-spacing: .04em; font-size: .78rem; }

/* 7. "Browse topics" / tag cloud at the foot of every post: finger-sized targets, calmer look. */
.tt-tagcloud { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: 1rem; }
.tt-tagcloud a { display: inline-flex; align-items: center; min-height: 36px; padding: .15rem .75rem; border: 1px solid #ddd; border-radius: 999px; text-decoration: none; opacity: 1; font-size: .85rem !important; color: #222; }
.tt-tagcloud a:hover { border-color: #ffb81c; background: #ffb81c; color: #000; text-decoration: none; }
.tt-topics a { min-height: 36px; display: inline-flex; align-items: center; }

/* 8. Footer links: 44px-ish tap targets on touch screens without changing the desktop look. */
@media (pointer: coarse), (max-width: 782px) {
	.tt-site-footer a { display: inline-block; padding-block: .35rem; }
	.tt-footer__topics a { padding-block: .45rem; }
}

/* 9. Images from old content: never overflow, keep aspect ratio, no layout jump. */
.wp-block-post-content img, .tt-fig img { max-width: 100%; height: auto; }
.wp-block-post-content figure { max-width: 100%; }
.tt-img-failed { display: none !important; }
.tt-item.tt-image:empty, .tt-fig:empty, .tt-item.tt-image:has(> .tt-fig:empty) { display: none; }

/* 10. Tables in old content: scroll inside their own box instead of widening the page. */
.tt-tablewrap { overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; margin-block: 1.25rem; }
.tt-tablewrap table { margin: 0; min-width: 100%; }
.tt-tablewrap:focus-visible { outline: 3px solid #111; }

/* 11. Embedded videos: always responsive. */
.wp-block-post-content iframe[src*="vimeo"], .wp-block-post-content iframe[src*="youtube"], .wp-block-post-content iframe[src*="youtu.be"] { max-width: 100%; }

/* 12. Reduced motion: respect the visitor's setting for the old reveal/parallax effects. */
@media (prefers-reduced-motion: reduce) {
	.tt-reveal, [class*="is-style-tt-reveal"] { opacity: 1 !important; transform: none !important; transition: none !important; }
	html { scroll-behavior: auto !important; }
}

/* 13. Dark card inside a light section (e.g. About > Core Values): headings stayed near-black on the dark photo and
       could not be read. Nested colour schemes now follow the innermost box. */
.tt-scheme-light .tt-scheme-dark { color: #fff; }
.tt-scheme-light .tt-scheme-dark :is(h1,h2,h3,h4,h5,h6) { color: #fff; }
.tt-scheme-light .tt-scheme-dark a:not(.tt-btn) { color: var(--tt-gold, #ffb81c); }
.tt-scheme-dark .tt-scheme-light { color: var(--wp--preset--color--ink, #191818); }
.tt-scheme-dark .tt-scheme-light :is(h1,h2,h3,h4,h5,h6) { color: var(--wp--preset--color--ink, #191818); }
.tt-scheme-dark .tt-scheme-light a:not(.tt-btn) { color: var(--wp--preset--color--red-deep, #b30000); }
/* ...but a see-through "light" box sitting on a dark photo (Contact page info card) is really dark. */
.tt-scheme-dark .tt-scheme-light[style*="--tt-bg-col:transparent"] { color: #fff; }
.tt-scheme-dark .tt-scheme-light[style*="--tt-bg-col:transparent"] :is(h1,h2,h3,h4,h5,h6) { color: #fff; }
.tt-scheme-dark .tt-scheme-light[style*="--tt-bg-col:transparent"] a:not(.tt-btn) { color: var(--tt-gold, #ffb81c); }

/* 14. Contact page: the form card was 60% white over a dark photo (muddy grey). Solid white card, dark photo overlay. */
.tt-box.tt-scheme-light.has-bgcol:has(.tt-form) { --tt-bg-op: .97 !important; border-radius: 10px; box-shadow: 0 10px 40px rgba(0,0,0,.35); }
.tt-box.tt-scheme-light.has-bgcol:has(.tt-form) input[type="text"], .tt-box.tt-scheme-light.has-bgcol:has(.tt-form) input[type="email"], .tt-box.tt-scheme-light.has-bgcol:has(.tt-form) input[type="tel"], .tt-box.tt-scheme-light.has-bgcol:has(.tt-form) textarea { background: #fff; }
.tt-form .wpcf7-not-valid-tip { color: #b30000; font-size: .85rem; text-transform: none; letter-spacing: 0; font-weight: 600; margin-top: .25rem; }
.tt-form .wpcf7-response-output { margin: 1rem 0 0; padding: .75rem 1rem; border-radius: 6px; }

/* 15. Call-to-action card that replaces the empty "Advertisement" slot on /blog/. */
.tt-qa-promo { text-align: center; padding: 1.5rem 1rem; }
.tt-qa-promo__k { margin: 0 0 .25rem; font-family: var(--wp--preset--font-family--heading); font-weight: 800; text-transform: uppercase; letter-spacing: .08em; font-size: .8rem; color: #946200; }
.tt-qa-promo__t { margin: 0 0 1rem; font-size: 1.1rem; font-weight: 600; line-height: 1.35; }

/* 16. Builder boxes carry desktop-sized inline padding (80px) and negative side margins (-60px) to overlap photos.
       On phones that squeezed the text into a ~190px strip and pushed the page 10-20px sideways (CCW instructor bios). */
@media (max-width: 800px) {
	.wp-block-post-content .tt-box[style*="padding"] { padding: clamp(1rem, 5vw, 1.75rem) !important; }
	.wp-block-post-content .tt-box[style*="margin-left"], .wp-block-post-content .tt-box[style*="margin-right"] { margin-left: 0 !important; margin-right: 0 !important; }
	.wp-block-post-content .tt-box[style*="margin-top"] { margin-top: 1rem !important; }
	.wp-block-post-content .tt-box[style*="margin-bottom"] { margin-bottom: 1rem !important; }
}

/* 17. Shortcode buttons/labels from the old Shortcodes Ultimate content (TSD Essentials shims): contrast. */
.wp-block-post-content .tsd-btn, .wp-block-post-content .tsd-btn--solid { background: #ffb81c; color: #111; border-color: #ffb81c; }
.wp-block-post-content .tsd-btn:hover, .wp-block-post-content .tsd-btn:focus-visible { background: #111; color: #ffb81c; border-color: #111; }
.tt-scheme-dark .tsd-btn { background: transparent; color: #ffb81c; }
.tt-scheme-dark .tsd-btn:hover { background: #ffb81c; color: #111; }
.su-label-type-warning { color: #111 !important; }
.su-label-type-success { background: #2f7a2a !important; }
.su-label-type-info { background: #2b6ca3 !important; }
.su-label-type-important { background: #b3231d !important; }

/* 18. Things that were a few pixels too wide for the screen and made phones scroll sideways:
       dividers set to 120% width by the old builder, and the comment form's text box (padding added to 100% width). */
.tt-divider { max-width: 100%; box-sizing: border-box; }
textarea, input[type="text"], input[type="email"], input[type="url"], input[type="tel"], input[type="search"], select { max-width: 100%; box-sizing: border-box; }
.comment-form textarea, .wp-block-post-comments-form textarea { width: 100%; }
html, body { overflow-x: clip; }


/* ===== 1.0.21 ===== */

/* "Explore our programs" strip above the footer of program pages (internal links + way back to Start Here). */
.tsd-programs { background: #f4f1ea; border-top: 1px solid var(--tt-line, #e3ddd0); padding: clamp(1.75rem, 4vw, 2.75rem) 1rem; }
.tsd-programs__in { max-width: 1100px; margin: 0 auto; text-align: center; }
.tsd-programs__k { margin: 0 0 .25rem; font-family: var(--wp--preset--font-family--heading); font-weight: 800; text-transform: uppercase; letter-spacing: .08em; font-size: .8rem; color: #946200; }
.tsd-programs__h { margin: 0 0 1.1rem; font-size: clamp(1.25rem, 2.6vw, 1.75rem); line-height: 1.2; }
.tsd-programs__list { display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem; margin: 0 0 1.1rem; padding: 0; list-style: none; }
.tsd-programs__list a { display: inline-block; padding: .65rem 1.1rem; border: 2px solid #111; border-radius: 999px; background: #fff; color: #111; font-family: var(--wp--preset--font-family--heading); font-weight: 700; font-size: .85rem; letter-spacing: .04em; text-decoration: none; }
.tsd-programs__list a:hover { background: #111; color: #ffb81c; }
.tsd-programs__list a:focus-visible, .tsd-programs__start:focus-visible { outline: 3px solid #111; outline-offset: 3px; }
.tsd-programs__start { display: inline-block; font-family: var(--wp--preset--font-family--heading); font-weight: 800; font-size: .9rem; letter-spacing: .08em; text-transform: uppercase; color: #8f0000; text-decoration: underline; text-underline-offset: 4px; }
.tsd-programs__start:hover { color: #111; }

/* Workshop pages: when the dashed placeholder slots are switched off (public live site) don't leave an empty list behind. */
.ws-photos:empty, .ws-quotes:empty { display: none; }

/* Check boxes and radio buttons now sit inside a <label>: keep the old look and a comfortable tap area. */
.wpcf7-list-item > label { display: inline-flex; align-items: center; gap: .5rem; cursor: pointer; min-height: 2rem; }
.wpcf7-list-item > label input { margin: 0; }

/* Keyboard focus that is visible on every link, button and field (some old builder styles removed the outline). */
.wp-block-post-content a:focus-visible, .wp-block-post-content button:focus-visible,
.wp-block-post-content input:focus-visible, .wp-block-post-content select:focus-visible, .wp-block-post-content textarea:focus-visible {
	outline: 3px solid #111; outline-offset: 2px; box-shadow: 0 0 0 5px #ffb81c;
}
.tt-scheme-dark a:focus-visible, .tt-footer a:focus-visible { outline-color: #ffb81c; box-shadow: none; }

/* ===== 1.0.25 ===== */

/* FAQ / accordion titles (Shortcodes Ultimate look-alike) were gold on a light grey box: contrast 1.5:1, hard to read.
   Dark text on light boxes; the gold stays on dark sections. */
body .su-spoiler > .su-spoiler-title { color: #111 !important; }
body .tt-scheme-dark .su-spoiler > .su-spoiler-title, body .has-black-background-color .su-spoiler > .su-spoiler-title,
body .su-spoiler-style-simple > .su-spoiler-title { color: #111 !important; }
body .tt-scheme-dark .su-spoiler-style-simple > .su-spoiler-title { color: #ffb81c !important; }

/* Small links in running text and share/breadcrumb rows: at least 24px tall to tap (WCAG 2.2 target size). */
.tt-share a, .woocommerce-breadcrumb a, .tsd-programs__start { display: inline-block; min-height: 24px; line-height: 24px; }
.tt-share a { padding-inline: .15rem; }


/* "Previous / Next" label under blog posts: a shade darker so it passes 4.5:1 on white. */
.tt-postnav__in small { color: #8f1d1d; opacity: 1; }
