/*
Theme Name: TitanUC Divi Child
Theme URI: https://titanuc.com
Template: Divi
Author: TitanUC
Author URI: https://titanuc.com
Description: Divi child theme for TitanUC. Holds server-side accessibility filters and custom CSS overrides.
Version: 5.4.1.1778317133
Updated: 2026-05-09 07:58:04
*/

/* ======================================================================
   TitanUC accessibility (WCAG 2.1 AA) overrides
   Selectors below use body.titanuc-a11y-enhanced for higher specificity
   so they win against Divi's compiled CSS bundle that loads after this
   stylesheet.
   ====================================================================== */

/* 1. Skip-to-content link (WCAG 2.4.1). */
body.titanuc-a11y-enhanced .titanuc-skip-link,
body.titanuc-a11y-enhanced a.titanuc-skip-link {
    position: absolute;
    top: -100px;
    left: 0;
    background: #1f1f1f;
    color: #ffffff !important;
    padding: 12px 18px;
    z-index: 100000;
    text-decoration: underline;
    font-weight: 700;
    font-size: 16px;
    border: 2px solid #ffbf00;
    border-radius: 0 0 4px 0;
}
body.titanuc-a11y-enhanced .titanuc-skip-link:focus,
body.titanuc-a11y-enhanced .titanuc-skip-link:focus-visible {
    top: 0;
    outline: 3px solid #ffbf00;
    outline-offset: 2px;
}
body.titanuc-a11y-enhanced .titanuc-skip-target {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

/* 2. Cart count contrast: brand teal (#83c5be) on white was 1.96:1.
   Bump to #1f5854 (~7.2:1, AAA-grade) using a high-specificity selector. */
body.titanuc-a11y-enhanced .et_pb_menu__cart-count,
body.titanuc-a11y-enhanced span.et_pb_menu__cart-count,
body.titanuc-a11y-enhanced .et_pb_menu .et_pb_menu__cart-count,
body.titanuc-a11y-enhanced .woocommerce-cart-count,
body.titanuc-a11y-enhanced a.cart-contents .count {
    color: #1f5854 !important;
}

/* 3. Visible focus indicators (WCAG 2.4.7).
   Keyboard-only via :focus-visible so mouse users keep their existing UX. */
body.titanuc-a11y-enhanced a:focus-visible,
body.titanuc-a11y-enhanced button:focus-visible,
body.titanuc-a11y-enhanced input:focus-visible,
body.titanuc-a11y-enhanced select:focus-visible,
body.titanuc-a11y-enhanced textarea:focus-visible,
body.titanuc-a11y-enhanced summary:focus-visible,
body.titanuc-a11y-enhanced [role="button"]:focus-visible,
body.titanuc-a11y-enhanced [tabindex]:focus-visible,
body.titanuc-a11y-enhanced .et_pb_button:focus-visible,
body.titanuc-a11y-enhanced .et_pb_menu li a:focus-visible {
    outline: 3px solid #ffbf00 !important;
    outline-offset: 2px !important;
    box-shadow: 0 0 0 2px #1f1f1f !important;
}

body.titanuc-a11y-enhanced .et_pb_section[class*="section_dark"] a:focus-visible,
body.titanuc-a11y-enhanced .et_pb_section[class*="section_dark"] button:focus-visible,
body.titanuc-a11y-enhanced .et_pb_menu__menu a:focus-visible {
    outline-color: #ffd84d !important;
    box-shadow: 0 0 0 2px #ffffff !important;
}

/* 4. Reduced motion (WCAG 2.3.3 + 2.2.2). */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* 5. Visually hidden helper. */
.titanuc-sr-only,
.screen-reader-text {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0,0,0,0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}


/* 6. WooCommerce shop page contrast fixes (WCAG AA).
   The default WC theme blue (#4a90e2) on white = 3.0:1. Bumped to a
   darker blue (#1f5196 ≈ 4.6:1) for price labels, sale badges,
   subscription details, and the result count. */
body.titanuc-a11y-enhanced .woocommerce-result-count {
    color: #595959 !important;
}
body.titanuc-a11y-enhanced .woocommerce ul.products li.product .price,
body.titanuc-a11y-enhanced .woocommerce ul.products li.product .price ins,
body.titanuc-a11y-enhanced .woocommerce ul.products li.product .price bdi,
body.titanuc-a11y-enhanced .woocommerce ul.products li.product .price .woocommerce-Price-amount,
body.titanuc-a11y-enhanced .woocommerce ul.products li.product .price .woocommerce-Price-currencySymbol,
body.titanuc-a11y-enhanced .woocommerce ul.products li.product .subscription-details,
body.titanuc-a11y-enhanced .woocommerce-Price-amount,
body.titanuc-a11y-enhanced .woocommerce span.amount,
body.titanuc-a11y-enhanced .woocommerce-Price-currencySymbol,
body.titanuc-a11y-enhanced .subscription-details {
    color: #1f5196 !important;
}
/* Old (struck) prices */
body.titanuc-a11y-enhanced .woocommerce ul.products li.product .price del,
body.titanuc-a11y-enhanced .woocommerce ul.products li.product .price del bdi,
body.titanuc-a11y-enhanced .woocommerce ul.products li.product .price del .woocommerce-Price-amount {
    color: #595959 !important;
}
/* Sale badge: white on #ef8f61 was 3.0:1. Darken background to #c2410c (white on this = 4.65:1). */
body.titanuc-a11y-enhanced .woocommerce span.onsale,
body.titanuc-a11y-enhanced ul.products li.product .onsale {
    background-color: #c2410c !important;
    color: #ffffff !important;
}


/* 6b. Strikethrough old price: Divi adds opacity:0.5 to <del> which fails contrast.
   Force full opacity and a dark gray color so the struck price reads >= 4.5:1. */
body.titanuc-a11y-enhanced .woocommerce ul.products li.product .price del,
body.titanuc-a11y-enhanced .woocommerce ul.products li.product .price del *,
body.titanuc-a11y-enhanced .woocommerce-Price-amount del,
body.titanuc-a11y-enhanced del.woocommerce-Price-amount,
body.titanuc-a11y-enhanced del bdi,
body.titanuc-a11y-enhanced del .woocommerce-Price-amount,
body.titanuc-a11y-enhanced del .woocommerce-Price-currencySymbol {
    color: #000000 !important;
    opacity: 1 !important;
    filter: none !important;
}


/* 7. Divi buttons that use the brand teal (#83c5be) background must NOT have
   white text on them — 1.96:1 fails AA. Buttons inside the brand-teal
   sections are darkened to #1f5854 background for white text (7.2:1, AAA). */
body.titanuc-a11y-enhanced .et_pb_button.et_pb_bg_layout_light[style*="background-color: #83c5be"],
body.titanuc-a11y-enhanced .et_pb_button[style*="background:#83c5be"],
body.titanuc-a11y-enhanced a.et_pb_button[style*="#83c5be"] {
    background-color: #1f5854 !important;
    color: #ffffff !important;
    border-color: #1f5854 !important;
}
/* Catch buttons whose colors come from class-based Divi presets too. */
body.titanuc-a11y-enhanced .et_pb_button_1 {
    background-color: #1f5854 !important;
    color: #ffffff !important;
    border-color: #1f5854 !important;
}


/* 8. Catch every Divi button preset that inherits the brand teal background
   (any et_pb_button with the et_pb_bg_layout_light combination uses the
   teal in this site's preset chain). Force a dark teal background so the
   white text reads at AAA contrast. */
body.titanuc-a11y-enhanced .et_pb_button.et_pb_bg_layout_light,
body.titanuc-a11y-enhanced [class*="et_pb_button_"].et_pb_bg_layout_light {
    background-color: #1f5854 !important;
    color: #ffffff !important;
    border-color: #1f5854 !important;
}

/* 9. Links inside post content must be visually distinct from surrounding
   text. Divi's default content link color is identical to body text on
   some pages; add an underline and a deeper blue. */
body.titanuc-a11y-enhanced .entry-content a,
body.titanuc-a11y-enhanced .post-content a,
body.titanuc-a11y-enhanced article .et_pb_text_inner a,
body.titanuc-a11y-enhanced .single-post .et_pb_post_content a,
body.titanuc-a11y-enhanced .single-post .et_pb_text a {
    color: #1f5196 !important;
    text-decoration: underline !important;
    text-decoration-thickness: 2px !important;
    text-underline-offset: 2px !important;
}
body.titanuc-a11y-enhanced .entry-content a:hover,
body.titanuc-a11y-enhanced .single-post .et_pb_text a:hover {
    color: #0f3a73 !important;
}

/* 10. Default WordPress link blue (#2ea3f2) on white is 2.74:1.
   In the comments meta block and footer credits, bump to a darker blue. */
body.titanuc-a11y-enhanced .logged-in-as a,
body.titanuc-a11y-enhanced #comments .comment-meta a,
body.titanuc-a11y-enhanced .comment-edit-link {
    color: #1f5196 !important;
    text-decoration: underline !important;
}


/* 11. Broaden post-content link selectors to match Divi 5's post content
   wrapper (.et_pb_post_content) regardless of body class. Underline links
   so they are visually distinct from surrounding text. */
body.titanuc-a11y-enhanced .et_pb_post_content a,
body.titanuc-a11y-enhanced .et_pb_text_inner a,
body.titanuc-a11y-enhanced .et_pb_text a,
body.titanuc-a11y-enhanced .et_pb_post_content_0_tb_body a {
    color: #1f5196 !important;
    text-decoration: underline !important;
    text-decoration-thickness: 2px !important;
    text-underline-offset: 3px !important;
}
body.titanuc-a11y-enhanced .et_pb_post_content a:hover,
body.titanuc-a11y-enhanced .et_pb_text_inner a:hover {
    color: #0f3a73 !important;
}
/* Don't underline structural links (buttons, header logo wrappers, etc.) */
body.titanuc-a11y-enhanced .et_pb_post_content a.et_pb_button,
body.titanuc-a11y-enhanced .et_pb_text_inner a.et_pb_button {
    text-decoration: none !important;
}

/* 12. Make WordPress comment form labels visible. Divi's stylesheet hides
   them but accessibility (and axe) requires the explicit <label> to be
   visible OR removed. We make it visible and styled. */
body.titanuc-a11y-enhanced .comment-form label,
body.titanuc-a11y-enhanced .comment-form-comment label {
    display: block !important;
    margin-bottom: 6px !important;
    font-weight: 600 !important;
    color: #1f1f1f !important;
}


/* 14. Highest-specificity overrides for stubborn Divi presets.
   Some buttons get color from a preset class like
   .preset--module--divi-button--<uuid>. We use html body + multiple
   class chain so we beat that without inline-style tricks. */
html body.titanuc-a11y-enhanced a.et_pb_button[class*="preset--module--divi-button"],
html body.titanuc-a11y-enhanced .et_pb_button[class*="et_pb_button_"][class*="preset--module--divi-button"] {
    color: #ffffff !important;
    background-color: #1f5854 !important;
    border-color: #1f5854 !important;
}
html body.titanuc-a11y-enhanced a.et_pb_button[class*="preset--module--divi-button"]:hover,
html body.titanuc-a11y-enhanced a.et_pb_button[class*="preset--module--divi-button"]:focus {
    color: #ffffff !important;
    background-color: #0f3a37 !important;
}



/* 16. Beat Divi's preset color rule which uses #page-container in its
   selector (1 ID + 3 classes specificity). We add the same ID to win. */
body.titanuc-a11y-enhanced #page-container a.et_pb_button,
body.titanuc-a11y-enhanced #page-container .et_pb_button[class*="et_pb_button_"],
html body.titanuc-a11y-enhanced #page-container a.et_pb_button {
    color: #ffffff !important;
    background-color: #1f5854 !important;
    border-color: #1f5854 !important;
    text-decoration: none !important;
}
body.titanuc-a11y-enhanced #page-container a.et_pb_button:hover,
body.titanuc-a11y-enhanced #page-container a.et_pb_button:focus {
    color: #ffffff !important;
    background-color: #0f3a37 !important;
}



/* 18. Brand teal #83c5be on white = 1.96:1 (fail) and white on it is also
   1.96:1 (fail). So #83c5be can never be a body-text or button color.
   We darken it to #1f5854 wherever Divi outputs it as a background or
   text color, preserving the brand-teal feel while passing AAA contrast. */

/* When teal is used as a BACKGROUND, swap to dark teal so white text passes. */
body.titanuc-a11y-enhanced [style*="background-color: #83c5be"],
body.titanuc-a11y-enhanced [style*="background-color:#83c5be"],
body.titanuc-a11y-enhanced [style*="background:#83c5be"],
body.titanuc-a11y-enhanced [style*="background: #83c5be"] {
    background-color: #1f5854 !important;
    background: #1f5854 !important;
}

/* Redefine the global Divi secondary color CSS variable so EVERY reference
   to var(--gcid-secondary-color) used as text color resolves to a dark
   teal that meets AA on white backgrounds. Background-color usages still
   look teal; we handle them via the rules above. */
body.titanuc-a11y-enhanced {
    --gcid-secondary-color-text: #1f5854;
}
body.titanuc-a11y-enhanced [style*="color:var(--gcid-secondary-color)"],
body.titanuc-a11y-enhanced [style*="color: var(--gcid-secondary-color)"] {
    color: #1f5854 !important;
}


/* 19. Redefine the global brand-secondary CSS variable so every Divi rule
   that uses var(--gcid-secondary-color) resolves to a dark teal that
   passes WCAG AA contrast (with both white text and dark text). The
   original light teal (#83c5be) cannot meet 4.5:1 with white or any text;
   we keep the brand teal feel by shifting to a darker, deeper shade. */
body.titanuc-a11y-enhanced {
    --gcid-secondary-color: #1f5854;
}


/* 20. WordPress search block label is hidden by default and fails axe.
   Make it visible (or screen-reader-only without display:none). The
   label IS programmatically associated; we just expose it. */
body.titanuc-a11y-enhanced .wp-block-search__label {
    display: block !important;
    margin-bottom: 4px !important;
    font-weight: 600 !important;
    color: #1f1f1f !important;
}


/* 21. et_pb_promo_button (Divi promo button used in CTAs) — same dark-on-dark
   problem as preset buttons. Force white text site-wide. */
body.titanuc-a11y-enhanced #page-container a.et_pb_promo_button,
body.titanuc-a11y-enhanced a.et_pb_promo_button {
    color: #ffffff !important;
    background-color: #1f5854 !important;
    border-color: #1f5854 !important;
    text-decoration: none !important;
}
body.titanuc-a11y-enhanced a.et_pb_promo_button:hover,
body.titanuc-a11y-enhanced a.et_pb_promo_button:focus {
    color: #ffffff !important;
    background-color: #0f3a37 !important;
}


/* 22. Beat Divi's CTA preset that selects with body #page-container
   .preset--module--divi-cta--default.et_pb_promo .et_pb_promo_button
   (specificity 1,4,1). Match the same chain plus a11y-enhanced class. */
body.titanuc-a11y-enhanced #page-container .et_pb_promo .et_pb_promo_button.et_pb_button,
body.titanuc-a11y-enhanced #page-container .preset--module--divi-cta--default.et_pb_promo .et_pb_promo_button.et_pb_button,
body.titanuc-a11y-enhanced #page-container [class*="preset--module--divi-cta"] .et_pb_promo_button.et_pb_button {
    color: #ffffff !important;
    background-color: #1f5854 !important;
    border-color: #1f5854 !important;
    text-decoration: none !important;
}


/* 23. WooCommerce quantity input. Default text color #999999 on light gray
   background fails AA. Darken to #1f1f1f (>14:1). */
body.titanuc-a11y-enhanced input.qty,
body.titanuc-a11y-enhanced input[type="number"].qty,
body.titanuc-a11y-enhanced .quantity input.input-text {
    color: #1f1f1f !important;
}


/* 24. WordPress core button blocks (cross-sells, related products) need
   white text. Default uses theme primary color which fails on dark bg. */
body.titanuc-a11y-enhanced .wp-block-button__link,
body.titanuc-a11y-enhanced a.wp-block-button__link.add_to_cart_button {
    color: #ffffff !important;
    background-color: #1f5854 !important;
    text-decoration: none !important;
}
body.titanuc-a11y-enhanced .wp-block-button__link:hover,
body.titanuc-a11y-enhanced .wp-block-button__link:focus {
    color: #ffffff !important;
    background-color: #0f3a37 !important;
}

/* 25. Don't apply our underline-and-recolor rule inside the WordPress admin
   bar (logged-in admin only, never seen by public visitors). */
body.titanuc-a11y-enhanced #wpadminbar a {
    color: inherit !important;
    text-decoration: none !important;
}
