/**
 * GridFolio — Style Isolation Layer (1.7.0)
 *
 * Loaded LAST, after theme styles (wp_enqueue_scripts priority 9999) and
 * after both plugin stylesheets. Every rule uses a doubled wrapper class
 * (.xrd-isolate.xrd-isolate) so the selector outranks typical theme and
 * page-builder selectors (.elementor-kit-x a, .site-content button, etc.)
 * without depending on load order alone.
 *
 * IMPORTANT: this file only ASSERTS what the plugin's own stylesheets
 * already intend. It never introduces new visual styling, so enabling it
 * on an existing site does not change the rendered design — it only stops
 * third-party CSS from disturbing it.
 */

/* ── Box model — plugin layout math assumes border-box everywhere ────────── */
.xrd-isolate.xrd-isolate,
.xrd-isolate.xrd-isolate *,
.xrd-isolate.xrd-isolate *::before,
.xrd-isolate.xrd-isolate *::after {
    box-sizing: border-box !important;
}

/* ── Links — themes commonly add underlines / border-bottom / bg-underline ─ */
.xrd-isolate.xrd-isolate a,
.xrd-isolate.xrd-isolate a:hover,
.xrd-isolate.xrd-isolate a:focus,
.xrd-isolate.xrd-isolate a:visited {
    text-decoration: none !important;
    border-bottom: none !important;
    box-shadow: none !important;
    background-repeat: no-repeat; /* neutralises theme "growing underline" bg tricks */
}

/* ── Buttons — kill native + theme button chrome (bg, borders, shadows) ──── */
.xrd-isolate.xrd-isolate button,
.xrd-isolate.xrd-isolate button:hover,
.xrd-isolate.xrd-isolate button:focus {
    -webkit-appearance: none !important;
    appearance: none !important;
    text-shadow: none !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    outline: none !important;
}

/* ── Search input — themes style inputs aggressively (bg, border, radius) ── */
.xrd-isolate.xrd-isolate .xrd-searchbar input.xrd-search,
.xrd-isolate.xrd-isolate .xrd-searchbar input.xrd-search:focus {
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    outline: none !important;
    margin: 0 !important;
    height: auto !important;
    min-height: 0 !important;
    line-height: normal !important;
    color: var(--xrd-sb-text, #ffffff) !important;
    font-family: var(--xrd-font-body, inherit) !important;
}

/* ── Images — no theme borders, shadows, or padding on card media ────────── */
.xrd-isolate.xrd-isolate .xrd-card img,
.xrd-isolate.xrd-isolate .xrd-fcard img,
.xrd-isolate.xrd-isolate .xrd-cat-tab-icon img {
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    background: none !important;
    max-width: 100%;
}

/* ── Headings & paragraphs — stop theme margins collapsing card rhythm ───── */
.xrd-isolate.xrd-isolate .xrd-card-title,
.xrd-isolate.xrd-isolate .xrd-fcard-title {
    padding: 0 !important;
    border: none !important;
    text-transform: none !important;
    letter-spacing: normal !important;
}
.xrd-isolate.xrd-isolate .xrd-card-subtitle,
.xrd-isolate.xrd-isolate .xrd-fcard-desc {
    padding: 0 !important;
    text-indent: 0 !important;
}

/* ── V2 slider wrapper — same protections ────────────────────────────────── */
.xrd-v2-wrap.xrd-isolate a,
.xrd-v2-wrap.xrd-isolate a:hover {
    text-decoration: none !important;
    border-bottom: none !important;
    box-shadow: none !important;
}
.xrd-v2-wrap.xrd-isolate button {
    -webkit-appearance: none !important;
    appearance: none !important;
    text-shadow: none !important;
    outline: none !important;
}
.xrd-v2-wrap.xrd-isolate img {
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
}
