/**
 * Print Styles
 *
 * Loaded with media="print" for proper specificity and non-blocking performance.
 * These styles only apply when printing.
 *
 * @package TMW_Core_Child
 */

/* ----- Page Setup ----- */

/* Set page margins to 0 to hide browser headers/footers (URL, date, page numbers) */

/* Content padding is added to body to compensate */
@page {
    margin: 0;
    size: auto;
}

/* ----- Hide Non-Essential Elements ----- */
.site-navigation,
.header-buttons,
.announcement-bar,
.nav-menu,
.nav-menu--mobile,
.sidebar,
.sidebar-cta,
.social-share-links,
.social-links,
.back-to-top,
.cookie-banner,
.popup,
.modal,
.no-print,
form,
audio,
iframe:not(.print-iframe) {
    display: none !important;
}

/* ----- Reset Backgrounds & Colors ----- */
*,
*::before,
*::after {
    background: transparent !important;
    color: #000000 !important;
    box-shadow: none !important;
    text-shadow: none !important;
}

/* ----- Buttons as Outline Style ----- */
button,
.btn,
.btn-primary,
.btn-secondary,
.btn-light,
.wp-block-button__link {
    display: inline-block !important;
    background: transparent !important;
    border: 1px solid #000000 !important;
    padding: 0.5em 1em !important;
    color: #000000 !important;
    text-decoration: none !important;
    font-weight: normal !important;
}

button::after,
.btn::after {
    background: transparent !important;
}

/* ----- Gutenberg Color Class Overrides -----
   Override all Gutenberg has-*-color and has-*-background-color classes */
[class*="has-"][class*="-color"],
[class*="has-"][class*="-background-color"],
[class*="has-"][class*="-gradient-background"] {
    background: transparent !important;
    color: #000000 !important;
}

section {
    background: transparent !important;
}

/* Hide button arrows/icons */
.btn::after,
.btn svg,
.wp-block-button__link::after {
    display: none !important;
}

/* ----- Typography ----- */
body {
    padding: 2cm;
    font-size: 12pt;
    line-height: 1.5;
}

h1 {
    font-size: 24pt;
}

h2 {
    font-size: 20pt;
}

h3 {
    font-size: 16pt;
}

h4,
h5,
h6 {
    font-size: 14pt;
}

p,
li,
td,
th {
    orphans: 3;
    widows: 3;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    page-break-after: avoid;
    break-after: avoid;
}

/* ----- Links ----- */
a,
a:visited {
    text-decoration: underline;
}

/* ----- Images ----- */
img {
    max-width: 100% !important;
    page-break-inside: avoid;
    break-inside: avoid;
}

/* ----- Tables ----- */
table {
    border-collapse: collapse;
}

table,
th,
td {
    border: 1px solid #000000;
}

thead {
    display: table-header-group;
}

tr {
    page-break-inside: avoid;
    break-inside: avoid;
}

/* ----- Page Breaks ----- */
.page-break-before {
    page-break-before: always;
    break-before: always;
}

.page-break-after {
    page-break-after: always;
    break-after: always;
}

.no-break {
    page-break-inside: avoid;
    break-inside: avoid;
}

/* ----- Content Width ----- */
.container,
.wp-block-group,
main,
article {
    max-width: 100% !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
}
