/* Global Font Override - Enforce Poppins Everywhere */

/* Import if not loaded via enqueue (backup) */
/* @import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap'); */

:root {
    --body-family: 'Poppins' !important;
    --btn-family: 'Poppins' !important;
    --cat-family: 'Poppins' !important;
    --dwidgets-family: 'Poppins' !important;
    --h1-family: 'Poppins' !important;
    --h2-family: 'Poppins' !important;
    --h3-family: 'Poppins' !important;
    --h4-family: 'Poppins' !important;
    --h5-family: 'Poppins' !important;
    --h6-family: 'Poppins' !important;
    --input-family: 'Poppins' !important;
    --menu-family: 'Poppins' !important;
    --meta-family: 'Poppins' !important;
    --submenu-family: 'Poppins' !important;
    --tagline-family: 'Poppins' !important;
    --meta-b-family: 'Poppins' !important;
}

/* Force override on all elements */
html,
body,
div,
span,
applet,
object,
iframe,
h1,
h2,
h3,
h4,
h5,
h6,
p,
blockquote,
pre,
a,
abbr,
acronym,
address,
big,
cite,
code,
del,
dfn,
em,
img,
ins,
kbd,
q,
s,
samp,
small,
strike,
strong,
sub,
sup,
tt,
var,
b,
u,
i,
center,
dl,
dt,
dd,
ol,
ul,
li,
fieldset,
form,
label,
legend,
table,
caption,
tbody,
tfoot,
thead,
tr,
th,
td,
article,
aside,
canvas,
details,
embed,
figure,
figcaption,
footer,
header,
hgroup,
menu,
nav,
output,
ruby,
section,
summary,
time,
mark,
audio,
video,
input,
textarea,
select,
button {
    font-family: 'Poppins' !important;
}

/* Specific theme overrides */
.site-content,
.site-header,
.site-footer,
.site-wrap {
    font-family: 'Poppins' !important;
}

/* Override Elementor or other builders if needed */
.elementor-widget-heading .elementor-heading-title {
    font-family: 'Poppins' !important;
}

/* Override WooCommerce */
.woocommerce,
.woocommerce-page,
.woocommerce p,
.woocommerce h1,
.woocommerce h2,
.woocommerce h3,
.woocommerce h4,
.woocommerce h5,
.woocommerce h6,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #respond input#submit {
    font-family: 'Poppins' !important;
}

/* --- EXCLUSIONS & ICON RESTORATION --- */

/* Restore Star Ratings (Foxiz Theme uses 'ruby-icon') */
.star-rating,
.star-rating span,
.star-rating:before,
.star-rating span:before {
    font-family: 'ruby-icon' !important;
}

/* Restore FontAwesome Icons */
.fa,
.fas,
.far,
.fab,
.fab {
    font-family: "Font Awesome 5 Free", "FontAwesome" !important;
}

/* Restore Dashicons */
.dashicons,
.dashicons-before:before {
    font-family: "dashicons" !important;
}

/* Restore Theme Specific Icons */
/* Keep selectors scoped to icon elements only. */
.ruby-icon,
i[class*="icon-"],
i[class^="icon-"],
span[class*="icon-"]:not(.elementor-icon-list-text):not([class*="icon-list-text"]),
span[class^="icon-"]:not(.elementor-icon-list-text):not([class*="icon-list-text"]),
a.remove:before,
.button.loading:after,
.button.added:after {
    font-family: 'ruby-icon' !important;
}

/* Elementor footer text contains class `elementor-icon-list-text`; keep it as normal text font. */
.elementor-icon-list-text,
.elementor-icon-list-item > a {
    font-family: 'Poppins' !important;
}

/* Common Standard Icon Classes */
.icon,
.ico,
i.icon,
i.ico {
    font-family: 'ruby-icon' !important;
    /* Assuming ruby-icon is the default icon font */
}

/* Fix generic span overriding icons inside them */
.star-rating span {
    font-family: 'ruby-icon' !important;
}

/* --- CHECKOUT PAGE STYLES (Appended to ensure loading) --- */

/* Force all inputs to have light gray border */
body.woocommerce-checkout input[type="text"],
body.woocommerce-checkout input[type="email"],
body.woocommerce-checkout input[type="tel"],
body.woocommerce-checkout input[type="password"],
body.woocommerce-checkout input[type="number"],
body.woocommerce-checkout textarea,
body.woocommerce-checkout select,
body.woocommerce-checkout .select2-container .select2-selection--single,
body.woocommerce-checkout .input-text,
body.woocommerce-checkout .form-row .input-text {
    border: 1px solid #e0e0e0 !important;
    /* Light Gray */
    background-color: #ffffff !important;
    border-radius: 6px !important;
    box-shadow: none !important;
    color: #333 !important;
    padding: 12px 15px !important;
    min-height: 48px !important;
}

/* Focus State */
body.woocommerce-checkout input:focus,
body.woocommerce-checkout textarea:focus,
body.woocommerce-checkout select:focus,
body.woocommerce-checkout .select2-container--open .select2-selection--single {
    border-color: #a0a0a0 !important;
    outline: none !important;
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.05) !important;
}

/* Select2 Specifics */
body.woocommerce-checkout .select2-container .select2-selection--single {
    height: 48px !important;
    display: flex !important;
    align-items: center !important;
    border: 1px solid #e0e0e0 !important;
}

body.woocommerce-checkout .select2-dropdown {
    border: 1px solid #e0e0e0 !important;
    border-radius: 6px !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
}

/* Payment Cards */
#payment ul.payment_methods li.wc_payment_method {
    background: #fff;
    border: 1px solid #e0e0e0 !important;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 15px;
}

#payment ul.payment_methods li .payment_box {
    background-color: #f9f9f9 !important;
    color: #666 !important;
    border: 1px solid #eee !important;
}

/* Shipping/Pickup Radio Boxes */
ul#shipping_method li,
.woocommerce-shipping-methods li {
    background: #fff;
    border: 1px solid #e0e0e0 !important;
    border-radius: 8px;
    padding: 15px 20px;
    margin-bottom: 12px;
}

/* Button Styling */
#place_order {
    background-color: #111 !important;
    color: #fff !important;
    border-radius: 6px !important;
    height: 50px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
}

/* --- COURSE CARD SPACING FIX --- */
/* Removes large blank gap before pricing area in Custom Courses Display cards. */
.ccd-courses-grid .ccd-modern-card .ccd-content {
    height: auto !important;
}

.ccd-courses-grid .ccd-modern-card .ccd-price-row {
    margin-top: 6px !important;
}

/* --- COURSE CARD FONT INHERITANCE FIX --- */
/* Force Custom Courses Display cards to use active theme/kit font, not browser default. */
.ccd-courses-grid {
    font-family: var(--wp--preset--font-family--body, var(--e-global-typography-text-font-family, inherit)) !important;
}

.ccd-courses-grid .ccd-modern-card,
.ccd-courses-grid .ccd-modern-card * {
    font-family: inherit !important;
}
