/*
Theme Name: Help-Now
Theme URI: https://help-now.com/
Author: Help-Now, LLC
Author URI: https://help-now.com/
Description: Client-support block theme for Help-Now, LLC (Managed IT Services). Home page link cards plus M365 status and reported-outages slots for plugins.
Requires at least: 6.6
Tested up to: 7.1
Requires PHP: 7.4
Version: 1.19.3
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: helpnow
*/

/* ==========================================================================
   Base
   ========================================================================== */

*,
*::before,
*::after
{
	box-sizing: border-box;
}

/* Always reserve room for the vertical scrollbar so the layout doesn't jump
   sideways between short pages (no scrollbar) and long ones. No effect where
   scrollbars overlay the page (phones, macOS default). */
html
{
	scrollbar-gutter: stable;
}

/* Template parts and sections butt together; spacing comes from each band. */
.wp-site-blocks > *
{
	margin-block-start: 0;
}

/* Keep the footer at the bottom of short pages. */
.wp-site-blocks
{
	display: flex;
	flex-direction: column;
	min-height: 100vh;
}

.wp-site-blocks > main,
.wp-site-blocks > .wp-block-group:not(.wp-block-template-part)
{
	flex: 1 0 auto;
}

:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible
{
	outline: 2px solid var(--wp--preset--color--accent);
	outline-offset: 2px;
}

img
{
	max-width: 100%;
	height: auto;
}

/* ==========================================================================
   Blueprint frame
   Square corners, 1px hairline, transparent fill, "+" registration marks.
   The marks are drawn by ::before so a plain Group with className
   "blueprint" is enough; no extra child elements are needed. Each mark is an
   11px cross centred on the corner of the padding box (as in the design).
   ========================================================================== */

.blueprint
{
	--hn-mark: rgba(29, 31, 32, 0.55);
	position: relative;
	border: 1px solid var(--wp--preset--color--divider);
	border-radius: 0;
	background-color: transparent;
}

.blueprint::before
{
	content: "";
	position: absolute;
	inset: -6px;
	pointer-events: none;
	background:
		linear-gradient(var(--hn-mark), var(--hn-mark)) left 5px top 0 / 1px 11px no-repeat,
		linear-gradient(var(--hn-mark), var(--hn-mark)) left 0 top 5px / 11px 1px no-repeat,
		linear-gradient(var(--hn-mark), var(--hn-mark)) right 5px top 0 / 1px 11px no-repeat,
		linear-gradient(var(--hn-mark), var(--hn-mark)) right 0 top 5px / 11px 1px no-repeat,
		linear-gradient(var(--hn-mark), var(--hn-mark)) left 5px bottom 0 / 1px 11px no-repeat,
		linear-gradient(var(--hn-mark), var(--hn-mark)) left 0 bottom 5px / 11px 1px no-repeat,
		linear-gradient(var(--hn-mark), var(--hn-mark)) right 5px bottom 0 / 1px 11px no-repeat,
		linear-gradient(var(--hn-mark), var(--hn-mark)) right 0 bottom 5px / 11px 1px no-repeat;
}

/* Legacy markup from the design files (<i class="corner tl"> etc.) still works. */
.blueprint > .corner
{
	position: absolute;
	width: 11px;
	height: 11px;
	color: rgba(29, 31, 32, 0.55);
}

.blueprint > .corner::before,
.blueprint > .corner::after
{
	content: "";
	position: absolute;
	background: currentColor;
}

.blueprint > .corner::before { left: 5px; top: 0; width: 1px; height: 100%; }
.blueprint > .corner::after { top: 5px; left: 0; width: 100%; height: 1px; }
.blueprint > .corner.tl { top: -6px; left: -6px; }
.blueprint > .corner.tr { top: -6px; right: -6px; }
.blueprint > .corner.bl { bottom: -6px; left: -6px; }
.blueprint > .corner.br { bottom: -6px; right: -6px; }

.blueprint:has(> .corner)::before
{
	content: none;
}

/* ==========================================================================
   Top nav
   ========================================================================== */

.hn-nav .hn-nav__row
{
	min-height: 40px;
}

.hn-nav .wp-block-navigation
{
	gap: 28px;
	font-size: 14px;
	line-height: 1;
}

/* Core sets nav item colour with a doubled class, so match its specificity. */
.hn-nav .wp-block-navigation .wp-block-navigation-item__content.wp-block-navigation-item__content
{
	color: var(--wp--preset--color--bg);
	text-decoration: none;
}

.hn-nav .wp-block-navigation .wp-block-navigation-item__content.wp-block-navigation-item__content:hover,
.hn-nav .wp-block-navigation .wp-block-navigation-item__content.wp-block-navigation-item__content:focus
{
	color: var(--wp--preset--color--accent-300);
}

/* ==========================================================================
   Logo / title strip
   ========================================================================== */

.hn-strip .hn-strip__row
{
	gap: 24px;
}

.hn-strip .wp-block-site-logo img,
.hn-strip .hn-logo img
{
	display: block;
	width: auto;
	height: 44px;
}

.hn-strip .wp-block-site-logo,
.hn-strip .hn-logo
{
	margin: 0;
	line-height: 0;
}

.hn-strip h1
{
	margin: 0;
	font-family: var(--wp--preset--font-family--heading);
	font-size: 22px;
	font-weight: 400;
	letter-spacing: 0.02em;
	line-height: 1.2;
	color: var(--wp--preset--color--neutral-700);
}

/* ==========================================================================
   Link cards (helpnow/link-card) and the grids that hold them
   ========================================================================== */

.hn-card-grid,
.hn-quick-links
{
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 32px;
}

.hn-quick-links
{
	gap: 24px;
}

.hn-card-grid > *,
.hn-quick-links > *
{
	margin: 0 !important;
}

.hn-card
{
	display: flex;
	flex-direction: column;
	gap: 14px;
	height: 100%;
	padding: 28px;
	color: var(--wp--preset--color--text);
	text-decoration: none;
}

a.hn-card,
a.hn-card:hover,
a.hn-card:focus
{
	color: var(--wp--preset--color--text);
	text-decoration: none;
}

a.hn-card:hover
{
	background-color: var(--wp--custom--hover-tint);
}

.hn-card__icon
{
	flex-shrink: 0;
	color: var(--wp--preset--color--accent);
}

.hn-card__title
{
	margin: 0;
	font-family: var(--wp--preset--font-family--heading);
	font-size: 25px;
	font-weight: 600;
	line-height: 1.2;
}

.hn-card__text
{
	margin: 0;
	font-size: 15px;
	line-height: 1.55;
	color: var(--wp--preset--color--neutral-800);
	text-wrap: pretty;
}

.hn-card__cta
{
	margin-top: auto;
	padding-top: 6px;
	font-family: var(--wp--preset--font-family--heading);
	font-size: 15px;
	font-weight: 600;
	line-height: 1.2;
	color: var(--wp--preset--color--accent-700);
}

.hn-card--compact
{
	flex-direction: row;
	align-items: center;
	gap: 14px;
	padding: 16px 20px;
}

.hn-card--compact .hn-card__title
{
	font-size: 20px;
}

/* ==========================================================================
   Status section
   ========================================================================== */

.hn-status-grid
{
	display: grid;
	grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
	gap: 32px;
	align-items: start;
}

.hn-status-grid > *
{
	margin: 0 !important;
}

.hn-panel
{
	display: flex;
	flex-direction: column;
	padding: 24px 28px;
}

.hn-panel > *
{
	margin-block: 0;
}

.hn-panel__head
{
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 16px;
	padding-bottom: 12px;
	border-bottom: 1px solid var(--wp--preset--color--divider);
}

.hn-panel__head > *
{
	margin: 0;
}

.hn-panel__title,
.hn-panel .hn-panel__head h3
{
	margin: 0;
	font-family: var(--wp--preset--font-family--heading);
	font-size: 25px;
	font-weight: 600;
	line-height: 1.2;
}

.hn-panel__meta
{
	font-size: 13px;
	color: var(--wp--preset--color--neutral-700);
}

/* M365 rows: markup produced by helpnow/m365-status from plugin data. */
.hn-m365__list
{
	margin: 0;
	padding: 0;
	list-style: none;
}

.hn-m365__row
{
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 11px 0;
	border-bottom: 1px solid var(--wp--custom--hairline);
	font-size: 15px;
	line-height: 1.4;
}

.hn-m365__state
{
	display: flex;
	align-items: center;
	gap: 8px;
	flex-shrink: 0;
	font-size: 13px;
	color: var(--wp--preset--color--neutral-800);
}

.hn-m365__legend
{
	display: flex;
	flex-wrap: wrap;
	gap: 8px 20px;
	padding-top: 14px;
	font-size: 12px;
	line-height: 1.4;
	color: var(--wp--preset--color--neutral-700);
}

.hn-m365__legend span
{
	display: flex;
	align-items: center;
	gap: 6px;
}

.hn-m365__updated
{
	display: block;
	padding-top: 10px;
	font-size: 13px;
	color: var(--wp--preset--color--neutral-700);
}

.hn-m365__empty
{
	margin: 0;
	padding: 16px 0 4px;
	font-size: 14px;
	color: var(--wp--preset--color--neutral-700);
}

.hn-state--healthy { color: var(--wp--custom--status--healthy); }
.hn-state--advisory { color: var(--wp--custom--status--advisory); }
.hn-state--incident { color: var(--wp--custom--status--incident); }

/* Legacy reported outages slot (pre-1.16.0 two-panel layout) */
.hn-outages-slot
{
	padding-top: 12px;
}

/* --------------------------------------------------------------------------
   Outage notices (helpnow/outage-notices): stacked cards under the home link
   cards, only when the outages plugin reports something. Same look as the
   Guardian Remote details card: white, hairline border, top edge in the
   severity colour. Severity: --down (red), --warn (orange), --info (blue), --ok (green).
   -------------------------------------------------------------------------- */

main > .hn-outages
{
	/* Cards section has 56px below it; sit 32px under the cards instead. */
	margin-top: -24px !important;
	margin-bottom: 0 !important;
	padding: 0 32px 56px;
}

.hn-outages__list
{
	display: grid;
	gap: 16px;
	max-width: var(--wp--style--global--wide-size);
	margin: 0 auto;
}

.hn-outage-notice
{
	--hn-tone: #c76b16;
	--hn-tone-text: #7a3f08;
	padding: 18px 22px;
	background: #fff;
	border: 1px solid var(--wp--preset--color--divider);
	border-top: 3px solid var(--hn-tone);
	font-size: 15px;
	line-height: 1.6;
	color: var(--wp--preset--color--neutral-800);
}

.hn-outage-notice--down
{
	--hn-tone: var(--wp--custom--status--incident);
	--hn-tone-text: #7d2620;
}

.hn-outage-notice--info
{
	--hn-tone: var(--wp--custom--status--maintenance);
	--hn-tone-text: #2c455d;
}

.hn-outage-notice--ok
{
	--hn-tone: var(--wp--custom--status--healthy);
	--hn-tone-text: #24573a;
}

.hn-outage-notice > *,
.hn-outage-notice__message > *
{
	margin: 0;
}

.hn-outage-notice > * + *,
.hn-outage-notice__message > * + *
{
	margin-top: 6px;
}

.hn-outage-notice .hn-outage-notice__title
{
	font-family: var(--wp--preset--font-family--heading);
	font-size: 20px;
	font-weight: 600;
	line-height: 1.3;
	color: var(--hn-tone-text);
}

.hn-outage-notice__message a
{
	color: var(--hn-tone-text);
}

.hn-outage-notice__meta
{
	font-size: 13px;
	line-height: 1.5;
	color: var(--wp--preset--color--neutral-700);
}

/* --------------------------------------------------------------------------
   Internet Services Status (helpnow/services-status). The theme places each
   row with --c3/--r3 (three columns) and --c2/--r2 (two columns), set
   inline, so columns are balanced (19 = 7/6/6) and the list still reads in
   order. One column on phones, where the status word is hidden and only the
   icon shows (the legend explains the icons; screen readers still get the
   word).
   -------------------------------------------------------------------------- */

.hn-services__list
{
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	column-gap: 40px;
	align-content: start;
	margin: 0;
	padding: 0;
	list-style: none;
}

.hn-services__row
{
	grid-column: var(--c3, auto);
	grid-row: var(--r3, auto);
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	min-width: 0;
	padding: 11px 0;
	border-bottom: 1px solid var(--wp--custom--hairline);
	font-size: 15px;
	line-height: 1.4;
}

.hn-services__row--tip
{
	cursor: help;
}

.hn-services__name
{
	min-width: 0;
}

.hn-services__state
{
	display: flex;
	align-items: center;
	gap: 8px;
	flex-shrink: 0;
	font-size: 13px;
	color: var(--wp--preset--color--neutral-800);
}

.hn-services__icon
{
	position: relative;
	display: inline-flex;
}

/* "Issues elsewhere": small amber dot on the icon. */
.hn-services__row--elsewhere .hn-services__icon::after
{
	content: "";
	position: absolute;
	top: -2px;
	right: -3px;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--wp--custom--status--elsewhere);
	box-shadow: 0 0 0 2px var(--wp--preset--color--surface);
}

.hn-services__dot
{
	display: inline-block;
	width: 8px;
	height: 8px;
	margin-right: 2px;
	border-radius: 50%;
	background: var(--wp--custom--status--elsewhere);
}

/* Grouped layout (when the plugin sends groups): one column per group,
   heading on top, its services listed below. Three columns; a fourth group
   starts a new row. Tablets keep three columns with icons only; phones
   stack the groups. */
.hn-services__cols
{
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	column-gap: 40px;
	row-gap: 24px;
	align-items: start;
}

.hn-services__col
{
	min-width: 0;
}

.hn-services .hn-services__list--stack
{
	display: block;
}

.hn-services .hn-services__group
{
	margin: 0;
	padding: 16px 0 6px;
	border-bottom: 1px solid var(--wp--preset--color--divider);
	font-family: var(--wp--preset--font-family--heading);
	font-size: 18px;
	font-weight: 600;
	line-height: 1.3;
	color: var(--wp--preset--color--neutral-800);
}

@media (max-width: 900px)
{
	.hn-services__cols
	{
		column-gap: 28px;
	}

	/* Icons only on tablets in the grouped layout (columns are narrower). */
	.hn-services__cols .hn-services__label
	{
		position: absolute !important;
		width: 1px;
		height: 1px;
		margin: -1px;
		overflow: hidden;
		clip: rect(0, 0, 0, 0);
		white-space: nowrap;
	}
}

@media (max-width: 640px)
{
	.hn-services__cols
	{
		grid-template-columns: minmax(0, 1fr);
		row-gap: 18px;
	}
}

.hn-services__foot
{
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 8px 24px;
	padding-top: 14px;
}

.hn-services__legend
{
	display: flex;
	flex-wrap: wrap;
	gap: 8px 18px;
	font-size: 12px;
	line-height: 1.4;
	color: var(--wp--preset--color--neutral-700);
}

.hn-services__legend > span
{
	display: flex;
	align-items: center;
	gap: 6px;
}

.hn-services__updated
{
	font-size: 13px;
	color: var(--wp--preset--color--neutral-700);
}

.hn-services__empty
{
	padding: 16px 0 4px;
	font-size: 14px;
	line-height: 1.6;
	color: var(--wp--preset--color--neutral-700);
}

.hn-services__empty > *
{
	margin: 0;
}

.hn-services__empty > * + *
{
	margin-top: 8px;
}

.hn-svc--up { color: var(--wp--custom--status--healthy); }
.hn-svc--maintenance { color: var(--wp--custom--status--maintenance); }
.hn-svc--warn { color: var(--wp--custom--status--advisory); }
.hn-svc--down { color: var(--wp--custom--status--incident); }
.hn-svc--unknown { color: var(--wp--custom--status--unknown); }

/* Text for screen readers only. */
.hn-sr-only
{
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

@media (max-width: 900px)
{
	.hn-services__list
	{
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.hn-services__row
	{
		grid-column: var(--c2, auto);
		grid-row: var(--r2, auto);
	}
}

@media (max-width: 760px)
{
	/* Phones: icon only; the word stays available to screen readers. */
	.hn-services__label
	{
		position: absolute !important;
		width: 1px;
		height: 1px;
		margin: -1px;
		overflow: hidden;
		clip: rect(0, 0, 0, 0);
		white-space: nowrap;
	}

	.hn-services__foot
	{
		flex-direction: column;
		gap: 10px;
	}
}

@media (max-width: 560px)
{
	.hn-services__list
	{
		grid-template-columns: minmax(0, 1fr);
	}

	.hn-services__row
	{
		grid-column: auto;
		grid-row: auto;
	}
}

/* ==========================================================================
   Article (inner pages)
   ========================================================================== */

/* Cap the page-content area itself at the content width. The templates set
   the Content block to "wide", so without this an embed that sets its own
   max-width (e.g. Formidable's 100% form width) spans the full 1016px instead
   of the 900px text column. */
.hn-article .wp-block-post-content
{
	max-width: var(--wp--style--global--content-size);
	margin-left: auto;
	margin-right: auto;
}

.hn-article .wp-block-post-content h3
{
	font-size: 25px;
}

.hn-article .wp-block-post-content > :is(h2, h3, h4)
{
	margin-block-start: 28px;
}

.hn-article .wp-block-post-content > :first-child
{
	margin-block-start: 0;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.hn-footer .hn-footer__groups
{
	gap: 64px;
	font-size: 14px;
	line-height: 1.7;
}

.hn-footer .hn-footer__groups > .wp-block-group > *
{
	margin: 0;
}

.hn-footer .hn-footer__label
{
	font-family: var(--wp--preset--font-family--heading);
	font-size: 16px;
	font-weight: 600;
	line-height: 1.7;
	color: var(--wp--preset--color--bg);
}

.hn-footer a
{
	color: inherit;
}

.hn-footer a:hover
{
	color: var(--wp--preset--color--accent-300);
}

.hn-copyright
{
	margin: 0;
	padding-top: 16px;
	border-top: 1px solid var(--wp--preset--color--accent-800);
	font-size: 13px;
	line-height: 1.5;
	color: var(--wp--preset--color--accent-400);
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 760px)
{
	.hn-card-grid,
	.hn-quick-links,
	.hn-status-grid
	{
		grid-template-columns: minmax(0, 1fr);
	}

	.hn-strip .hn-strip__row
	{
		flex-wrap: wrap;
		gap: 12px;
	}

	.hn-strip .hn-strip__row > h1
	{
		flex-basis: 100%;
	}

	.hn-footer .hn-footer__groups
	{
		flex-direction: column;
		gap: 16px;
	}
}

/* Section bands */
.hn-strip,
.hn-status
{
	border-bottom: 1px solid var(--wp--preset--color--divider);
}

.hn-status
{
	border-top: 1px solid var(--wp--preset--color--divider);
}

/* ==========================================================================
   Client forms list ([hn_client_forms], HN Site Tools plugin). The plugin
   outputs ul.hncr-forms > li.hncr-form > a.hncr-form-title +
   div.hncr-form-desc (optional); this shows it as a stacked list: title
   above its description, divider between rows, chevron on the right. The
   title link is stretched over the row, so the whole row is clickable.
   ========================================================================== */

.hncr-forms
{
	--hncr-divider: #d9e2ec;
	--hncr-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m9 18 6-6-6-6'/%3E%3C/svg%3E");
	margin: 0;
	padding: 0;
	list-style: none;
	border-top: 1px solid var(--hncr-divider);
}

.hncr-form
{
	position: relative;
	margin: 0;
	/* Right padding leaves room for the 22px arrow plus a 24px gap. */
	padding: 20px 54px 20px 8px;
	border-bottom: 1px solid var(--hncr-divider);
	transition: background-color 0.15s ease;
}

.hncr-forms .hncr-form-title
{
	display: block;
	font-family: var(--wp--preset--font-family--heading);
	font-size: 20px;
	font-weight: 600;
	line-height: 1.25;
	color: var(--wp--preset--color--accent-700);
	text-decoration: none;
}

/* Stretch the link over the whole row. */
.hncr-forms .hncr-form-title::after
{
	content: "";
	position: absolute;
	inset: 0;
}

.hncr-forms .hncr-form-title:focus-visible
{
	outline: none;
}

/* Keyboard focus: ring around the whole row. */
.hncr-form:focus-within
{
	z-index: 1;
	outline: 2px solid var(--wp--preset--color--accent);
	outline-offset: 2px;
}

.hncr-form-desc
{
	margin-top: 4px;
	font-size: 16px;
	line-height: 1.45;
	/* #5d5d60: 5.9:1 on the page background, 5.4:1 on the hover tint. */
	color: var(--wp--preset--color--neutral-700);
}

.hncr-form-desc > *
{
	margin: 0;
}

.hncr-form-desc > * + *
{
	margin-top: 8px;
}

/* Chevron at the right, centred on the row (decorative). */
.hncr-form::after
{
	content: "";
	position: absolute;
	top: 50%;
	right: 8px;
	width: 22px;
	height: 22px;
	margin-top: -11px;
	background-color: var(--wp--preset--color--accent-700);
	-webkit-mask: var(--hncr-arrow) center / contain no-repeat;
	mask: var(--hncr-arrow) center / contain no-repeat;
	pointer-events: none;
	transition: transform 0.15s ease;
}

.hncr-form:hover
{
	/* Same hover as the home page link cards and quick links. */
	background-color: var(--wp--custom--hover-tint);
}

.hncr-form:hover .hncr-form-title
{
	color: var(--wp--preset--color--accent-800);
}

.hncr-form:hover::after
{
	transform: translateX(4px);
}

@media (prefers-reduced-motion: reduce)
{
	.hncr-form,
	.hncr-form::after
	{
		transition: none;
	}
}

.hncr-forms-empty
{
	color: var(--wp--preset--color--neutral-700);
}

.hncr-back a
{
	font-weight: 500;
	text-decoration: none;
}

@media (max-width: 760px)
{
	.hncr-form
	{
		padding: 16px 46px 16px 4px;
	}

	.hncr-form::after
	{
		right: 4px;
	}
}

/* ==========================================================================
   Quick links on phones: one row of icon-only boxes so page content starts
   higher. The titles stay in the markup (visually hidden) for screen
   readers. Placed after the main responsive block so it wins.
   ========================================================================== */

@media (max-width: 760px)
{
	.hn-quick-links-band
	{
		padding-top: 16px !important;
	}

	.hn-quick-links
	{
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 20px;
	}

	.hn-card--compact
	{
		justify-content: center;
		padding: 12px 6px;
	}

	.hn-card--compact .hn-card__icon
	{
		width: 30px;
		height: 30px;
	}

	.hn-card--compact .hn-card__title
	{
		position: absolute;
		width: 1px;
		height: 1px;
		margin: -1px;
		padding: 0;
		overflow: hidden;
		clip: rect(0 0 0 0);
		white-space: nowrap;
		border: 0;
	}
}

/* ==========================================================================
   Support center open/closed banner ([hn_support_status] from the support
   status plugin). The plugin outputs .hn-support-status plus
   --open / --closed. Alert-bar style: tinted fill, coloured left edge,
   icon drawn with a CSS mask (swap the --hn-ss-icon-* URLs to change it).
   Leave the plugin's own per-state CSS boxes empty so they don't conflict.
   ========================================================================== */

.hn-support-status
{
	--hn-ss-icon-open: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 2a10 10 0 1 0 0 20a10 10 0 1 0 0-20'/%3E%3Cpath d='m9 12 2 2 4-4'/%3E%3C/svg%3E");
	--hn-ss-icon-closed: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M12 6v6l4 2'/%3E%3C/svg%3E");
	position: relative;
	display: block;
	margin-block-end: 28px;
	padding: 12px 18px 12px 50px;
	border-left: 4px solid;
	font-size: 15px;
	line-height: 1.45;
}

/* Inline use ([hn_support_status tag="span"]) stays inline. */
span.hn-support-status
{
	display: inline-block;
	margin-block-end: 0;
}

.hn-support-status::before
{
	content: "";
	position: absolute;
	top: 50%;
	left: 18px;
	width: 20px;
	height: 20px;
	transform: translateY(-50%);
	background: currentColor;
	-webkit-mask: var(--hn-ss-icon-open) center / contain no-repeat;
	        mask: var(--hn-ss-icon-open) center / contain no-repeat;
}

.hn-support-status--closed::before
{
	-webkit-mask-image: var(--hn-ss-icon-closed);
	        mask-image: var(--hn-ss-icon-closed);
}

.hn-support-status strong
{
	margin-right: 6px;
	font-weight: 600;
}

.hn-support-status a
{
	color: inherit;
	font-weight: 500;
}

.hn-support-status--open
{
	background: #e5f2e9;
	border-color: #3f8a5c;
	color: #1f5a35;
}

.hn-support-status--closed
{
	background: #fcecd9;
	border-color: #c76b16;
	color: #7a3f08;
}

/* ==========================================================================
   Callouts: block styles for Paragraph and Group (Styles panel in the
   editor, or the "Callout" patterns). Same look as the support status bar:
   tinted fill, coloured left edge, icon on the left (top-aligned so
   multi-line callouts look right).
   ========================================================================== */

:is(.is-style-hn-callout-note, .is-style-hn-callout-tip, .is-style-hn-callout-important, .is-style-hn-callout-warning)
{
	position: relative;
	padding: 12px 18px 12px 50px;
	border-left-width: 4px;
	border-left-style: solid;
	font-size: 15px;
	line-height: 1.5;
}

:is(.is-style-hn-callout-note, .is-style-hn-callout-tip, .is-style-hn-callout-important, .is-style-hn-callout-warning)::before
{
	content: "";
	position: absolute;
	top: calc(12px + (1.5em - 20px) / 2);
	left: 18px;
	width: 20px;
	height: 20px;
	background: currentColor;
	-webkit-mask: var(--hn-callout-icon) center / contain no-repeat;
	        mask: var(--hn-callout-icon) center / contain no-repeat;
}

/* Callouts holding several elements (Group block, Formidable HTML field, etc.):
   tighter spacing between them. */
:is(.is-style-hn-callout-note, .is-style-hn-callout-tip, .is-style-hn-callout-important, .is-style-hn-callout-warning) > *
{
	margin-block: 0;
}

:is(.is-style-hn-callout-note, .is-style-hn-callout-tip, .is-style-hn-callout-important, .is-style-hn-callout-warning) > * + *
{
	margin-block-start: 8px;
}

:is(.is-style-hn-callout-note, .is-style-hn-callout-tip, .is-style-hn-callout-important, .is-style-hn-callout-warning):is(.is-style-hn-callout-note, .is-style-hn-callout-tip, .is-style-hn-callout-important, .is-style-hn-callout-warning) :is(h2, h3, h4, h5, h6)
{
	font-size: 18px;
	line-height: 1.35;
	color: inherit;
}

:is(.is-style-hn-callout-note, .is-style-hn-callout-tip, .is-style-hn-callout-important, .is-style-hn-callout-warning) :is(ul, ol)
{
	padding-left: 20px;
}

:is(.is-style-hn-callout-note, .is-style-hn-callout-tip, .is-style-hn-callout-important, .is-style-hn-callout-warning) strong
{
	font-weight: 600;
}

:is(.is-style-hn-callout-note, .is-style-hn-callout-tip, .is-style-hn-callout-important, .is-style-hn-callout-warning) a
{
	color: inherit;
	font-weight: 500;
}

/* Note: blue (info) */
.is-style-hn-callout-note
{
	--hn-callout-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M12 16v-4'/%3E%3Cpath d='M12 8h.01'/%3E%3C/svg%3E");
	background: #e8eff6;
	border-color: #5980a6;
	color: #2c455d;
}

/* Tip: green (lightbulb) */
.is-style-hn-callout-tip
{
	--hn-callout-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5'/%3E%3Cpath d='M9 18h6'/%3E%3Cpath d='M10 22h4'/%3E%3C/svg%3E");
	background: #e5f2e9;
	border-color: #3f8a5c;
	color: #1f5a35;
}

/* Important: orange (triangle) */
.is-style-hn-callout-important
{
	--hn-callout-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3'/%3E%3Cpath d='M12 9v4'/%3E%3Cpath d='M12 17h.01'/%3E%3C/svg%3E");
	background: #fcecd9;
	border-color: #c76b16;
	color: #7a3f08;
}

/* Warning: red (octagon), for genuine risks only */
.is-style-hn-callout-warning
{
	--hn-callout-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 16h.01'/%3E%3Cpath d='M12 8v4'/%3E%3Cpath d='M15.312 2a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586l-4.688-4.688A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2z'/%3E%3C/svg%3E");
	background: #fbe7e5;
	border-color: #b5473d;
	color: #7d2620;
}

/* ==========================================================================
   Indent helper: add "hn-indent" under Advanced > Additional CSS class(es)
   on any block to indent it on both sides. Needs !important and the doubled class to beat
   WordPress's centring rules for blocks in the page column (front end and editor).
   ========================================================================== */

.hn-indent.hn-indent,
.is-layout-constrained > .hn-indent.hn-indent
{
	margin-left: 32px !important;
	margin-right: 32px !important;
}

@media (max-width: 760px)
{
	.hn-indent.hn-indent,
	.is-layout-constrained > .hn-indent.hn-indent
	{
		margin-left: 16px !important;
		margin-right: 16px !important;
	}
}

/* ==========================================================================
   Guardian Remote Support ([hn_guardian_remote_support], plugin 1.4.0+).
   Row 1: .hn-grs__action (form / download) | .hn-grs__status (one-line
   headline, same height as the ticket box and button, aligned with them).
   Row 2: .hn-grs__details spanning both columns (longer message).
   Phones: status, action, details. Contract:
   claude/guardian-remote-layout-contract.md in the project.
   ========================================================================== */

.hn-grs
{
	--grs-row: 52px;            /* height of the ticket box, button and status */
	--grs-label: 28px;          /* label line + gap above the ticket box */
	--grs-icon-info: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M12 16v-4'/%3E%3Cpath d='M12 8h.01'/%3E%3C/svg%3E");
	--grs-icon-warn: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3'/%3E%3Cpath d='M12 9v4'/%3E%3Cpath d='M12 17h.01'/%3E%3C/svg%3E");
	--grs-icon-clock: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M12 6v6l4 2'/%3E%3C/svg%3E");
	--grs-icon-ok: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 2a10 10 0 1 0 0 20a10 10 0 1 0 0-20'/%3E%3Cpath d='m9 12 2 2 4-4'/%3E%3C/svg%3E");
	--grs-icon-download: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4'/%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3Cpath d='M12 15V3'/%3E%3C/svg%3E");
}

.hn-grs:has(> .hn-grs__action)
{
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	column-gap: 32px;
	row-gap: 24px;
	align-items: start;
}

.hn-grs:has(> .hn-grs__action) > *
{
	margin: 0 !important;
}

/* ---- Action (left) ---- */
.hn-grs .hn-grs__action
{
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.hn-grs .hn-grs__form
{
	display: flex;
	flex-wrap: wrap;
	gap: 0;
	margin: 0;
}

.hn-grs .hn-grs__label
{
	flex-basis: 100%;
	height: calc(var(--grs-label) - 8px);
	margin: 0 0 8px;
	font-size: 13px;
	font-weight: 600;
	line-height: calc(var(--grs-label) - 8px);
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--wp--preset--color--neutral-700);
}

.hn-grs .hn-grs__input
{
	flex: 1 1 0;
	width: auto;
	min-width: 0;
	height: var(--grs-row);
	padding: 0 14px;
	border: 1px solid #a9b2bc;
	border-right: 0;
	border-radius: 0;
	background: #fff;
	font-family: var(--wp--preset--font-family--body);
	font-size: 21px;
	letter-spacing: 0.06em;
	color: var(--wp--preset--color--text);
}

/* No outline or glow on the ticket box; the blue border shows focus. */
.hn-grs .hn-grs__input:focus,
.hn-grs .hn-grs__input:focus-visible
{
	outline: none;
	box-shadow: none;
	border-color: var(--wp--preset--color--accent);
}

.hn-grs .hn-grs__submit
{
	flex: 0 0 auto;
	height: var(--grs-row);
	padding: 0 28px;
	border: 0;
	border-radius: 0;
	background: var(--wp--preset--color--accent-700);
	color: #fff;
	font-family: var(--wp--preset--font-family--heading);
	font-size: 18px;
	font-weight: 600;
	cursor: pointer;
}

.hn-grs .hn-grs__submit:hover
{
	background: var(--wp--preset--color--accent-800);
}

.hn-grs .hn-grs__notice
{
	flex-basis: 100%;
	margin: 8px 0 0;
	font-size: 14px;
	font-weight: 500;
	color: #a5430f;
}

/* Disabled (support closed) */
.hn-grs .hn-grs__form--disabled .hn-grs__input
{
	background: #eceef1;
	border-color: #c9ced4;
	cursor: not-allowed;
}

.hn-grs .hn-grs__form--disabled .hn-grs__submit
{
	background: #a3adb8;
	cursor: not-allowed;
}

.hn-grs .hn-grs__form--disabled .hn-grs__label
{
	color: #8a8f95;
}

/* Download button: same height as the form row so the status lines up */
.hn-grs .hn-grs__result
{
	margin: 0;
}

.hn-grs .hn-grs__link
{
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
	min-height: var(--grs-row);
	padding: 0 24px;
	background: #2f7a4a;
	color: #fff;
	font-family: var(--wp--preset--font-family--heading);
	font-size: 20px;
	font-weight: 600;
	text-decoration: none;
}

.hn-grs .hn-grs__link::before
{
	content: "";
	flex-shrink: 0;
	width: 22px;
	height: 22px;
	background: currentColor;
	-webkit-mask: var(--grs-icon-download) center / contain no-repeat;
	        mask: var(--grs-icon-download) center / contain no-repeat;
}

.hn-grs .hn-grs__link:hover
{
	background: #24603a;
	color: #fff;
}

.hn-grs .hn-grs__reset
{
	margin: 0;
	font-size: 14px;
}

/* Busy (JavaScript lookup running) */
.hn-grs--busy .hn-grs__action
{
	opacity: 0.6;
	cursor: progress;
}

/* ---- Status (right): one line, the height of the form row ---- */
.hn-grs .hn-grs__status
{
	position: relative;
	display: flex;
	align-items: center;
	height: var(--grs-row);
	margin-top: var(--grs-label) !important;   /* line up with the ticket box, not the label */
	padding: 0 18px 0 50px;
	border-left: 4px solid;
	overflow: hidden;
	font-family: var(--wp--preset--font-family--heading);
	font-size: 19px;
	font-weight: 600;
	line-height: 1.2;
}

/* The download view has no label, so the status sits level with the button. */
.hn-grs--allowed .hn-grs__status
{
	margin-top: 0 !important;
}

.hn-grs .hn-grs__status::before
{
	content: "";
	position: absolute;
	top: 50%;
	left: 18px;
	width: 22px;
	height: 22px;
	transform: translateY(-50%);
	background: currentColor;
	-webkit-mask: var(--grs-icon) center / contain no-repeat;
	        mask: var(--grs-icon) center / contain no-repeat;
}

.hn-grs .hn-grs__status-text
{
	min-width: 0;
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
}

.hn-grs .hn-grs__status--info
{
	--grs-icon: var(--grs-icon-info);
	background: #e8eff6;
	border-color: #5980a6;
	color: #2c455d;
}

.hn-grs .hn-grs__status--warn
{
	--grs-icon: var(--grs-icon-warn);
	background: #fcecd9;
	border-color: #c76b16;
	color: #7a3f08;
}

.hn-grs--closed .hn-grs__status--warn
{
	--grs-icon: var(--grs-icon-clock);
}

.hn-grs .hn-grs__status--ok
{
	--grs-icon: var(--grs-icon-ok);
	background: #e5f2e9;
	border-color: #3f8a5c;
	color: #1f5a35;
}

/* ---- Details (full width, below both columns) ---- */
.hn-grs:has(> .hn-grs__action) .hn-grs__details
{
	grid-column: 1 / -1;
}

.hn-grs .hn-grs__details
{
	padding: 18px 22px;
	background: #fff;
	border: 1px solid var(--wp--preset--color--divider);
	border-top: 3px solid var(--grs-tone, var(--wp--preset--color--divider));
	font-size: 15px;
	line-height: 1.6;
	color: var(--wp--preset--color--neutral-800);
}

.hn-grs .hn-grs__details--info { --grs-tone: #5980a6; }
.hn-grs .hn-grs__details--warn { --grs-tone: #c76b16; }
.hn-grs .hn-grs__details--ok { --grs-tone: #3f8a5c; }

.hn-grs .hn-grs__details[hidden]
{
	display: none;
}

.hn-grs .hn-grs__details > :first-child { margin-top: 0; }
.hn-grs .hn-grs__details > :last-child { margin-bottom: 0; }
.hn-grs .hn-grs__details > * + * { margin-top: 10px; }
.hn-grs .hn-grs__details :is(p, ol, ul) { margin-bottom: 0; }
.hn-grs .hn-grs__details :is(ol, ul) { padding-left: 22px; }
.hn-grs .hn-grs__details li + li { margin-top: 4px; }
.hn-grs .hn-grs__details strong { font-weight: 600; color: var(--wp--preset--color--text); }
.hn-grs .hn-grs__details img { max-width: 100%; height: auto; }

/* ---- Phones: status, then action, then details ---- */
@media (max-width: 760px)
{
	.hn-grs:has(> .hn-grs__action)
	{
		grid-template-columns: minmax(0, 1fr);
		row-gap: 16px;
	}

	.hn-grs .hn-grs__status
	{
		order: -1;
		margin-top: 0 !important;
		height: auto;
		min-height: 48px;
		padding-top: 10px;
		padding-bottom: 10px;
	}

	.hn-grs .hn-grs__status-text
	{
		white-space: normal;
	}

	.hn-grs .hn-grs__submit
	{
		padding: 0 18px;
	}

	.hn-grs .hn-grs__link
	{
		font-size: 19px;
	}
}

/* ==========================================================================
   Formidable Forms: dropdowns. Larger box with a minimum width, and larger
   entries in the open list. Browsers that support customizable selects
   (appearance: base-select; Chrome/Edge) also get roomy, styled list rows;
   others show their standard list at the larger text size.
   Tune with the --hn-frm-select-* variables below.
   ========================================================================== */

.frm_forms.with_frm_style
{
	--hn-frm-select-min-width: 300px;
	--hn-frm-select-height: 46px;
	--hn-frm-select-font-size: 16px;
	--hn-frm-option-padding: 10px 14px;
}

.frm_forms.with_frm_style select:not([multiple])
{
	min-width: min(var(--hn-frm-select-min-width), 100%);
	height: var(--hn-frm-select-height);
	min-height: var(--hn-frm-select-height);
	padding-top: 0;
	padding-bottom: 0;
	font-size: var(--hn-frm-select-font-size);
	line-height: 1.3;
}

.frm_forms.with_frm_style select:not([multiple]) option
{
	font-size: var(--hn-frm-select-font-size);
}

@supports (appearance: base-select)
{
	.frm_forms.with_frm_style select:not([multiple]),
	.frm_forms.with_frm_style select:not([multiple])::picker(select)
	{
		appearance: base-select;
	}

	.frm_forms.with_frm_style select:not([multiple])
	{
		display: flex;
		align-items: center;
	}

	/* The dropdown arrow (Formidable relies on the browser's). */
	.frm_forms.with_frm_style select:not([multiple])::picker-icon
	{
		margin-left: auto;
		padding-left: 12px;
		color: var(--wp--preset--color--accent-700);
	}

	/* No check mark next to a blank "choose one" entry. */
	.frm_forms.with_frm_style select:not([multiple]) option[value=""]::checkmark
	{
		content: none;
	}

	.frm_forms.with_frm_style select:not([multiple])::picker(select)
	{
		margin-top: 4px;
		padding: 4px 0;
		border: 1px solid #a9b2bc;
		border-radius: 0;
		background: #fff;
		box-shadow: 0 8px 24px rgba(29, 31, 32, 0.14);
	}

	.frm_forms.with_frm_style select:not([multiple]) option
	{
		display: flex;
		align-items: center;
		gap: 8px;
		min-height: 44px;
		padding: var(--hn-frm-option-padding);
		color: var(--wp--preset--color--text);
	}

	.frm_forms.with_frm_style select:not([multiple]) option:hover,
	.frm_forms.with_frm_style select:not([multiple]) option:focus-visible
	{
		background: #e8eff6;
		outline: none;
	}

	.frm_forms.with_frm_style select:not([multiple]) option:checked
	{
		font-weight: 600;
		color: var(--wp--preset--color--accent-800);
	}

	.frm_forms.with_frm_style select:not([multiple]) option::checkmark
	{
		color: var(--wp--preset--color--accent);
	}
}

/* Time fields (hour : minute AM/PM): three small dropdowns on one line
   instead of three full-width ones stacked. Same 46px height as the other
   dropdowns. --auto-width is the variable Formidable's own width rule uses
   (100% in this style), so setting it here also works when the style has
   "Override theme styling" (!important) turned on. */
.frm_forms.with_frm_style .frm_time_wrap
{
	--auto-width: auto;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
}

.frm_forms.with_frm_style .frm_time_wrap > span
{
	display: inline-flex;
	align-items: center;
	gap: 8px;
}

.frm_forms.with_frm_style .frm_time_wrap select.frm_time_select:not([multiple])
{
	flex: 0 0 auto;
	width: auto !important;
	min-width: 84px;
	max-width: none;
}

.frm_forms.with_frm_style .frm_time_wrap .frm_time_sep
{
	font-size: 18px;
	font-weight: 600;
	line-height: 1;
}

@media (max-width: 480px)
{
	.frm_forms.with_frm_style .frm_time_wrap,
	.frm_forms.with_frm_style .frm_time_wrap > span
	{
		gap: 6px;
	}

	.frm_forms.with_frm_style .frm_time_wrap select.frm_time_select:not([multiple])
	{
		min-width: 72px;
	}
}
