/* Important declarations in a named layer take precedence over legacy unlayered rules. */
@layer tbc-link-standard {
    body a[href]:not(:where(#wpadminbar a)) {
        color: var(--tbc-link-ink, #e4c6a4) !important;
        font-weight: 600 !important;
    }
    body a[href][data-tbc-link-tone="gold"] { --tbc-link-ink: #e4c6a4 !important; }
    body a[href][data-tbc-link-tone="navy"] { --tbc-link-ink: #0f3244 !important; }
    body :is(p, li, dd, dt, blockquote, h1, h2, h3, h4, h5, h6) a[href]:not([data-tbc-keep-size]):not(:where(#wpadminbar a)) {
        font-size: inherit !important;
        line-height: inherit !important;
    }
    body a[href]:not(:where(#wpadminbar a)) :is(p, h1, h2, h3, h4, h5, h6, span, strong, b, em, small):not(:where([class*="fa-"], .flag, .screen-reader-text)) {
        color: inherit !important;
        font-weight: inherit !important;
    }
    body a[href]:not(:where(#wpadminbar a)) :is(span, strong, b, em, small):not(:where([class*="fa-"], .flag, .screen-reader-text)) {
        font-size: inherit !important;
    }
}

/* Navigation stays white, with gold for the individual hovered or focused link. */
@layer tbc-link-standard {
    body :is(nav, .header__nav, .mobile-nav, .tbc-nav, .footer-block-links) a[href] {
        --tbc-link-ink: #ffffff !important;
    }
    body :is(nav, .header__nav, .mobile-nav, .tbc-nav, .footer-block-links) a[href]:is(:hover, :focus-visible) {
        --tbc-link-ink: #e4c6a4 !important;
    }
}

/* Boat names retain their original dark blue rather than the content-link gold. */
@layer tbc-link-standard {
    body .boats-list__content a[href]:has(h3),
    body .boats-list__content a[href]:has(.h3) {
        --tbc-link-ink: #0e3245 !important;
    }
    body .boats-list__content :is(h3, .h3) {
        color: #0e3245 !important;
    }
    body .tbc-refresh-boat-card__title[href],
    body .tbc-refresh-boat-card__title a[href] {
        --tbc-link-ink: var(--tbc-refresh-navy, #0e3245) !important;
    }
    body .tbc-refresh-boat-card__title {
        color: var(--tbc-refresh-navy, #0e3245) !important;
    }
}
@layer tbc-link-standard {
    body .tbc-refresh-boat-card .tbc-refresh-boat-card__title,
    body .tbc-refresh-boat-card .tbc-refresh-boat-card__title a[href],
    body .tbc-refresh-boat-card a[href]:has(.tbc-refresh-boat-card__title) {
        --tbc-link-ink: var(--tbc-refresh-navy, #0e3245) !important;
        color: var(--tbc-refresh-navy, #0e3245) !important;
    }
}

/* WhatsApp buttons retain white text and icons on their green background. */
@layer tbc-link-standard {
    body a:is(.btn-big, .whatsapp-button, .whatsapp-btn)[href*="wa.me/"],
    body a:is(.btn-big, .whatsapp-button, .whatsapp-btn)[href*="api.whatsapp.com/"],
    body a:is(.btn-big, .whatsapp-button, .whatsapp-btn)[href^="whatsapp:"] {
        --tbc-link-ink: #ffffff !important;
        color: #ffffff !important;
    }
    body a:is(.btn-big, .whatsapp-button, .whatsapp-btn)[href*="wa.me/"] :is(span, strong, b, i, svg),
    body a:is(.btn-big, .whatsapp-button, .whatsapp-btn)[href*="api.whatsapp.com/"] :is(span, strong, b, i, svg),
    body a:is(.btn-big, .whatsapp-button, .whatsapp-btn)[href^="whatsapp:"] :is(span, strong, b, i, svg) {
        color: #ffffff !important;
    }
}
