/*
 * Static-page shell (Phase 3H — docs/STATIC-PAGES-IMPLEMENTATION.md §4).
 * Styles the real WordPress block-editor content on About/Contact/Delivery/
 * Returns/Warranty/Privacy/Terms/FAQ/Business Customers/Customer Support —
 * every one of those is a plain Page rendered through the existing
 * `page.php` (`the_content()`), so this file targets `.entry-content` and a
 * small set of block "additional CSS class" hooks content editors apply in
 * wp-admin, not bespoke PHP templates. Reuses `.bholats-card`/
 * `.bholats-info-card` (cards.css), `.bholats-alert` (feedback.css), and
 * `.bholats-accordion__*` (navigation.css) rather than duplicating any of
 * them — this file only adds what those don't already cover.
 */

/* --- Page shell --- */

body.page .bholats-main {
	padding-top: var(--space-6);
	padding-bottom: var(--space-16);
}

.bholats-static-page__header {
	margin-bottom: var(--space-8);
}

/* H1 font styling is the site-wide default now (base.css) — only the
   page-specific margin is overridden here (a shorter gap than Cart/Account
   use, since the intro paragraph immediately below needs to read as part
   of the same opening statement, not a separate block). */
body.page h1 {
	margin: 0 0 var(--space-3);
}

.bholats-static-page__intro {
	font-size: var(--text-lg);
	line-height: var(--leading-relaxed);
	color: var(--color-text-secondary);
	max-width: var(--reading-width);
	margin: 0 0 var(--space-8);
}

/* Comfortable reading width for body copy — applied per direct child, not
   to the .entry-content wrapper itself. Phase 3K fix: the wrapper used to
   carry the same max-width as its children, which silently defeated the
   "full-width elements can break out" exception list below — a child's own
   max-width:none can't make it wider than an already-narrowed parent, so
   every info-card grid/table/related-pages nav/final-cta on every static
   page was rendering capped to ~70ch (confirmed visually: About/Business
   Customers/Customer Support card grids and every policy page's closing
   related-links row and CTA band were left-parked in a ~700px column with
   a wide dead strip beside them at 1440px — docs/PAGE-REQUIREMENTS.md's own
   "static pages can feel visually sparse" diagnosis). The wrapper now
   spans the full content area (bounded only by .bholats-main's existing
   1320px container); plain prose blocks stay comfortably narrow via the
   per-child rule, while the named structural components below are free to
   use the full width. */
.entry-content > * {
	max-width: var(--reading-width);
}
.entry-content .bholats-two-column,
.entry-content .bholats-info-cards,
.entry-content .bholats-contact-cards,
.entry-content .bholats-table-wrap,
.entry-content table,
.entry-content .bholats-accordion,
.entry-content .bholats-related-pages,
.entry-content .bholats-final-cta {
	max-width: none;
}

/* H2 font styling is the site-wide default now (base.css) — only the
   page-specific vertical rhythm (generous space above each new section,
   none before the very first one) is overridden here. */
.entry-content h2 {
	margin: var(--space-10) 0 var(--space-4);
}
.entry-content > h2:first-child { margin-top: 0; }

.entry-content h3 {
	font-size: var(--text-h3);
	font-weight: var(--font-weight-semibold);
	margin: var(--space-6) 0 var(--space-3);
}

.entry-content p {
	line-height: var(--leading-relaxed);
	margin: 0 0 var(--space-4);
}

.entry-content ul,
.entry-content ol {
	line-height: var(--leading-relaxed);
	margin: 0 0 var(--space-4);
	padding-left: var(--space-6);
}
.entry-content li { margin-bottom: var(--space-2); }

/* :not(.bholats-btn) — otherwise this beats .bholats-btn--primary's own
   white text on specificity ((0,1,1) vs (0,1,0)), since a button-styled
   link (e.g. the final-CTA's "Shop now") is still inside .entry-content.
   Confirmed via axe-core: contrast dropped to 2.87 (brand-deep text on a
   brand-blue button background) before this exclusion was added. */
.entry-content a:not(.bholats-btn) {
	color: var(--color-brand-deep);
	text-decoration: underline;
	text-underline-offset: 2px;
}
.entry-content a:not(.bholats-btn):hover { color: var(--color-brand-blue); }

/* Long tokens (emails, URLs) must wrap rather than force horizontal
   overflow on narrow viewports (brief's explicit responsive requirement). */
.entry-content a,
.entry-content address,
.entry-content td,
.entry-content th {
	overflow-wrap: break-word;
	word-break: break-word;
}

/* --- Two-column section (e.g. About's "who we are" / "what we sell") --- */

.bholats-two-column {
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--space-6);
	margin: 0 0 var(--space-8);
}
@media (min-width: 768px) {
	.bholats-two-column { grid-template-columns: 1fr 1fr; gap: var(--space-8); }
}

/* --- Information card grid (reuses .bholats-card/.bholats-info-card —
   editors apply both classes plus this wrapper's child class in the block
   editor's "additional CSS class" field) --- */

.bholats-info-cards {
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--space-4);
	margin: 0 0 var(--space-8);
}
@media (min-width: 600px) {
	.bholats-info-cards { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
	.bholats-info-cards--3up { grid-template-columns: repeat(3, 1fr); }
}

/* --- Contact cards (Contact page: phone/email/WhatsApp/address/hours —
   only ever rendered when inc/static-pages.php confirms a real value) --- */

.bholats-contact-cards {
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--space-4);
	margin: 0 0 var(--space-8);
}
@media (min-width: 600px) {
	.bholats-contact-cards { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
}

.bholats-contact-card {
	display: flex;
	flex-direction: column;
	gap: var(--space-2);
	padding: var(--space-5);
}

.bholats-contact-card__label {
	font-size: var(--text-xs);
	text-transform: uppercase;
	letter-spacing: var(--tracking-wide);
	color: var(--color-text-secondary);
	font-weight: var(--font-weight-semibold);
}

.bholats-contact-card__value {
	font-size: var(--text-base);
	font-weight: var(--font-weight-medium);
	color: var(--color-text-primary);
}
.bholats-contact-card__value a { color: inherit; text-decoration: none; }
.bholats-contact-card__value a:hover { color: var(--color-brand-blue); text-decoration: underline; }

/* --- Definition list (glossary-style: e.g. Terms defined terms) --- */

.entry-content dl { margin: 0 0 var(--space-6); }
.entry-content dt { font-weight: var(--font-weight-semibold); color: var(--color-text-primary); margin-top: var(--space-3); }
.entry-content dd { margin: var(--space-1) 0 0; color: var(--color-text-secondary); line-height: var(--leading-relaxed); }

/* --- Policy table (e.g. warranty/returns condition matrices) --- */

.bholats-table-wrap {
	overflow-x: auto;
	margin: 0 0 var(--space-8);
	border: var(--border-default);
	border-radius: var(--radius-md);
}
.bholats-table-wrap table {
	width: 100%;
	border-collapse: collapse;
	font-size: var(--text-sm);
}
.bholats-table-wrap th,
.bholats-table-wrap td {
	text-align: left;
	padding: var(--space-3) var(--space-4);
	border-bottom: var(--border-default);
	vertical-align: top;
}
.bholats-table-wrap thead th {
	background: var(--color-surface-sunken);
	font-weight: var(--font-weight-semibold);
	text-transform: uppercase;
	font-size: var(--text-xs);
	letter-spacing: var(--tracking-wide);
	color: var(--color-text-secondary);
}
.bholats-table-wrap tr:last-child td { border-bottom: none; }

/* --- FAQ accordion: reuses .bholats-accordion__* verbatim; this only
   provides the outer grouping/spacing per category. --- */

.bholats-faq-category { margin: 0 0 var(--space-10); }
.bholats-faq-category:last-child { margin-bottom: 0; }
.bholats-faq-category__title {
	font-family: var(--font-display);
	font-size: var(--text-h3);
	font-weight: var(--font-weight-semibold);
	margin: 0 0 var(--space-2);
}
.bholats-accordion { max-width: none; }

/* --- Related-page navigation --- */

.bholats-related-pages {
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--space-3);
	margin: var(--space-10) 0;
	padding-top: var(--space-8);
	border-top: var(--border-default);
}
@media (min-width: 600px) {
	.bholats-related-pages { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
}
.bholats-related-pages__link {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: var(--space-4);
	font-weight: var(--font-weight-semibold);
	color: var(--color-text-primary);
	text-decoration: none;
}
.bholats-related-pages__link:hover { color: var(--color-brand-blue); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.bholats-related-pages__link:focus-visible { outline: none; box-shadow: var(--shadow-focus), var(--shadow-md); }

/* --- Final call to action --- */

.bholats-final-cta {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: var(--space-4);
	padding: var(--space-8);
	background: var(--color-brand-ink);
	color: var(--color-text-on-brand);
	border-radius: var(--radius-lg);
	margin: var(--space-10) 0 0;
}
.bholats-final-cta h2,
.bholats-final-cta p { color: inherit; margin: 0; }
.bholats-final-cta__actions { display: flex; flex-wrap: wrap; gap: var(--space-3); }

/* --- Contact form (bholats-core's [bholats_contact_form] shortcode) --- */

.bholats-contact-form { max-width: 60ch; }
.bholats-contact-form .bholats-form-row { margin-bottom: var(--space-4); }
.bholats-contact-form label {
	display: block;
	font-size: var(--text-sm);
	font-weight: var(--font-weight-medium);
	color: var(--color-text-secondary);
	margin-bottom: var(--space-1);
}
.bholats-contact-form .required { color: var(--color-error); }
.bholats-contact-form input[type="text"],
.bholats-contact-form input[type="email"],
.bholats-contact-form select,
.bholats-contact-form textarea {
	width: 100%;
	min-height: 48px;
	padding: var(--space-2) var(--space-3);
	border: var(--border-default);
	border-radius: var(--radius-md);
	font-family: var(--font-body);
	font-size: var(--text-base);
	background: var(--color-surface);
	color: var(--color-text-primary);
}
.bholats-contact-form textarea { min-height: 140px; }
.bholats-contact-form input:focus,
.bholats-contact-form select:focus,
.bholats-contact-form textarea:focus {
	outline: none;
	box-shadow: var(--shadow-focus);
	border-color: var(--color-brand-blue);
}
.bholats-form-hint { font-size: var(--text-xs); color: var(--color-text-secondary); margin: 0 0 var(--space-2); }

/* Honeypot: off-screen, not display:none (some bots skip display:none
   fields but still fill in off-screen ones — see class-contact-form.php). */
.bholats-contact-form__honeypot {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.bholats-contact-form__submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 48px;
	padding: var(--space-3) var(--space-6);
	border: none;
	border-radius: var(--radius-md);
	background: var(--color-brand-blue);
	color: var(--color-text-on-brand);
	font-family: var(--font-body);
	font-size: var(--text-sm);
	font-weight: var(--font-weight-semibold);
	cursor: pointer;
	transition: background-color var(--duration-base) var(--ease-standard), transform var(--duration-fast) var(--ease-out);
}
.bholats-contact-form__submit:hover { background: var(--color-brand-bright); transform: translateY(-1px); }
.bholats-contact-form__submit:focus-visible { outline: none; box-shadow: var(--shadow-focus); }

/* --- Business-decision / awaiting-confirmation callout ---
   Reuses .bholats-alert--warning verbatim; this file adds nothing extra —
   included here only as a docblock note for content editors: wrap
   still-pending policy sections in
   <div class="bholats-alert bholats-alert--warning"><div class="bholats-alert__content">…</div></div>
   rather than inventing a new box. */
