/*
 * Concrete 9 compatibility for the Bootstrap 3 White Lodge theme (Nurved, Oct 2026).
 * v9 core blocks emit Bootstrap 5 markup and no longer ship some per-block CSS.
 * Everything here makes the v9 output render the way the 8.x site did.
 */

/* ---- Images ------------------------------------------------------------
   v9 image blocks use .img-fluid (BS5) instead of .img-responsive, and put
   width/height attributes on <img> and on each <picture><source>. Chrome
   applies the <source> sizes to the image, which stretched the logos. */
.img-fluid,
img.ccm-image-block {
    display: block;
    max-width: 100%;
    height: auto;
}
picture > img {
    width: auto;
    height: auto;
    max-width: 100%;
}

/* ---- Free-form area layouts ---------------------------------------------
   The 8.x site never loaded the generated layout CSS, so these columns have
   always stacked full width. v9 does load it; keep the live behaviour. */
div.ccm-layout-column-wrapper > div.ccm-layout-column {
    float: none !important;
    width: auto !important;
}

/* ---- YouTube block (v8 blocks/youtube/view.css, dropped in v9) ---------- */
.youtubeBlockResponsive16by9,
.youtubeBlockResponsive4by3 { position: relative; height: 0; }
.youtubeBlockResponsive16by9 iframe,
.youtubeBlockResponsive4by3 iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: none; }
.youtubeBlockResponsive16by9 { padding-bottom: 56.25%; }
.youtubeBlockResponsive4by3 { padding-bottom: 75%; }

/* ---- Search block (v8 blocks/search/view.css, dropped in v9) ------------ */
#searchResults .pageLink { font-size: 12px; color: #999; margin: 2px 0 8px 0; padding: 0; display: block; }
#searchResults .searchResult { margin-bottom: 16px; margin-top: 24px; }
#searchResults .searchResult h3 { margin-bottom: 0; padding-bottom: 0; }
#searchResults .searchResult p { margin-top: 4px; }

/* ---- Express forms -----------------------------------------------------
   v9 wraps fields in .mb-3 instead of .form-group. Repeat the theme's
   rules that hide the job/event reference fields (application.css). */
.ccm-page.page-type-job .ccm-dashboard-express-form fieldset .mb-3:nth-last-child(-n+2) { visibility: hidden; height: 0; overflow: hidden; margin: 0; }
.ccm-page.page-type-event .ccm-dashboard-express-form fieldset .mb-3:last-child { visibility: hidden; height: 0; overflow: hidden; }
.ccm-dashboard-express-form .mb-3 { margin-bottom: 15px; }
.form-label { display: inline-block; max-width: 100%; margin-bottom: 5px; font-weight: 700; }
.form-select { display: block; width: 100%; height: 34px; padding: 6px 12px; font-size: 14px; color: #555; background-color: #fff; border: 1px solid #ccc; border-radius: 4px; }
/* v9 prints the server timezone under date fields */
input[type="date"] + .text-muted { display: none; }

/* ---- Other BS5 utilities used by v9 core templates ---------------------- */
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.d-none { display: none !important; }
.float-end { float: right !important; }
.float-start { float: left !important; }
.mb-3 { margin-bottom: 1rem; }
