/*
Theme Name: Twenty Twenty-Five Legal Pad Child
Theme URI: https://example.com/
Description: Child theme for Twenty Twenty-Five that renders content like a yellow legal pad / journal, with black header strip and red margin line. Includes optional "multiple sheets per post" styling for Query Loop templates.
Author: Joe
Template: twentytwentyfive
Version: 1.1.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: tt5-legalpad-child
*/

/* ------------------------------------------------------------
   GLOBAL LEGAL PAD LOOK (applies site-wide)
   ------------------------------------------------------------ */

body {
    background: #f7f1c6;
}

.wp-site-blocks {
    max-width: 760px;
    margin: 3rem auto;
    background: #fff8b5;
    box-shadow: 0 0 0 1px rgba(0,0,0,0.08);
    line-height: 1.8;
    padding: 0 !important;
    position: relative;

    /* Subtle paper texture (CSS-only) */
    background-image:
        radial-gradient(rgba(0,0,0,0.035) 1px, transparent 1px),
        radial-gradient(rgba(0,0,0,0.02) 1px, transparent 1px);
    background-size: 22px 22px, 33px 33px;
    background-position: 0 0, 11px 13px;
}

/* Red margin line runs full height of the sheet */
.wp-site-blocks::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 48px;
    width: 1px;
    background: rgba(198, 0, 0, 0.45);
    z-index: 2;
    pointer-events: none;
}

/* Auto-injected header strip (theme inserts this if enabled) */
.legal-pad-header {
    background: #000;
    color: #fff;
    padding: 1.2rem 2rem;
    font-family: Georgia, "Libre Baskerville", serif;
    font-size: 1.4rem;
    letter-spacing: 0.05em;
    width: 100%;
    position: relative;
    z-index: 3;
}

/* Auto-wrapped content area */
.legal-pad-content {
    
    position: relative;
    z-index: 3;

    /* ruled lines (single-sheet mode) */
    background-image: linear-gradient(
        to bottom,
        rgba(0,0,0,0.06) 1px,
        transparent 1px
    );
    background-size: 100% 1.8em;
}

/* Remove default top margins that can create a gap above the header strip */
.wp-site-blocks > * {
    margin-top: 0 !important;
}

/* ------------------------------------------------------------
   OPTION: FULL-WIDTH BLACK STRIP (across browser viewport)
   Enabled via Theme Options (adds body class tt5lp-fullwidth-header)
   ------------------------------------------------------------ */

body.tt5lp-fullwidth-header { overflow-x: hidden; }

body.tt5lp-fullwidth-header .legal-pad-header {
    width: 100vw;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
}

body.tt5lp-fullwidth-header .legal-pad-header .legal-pad-header-inner {
    max-width: 760px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 2rem;
    padding-right: 2rem;
}

/* ------------------------------------------------------------
   OPTION: MULTIPLE SHEETS PER POST (Query Loop / blog index)
   Enabled via Theme Options (adds class to Post Template block)
   ------------------------------------------------------------ */

body.tt5lp-multi-sheets .wp-block-post-template {
    background-image: none !important; /* avoid wrapper ruling */
}

body.tt5lp-multi-sheets .wp-block-post-template > li {

	/*margin: 2.2rem 0;
    padding: 2.6rem 3rem;
	*/
    background: #fff8b5;
    box-shadow: 0 0 0 1px rgba(0,0,0,0.08), 0 10px 24px rgba(0,0,0,0.10);
    position: relative;
    border-radius: 2px;

    /* ruled lines per sheet */
    background-image: linear-gradient(
        to bottom,
        rgba(0,0,0,0.06) 1px,
        transparent 1px
    );
    background-size: 100% 1.8em;
}

/* Stacked sheets illusion */
body.tt5lp-multi-sheets .wp-block-post-template > li::before,
body.tt5lp-multi-sheets .wp-block-post-template > li::after {
    content: "";
    position: absolute;
    left: 10px;
    right: 10px;
    top: 10px;
    bottom: -10px;
    background: #fff8b5;
    box-shadow: 0 0 0 1px rgba(0,0,0,0.06);
    z-index: -1;
    border-radius: 2px;
}

body.tt5lp-multi-sheets .wp-block-post-template > li::after {
    left: 18px;
    right: 18px;
    top: 18px;
    bottom: -18px;
    box-shadow: 0 0 0 1px rgba(0,0,0,0.05);
    z-index: -2;
}

body.tt5lp-multi-sheets .wp-block-post-template > li > * {
    position: relative;
    z-index: 1;
}

/* When using multi-sheets, remove ruling from the auto-wrapped content area to avoid double lines */
body.tt5lp-multi-sheets .legal-pad-content {
    background-image: none !important;
}