/*
 * WP CSS Chaos Breaker v2
 * Layout-only chaos. No visible warning banner and no neon/rainbow theme.
 */

body.wpcb-chaos-active {
    overflow-x: hidden !important;
    min-height: 180vh !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #fff !important;
    color: #000 !important;
    font-family: serif !important;
    line-height: .75 !important;
}

/* Keep WordPress toolbar completely usable and visually normal. */
body.wpcb-chaos-active #wpadminbar,
body.wpcb-chaos-active #wpadminbar *,
body.wpcb-chaos-active #wpadminbar *::before,
body.wpcb-chaos-active #wpadminbar *::after {
    transform: none !important;
    filter: none !important;
    animation: none !important;
    letter-spacing: normal !important;
    word-spacing: normal !important;
    line-height: normal !important;
    text-shadow: none !important;
    box-shadow: none !important;
}

/* Kill decorative colors without adding a colorful replacement theme. */
body.wpcb-chaos-active *:not(#wpadminbar):not(#wpadminbar *) {
    box-sizing: content-box !important;
    border-radius: 0 !important;
    text-shadow: none !important;
    box-shadow: none !important;
    transition: none !important;
}

/* Remove most authored backgrounds / color treatments. */
body.wpcb-chaos-active main,
body.wpcb-chaos-active article,
body.wpcb-chaos-active section,
body.wpcb-chaos-active aside,
body.wpcb-chaos-active header:not(#wpadminbar),
body.wpcb-chaos-active footer,
body.wpcb-chaos-active nav:not(#wpadminbar),
body.wpcb-chaos-active div:not(#wpadminbar):not(#wpadminbar *),
body.wpcb-chaos-active form,
body.wpcb-chaos-active table,
body.wpcb-chaos-active ul,
body.wpcb-chaos-active ol {
    background-color: transparent !important;
    background-image: none !important;
}

/* Make the layout structurally useless. */
body.wpcb-chaos-active main,
body.wpcb-chaos-active article,
body.wpcb-chaos-active section,
body.wpcb-chaos-active aside,
body.wpcb-chaos-active header:not(#wpadminbar),
body.wpcb-chaos-active footer,
body.wpcb-chaos-active nav:not(#wpadminbar),
body.wpcb-chaos-active .site,
body.wpcb-chaos-active .site-content,
body.wpcb-chaos-active .elementor,
body.wpcb-chaos-active .elementor-section,
body.wpcb-chaos-active .elementor-container,
body.wpcb-chaos-active .elementor-column,
body.wpcb-chaos-active [class*="container"],
body.wpcb-chaos-active [class*="wrapper"],
body.wpcb-chaos-active [class*="content"],
body.wpcb-chaos-active [class*="grid"],
body.wpcb-chaos-active [class*="flex"],
body.wpcb-chaos-active [class*="row"] {
    display: block !important;
    position: relative !important;
    float: none !important;
    clear: none !important;
    width: auto !important;
    max-width: none !important;
    min-width: 0 !important;
    height: auto !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    gap: 0 !important;
    grid-template-columns: none !important;
    grid-template-rows: none !important;
    flex: none !important;
    align-items: initial !important;
    justify-content: initial !important;
}

/* Typography becomes inconsistent without the previous giant banner/colors. */
body.wpcb-chaos-active h1,
body.wpcb-chaos-active h2,
body.wpcb-chaos-active h3,
body.wpcb-chaos-active h4,
body.wpcb-chaos-active h5,
body.wpcb-chaos-active h6 {
    color: #000 !important;
    background: none !important;
    font-family: serif !important;
    font-weight: normal !important;
    line-height: .65 !important;
    letter-spacing: -3px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
}

body.wpcb-chaos-active p,
body.wpcb-chaos-active li,
body.wpcb-chaos-active blockquote,
body.wpcb-chaos-active figcaption,
body.wpcb-chaos-active span:not(#wpadminbar span) {
    color: #000 !important;
    background: none !important;
    line-height: .72 !important;
}

/* Buttons/links lose their designed appearance. */
body.wpcb-chaos-active a:not(#wpadminbar a),
body.wpcb-chaos-active button,
body.wpcb-chaos-active input,
body.wpcb-chaos-active textarea,
body.wpcb-chaos-active select,
body.wpcb-chaos-active .button,
body.wpcb-chaos-active [class*="btn"] {
    color: #000 !important;
    background: transparent !important;
    border: 1px solid #000 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    text-decoration: none !important;
    font: inherit !important;
}

/* Media loses normal sizing and color. */
body.wpcb-chaos-active img,
body.wpcb-chaos-active video,
body.wpcb-chaos-active iframe,
body.wpcb-chaos-active svg,
body.wpcb-chaos-active canvas {
    max-width: none !important;
    height: auto !important;
    filter: grayscale(1) contrast(1.1) !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

/* Tables/forms stop behaving normally. */
body.wpcb-chaos-active table {
    border-collapse: separate !important;
    border-spacing: 0 !important;
    width: auto !important;
}

body.wpcb-chaos-active th,
body.wpcb-chaos-active td {
    padding: 0 !important;
    border: 1px solid #000 !important;
    background: transparent !important;
    color: #000 !important;
}

/* JS assigns these classes to random elements. */
body.wpcb-chaos-active .wpcb-chaos-relative {
    position: relative !important;
    z-index: var(--wpcb-z, 1) !important;
    left: var(--wpcb-left, 0px) !important;
    top: var(--wpcb-top, 0px) !important;
    width: var(--wpcb-width, auto) !important;
    max-width: none !important;
    transform:
        rotate(var(--wpcb-rotate, 0deg))
        skew(var(--wpcb-skew-x, 0deg), var(--wpcb-skew-y, 0deg))
        scale(var(--wpcb-scale, 1)) !important;
}

body.wpcb-chaos-active .wpcb-chaos-absolute {
    position: absolute !important;
    z-index: var(--wpcb-z, 1) !important;
    left: var(--wpcb-left, 0px) !important;
    top: var(--wpcb-top, 0px) !important;
    width: var(--wpcb-width, auto) !important;
    max-width: none !important;
    transform:
        rotate(var(--wpcb-rotate, 0deg))
        skew(var(--wpcb-skew-x, 0deg), var(--wpcb-skew-y, 0deg))
        scale(var(--wpcb-scale, 1)) !important;
}

body.wpcb-chaos-active .wpcb-chaos-fixed {
    position: fixed !important;
    z-index: var(--wpcb-z, 50) !important;
    left: var(--wpcb-left, 0px) !important;
    top: var(--wpcb-top, 0px) !important;
    width: var(--wpcb-width, auto) !important;
    max-width: none !important;
    transform:
        rotate(var(--wpcb-rotate, 0deg))
        skew(var(--wpcb-skew-x, 0deg), var(--wpcb-skew-y, 0deg))
        scale(var(--wpcb-scale, 1)) !important;
}

/* No ::before/::after warning text. */
body.wpcb-chaos-active::before,
body.wpcb-chaos-active::after {
    content: none !important;
    display: none !important;
}
