/* =========================================================
   CMS CONTENT ISOLATION STYLES
   This file ensures that TinyMCE output renders ONLY with
   its own inline styles + CMS-specific classes.
   No theme, Bootstrap, or parent styles will leak inside.
   ========================================================= */

/* HARD RESET – remove ALL inherited website styles */
.cms-sandbox,
.cms-sandbox * {
    all: initial;
    font-family: inherit; /* optionally inherit base font */
    box-sizing: border-box;
}

/* RESTORE default browser behavior for common tags */
.cms-sandbox p,
.cms-sandbox h1,
.cms-sandbox h2,
.cms-sandbox h3,
.cms-sandbox h4,
.cms-sandbox h5,
.cms-sandbox h6,
.cms-sandbox ul,
.cms-sandbox ol,
.cms-sandbox li,
.cms-sandbox blockquote,
.cms-sandbox strong,
.cms-sandbox em,
.cms-sandbox span,
.cms-sandbox div {
    all: revert;
    box-sizing: border-box;
}

/* IMAGES */
.cms-sandbox img {
    all: revert;
    max-width: 100%;
    height: auto;
    display: block;
}

/* LINKS */
.cms-sandbox a {
    all: revert;
    text-decoration: underline;
    cursor: pointer;
    color: inherit; /* or set custom */
}

/* TABLES */
.cms-sandbox table {
    all: revert;
    border-collapse: collapse;
    width: 100%;
}

.cms-sandbox th,
.cms-sandbox td {
    all: revert;
    border: 1px solid #ddd;
    padding: 6px;
    box-sizing: border-box;
}

/* LISTS */
.cms-sandbox ul,
.cms-sandbox ol {
    padding-left: 1.2rem;
    margin-bottom: 1rem;
}

/* HEADINGS spacing (optional fine-tuning) */
.cms-sandbox h1 { margin: 0.67em 0; }
.cms-sandbox h2 { margin: 0.75em 0; }
.cms-sandbox h3 { margin: 0.83em 0; }
.cms-sandbox h4 { margin: 1.12em 0; }
.cms-sandbox h5 { margin: 1.5em 0; }
.cms-sandbox h6 { margin: 1.67em 0; }

/* PARAGRAPH spacing */
.cms-sandbox p {
    margin: 0 0 1em;
}
