/*
Theme Name: Avada Child
Description: Child theme for Avada theme
Author: ThemeFusion
Author URI: https://theme-fusion.com
Template: Avada
Version: 1.0.0
Text Domain:  Avada
*/

.fx-additional-content {
    padding-top: 40px;
}

.fx-label-active,
.fx-label-active > span {
    top: 12px!important;
    font-size: 12px!important;
    background: 0 0!important;
    bottom: auto;
    right: 8px;
    margin-top: 0;
    line-height: 1;
}

.fx-label-inactive {
    top: 25px!important;
}

/*
 * F87: Avada #toTop:before uses content: "\f106" (awb-icons) — not in HTML. Replace with real text in to-top.php
 * and disable the pseudo-element so unstyled / CSS-off users still get a name.
 * ::after is sometimes added via Avada custom CSS or addons (e.g. content: "Back to Top") — strip it; label is HTML.
 */
body .to-top-container #toTop::before,
body #toTop::before,
body .fusion-top-top-link::before {
    content: none !important;
}

body .to-top-container #toTop::after,
body #toTop::after,
body .fusion-top-top-link::after,
body .to-top-container::after {
    content: none !important;
    display: none !important;
}

/* Center icon + label in the fixed button (Avada relied on ::before for the chevron). */
body .to-top-container #toTop {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Avada sets a short fixed height; 14px label + chevron needs a taller hit area. */
body .to-top-container:not(.awb-to-top-scroll-progress) #toTop.fusion-top-top-link {
    height: auto;
    min-height: 56px;
    padding-top: 6px;
    padding-bottom: 6px;
    box-sizing: border-box;
}

body .fusion-top-top-link .jh-to-top-inner {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1px;
    max-width: 100%;
    padding: 0 3px;
    box-sizing: border-box;
    color: var(--totop_icon_color, inherit);
    text-align: center;
}

body .fusion-top-top-link .jh-to-top-icon {
    display: flex;
    line-height: 0;
}

body .fusion-top-top-link .jh-to-top-chevron {
    width: 18px;
    height: 18px;
    display: block;
}

body .fusion-top-top-link .jh-to-top-visible-text {
    display: block;
    max-width: 100%;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    color: inherit;
}

body .awb-to-top-scroll-progress #toTop .jh-to-top-chevron {
    width: 16px;
    height: 16px;
}

body .awb-to-top-scroll-progress #toTop .jh-to-top-visible-text {
    font-size: 14px;
}

/* ADA: Anchors that replace <a><button type="submit"> to match real WC/Avada buttons */
.woocommerce a.wc-jh-link-as-button.button,
.woocommerce a.wc-jh-link-as-button.single_add_to_cart_button,
.woocommerce-page a.wc-jh-link-as-button.button,
.woocommerce-page a.wc-jh-link-as-button.single_add_to_cart_button {
    text-decoration: none;
    display: inline-block;
    box-sizing: border-box;
    cursor: pointer;
}

/*
 * Trust badges (manual in Avada): Column/container class `jh-trust-badge-row`; each line a div (or span) with
 * `jh-trust-badge-item`. Optional: paste Fusion button classes onto a div (not an <a>) inside the row — styling only.
 */
body #wrapper .jh-trust-badge-row .jh-trust-badge-item {
    cursor: default;
    display: inline-flex;
    align-items: center;
    gap: 0.5em;
    text-decoration: none;
}

body #wrapper .jh-trust-badge-row div.fusion-button {
    cursor: default;
    text-decoration: none;
}

/*
 * Fusion Title fixes:
 * Avada colors those via p.title-heading-tag / h1–h6; if classes are missing (builder output, DOM filters).
 * Re-apply H1/title tokens for size-one text titles (sitewide — no shadow here).
 */
body #wrapper .fusion-title.fusion-title-text.fusion-title-size-one .fusion-title-heading,
body #wrapper .fusion-title.fusion-title-text.fusion-title-size-one p {
    margin: 0;
    color: var(--awb-text-color, var(--h1_typography-color, var(--awb-color1))) !important;
    font-size: var(--awb-font-size, var(--h1_typography-font-size)) !important;
    line-height: var(--h1_typography-line-height, 1.2) !important;
    font-family: var(--awb-title-font-family, var(--h1_typography-font-family, inherit)) !important;
    font-weight: var(--awb-title-font-weight, var(--h1_typography-font-weight, 400)) !important;
    font-style: var(--awb-title-font-style, var(--h1_typography-font-style, normal)) !important;
    letter-spacing: var(--awb-title-letter-spacing, var(--h1_typography-letter-spacing, normal)) !important;
    text-transform: var(--awb-title-text-transform, var(--h1_typography-text-transform, none)) !important;
}

body #wrapper .fusion-title.fusion-title-text.fusion-title-size-one p strong,
body #wrapper .fusion-title.fusion-title-text.fusion-title-size-one .fusion-title-heading strong {
    color: inherit;
    font-weight: 700;
}

body.home #wrapper .post-content > *:first-child .fusion-title.fusion-title-text.fusion-title-size-one .fusion-title-heading,
body.home #wrapper .post-content > *:first-child .fusion-title.fusion-title-text.fusion-title-size-one p,
body #wrapper .fusion-title.jh-hero-banner-title.fusion-title-text.fusion-title-size-one .fusion-title-heading,
body #wrapper .fusion-title.jh-hero-banner-title.fusion-title-text.fusion-title-size-one p {
    text-shadow: 1px 1px 7px rgba(0, 0, 0, 0.85) !important;
}

/*
 * WCAG ADA Contrast Fixes
 */

body #wrapper {
    --jh-footer-link-hover-color: #ff2a35;
}

body #wrapper .fusion-footer-widget-area a:hover,
body #wrapper .fusion-footer-widget-area a:focus-visible,
body #wrapper .fusion-footer-copyright-area a:hover,
body #wrapper .fusion-footer-copyright-area a:focus-visible {
    color: var(--jh-footer-link-hover-color) !important;
}

body #wrapper .fusion-social-links-footer .fusion-social-network-icon:hover,
body #wrapper .fusion-social-links-footer .fusion-social-network-icon:focus-visible {
    color: #fff !important;
}

body #wrapper .fusion-footer-widget-area .select2-container--default .select2-selection--single .select2-selection__rendered,
body #wrapper .fusion-footer-widget-area .select2-container--default .select2-selection--single .select2-selection__placeholder {
    color: #2d2d2d !important;
}

body #wrapper .fusion-footer-widget-area .widget_product_categories .select2-container--default .select2-selection--single .select2-selection__rendered,
body #wrapper .fusion-footer-widget-area .widget_product_categories .select2-container--default .select2-selection--single .select2-selection__placeholder {
    color: #2d2d2d !important;
}

body #wrapper .fkcart-shortcode-container .fkcart-shortcode-count.fkcart-item-count {
    min-width: 20px;
    min-height: 20px;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
    background-color: #a71c20 !important;
    color: #fff !important;
    border-radius: 9999px;
}

body #wrapper a.wprev-google-wr-a {
    background-color: #080808 !important;
    color: #fff !important;
    font-weight: 700 !important;
}

body #wrapper a.wprev-google-wr-a:hover,
body #wrapper a.wprev-google-wr-a:focus {
    background-color: #333333 !important;
    color: #fff !important;
}