/*
Theme Name: Byensnyt.dk
Theme URI: Byensnyt.dk
Template: Newspaper
Author: OnlineSynlighed.dk
Author URI: https://onlinesynlighed.dk
Version: 9.8.1567594885
Updated: 2019-09-04 11:01:25

*/

/* ============================================================
   BYENSNYT.DK - Facebook In-App Browser Fix
   Newspaper Theme (tagDiv)
   ============================================================
   Tilføj dette i child-temaets style.css
   ELLER i Theme Panel → Custom CSS
   EFTER den eksisterende custom CSS.
   ============================================================ */

/* === 1. GLOBAL OVERFLOW FIX === */
html, body {
    overflow-x: hidden !important;
    max-width: 100% !important;
}

/* === 2. NEWSPAPER WRAPPER-KLASSER === */
/* Newspaper bruger .td-outer-wrap som yderste container */
.td-outer-wrap {
    overflow-x: hidden !important;
    max-width: 100% !important;
}

/* Newspaper header-containere kan sprænge layoutet */
.td-header-wrap,
.td-header-menu-wrap,
.td-banner-wrap {
    max-width: 100% !important;
    overflow-x: hidden !important;
}

/* === 3. BILLEDER === */
/* Newspaper sætter ofte faste bredder via inline CSS på billeder */
.td-post-content img,
.td-post-featured-image img,
.entry-thumb,
.td-module-thumb img,
img {
    max-width: 100% !important;
    height: auto !important;
}

/* === 4. TABELLER I ARTIKLER === */
/* Newspaper-artikler kan indeholde tabeller fra editoren */
.td-post-content table {
    max-width: 100% !important;
    width: 100% !important;
    table-layout: fixed;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

.td-post-content td,
.td-post-content th {
    overflow-wrap: break-word;
    word-wrap: break-word;
    word-break: break-word;
}

/* === 5. IFRAMES OG EMBEDS === */
.td-post-content iframe,
.td-post-content embed,
.td-post-content object,
.td-post-content video {
    max-width: 100% !important;
}

/* === 6. PARTNER-LOGO SLIDER (RT WP Logo Slider / Slick) === */
.rt-wpls .slick-list,
.rt-wpls .slick-track,
.rt-wpls .slick-slider {
    max-width: 100% !important;
    overflow: hidden !important;
}

/* === 7. NEWSPAPER GRID / COLUMNS (td-pb-row / td-pb-span) === */
.td-pb-row {
    max-width: 100% !important;
    overflow-x: hidden !important;
}

/* === 8. NEWSPAPER SINGLE POST INDHOLD === */
.td-post-content,
.td-post-content p {
    overflow-wrap: break-word;
    word-wrap: break-word;
    word-break: break-word;
    max-width: 100% !important;
}

/* === 9. NEWSPAPER SIDEBAR WIDGETS / ANNONCER === */
.td-is-sticky .td-pb-span4,
.td-ss-main-sidebar,
.td-pb-span4 {
    max-width: 100% !important;
    overflow: hidden !important;
}

.td-a-rec img,
.td-ss-main-sidebar img,
.textwidget img,
.widget img {
    max-width: 100% !important;
    height: auto !important;
}

/* === 10. NEWSPAPER MEGA MENU === */
.td-mega-menu,
.sf-menu {
    max-width: 100% !important;
    overflow-x: hidden !important;
}

/* === 11. LANGE ORD OG URL'ER === */
.td-post-content p,
.td-post-content li,
.td-post-content a,
.td-post-content h1,
.td-post-content h2,
.td-post-content h3,
.td-post-content h4,
.td-post-content blockquote {
    overflow-wrap: break-word;
    word-wrap: break-word;
}

/* === 12. MOBIL-SPECIFIK FIX === */
/* Facebook in-app browser bruger typisk en viewport ~400-430px bred */
@media only screen and (max-width: 767px) {
    body {
        min-width: 0 !important;
        width: 100% !important;
    }

    /* Newspaper container på mobil */
    .td-container,
    .tdc-row,
    .td-pb-row,
    .vc_row,
    .wpb_row {
        max-width: 100% !important;
        overflow-x: hidden !important;
        padding-left: 15px !important;
        padding-right: 15px !important;
        box-sizing: border-box !important;
    }

    /* Newspaper span-kolonner til fuld bredde på mobil */
    .td-pb-span12,
    .td-pb-span9,
    .td-pb-span8,
    .td-pb-span6,
    .td-pb-span4,
    .td-pb-span3 {
        width: 100% !important;
        max-width: 100% !important;
    }

    /* Annoncebannere - vigtig synder */
    .td-a-rec,
    .td-a-rec img,
    .td-all-devices {
        max-width: 100% !important;
        overflow: hidden !important;
    }

    .td-a-rec img {
        height: auto !important;
    }

    /* Pre/code blokke */
    .td-post-content pre,
    .td-post-content code {
        white-space: pre-wrap !important;
        word-wrap: break-word !important;
        max-width: 100% !important;
    }

    /* Cookie/popup bannere */
    .cmplz-cookiebanner,
    .pum-container {
        max-width: 100% !important;
        overflow-x: hidden;
    }

    /* Newspaper social sharing */
    .td-post-sharing,
    .td-post-sharing-classic {
        max-width: 100% !important;
        flex-wrap: wrap !important;
        overflow: hidden !important;
    }

    /* Newspaper breadcrumbs kan blive for lange */
    .entry-crumbs {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        max-width: 100%;
    }
}