/*
 * ---------------------------------------------------------------------
 * Modul 028: Impressum Artikelrahmen und Bildrundung
 * ---------------------------------------------------------------------
 */

/*
 * Der Rahmen übernimmt ausschließlich auf der Impressumseite die bereits
 * im Artikel-Layout verwendeten Werte. Inhalt, Typografie und bestehende
 * Gutenberg-Spalten bleiben unverändert.
 */
body.page .td-page-content.tagdiv-type,
body.page .td-page-content {
    box-sizing: border-box;
    padding: 20px 24px !important;
    border: 1px solid #e5e7eb;
    border-radius: 2px;
    background: #ffffff;
    box-shadow: none;
    padding-bottom: 32px !important;
    margin-bottom: 20px;
}


/*
 * Gutenberg erzeugt im Impressum nach dem Spaltenblock einen leeren
 * Schlussabsatz. Zusammen mit dem Blockabstand würde dieser die untere
 * Rahmenlinie unnötig weit vom letzten sichtbaren Inhalt wegschieben.
 */
body.page .td-page-content > p:empty {
    display: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

body.page .td-page-content > .wp-block-columns:last-of-type {
    margin-bottom: 0 !important;
}

body.page .td-page-content .wp-block-column > :last-child {
    margin-bottom: 0 !important;
}

/*
 * Das normale WordPress-Inhaltsbild der Impressumseite erhält dieselbe
 * Rundung wie die Artikelbilder. Kleine Theme-Icons oder sonstige
 * Seitenelemente werden dadurch nicht erfasst.
 */
body.page .td-page-content .wp-block-image img,
body.page .td-page-content .wp-caption img,
body.page .td-page-content img[class*="wp-image-"] {
    border-radius: 8px;
}

@media (max-width: 767px) {
    body.page .td-page-content.tagdiv-type,
    body.page .td-page-content {
        padding: 16px 14px !important;
        padding-bottom: 28px !important;
        margin-bottom: 16px;
    }
}
