/**
 * Operator theme-independence boundary.
 *
 * Neutralizes inherited Houzez theme CSS inside the operator wrappers so the kit +
 * bespoke plugin CSS govern. Houzez is hardened AGAINST here, never edited.
 *
 * Wrappers keyed:
 *   - Admin  : .dl-pa-shell, .dl-platform-admin            (Phase 1 — verified)
 *   - Portal : .dl-portal-dash-shell                       (Phase 2 — agency proof
 *              confirmed, then broadened to all portal contexts: agency + agent
 *              dashboards and any portal surface inside .dl-portal-dash-shell.)
 *
 * Two layers:
 *   1. Scoped reset — beats the bare-element theme rules from the bleed catalogue.
 *   2. Targeted overrides — the inline customizer red (#e4192b, ~0,4,0 INLINE) which
 *      a normal reset can't beat; pinned with !important, scoped to the wrapper.
 *
 * Scope is strictly the operator wrappers — the theme header/footer around the
 * surface, the buyer frontend, and wp-admin are untouched.
 */

/* ============================ 1. SCOPED RESET ============================ */

/* Base text: predictable colour + leading. font-family left to inherit (forcing a
   stack would shift every text element globally; revisit if a theme font bleeds). */
.dl-pa-shell,
.dl-platform-admin,
.dl-portal-dash-shell {
    color: var(--dl-ui-text, #1f2933);
    line-height: 1.5;
}

/* Fields: re-assert the kit field surface so theme `input{border:none;background:none}`
   and `.form-control` resets can't strip kit/bespoke fields. Text-like inputs only —
   checkbox/radio/submit/button/file/range/color excluded so native controls and submit
   buttons are NOT flattened. */
.dl-pa-shell input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]):not([type="file"]):not([type="range"]):not([type="color"]),
.dl-pa-shell select,
.dl-pa-shell textarea,
.dl-platform-admin input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]):not([type="file"]):not([type="range"]):not([type="color"]),
.dl-platform-admin select,
.dl-platform-admin textarea,
.dl-portal-dash-shell input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]):not([type="file"]):not([type="range"]):not([type="color"]),
.dl-portal-dash-shell select,
.dl-portal-dash-shell textarea {
    background-color: var(--dl-ui-card-bg, #fff);
    border: 1px solid var(--dl-ui-border, #e8ddd4);
    -webkit-appearance: none;
    appearance: none;
    box-sizing: border-box;
    line-height: 1.35;
}

/* Buttons: neutralize the theme button reset (kit/bespoke buttons set their own). */
.dl-pa-shell button,
.dl-platform-admin button,
.dl-portal-dash-shell button {
    -webkit-appearance: none;
    appearance: none;
}

/* Headings: predictable margins/leading. Plugin heading classes override. */
.dl-pa-shell h1, .dl-pa-shell h2, .dl-pa-shell h3,
.dl-pa-shell h4, .dl-pa-shell h5, .dl-pa-shell h6,
.dl-platform-admin h1, .dl-platform-admin h2, .dl-platform-admin h3,
.dl-platform-admin h4, .dl-platform-admin h5, .dl-platform-admin h6,
.dl-portal-dash-shell h1,
.dl-portal-dash-shell h2,
.dl-portal-dash-shell h3,
.dl-portal-dash-shell h4,
.dl-portal-dash-shell h5,
.dl-portal-dash-shell h6 {
    margin: 0 0 0.5rem;
    line-height: 1.3;
    color: inherit;
}

/* Lists: reset theme-inherited list chrome (plugin list components are class/element
   based and unaffected). */
.dl-pa-shell ul, .dl-pa-shell ol,
.dl-platform-admin ul, .dl-platform-admin ol,
.dl-portal-dash-shell ul,
.dl-portal-dash-shell ol {
    margin: 0;
    padding: 0;
    list-style: none;
}

/* ===================== 2. TARGETED OVERRIDES (red bleed) ===================== */
/* Houzez generates `a, a:hover, a:visited, … { color:#e4192b }` INLINE from the
   customizer primary colour (~0,4,0, inline) — a cascade reset can't beat an inline
   rule, so these use !important. Component selectors out-specify the general link
   rule so buttons/cards keep their own colours. */

/* General plugin text links → kit text colour (kills the red bleed on plain links). */
.dl-pa-shell a,
.dl-platform-admin a,
.dl-portal-dash-shell a {
    color: var(--dl-ui-text, #1f2933) !important;
}

/* Kit buttons → per-variant colour (--dl-ui-btn-color the variant sets), all states. */
.dl-pa-shell a.dl-ui-btn, .dl-pa-shell a.dl-ui-btn:link, .dl-pa-shell a.dl-ui-btn:visited,
.dl-pa-shell a.dl-ui-btn:hover, .dl-pa-shell a.dl-ui-btn:focus, .dl-pa-shell a.dl-ui-btn:active,
.dl-platform-admin a.dl-ui-btn, .dl-platform-admin a.dl-ui-btn:link, .dl-platform-admin a.dl-ui-btn:visited,
.dl-platform-admin a.dl-ui-btn:hover, .dl-platform-admin a.dl-ui-btn:focus, .dl-platform-admin a.dl-ui-btn:active,
.dl-portal-dash-shell a.dl-ui-btn,
.dl-portal-dash-shell a.dl-ui-btn:link,
.dl-portal-dash-shell a.dl-ui-btn:visited,
.dl-portal-dash-shell a.dl-ui-btn:hover,
.dl-portal-dash-shell a.dl-ui-btn:focus,
.dl-portal-dash-shell a.dl-ui-btn:active {
    color: var(--dl-ui-btn-color, var(--dl-ui-text, #1f2933)) !important;
}

/* Legacy VC filled buttons → white (ghost/secondary inherit dark from general rule). */
.dl-pa-shell a.dl-vc-btn--primary, .dl-pa-shell a.dl-vc-btn--danger,
.dl-platform-admin a.dl-vc-btn--primary, .dl-platform-admin a.dl-vc-btn--danger,
.dl-portal-dash-shell a.dl-vc-btn--primary,
.dl-portal-dash-shell a.dl-vc-btn--danger {
    color: #fff !important;
}

/* No underline on any plugin button / clickable card anchor. */
.dl-pa-shell a.dl-ui-btn, .dl-pa-shell a.dl-vc-btn, .dl-pa-shell a.dl-ui-card,
.dl-platform-admin a.dl-ui-btn, .dl-platform-admin a.dl-vc-btn, .dl-platform-admin a.dl-ui-card,
.dl-portal-dash-shell a.dl-ui-btn,
.dl-portal-dash-shell a.dl-vc-btn,
.dl-portal-dash-shell a.dl-ui-card {
    text-decoration: none !important;
}
