/* ==========================================================================
   Believe Housing – print stylesheet
   Theme: mw-believehousing
   Created: 2026-12-04

   Everything sits inside @media print, so this has no effect on screen.
   Safe to enqueue with media="all" or "print", or to paste into the
   bottom of an existing theme stylesheet.
   ========================================================================== */

@media print {

  /* ------------------------------------------------------------------------
     1. Page setup
     ------------------------------------------------------------------------ */

  @page {
    size: A4;
    margin: 18mm 16mm 20mm;
  }

  html,
  body {
    background: #fff !important;
    color: #000 !important;
    font-family: Lato, Arial, Helvetica, sans-serif;
    font-size: 11pt;
    line-height: 1.45;
    margin: 0 !important;
    padding: 0 !important;
  }

  *,
  *::before,
  *::after {
    background: transparent !important;
    background-image: none !important;
    color: #000 !important;
    box-shadow: none !important;
    text-shadow: none !important;
    -webkit-print-color-adjust: economy;
    print-color-adjust: economy;
  }

  /* ------------------------------------------------------------------------
     2. Hide site furniture
     ------------------------------------------------------------------------ */

  /* Header: everything except the logo */
  .g__notifications,
  .g__header__right,
  .g__header__search,
  .g__header__nav,
  #site-header > input,

  /* Footer, back-to-top, cookie banner, chat widget */
  #site-footer,
  #top-btn,
  #ccc,
  .five9-frame,
  [class*="five9"],

  /* Hero decoration, video toggle and buttons */
  .c__hero__bg,
  .c__hero__bg__toggle,
  .c__hero__contentBtns,

  /* Slider and news teaser images: lazy-loaded CSS backgrounds that
     can't print reliably, so print these modules as text only */
  .slick-cloned,
  .m__section__image,
  .c__tease__img,

  /* Report template: table of contents sidebar (on-screen navigation) */
  .single-report__side,

  /* Page modules that only make sense on screen */
  .m__twoThirds__sidebar,
  .m__promoBlock,
  .m__promo__block,
  .m__form,
  .m__tabs__bar,
  .m__tabs input,
  .m__accordion input,

  /* General interactive elements */
  form,
  button,
  input,
  select,
  textarea,
  iframe,
  video,
  audio,
  .slick-arrow,
  .slick-dots,
  .sr-only,
  .screen-reader-text {
    display: none !important;
  }

  /* ------------------------------------------------------------------------
     3. Header – logo only, top of first page
     ------------------------------------------------------------------------ */

  #site-header {
    position: static !important;
    height: auto !important;
    padding: 0 0 6mm !important;
    margin: 0 0 6mm !important;
    border-bottom: 1pt solid #000;
  }

  #site-header .g__headerMain,
  #site-header .l__contain,
  #site-header .l__row {
    display: block !important;
    position: static !important;
    width: auto !important;
    max-width: none !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  .g__header__logo {
    display: block !important;
  }

  .g__header__logo img {
    display: block;
    width: auto !important;
    height: 14mm !important;
    max-width: 60mm !important;
  }

  /* ------------------------------------------------------------------------
     4. Layout – single full-width column
     ------------------------------------------------------------------------ */

  #site-content,
  .l__contain,
  .l__row,
  .l__col,
  [class*="l__col__span"],
  [class*="l__col__offby"],
  .m__twoThirds--wrap,
  .single-report,
  .single-report__wrap,
  .single-report__main,
  .single-report__main__chapter {
    display: block !important;
    float: none !important;
    position: static !important;
    width: auto !important;
    max-width: none !important;
    min-height: 0 !important;
    height: auto !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    transform: none !important;
  }

  .c__block,
  .m__textBlock,
  .m__section,
  .single-report__main__chapter {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    margin-top: 0 !important;
    margin-bottom: 4mm !important;
  }

  /* ------------------------------------------------------------------------
     5. Hero – keep the page title, lose the styling
     ------------------------------------------------------------------------ */

  .c__hero,
  .c__hero .l__contain,
  .c__hero__content {
    display: block !important;
    position: static !important;
    height: auto !important;
    min-height: 0 !important;
    padding: 0 !important;
    margin: 0 0 6mm !important;
  }

  .c__hero__content,
  .c__hero__content > div {
    width: auto !important;
    max-width: none !important;
    flex: none !important;
    text-align: left !important;
  }

  .single-report,
  .single-report__wrap,
  .single-report__main {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
  }

  .c__hero::before,
  .c__hero::after {
    display: none !important;
    content: none !important;
  }

  /* ------------------------------------------------------------------------
     6. Typography
     ------------------------------------------------------------------------ */

  h1, h2, h3, h4, h5, h6 {
    font-family: Lato, Arial, Helvetica, sans-serif;
    font-weight: 700;
    line-height: 1.25;
    text-align: left !important;
    margin: 6mm 0 2mm !important;
    padding: 0 !important;
    break-after: avoid;
    page-break-after: avoid;
  }

  h1 { font-size: 20pt; margin-top: 0 !important; }
  h2 { font-size: 15pt; }
  h3 { font-size: 13pt; }
  h4, h5, h6 { font-size: 11.5pt; }

  .single-report__main__chapter__title {
    padding: 0 !important;
    margin: 0 !important;
    break-after: avoid;
    page-break-after: avoid;
  }

  p, li, td, th, blockquote {
    font-size: 11pt;
    orphans: 3;
    widows: 3;
  }

  p {
    margin: 0 0 3mm !important;
  }

  ul, ol {
    margin: 0 0 3mm 6mm !important;
    padding-left: 4mm !important;
  }

  /* Bullets often come from background images or ::before icons on screen */
  ul li { list-style: disc outside !important; }
  ol li { list-style: decimal outside !important; }

  li {
    margin: 0 0 1.5mm !important;
    padding-left: 0 !important;
  }

  li::before {
    display: none !important;
  }

  /* ------------------------------------------------------------------------
     7. Links – show URLs after link text
     ------------------------------------------------------------------------ */

  a {
    text-decoration: underline;
  }

  /* Only for links inside running text and tables – link lists and
     download blocks would otherwise fill the page with URLs */
  #site-content p a[href^="http"]::after,
  #site-content td a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-size: 9pt;
    font-weight: 400;
    word-break: break-all;
  }

  /* Don't print URLs for anchors, phone, email or links wrapping images */
  #site-content a[href^="#"]::after,
  #site-content a[href^="tel:"]::after,
  #site-content a[href^="mailto:"]::after,
  #site-content a:has(img)::after {
    content: none !important;
  }

  /* ------------------------------------------------------------------------
     8. Accordions and tabs – print every panel, expanded
     ------------------------------------------------------------------------ */

  .m__accordion .m__accordion-item__body {
    max-height: none !important;
    height: auto !important;
    overflow: visible !important;
    opacity: 1 !important;
    visibility: visible !important;
    display: block !important;
    padding: 0 0 2mm !important;
  }

  .m__accordion-item__heading {
    display: block !important;
    font-weight: 700;
    font-size: 12pt;
    margin: 4mm 0 2mm !important;
    padding: 0 !important;
    border: 0 !important;
    break-after: avoid;
    page-break-after: avoid;
  }

  .m__accordion-item__heading::before,
  .m__accordion-item__heading::after {
    display: none !important;
  }

  .m__tabs__panel {
    display: block !important;
    overflow: visible !important;
    margin-bottom: 4mm !important;
  }

  .m__tabs .img,
  .m__tabs div[data-bkimage] {
    display: none !important;
  }

  /* ------------------------------------------------------------------------
     8a. Scroll animations – elements with data-anim start invisible and
         only fade in when scrolled into view, so force them visible
     ------------------------------------------------------------------------ */

  [data-anim] {
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    animation: none !important;
    transition: none !important;
  }

  /* ------------------------------------------------------------------------
     8b. Slick sliders (homepage slider) – print every slide, stacked.
         On screen Slick offsets the track in pixels based on screen width,
         which points at empty space at print width.
     ------------------------------------------------------------------------ */

  .slick-list {
    overflow: visible !important;
    height: auto !important;
  }

  .slick-track {
    transform: none !important;
    width: auto !important;
    height: auto !important;
    left: 0 !important;
  }

  .slick-slide {
    display: block !important;
    float: none !important;
    width: auto !important;
    height: auto !important;
    opacity: 1 !important;
    visibility: visible !important;
    position: static !important;
    margin: 0 0 5mm !important;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  /* Slick's duplicate slides for infinite looping */
  .slick-slide.slick-cloned {
    display: none !important;
  }

  .m__section {
    display: block !important;
    min-height: 0 !important;
  }

  /* Higher specificity than the l__col layout reset in section 4 */
  #site-content .m__section .m__section__image,
  #site-content .c__tease .c__tease__img,
  #site-content a.btn {
    display: none !important;
  }

  #site-content .m__section .m__section__content {
    padding: 0 !important;
    margin: 0 !important;
  }

  /* ------------------------------------------------------------------------
     8c. News teasers (latest from believe housing)
     ------------------------------------------------------------------------ */

  /* Card grid wrapper – stack the cards instead of four narrow columns */
  .c__listings .l__col__evenpad,
  .c__listings .l__gridmaintain,
  .c__listings .l__news-wave {
    display: block !important;
    width: auto !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .c__listings .c__tease,
  .c__listings .c__tease > a,
  .c__tease__content {
    display: block !important;
    width: auto !important;
    height: auto !important;
    min-height: 0 !important;
    overflow: visible !important;
    padding: 0 !important;
  }

  .c__listings .c__tease {
    max-width: none !important;
    flex: none !important;
    margin: 0 0 5mm !important;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .c__listings .c__tease > a {
    text-decoration: none !important;
  }

  .c__tease__content--categoryDate {
    display: block !important;
    font-size: 9pt;
    margin: 0 0 1mm !important;
  }

  .c__tease__content__link {
    display: none !important;
  }

  /* ------------------------------------------------------------------------
     9. Tables (TablePress and general)
     ------------------------------------------------------------------------ */

  table,
  .tablepress {
    width: 100% !important;
    border-collapse: collapse !important;
    margin: 0 0 5mm !important;
    font-size: 10pt;
  }

  thead {
    display: table-header-group; /* repeat header row on each page */
  }

  tr,
  img,
  figure {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  /* ID prefix beats TablePress's own coloured header/striping rules,
     which would otherwise leave white text on a white page */
  #site-content table tr,
  #site-content table th,
  #site-content table td,
  #site-content .tablepress tr,
  #site-content .tablepress th,
  #site-content .tablepress td,
  #site-content .tablepress th *,
  #site-content .tablepress td * {
    background: #fff !important;
    background-color: #fff !important;
    color: #000 !important;
  }

  #site-content table th,
  #site-content table td {
    border: 0.75pt solid #000 !important;
    padding: 1.5mm 2mm !important;
    text-align: left !important;
    vertical-align: top !important;
  }

  #site-content table th,
  #site-content .tablepress thead th {
    font-weight: 700 !important;
  }

  /* Hide TablePress search/pagination controls if DataTables is enabled */
  .dataTables_filter,
  .dataTables_length,
  .dataTables_info,
  .dataTables_paginate,
  .dt-search,
  .dt-length,
  .dt-info,
  .dt-paging {
    display: none !important;
  }

  /* ------------------------------------------------------------------------
     10. Images
     ------------------------------------------------------------------------ */

  img {
    max-width: 100% !important;
    height: auto;
  }

  /* Decorative/background-image blocks carry no print value */
  [data-bkimage] {
    min-height: 0 !important;
  }
}