/*
 Theme Name:   Soledad Child Theme
 Theme URI:    http://pencidesign.com/
 Description:  Soledad Child Theme - Made by PenciDesign. 300gospodarka changes to Soledad: docs/motyw.md.
 Author:       Pencidesign
 Version:      1.2
 Author URI:   http://pencidesign.com/
 Template:     soledad
 Text Domain:  soledad
*/

/* Loaded after Soledad's main.css (handle "penci_style"). */

/* Header leaderboard (template-parts/placement/ad-header.php) */
#headerLeaderboard {
    width: 970px;
    height: 250px;
    margin: 0 auto;
    display: block;
}

#headerLeaderboardMobile {
    width: 100%;
    height: auto;
    display: none;
}

@media only screen and (max-width: 480px) {
    #headerLeaderboard {
        display: none;
    }
    #headerLeaderboardMobile {
        display: block;
    }
}

/* CLS fixes for the ad slots (from fix/cls-header-ad-cookie-bar) */
/* OptAd360 appends its billboard slot (min-height 325px, +50px headroom from 300polityka-core) to the end of
   #header after the page has rendered, pushing the whole page down (CLS ~0.2). Reserve the space up front,
   drop it once the slot is in. */
#header {
    padding-bottom: 375px;
}
#header:has(> [id^="oa-360"]) {
    padding-bottom: 0;
}
/* With an adblocker AdRecover puts a 300x600 banner into an Elementor spacer (1–2em high on the homepage)
   and it spilled over the posts below. A spacer with anything in it grows with its content. */
.elementor .elementor-widget-spacer .elementor-spacer-inner:has(> *) {
    height: auto;
    min-height: var(--spacer-size);
}
/* The homepage sidebar column ends with a run of spacers (fine beside the posts on desktop); on mobile it
   stacks under the posts and they add up to ~300px of blank space. Keep one spacer per run. */
@media only screen and (max-width: 767px) {
    .elementor-widget-spacer + .elementor-widget-spacer:not(:has(.elementor-spacer-inner > *)) {
        display: none;
    }
}
/* The slot above the footer starts small (desktop 90px, mobile 250px) and grows when the ad loads
   (desktop 343px, tablet ~450px, mobile ~650px), pushing the footer down. Keep it at the full height
   plus 50px from the start (inline style, hence !important). */
.wrapper-boxed > [id^="oa-360"] {
    min-height: 393px !important;
    align-items: flex-start !important; /* a smaller ad sits right under the content, the spare room goes above the footer */
}
@media only screen and (max-width: 1023px) {
    .wrapper-boxed > [id^="oa-360"] {
        min-height: 500px !important;
    }
}
@media only screen and (max-width: 767px) {
    .wrapper-boxed > [id^="oa-360"] {
        min-height: 700px !important;
    }
}
