/**
 * WordPress Default Style Resets
 * 
 * Generalized resets to ensure deployed pages match local HTML exactly.
 * These resets override WordPress default styles without project-specific fonts.
 * 
 * Projects should add their own font-family declarations in their CSS files.
 * 
 * CSS Loading Order:
 * 1. WordPress Core Styles (priority 10)
 * 2. Google Fonts (priority 15, step 0)
 * 3. WordPress Resets CSS (priority 15, step 0.5) ← This file
 * 4. Project CSS (priority 15, step 1-2)
 */

/* ==========================================================================
   1. Admin Bar Displacement Fix
   ========================================================================== */

/* WordPress admin bar adds margin-top to html when logged in, causing layout shifts */
html { 
    margin-top: 0 !important; 
}

/* ==========================================================================
   2. Entry Content Block Margins Reset
   ========================================================================== */

/* WordPress adds default margins to all direct children of .entry-content */
.entry-content > *,
.entry-content > *:first-child,
.entry-content > *:last-child {
    margin-top: 0;
    margin-bottom: 0;
}

/* ==========================================================================
   3. WordPress Block Group Spacing Reset
   ========================================================================== */

/* Reset wp-block-group spacing to prevent extra margins/padding from WordPress defaults */
/* This resets ALL wp-block-group elements generically - projects should override in their own CSS */
/* Projects preserve spacing for their components by adding more specific selectors in project CSS */
.wp-block-group:not([class*="wp-block"]):not([class*="is-layout"]) {
    margin: 0 !important;
    padding: 0 !important;
}

/* Note: Projects should add their own CSS rules to preserve spacing for their components */
/* Example: .my-project-hero.wp-block-group { margin: 2rem 0; padding: 1rem; } */

/* ==========================================================================
   4. WordPress Block Columns Reset
   ========================================================================== */

/* WordPress adds default margins to block columns */
/* Projects should override in their own CSS if they need column spacing */
.wp-block-columns {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

/* ==========================================================================
   5. WordPress Paragraph Margins Reset
   ========================================================================== */

/* Reset WordPress default margins on paragraphs */
/* Projects should override in their own CSS if they need paragraph spacing */
.wp-block-paragraph {
    margin: 0 !important;
    padding: 0 !important;
}

/* ==========================================================================
   6. WordPress Align Full/Wide Block Handling
   ========================================================================== */

/* WordPress "Align Full" class - full viewport width */
.alignfull {
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    max-width: 100vw;
    width: 100vw;
}

/* WordPress "Align Wide" class - wider than content but not full width */
.alignwide {
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    max-width: calc(100vw - 2rem);
    width: calc(100vw - 2rem);
}

/* ==========================================================================
   7. Screen Reader Text Styling
   ========================================================================== */

/* Clear the "Skip to content" or Screen Reader text - ensure it's properly hidden */
.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    word-wrap: normal;
}

/* ==========================================================================
   7.5. Body-Level Font Resets (Establish Baseline)
   ========================================================================== */

/* Note: We do NOT reset body-level properties here because project CSS should define them */
/* Resetting body properties would remove project CSS values, causing issues */
/* Instead, we reset WordPress-injected elements only, allowing them to inherit from body */

/* ==========================================================================
   8. Font-family Resets (Generalized - Let Project CSS Define Fonts)
   ========================================================================== */

/* Reset font-family on WordPress-injected elements */
/* This prevents WordPress from injecting default fonts - projects define fonts in their CSS */
/* Elements inherit from body, which project CSS should define */
.wp-block-group:not([class*="wp-block"]):not([class*="is-layout"]),
.wp-block-paragraph,
.wp-block-heading,
.wp-block-column,
.wp-block-columns,
.wp-block-list,
.wp-block-quote,
[class*="wp-block-"]:not([class*="wp-block-group"]):not([class*="wp-block-paragraph"]):not([class*="wp-block-heading"]):not([class*="wp-block-column"]):not([class*="wp-block-columns"]):not([class*="wp-block-list"]):not([class*="wp-block-quote"]),
.entry-content > * {
    font-family: inherit !important;
}

/* ==========================================================================
   9. Font-size Resets (Generalized - Let Project CSS Define Sizes)
   ========================================================================== */

/* Reset font-size on WordPress-injected elements */
/* Using 'unset' to completely remove the property, allowing project CSS to define it */
.wp-block-group:not([class*="wp-block"]):not([class*="is-layout"]),
.wp-block-paragraph,
.wp-block-heading,
h1.wp-block-heading,
h2.wp-block-heading,
h3.wp-block-heading,
h4.wp-block-heading,
h5.wp-block-heading,
h6.wp-block-heading,
.wp-block-column,
.wp-block-columns,
.wp-block-list,
.wp-block-quote,
[class*="wp-block-"]:not([class*="wp-block-group"]):not([class*="wp-block-paragraph"]):not([class*="wp-block-heading"]):not([class*="wp-block-column"]):not([class*="wp-block-columns"]):not([class*="wp-block-list"]):not([class*="wp-block-quote"]),
.entry-content > * {
    font-size: unset !important;
}

/* ==========================================================================
   10. Line-height Resets (Generalized - Let Project CSS Define Line-height)
   ========================================================================== */

/* Reset line-height on WordPress-injected elements */
/* Using 'unset' to completely remove the property, allowing project CSS to define it */
.wp-block-group:not([class*="wp-block"]):not([class*="is-layout"]),
.wp-block-paragraph,
.wp-block-heading,
h1.wp-block-heading,
h2.wp-block-heading,
h3.wp-block-heading,
h4.wp-block-heading,
h5.wp-block-heading,
h6.wp-block-heading,
.wp-block-column,
.wp-block-columns,
.wp-block-list,
.wp-block-quote,
[class*="wp-block-"]:not([class*="wp-block-group"]):not([class*="wp-block-paragraph"]):not([class*="wp-block-heading"]):not([class*="wp-block-column"]):not([class*="wp-block-columns"]):not([class*="wp-block-list"]):not([class*="wp-block-quote"]),
.entry-content > * {
    line-height: unset !important;
}

/* ==========================================================================
   11. Font-weight Resets (Generalized - Let Project CSS Define Weights)
   ========================================================================== */

/* Reset font-weight on WordPress-injected elements */
/* Using 'unset' to completely remove the property, allowing project CSS to define it */
.wp-block-group:not([class*="wp-block"]):not([class*="is-layout"]),
.wp-block-paragraph,
.wp-block-heading,
h1.wp-block-heading,
h2.wp-block-heading,
h3.wp-block-heading,
h4.wp-block-heading,
h5.wp-block-heading,
h6.wp-block-heading,
.wp-block-column,
.wp-block-columns,
.wp-block-list,
.wp-block-quote,
[class*="wp-block-"]:not([class*="wp-block-group"]):not([class*="wp-block-paragraph"]):not([class*="wp-block-heading"]):not([class*="wp-block-column"]):not([class*="wp-block-columns"]):not([class*="wp-block-list"]):not([class*="wp-block-quote"]),
.entry-content > * {
    font-weight: unset !important;
}
