/*
 * The policy pages (inc/policy/page.php) in the Help page's A1 "Help desk" look: a navy band with
 * the title and the language buttons, then one column with each section as a card. Loads on pages
 * holding the Language buttons block, and in the block editor. Class names are the ones the page's
 * blocks carry: .nx-policy-hero and .nx-policy (Groups), .nx-lang (a Group with a Language),
 * .nx-policy-section (the "Policy section" pattern), .nx-policy-glance, .nx-policy-pending.
 */
@font-face {
	font-family: "NX Noto Sans Sinhala";
	src: url("../fonts/noto-sans-sinhala.woff2") format("woff2");
	font-weight: 400 700;
	font-display: swap;
	unicode-range: U+0D80-0DFF, U+200C-200D, U+25CC;
}
@font-face {
	font-family: "NX Noto Sans Tamil";
	src: url("../fonts/noto-sans-tamil.woff2") format("woff2");
	font-weight: 400 700;
	font-display: swap;
	unicode-range: U+0B80-0BFF, U+200C-200D, U+25CC;
}

.nx-policy-hero,
.nx-policy {
	--nxp-navy: #161d27;
	--nxp-ink: #111;
	--nxp-text: #3d434c;
	--nxp-muted: #5f6672;
	--nxp-line: #e0e0e0;
	--nxp-rule: #eee;
	--nxp-grey: #f4f5f7;
	--nxp-chip: #eef1f5;
	--nxp-radius: 6px;
	/* What a link to a section must clear: the sticky bar (61 px at 1440, 70 px on phones). */
	--nxp-sticky: 76px;
}

/* Sinhala and Tamil: Latin words in the text stay in the site's font, the rest in Noto. */
.nx-lang[lang="si"],
.nx-langs [lang="si"] { font-family: Inter, "NX Noto Sans Sinhala", "Noto Sans Sinhala", "Iskoola Pota", "Nirmala UI", "Sinhala Sangam MN", sans-serif; }
.nx-lang[lang="ta"],
.nx-langs [lang="ta"] { font-family: Inter, "NX Noto Sans Tamil", "Noto Sans Tamil", "Nirmala UI", Latha, "Tamil Sangam MN", sans-serif; }
.nx-lang[lang="si"] :is(h2, h3, h4),
.nx-lang[lang="ta"] :is(h2, h3, h4) { font-family: inherit; line-height: 1.45; }
.nx-lang[lang="si"], .nx-lang[lang="ta"] { line-height: 1.8; }

/* The band. Full width on every screen (Shoptimizer's own alignfull rule is desktop only). */
.nx-policy-page .entry-content > .nx-policy-hero { margin: 0 calc(50% - 50vw) !important; }
.nx-policy-hero {
	padding: 44px 20px 40px;
	background: var(--nxp-navy);
	color: #fff;
	text-align: center;
}
.nx-policy-hero > * { max-width: 760px; margin-left: auto !important; margin-right: auto !important; }
.nx-policy-hero .nx-policy-hero__title { margin: 0 auto 20px; color: #fff; font-size: 38px; font-weight: 700; line-height: 1.15; }
.nx-policy-hero .nx-policy-hero__intro { margin: 0 auto 20px; color: #d3d8e0; font-size: 17px; }

/* The language buttons (links without scripts). */
.nx-langs {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px;
	margin: 0 auto;
}
.nx-langs .nx-langs__link,
.nx-langs .nx-langs__button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 104px;
	min-height: 46px;
	margin: 0;
	padding: 0 20px;
	border: 1px solid rgba(255, 255, 255, .55);
	border-radius: 99px;
	background: transparent;
	color: #fff;
	font: inherit;
	font-size: 16px;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none !important;
	cursor: pointer;
}
.nx-langs .nx-langs__link:hover,
.nx-langs .nx-langs__button:hover { border-color: #fff; background: rgba(255, 255, 255, .08); color: #fff; }
.nx-langs .nx-langs__button[aria-pressed="true"] { border-color: #fff; background: #fff; color: var(--nxp-navy); }
.nx-langs .nx-langs__link:focus-visible,
.nx-langs .nx-langs__button:focus-visible { outline: 3px solid #8fb3e8; outline-offset: 2px; }

/* The column. */
.nx-policy { color: var(--nxp-text); }
.nx-policy a { color: var(--nxp-navy); text-decoration: underline; text-underline-offset: 2px; }
.nx-policy :focus-visible { outline: 2px solid var(--nxp-navy); outline-offset: 2px; }
.nx-policy .nx-lang { max-width: 820px; margin: 0 auto; padding: 30px 0 8px; scroll-margin-top: var(--nxp-sticky); }
.nx-policy .nx-lang[hidden] { display: none !important; }
/* Without scripts the languages follow one another: a rule between them. */
html:not([data-nx-lang]) .nx-policy .nx-lang + .nx-lang { margin-top: 28px; border-top: 1px solid var(--nxp-line); }
.nx-policy .nx-lang > h2 { margin-top: 0; margin-bottom: 14px; color: var(--nxp-ink); font-size: 28px; font-weight: 700; line-height: 1.3; }
.nx-policy .nx-lang > p,
.nx-policy .nx-lang > ul,
.nx-policy .nx-lang > ol { font-size: 16px; line-height: 1.7; overflow-wrap: anywhere; }

/* A section: a card whose first heading is its header row. */
.nx-policy .nx-policy-section {
	margin-top: 26px;
	margin-bottom: 18px;
	overflow: hidden;
	border: 1px solid var(--nxp-line);
	border-radius: var(--nxp-radius);
	background: #fff;
	scroll-margin-top: var(--nxp-sticky);
}
.nx-policy .nx-policy-section + .nx-policy-section { margin-top: 0; }
.nx-policy .nx-policy-section > :first-child:is(h2, h3) {
	margin: 0 0 14px;
	padding: 15px 18px;
	border-bottom: 1px solid var(--nxp-rule);
	background: #fafafa;
	color: var(--nxp-ink);
	font-size: 20px;
	font-weight: 600;
	line-height: 1.35;
}
.nx-policy .nx-policy-section > :not(:first-child) { margin: 0 18px 14px; font-size: 15.5px; line-height: 1.7; overflow-wrap: anywhere; }
.nx-policy .nx-policy-section > :last-child { margin-bottom: 18px; }
.nx-policy .nx-policy-section h4 { margin-top: 22px; color: var(--nxp-ink); font-size: 17px; font-weight: 600; }
.nx-policy .nx-policy-section ul,
.nx-policy .nx-policy-section ol { padding-left: 22px; }
.nx-policy .nx-policy-section li { margin-left: 0; }
.nx-policy .nx-policy-section li + li { margin-top: 6px; }
.nx-policy .nx-policy-section li > ul,
.nx-policy .nx-policy-section li > ol { margin-top: 6px; margin-bottom: 0; }
.nx-policy .nx-policy-section blockquote {
	margin-left: 18px;
	margin-right: 18px;
	padding: 12px 16px;
	border-left: 3px solid var(--nxp-navy);
	background: var(--nxp-grey);
	font-size: 15.5px;
	font-style: normal;
}
.nx-policy .nx-policy-section blockquote p { margin: 0; font-size: inherit; }
.nx-policy .nx-policy-section code { padding: 1px 4px; border-radius: 3px; background: var(--nxp-chip); font-size: 13.5px; overflow-wrap: anywhere; }

/* "At a glance": the short version, first. */
.nx-policy .nx-policy-glance { border-color: #c9d3e1; background: #f7f9fc; }
.nx-policy .nx-policy-glance > :first-child:is(h2, h3) { background: #eef3fb; }

/* English text waiting for its Sinhala or Tamil translation. */
.nx-policy .nx-policy-soon {
	display: inline-block;
	margin-right: 6px;
	padding: 1px 9px;
	border: 1px solid #d5dbe3;
	border-radius: 99px;
	background: var(--nxp-chip);
	color: var(--nxp-navy);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .3px;
	vertical-align: 1px;
}

/* The "Help facts" WhatsApp button and the closing lines. */
.nx-policy .nx-policy-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.nx-policy a.nx-help-wa {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 46px;
	padding: 0 18px;
	border-radius: var(--nxp-radius);
	background: #0b7a5c;
	color: #fff;
	font-size: 15px;
	font-weight: 600;
	text-decoration: none;
}
.nx-policy a.nx-help-wa:hover { background: #096a50; color: #fff; }
.nx-policy a.nx-help-wa--link { min-height: 44px; padding: 0; background: none; color: #0b7a5c; text-decoration: underline; }
.nx-policy .nx-help-wa .nx-wa-icon { width: 20px; height: 20px; flex: none; fill: currentColor; }
.nx-policy .nx-policy-closing { color: var(--nxp-muted); font-size: 15px; }
.nx-policy .nx-policy-related { font-size: 15px; line-height: 2; }

@media (max-width: 767px) {
	.nx-policy-hero,
	.nx-policy { --nxp-sticky: 84px; }
	.nx-policy-hero { padding: 28px 16px 26px; }
	.nx-policy-hero .nx-policy-hero__title { margin-bottom: 16px; font-size: 28px; }
	.nx-langs { gap: 6px; }
	.nx-langs .nx-langs__link,
	.nx-langs .nx-langs__button { flex: 1 1 0; min-width: 0; padding: 0 10px; font-size: 15px; }
	.nx-policy .nx-lang { padding-top: 22px; }
	.nx-policy .nx-lang > h2 { font-size: 23px; }
	.nx-policy .nx-policy-section > :first-child:is(h2, h3) { padding: 13px 16px; font-size: 18px; }
	.nx-policy .nx-policy-section > :not(:first-child) { margin-left: 16px; margin-right: 16px; }
	.nx-policy .nx-policy-section blockquote { margin-left: 16px; margin-right: 16px; }
}

@media print {
	.nx-langs { display: none !important; }
	.nx-policy-page .entry-content > .nx-policy-hero { margin: 0 !important; padding: 0 0 12px; background: none; color: var(--nxp-ink); text-align: left; }
	.nx-policy-hero .nx-policy-hero__title { color: var(--nxp-ink); }
	.nx-policy .nx-lang[hidden] { display: block !important; }
	.nx-policy .nx-policy-section { break-inside: auto; }
}
