/**
 * Print Stylesheet
 *
 * Loaded with media="print" (see gentrylocke_enqueue_print_styles() in
 * functions.php), so none of this affects screen rendering.
 *
 * Covers two layers:
 *   1. Site-wide chrome/interactivity that never belongs on a printed
 *      page (header, footer, sliders, back-to-top, hidden accordion
 *      panels, etc.) — this is the `gentrylocke-print` layer below.
 *   2. Attorney bio page specifics (single-attorney template + its
 *      attorney-header/attorney-bio/attorney-details blocks), triggered
 *      by the Print action button in blocks/attorney-header/template.php.
 */

/* ── Page setup ─────────────────────────────────────────────────────── */

@page {
	margin: 1.5cm;
}

:root {
	/* 14px at the default 16px root size; rem so it still tracks user
	   font-size settings. */
	--gentrylocke-print-font-size: 0.875rem;
}

/* ── Site-wide chrome: never printed ───────────────────────────────── */

.site-footer,
.back-to-top,
.gl-why-widget,
#wpadminbar,
.skip-link {
	display: none !important;
}

/* Site header: the client wants the logo kept in the top-left of every
   printed page rather than dropping the header entirely, so — unlike
   every other piece of site chrome above — .site-header stays, but
   everything in it except the logo (utility links, primary nav) is
   hidden and the rest of its layout is stripped down to just that mark. */

.site-header__utility,
.primary-menu {
	display: none !important;
}

.site-header,
.site-header__inner {
	background: none !important;
}

.site-header__main {
	justify-content: flex-start !important;
	padding: 0 !important;
	margin-bottom: 1rem;
}

.site-header__logo-image {
	width: 140px;
}

body {
	background: #fff !important;
	color: #000;
	font-size: var(--gentrylocke-print-font-size);
}

/* Reset core blocks (and anything carrying a font-size preset class like
   .has-large-font-size) to the print default size. Headings and the post title
   are left out so they keep their hierarchy. */
:is([class*="wp-block-"], [class*="-font-size"]):not(:is(h1, h2, h3, h4, h5, h6, .wp-block-heading, .wp-block-post-title)) {
	font-size: var(--gentrylocke-print-font-size) !important;
}

/* Avoid single stranded lines at page breaks, and keep headings with the
   content that follows them. */
p,
li,
blockquote {
	orphans: 3;
	widows: 3;
}

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

main.wp-block-group {
	margin-top: 0 !important;
}

/* ── Links ──────────────────────────────────────────────────────────── */

a {
	color: #000;
	text-decoration: underline;
}

/* Spell out link destinations, since a printed page can't be clicked.
   Skipped for in-page anchors and script links (meaningless on paper),
   mailto:/tel: links (the visible text is already the address/number),
   and the header logo link. */
a[href]::after {
	content: " (" attr(href) ")";
	font-size: 0.85em;
	font-weight: normal;
	word-break: break-all;
}

a[href^="#"]::after,
a[href^="javascript:"]::after,
a[href^="mailto:"]::after,
a[href^="tel:"]::after,
.site-header a::after {
	content: none;
}

/* ── Force-expand anything collapsed for screen interaction ───────────
   Two different accordion implementations are in play here, and both
   need unfurling: the theme's own hand-rolled markup (FAQs,
   attorney-details left/right columns) hides panels with the `hidden`
   attribute, while the real core/accordion block (accordion-item /
   accordion-heading / accordion-panel) hides its panel with
   `aria-hidden="true"` or `inert` instead — see
   wp-includes/blocks/accordion-panel/style.css. Nothing should stay
   collapsed on a printed page either way. */

.wp-block-accordion-content[hidden],
.wp-block-accordion-panel[aria-hidden="true"],
.wp-block-accordion-panel[inert],
[hidden] {
	display: block !important;
}

.wp-block-accordion-heading__toggle-icon,
.attorney-details__accordion-toggle .wp-block-accordion-heading__toggle-icon {
	display: none !important;
}

.wp-block-accordion-heading__toggle {
	cursor: default;
}

/* ── Sliders / carousels: every slide should print, stacked in flow ───
   Every Splide instance in this theme (carousel, news-slider, team-slider,
   feature-carousel, marquee-slider, hero-slider) shares the same vendor
   markup — .splide > .splide__track > .splide__list > .splide__slide — so
   one generic override reaches all of them instead of repeating this per
   block. Splide positions slides with an inline transform (track sliding)
   or, for type:'fade' (hero-slider), stacks them with position:absolute
   and opacity; both are beaten by the !important declarations below. */

.splide__track {
	overflow: visible !important;
	width: auto !important;
}

.splide__list {
	display: flex !important;
	flex-wrap: wrap !important;
	transform: none !important;
	width: auto !important;
	height: auto !important;
}

/* Slide width is left alone deliberately: most of these blocks give each
   slide a real width (fixedWidth, a perPage percentage, or autoWidth
   content sizing) that still makes sense wrapped into rows here. Only
   position/visibility need overriding to get every slide showing at once. */
.splide__slide {
	position: static !important;
	opacity: 1 !important;
	visibility: visible !important;
	transform: none !important;
	break-inside: avoid;
}

/* Splide's type:'loop' clones slides at each end to fake infinite looping;
   those clones must not print as duplicate content. */
.splide__slide--clone {
	display: none !important;
}

.splide__arrows,
.splide__pagination,
[class$="__controls"],
[class*="__arrow--"],
[class$="__pagination"],
[class$="__pause-btn"] {
	display: none !important;
}

/* Team Slider: name/subtitle only shows on the "active" card (opacity:0
   otherwise), the rest just showing a dark overlay with no label — force
   every card into its active look so each team member is identifiable. */
.team-slider__overlay--flat {
	opacity: 0 !important;
}

.team-slider__overlay--gradient {
	opacity: 1 !important;
}

.team-slider__info {
	opacity: 1 !important;
	transform: none !important;
}

.team-slider__card {
	height: auto !important;
	aspect-ratio: 4 / 5;
}

/* Hero Slider: type:'fade' cutout images are position:absolute;inset:0 over
   a fixed-height, overflow:hidden stage so only the active slide shows —
   the generic .splide__slide override above can't reach the <img> itself,
   and the stage would otherwise clip every slide but the first to nothing. */
.hero-slider__stage {
	height: auto !important;
	overflow: visible !important;
}

.hero-slider__circle,
.hero-slider__lines,
.hero-slider__pause-btn {
	display: none !important;
}

.hero-slider__slides,
.hero-slider__slides .splide__track,
.hero-slider__slides .splide__list {
	position: static !important;
	max-width: none !important;
	height: auto !important;
}

/* Slide images are transparent cutouts meant to be cropped to a 2:1 box
   (object-fit:cover), not printed at their tall, narrow intrinsic size —
   so each slide keeps that 2:1 box (position:relative, overriding the
   generic .splide__slide rule above) instead of switching to static/auto,
   which would blow the cutout up to its full intrinsic height. */
.hero-slider__slide {
	position: relative !important;
	height: auto !important;
	aspect-ratio: 2 / 1;
	margin-bottom: 1rem !important;
}

.hero-slider__title,
.hero-slider__subtitle {
	position: static !important;
	color: #000 !important;
	background: none !important;
	text-shadow: none !important;
}

/* ── Decorative background art: saves ink, avoids dark print blocks ── */

.is-style-circle-dark-green::before {
	display: none !important;
}

.is-style-circle-dark-green,
.is-style-primary-bg,
.is-style-primary-half-bg,
.is-style-accent-bg,
.is-style-accent-half-bg,
.has-background {
	background-color: transparent !important;
	background-image: none !important;
	color: #000 !important;
}

/* Doubled-up class beats the theme's own `.is-style-dark X` /
   `.is-style-circle-dark-green X` two-class selectors (e.g. news-slider's
   white-on-dark title) without hunting down every one of them by name —
   `.foo.foo` matches the same element as `.foo` but counts as two classes
   for specificity, and print.css loads after style.css so ties go to us. */
.has-background.has-background *,
.is-style-dark.is-style-dark *,
.is-style-circle-dark-green.is-style-circle-dark-green *,
.is-style-primary-bg.is-style-primary-bg *,
.is-style-primary-half-bg.is-style-primary-half-bg *,
.is-style-accent-bg.is-style-accent-bg *,
.is-style-accent-half-bg.is-style-accent-half-bg * {
	color: #000 !important;
}

.is-style-circle-dark-green .wp-block-accordion-item {
	border-bottom-color: #999 !important;
}

/* ── Media/Text blocks: media on top, content below, left-aligned ─────
   Core's own mobile stacking (wp-includes/blocks/media-text/style.css)
   only kicks in under a max-width:600px media query, and the theme's own
   center-aligned version of that stack (style.css) only kicks in under
   max-width:781px — neither reliably matches a printed page's width, so
   force the same stack here instead of leaning on either breakpoint.
   has-media-on-the-right normally swaps media to grid-column 2 without
   changing its row, i.e. side-by-side; pin both to column 1 with media on
   row 1 so it always lands on top regardless of that variant. */

.wp-block-media-text {
	grid-template-columns: 100% !important;
	text-align: left !important;
	justify-content: normal !important;
}

/* !important on the grid placement: core's own .has-media-on-the-right
   variant targets these same elements with a 3-class selector
   (.wp-block-media-text.has-media-on-the-right>.wp-block-media-text__media),
   which outranks this 2-class one on specificity alone. */
.wp-block-media-text > .wp-block-media-text__media {
	grid-column: 1 !important;
	grid-row: 1 !important;
	margin-inline: 0 !important;
	margin-block-end: 1.5rem;
	min-height: 0 !important;
}

.wp-block-media-text > .wp-block-media-text__content {
	grid-column: 1 !important;
	grid-row: 2 !important;
}

.wp-block-media-text ul,
.wp-block-media-text ol {
	text-align: left;
}

/* is-style-media-breakout pulls the media edge-to-edge past the content
   column with a negative margin — meaningless once stacked to one column. */
.wp-block-media-text.is-style-media-breakout > .wp-block-media-text__media {
	margin-left: 0 !important;
	margin-right: 0 !important;
}

/* ── Flip Card / Location Card: expand front+back into a stack ────────
   Both blocks share identical structure — .{x}-card-block > __inner >
   __face(--front|--back) — where each face is position:absolute;inset:0,
   stacked on top of the other and flipped into view with rotateY(180deg)
   on hover/focus. On paper there's no hover, so expand both faces into a
   plain top-to-bottom stack instead, and drop the photos entirely (they're
   purely decorative background behind the text, per the same treatment as
   the dark-bg sections above). */

.flip-card-block,
.location-card-block {
	aspect-ratio: auto !important;
	perspective: none !important;
	break-inside: avoid;
	margin-bottom: 1.5rem;
}

.flip-card-block__inner,
.location-card-block__inner {
	position: static !important;
	height: auto !important;
	transform: none !important;
}

.flip-card-block__face,
.location-card-block__face {
	position: static !important;
	inset: auto;
	align-items: flex-start !important;
	justify-content: flex-start !important;
	text-align: left !important;
	transform: none !important;
}

.flip-card-block__image,
.location-card-block__image,
.flip-card-block__overlay,
.location-card-block__overlay {
	display: none !important;
}

.flip-card-block__title-wrap,
.flip-card-block__face--front .flip-card-block__title {
	background: none !important;
	padding: 0 !important;
}

/* The back face repeats the same title the front face already shows —
   drop the duplicate rather than printing it twice. */
.flip-card-block__content .flip-card-block__title,
.location-card-block__content .location-card-block__title {
	display: none !important;
}

.flip-card-block__title,
.location-card-block__title,
.flip-card-block__content,
.location-card-block__content {
	color: #000 !important;
}

.flip-card-block__face--back,
.location-card-block__face--back {
	margin-top: 0.75rem;
	padding: 0.75rem 0 0 !important;
	border-top: 1px solid #999;
}

.location-card-block__cta {
	justify-content: flex-start;
}

/* ── Featured page hero (templates/page-featured.html) ─────────────────
   .featured-hero is a viewport-height half-circle (height:101.736vw/2)
   with the featured image clipped into it and the title absolutely
   positioned near the bottom in white — none of which survives print
   sizing gracefully. Collapse the whole thing down to just the title,
   in normal flow and in black. */

.featured-hero {
	height: auto !important;
	overflow: visible !important;
}

.featured-hero__circle {
	display: none !important;
}

.featured-hero__title {
	position: static !important;
	transform: none !important;
	left: auto;
	bottom: auto;
	color: #000 !important;
	margin-bottom: 0.5em !important;
}

/* ── Basic page hero (templates/page.html) ─────────────────────────────
   .page-hero__content already loses its dark-green background and gets
   black text from the generic .has-background rule above; the featured
   image above it just needs dropping, same as every other large/hero
   image in this stylesheet — decorative, not informational, on paper. */

.page-hero__image {
	display: none !important;
}

/* ── Tag / pill chips: hidden to save space and ink ───────────────────
   Any BEM __tag element (taxonomy labels on posts, attorney bio tags, etc.)
   and event category terms are dropped entirely. The __tag selectors match
   the class as either the last or a middle class, but not __tags wrappers. */

[class$="__tag"],
[class*="__tag "],
.event-terms__term {
	display: none !important;
}

/* News & Insights archive pill: same background/text-color fix, but
   plain text rather than a bordered chip — no padding to crowd against a
   border, normal weight instead of whatever it inherits, just a clear
   black label. */
.gl-news-archive__pill {
	background: none !important;
	color: #000 !important;
	padding: 0 !important;
	font-weight: normal !important;
}

/* ── News & Insights archive listing (includes/gl-news-archive.php) ────
   .gl-news-archive__grid ("Library") drops to 2 columns at
   max-width:1024px and 1 column at max-width:781px — a printed page is
   often narrower than that 781px breakpoint (e.g. ~720px on Letter with
   these margins), so it was collapsing to one full-width card per row,
   each with a large 3:2 image, which is what was pushing one card per
   page. Force the 2-column layout regardless of that breakpoint and trim
   the (screen-only-appropriate) 6rem row gap down to something print
   doesn't need to burn a page's worth of space on. */

.gl-news-archive__grid {
	grid-template-columns: repeat(2, 1fr) !important;
	gap: 2rem !important;
}

.gl-news-archive__card {
	break-inside: avoid;
}

/* ══════════════════════════════════════════════════════════════════════
   Attorney bio page (templates/single-attorney.html)
   ══════════════════════════════════════════════════════════════════════ */

/* Actions row (Team Members / Card / LinkedIn / Print) is screen-only UI. */
.attorney-header__actions {
	display: none !important;
}

/* Headshot beside name/title/meta, as on screen. A printed page is often
   narrower than the block's max-width:781px mobile breakpoint, which stacks
   and centers the header — force the two-column layout back regardless. */
.attorney-header {
	display: flex !important;
	flex-direction: row !important;
	align-items: flex-end !important;
	gap: 24px !important;
	text-align: left !important;
}

/* Screen styles leave 2rem under the text column; drop it so both columns
   rest on the same baseline at the bottom of the header. */
.attorney-header__content {
	margin-bottom: 0 !important;
}

.attorney-header__photo {
	flex: 0 0 auto;
	width: 33% !important;
	max-width: 220px !important;
	align-self: flex-end !important;
}

.attorney-header__name {
	margin-bottom: 0.15em;
	color: #000;
	font-size: 1.75rem !important; /* 28px */
}

.attorney-header__title {
	color: #000;
	font-size: 1.5rem !important; /* 24px */
}

/* Tags and actions are hidden in print, so the facts list is the last thing
   in the column — drop the margins that spaced it from them. */
.attorney-header__facts {
	margin-bottom: 0 !important;
}

.attorney-header__fact:last-child {
	margin-bottom: 0 !important;
}

.attorney-header__fact a {
	color: #000;
	text-decoration: none;
}

.attorney-header__tags {
	color: #000;
}

/* Bio: print the full text, not the clamped/collapsed preview. */
.attorney-bio {
	max-width: none;
	text-align: left;
}

.attorney-bio__content {
	max-height: none !important;
	overflow: visible !important;
	color: #000;
}

/* The collapsed-preview fade-out is screen-only — print the text solid. */
.attorney-bio__content--fade {
	-webkit-mask-image: none !important;
	mask-image: none !important;
}

.attorney-bio__links,
.attorney-bio__dials,
.attorney-bio__video-lightbox,
.attorney-bio .wp-video,
.attorney-bio .mejs-container {
	display: none !important;
}

/* Get to know me: the block's max-width:781px query centers the heading and
   Q&A list, and a printed page is usually narrower than that — keep it all
   left-aligned. Answers use the print default size. */
.attorney-details__heading,
.attorney-details__handshake,
.attorney-details__question,
.attorney-details__answer {
	text-align: left !important;
}

.attorney-details__answer {
	font-size: var(--gentrylocke-print-font-size) !important;
	orphans: 2;
	widows: 2;
}

/* Details: accordions (all forced open above) print as a single column
   rather than the two-column screen layout. */
.attorney-details__columns {
	grid-template-columns: 1fr !important;
}

.attorney-details__accordion-toggle {
	cursor: default;
	padding-bottom: 0.25em;
}

/* Breathing room between an accordion title and its content. */
.attorney-details .wp-block-accordion-heading {
	margin-bottom: 0.5em !important;
}

/* h4s inside the accordions (Admissions, Education, etc.) pinned to 21px. */
.attorney-details h4,
.attorney-details__sub-heading {
	font-size: 1.3125rem !important;
}

/* Accordion titles pinned to 25px (the h3 minimum). Both the <button> and
   the title <span> inside it carry wp-block- classes, so the core-block
   font-size reset above shrinks them to the 14px default; the extra
   specificity here beats that reset. */
.attorney-details .wp-block-accordion-heading .attorney-details__accordion-toggle,
.attorney-details .wp-block-accordion-heading .wp-block-accordion-heading__toggle-title {
	font-size: 1.5625rem !important;
}

/* News & Insights accordion: hidden entirely (title, list and divider). The
   item has no class of its own, so match it by the list it contains. */
.wp-block-accordion-item:has(.attorney-details__news) {
	display: none !important;
}
