/*
 * Solid Teens: the quick exit, the helplines and the safeguarding details (styi/quick-exit, styi/helplines,
 * styi/safeguarding). Loaded only on pages that show one of them, and in the editor. Colours come only from
 * the palette; gold is used as a fill with navy text or beside navy.
 */

/* Quick exit: fixed at the bottom right of the screen, above everything else. The link sits on its own
   deep navy pad, so its gold focus ring always meets navy, on white and on the dark bands alike. */
.styi-quick-exit {
	position: fixed;
	right: var(--styi-gutter);
	bottom: var(--styi-gutter);
	z-index: 70;
	display: inline-flex;
	padding: 6px;
	background: var(--wp--preset--color--deep-navy);
	box-shadow: 0 0.25rem 1rem rgb(8 41 90 / 0.35);
}

.styi-quick-exit__link {
	display: inline-flex;
	align-items: center;
	min-height: 3rem;
	padding: 0.75rem 1.25rem;
	border: 2px solid var(--wp--preset--color--white);
	background: var(--wp--preset--color--deep-navy);
	color: var(--wp--preset--color--white);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 700;
	line-height: 1.2;
	text-decoration: none;
}

.styi-quick-exit__link:hover {
	background: var(--wp--preset--color--navy);
	color: var(--wp--preset--color--white);
}

:root .styi-quick-exit__link:focus-visible {
	outline: 3px solid var(--wp--preset--color--gold);
	outline-offset: 0;
}

/* A control scrolled into view on focus stops above the button (WCAG 2.2 SC 2.4.11, Focus Not Obscured). */
:root:has(.styi-quick-exit) {
	scroll-padding-bottom: calc(var(--styi-gutter) + 5rem);
}

/* The cookie notice sits above the button, and the footer leaves room for it. */
:root:has(.styi-quick-exit) .styi-cookie {
	bottom: calc(var(--styi-gutter) + 4rem);
}

:root:has(.styi-quick-exit) .styi-footer {
	padding-bottom: calc(var(--wp--preset--spacing--50) + 4.5rem);
}

/* In the editor the button stays where it is placed. */
.editor-styles-wrapper .styi-quick-exit {
	position: static;
}

/* Helplines: 112 first and large, then the lines as ruled rows. */
.styi-helplines {
	display: grid;
	gap: var(--wp--preset--spacing--50);
}

.styi-helplines p {
	margin: 0;
}

.styi-helplines__urgent {
	display: grid;
	gap: var(--wp--preset--spacing--30);
}

.styi-helplines__now {
	font-size: var(--wp--preset--font-size--section);
	font-weight: 800;
	line-height: 1.15;
}

:root .styi-helplines__emergency {
	display: inline-block;
	padding: 0.1em 0.4em;
	background: var(--wp--preset--color--gold);
	color: var(--wp--preset--color--navy);
	text-decoration: none;
}

:root .styi-helplines__emergency:hover,
:root .styi-helplines__emergency:focus-visible {
	background: var(--wp--preset--color--amber);
	color: var(--wp--preset--color--navy);
}

.styi-helplines__list {
	display: grid;
	gap: 0;
	margin: 0;
	padding: 0;
	list-style: none;
	border-top: 1px solid currentColor;
}

.styi-helpline {
	display: grid;
	gap: 0.5rem;
	padding-block: var(--wp--preset--spacing--40);
	border-bottom: 1px solid currentColor;
}

@media (min-width: 48rem) {
	.styi-helplines__list {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		column-gap: var(--wp--preset--spacing--60);
	}
}

.styi-helpline__name {
	margin: 0;
	font-size: var(--wp--preset--font-size--card);
}

.styi-helpline__number {
	display: inline-flex;
	gap: 0.4em;
	align-items: center;
	min-height: 3rem;
	padding: 0.5rem 1rem;
	border: 2px solid currentColor;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
	text-decoration: none;
}

:root .styi-helpline__number:hover {
	border-color: var(--wp--preset--color--gold);
	background: var(--wp--preset--color--gold);
	color: var(--wp--preset--color--navy);
}

.styi-helpline__hours {
	font-weight: 600;
}

.styi-helpline__checked {
	font-size: var(--wp--preset--font-size--small);
}

.styi-helpline__checked a {
	text-decoration: underline;
	text-underline-offset: 0.2em;
}

/* Safeguarding lead and policy. */
.styi-safeguarding-lead,
.styi-safeguarding-policy {
	display: grid;
	gap: var(--wp--preset--spacing--30);
	font-size: var(--wp--preset--font-size--lead);
}

.styi-safeguarding-lead p {
	margin: 0;
}

.styi-safeguarding-lead a,
.styi-safeguarding-policy a {
	font-weight: 700;
	text-decoration: underline;
	text-underline-offset: 0.2em;
}
