/*
Theme Name: Traversing The Hinterland
Theme URL: http://www.traversingthehunterland.co.uk
Version: 0.9.1
Description: Version: 0.9.0
Author: Paul McAlenan
Author URL: http://www.paulmcalenan.co.uk
*/

@import url('./assets/css/reset.css');
/* @import url('./assets/css/normalise.css'); */
/* @import url('./assets/css/typography.css'); */

/* Box sizing
--------------------------------------------- */
/* Inherit box-sizing to more easily change it's value on a component level.
@link http://css-tricks.com/inheriting-box-sizing-probably-slightly-better-best-practice/ */
/* html { box-sizing: border-box; }

*, *::before,
*::after { box-sizing: inherit; } */


/*--------------------------------------------------------------
# GENERAL
--------------------------------------------------------------*/

@font-face {
	font-family: 'Lexend';
	src: url('./assets/fonts/Lexend-Regular.woff2') format('woff2');
	font-weight: 400;
	font-display: swap; /* Critical: Ensures text renders while font loads */
}

@font-face {
	font-family: 'Lexend';
	src: url('./assets/fonts/Lexend-Light.woff2') format('woff2');
	font-weight: 300;
	font-display: swap; /* Critical: Ensures text renders while font loads */
}

@font-face {
	font-family: 'Lexend';
	src: url('./assets/fonts/Lexend-ExtraLight.woff2') format('woff2');
	font-weight: 200;
	font-display: swap; /* Critical: Ensures text renders while font loads */
}

@font-face {
	font-family: 'Lexend';
	src: url('./assets/fonts/Lexend-Medium.woff2') format('woff2');
	font-weight: 500;
	font-display: swap; /* Critical: Ensures text renders while font loads */
}

:not(a:span) span {
	color: var(--tomato);
}

img {
	display: block; /* make <a> tag full height of img */
	height: auto;
	border-radius: 2px;
}

/* iframe { max-height: 100%; } */


/*--------------------------------------------------------------
# Colours
--------------------------------------------------------------*/
:root {
	--text-color: #36454f; /* charcoal */
	--background-color: #ffffff;
	--hover-color:lightgray;


	--lightbox-bg: rgba(255, 255, 255, .9);

	--colour-valid: #57E964;
	--colour-invalid: red;

	--clr-heading: hsl(0 0% 25%);
	--darkmode-hover: 0, 0, 0;

	--charcoal: #36454f;
	--dimgrey: #696969;
	--grey: #808080;
	--darkgrey: #a9a9a9;
	--silver: #c0c0c0;
	--lightgrey: #d3d3d3;
	/* --blue: #409cfe; */

	--blue: #4898EE;
	--white: #ffffff;
	--pink: #ff00ff;
	--tomato: #FE4340;
}

.darkmode {
	--text-color: #ebebec;
	--background-color: #1a1915;

	/* --clr-card-bg: hsl(209 50% 5%); */
	--clr-heading: hsl(209 50% 80%);
	--hover-color: rgb(128, 128, 128);
	--darkmode-hover: 255, 255, 255;

	--lightbox-bg: rgba(0, 0, 0, .5);
}


/*--------------------------------------------------------------
# MAIN LAYOUT
--------------------------------------------------------------*/

html {
	/* height: 100%; */
	overflow: auto;
	font-family: 'Lexend', sans-serif;
}

body {
	--hover-padding: 20px;
	--content-max-width: 600px;

	display: grid;

	grid-template-columns:
		[fullwidth-start] 1fr [padding-start] var(--hover-padding)
		[content-start] min(100% - var(--hover-padding) * 2, var(--content-max-width)) [content-end]
		var(--hover-padding) [padding-end] 1fr [fullwidth-end];

	grid-template-rows: auto auto 1fr auto auto auto;
	row-gap: 1.5rem;
}

body:is(.search, .privacy-policy, .error404) {
	grid-template-rows: auto auto auto auto auto 1fr;
}

body {
	container: body / inline-size;
	color: var(--text-color);
	background: var(--background-color);
	font-size: 1.125rem;
	font-weight: 400;
	line-height: 1.5;
	transition: 0.8s;
	padding-right: 0 !important;
}

body > *:not(main, footer) {
	grid-column: content;
}

main, footer {
	display: grid;
	grid-column: padding;
}

body:not(.single, .page, .search, .error404) > main {
	grid-template-columns: inherit;
}

body:not(.single) > main > figure {
	grid-column: padding;
}

/* Format headers */
h1, figure h2 {
	font-size: 1.625rem;
	font-weight: 300;
}

h2, h3 {
	font-size: 1.25rem;
}

body > header {
	grid-column: padding;
	display: flex;
	flex-wrap: wrap;
	row-gap: 1rem;
	/* margin-top: 2.0rem; */
	align-self: start;
	justify-self: stretch;
}

body:is(.single, .search) > header {
	margin-top: 2rem;
	/* margin-top: -1.25rem; */
}

body > header + nav {
	position: relative;
	align-self: start;
	justify-self: stretch;
}

main {
	min-height: 0;
}

body > header h1 {
	/* padding: calc(0.5rem - 2px) 0; */
	padding-left: calc(var(--hover-padding) - 2px);
	display: flex;
	flex-wrap: wrap;
	flex: 1; /* prevents the darkmode button from wrapping to a new line */
	font-size: 2rem;
	font-weight: 400;
	letter-spacing: 3px;
	border: 2px solid transparent;
}

/* Accessibility for blog name link */
header > h1:has(a:focus-visible) {
	border: 2px solid orange;
	border-radius: 2px;
	background-color: var(--hover-color);
}

body > figure {
	height: 180px;
	background: url('assets/images/hinterland.webp') no-repeat;
	background-position: 90%;
	position: relative;
	/* overflow: visible; */
	width: 100%;
}

@container body (width < 600px) {
	body > figure {
		grid-column: padding;
	}
}


/* Format links & buttons
-------------------------------------------------------------- */

/* a { word-break: break-all; } */
a { word-break: break-word; }

article a {
	transition: color .2s;
}

article a:where(:link, :visited, :focus, :active ) {
	text-decoration: none;
	color: var(--blue);
}

article a:is(:hover, :focus) {
	text-decoration: none;
	color: var(--tomato);
}

article a:focus {
	text-decoration: underline;
}

/*--------------------------------------------------------------
# NAVIGATION
-------------------------------------------------------------- */

/*  All <nav> */
nav {
	display: flex;
}

/* Post <nav> */
nav:is(article + nav) {
	flex-wrap: wrap;
	row-gap: .5rem;
	padding: 0 var(--hover-padding);
}

/* Main <navs> */
nav:not(article + nav) {
	column-gap: .5rem;
}

nav svg {
	stroke: currentColor;
}

nav a:hover svg {
	stroke: currentColor;
}

/* Main navigation
--------------------------------------------------------------*/

nav:has(+main) a, main ~ nav:last-of-type a

/* nav:not(article + nav) a */
{
/* nav:not(main + nav) a, form > div > button { */
	padding: .25rem .5rem;
	border: 2px solid var(--blue);
	border-radius: 2px;
	transition: .6s;
}

:is(nav:not(article + nav) a, form > div > button):is(:hover, :focus-visible) {
/* :is(nav:not(main + nav) a, form > div > button):is(:hover, :focus-visible) { */
	background-color: var(--hover-color);
}

:is(nav:not(main + nav) a, form > div > button):is(:focus-visible) {
	border-color: orange;
}

/* Pagination
--------------------------------------------------------------*/
main + nav {
/* .blog main + nav { */
	/* display: flex; */
	align-items: center;
}

/* .blog main + nav > :is(a, span) { */
main + nav > * {
/* .blog main + nav > * { */
	/* display: inline-block; */
	padding: 0.25rem 0.625rem;
}

body:not(.single, .page) main + nav :first-child {
/* .blog main + nav :first-child { */
	padding-left: 0;
}

main + nav > a:has(svg) {
/* .blog main + nav > a:has(svg) { */
	padding: 0.35rem 0.125rem;
}

main + nav [aria-current] {
/* .blog main + nav [aria-current] { */
	font-weight: 600;
	cursor: default;
}

main + nav a:is(:hover, :focus-visible) {
/* .blog main + nav a:is(:hover, :focus-visible) { */
	background-color: var(--hover-color);
	border-radius: 2px;
}

main + nav a:focus-visible {
/* .blog main + nav a:focus-visible { */
	border: 2px solid orange;
	border-radius: 2px;
}

/* Single Posts Navigation
-------------------------------------------------------------- */
article + nav a {
	width: 100%;
}

article + nav a:hover {
	color: var(--blue);
	transition: .2s;
}

article + nav::before {
	margin-top: 0.5em;
	margin-bottom: 1.75rem;
	content: "";
	display: block;
	border-bottom: 0.125em solid var(--silver);
	width: 100%;
}

article + nav > a:last-child::before {
	width: 4em;
	margin: 1em 0;
	content: "";
	display: block;
	border-bottom: 0.125em solid var(--silver);
}

article + nav::after {
	margin-top: 1.175em;
	margin-bottom: 0.5rem;
	content: "";
	display: block;
	border-bottom: 0.125em solid var(--silver);
	width: 100%;
}

article + nav span {
	display: block;
}

/* Tags
-------------------------------------------------------------- */
.post_tags > a {
	padding: 0.25rem 0.5rem;
	border: 2px solid var(--blue);
	border-radius: 2px;
}

/*--------------------------------------------------------------
# Content
-------------------------------------------------------------- */
article, section {
	display: grid;
	row-gap: 1rem;
}

.home article {
	row-gap: 0.5rem;
	padding: 20px;
	transition: 0.6s;
}

body:not(.home) :is(article, section:not(article > section)) {
	grid-template-columns:
		[padding-start] var(--hover-padding)
		[content-start] 1fr [content-end]
		var(--hover-padding) [padding-end];
		grid-template-rows: min-content min-content;

}

body:not(.home) :is(article, section) > *:not(figure, form) {
	grid-column: content;
}

body:not(.home) :is(article, section) > figure {
	grid-column: padding;
}

time {
	width: max-content;
	padding: 0.5rem 0 0.5rem 0;
	border-top: 1px solid var(--silver);
	border-bottom: 1px solid var(--silver);
	font-weight: normal;
}

main figure {
/* body:not(.home) main article > figure { */
	padding: 20px;
	transition: 0.6s;
}

.single figure  {
	margin-top: -1rem;
}

.single article > section {
	padding: 1rem;
	border: 1px solid var(--silver);
	border-radius: 3px;
	margin: 1rem 0 2rem;
}

blockquote {
	background: var(--hover-color);
	padding: 1.5rem;
	border-radius: 0.75rem;
}

@container body (width < 768px) {
	article figure > a {
		pointer-events: none;
		cursor: default;
	}
}

@container body (width < 768px) {
	article figcaption {
		text-align: right;
		margin-top: 10px;
	}
}

/* Private Block
-------------------------------------------------------------- */
.wp-block-private-blurb-block, .private-block {
	background-color: #FCB900;
	padding: 0.5rem 1.25rem !important;
	word-break: break-all;
}

body:not(.logged-in) .wp-block-private-blurb-block {
	display: none;
}

/*--------------------------------------------------------------
# FOOTER
-------------------------------------------------------------- */
body > footer {
	display: grid;
	grid-template-columns:
		[padding-start] var(--hover-padding)
		[content-start] 1fr [content-end]
		var(--hover-padding) [padding-end];
	row-gap: 1rem;
	width: 100%;
	margin-bottom: 2.0rem;
	transition: 0.6s;
	font-size: .875rem;
}

body > footer > :is( a, div) {
	display: flex;
	flex-wrap: wrap;
	/* display: grid; */

	row-gap: 4px;
	padding-top: 20px;
	padding-bottom: 20px;
	transition: 0.6s;
}

body > footer > :is(a, div) {
	grid-column: content;
}

body > footer > :is(a, div) > p:first-child {
	flex: 100%;
}

body > footer > :is(a, div)  > :is(img, a:has(img)) {
	margin-left: auto;
	align-self: end;
}


body:not(.about) > footer .copyright span {
	color: var(--blue);
}

footer {
	align-self: self-end;
}

/*--------------------------------------------------------------
# Roger & Paul
-------------------------------------------------------------- */
@media screen and (min-width: 768px) {

	body > figure > span {
		position: absolute;
		top: 0px;
		height: 100%;
	}

	span.roger {
		right: 0px;
		width: 240px;
	}

	span.me {
		left: 0px;
		width: 365px;
	}

	span.roger:hover {
		background: url('assets/images/roger_glow.png') no-repeat -4px bottom;
	}

	span.me:hover {
		background: url('assets/images/me_glow.png') no-repeat 315px bottom;
	}

	figure:has( > a > img:hover) {
		cursor: pointer;
		border-radius: 3px;

		/* Fallback if average image colour fails  */
		background-color: var(--lightgrey);
	}

	:is(.home, .single) figcaption:not(body > figure > figcaption) {
		display: none;
	}

	body:not(.about) > footer:has(a:hover, a:focus-visible) {
		background-color: var(--hover-color);
		/* background-color: #eeeeee; */
	}

	body:not(.about) > footer:has(a:focus-visible) {
		border: 2px solid orange;
		/* background-color: #eeeeee; */
	}

}

/*--------------------------------------------------------------
# Privacy Popup
-------------------------------------------------------------- */
#privacy {
	z-index: 9999;
	position: fixed;
	bottom: 3%;
	right: 2%;
	padding: 1.0rem;
	max-width: 60ch;
	border-radius: 10px;
	background: #fff;
	border: 1px solid rgba(0, 0, 0, .15);
	font-size: 15px;
	box-shadow:rgba(23,43,99,.4) 0 7px 28px
}

@media ( max-width: 600px ) {
	#privacy {
		border-radius: 0;
		max-width: 100%;
		right: 0;
		bottom: 0;
	}
}

#privacy a {
	font-size: 15px;
	text-decoration: none;
}

#privacy a:hover {
	opacity: .7;
}

#privacy p {
	margin: 0;
	color: #000;
	padding-right: 4.0rem;
}

#privacy button {
	position:absolute;
	right: 0.5rem;
	top: 20px;
	align-self: center;
	line-height: 1;
	color: #fff;
	background-color: var(--blue);
	border: none;
	/* opacity: 0.6; */
	font-size: 24px;
	cursor: pointer;
	border-radius: 50px;
	padding: 5px 15px 10px 15px;
	transition: 0.6s;
}

#privacy button:hover { background-color: var(--charcoal); }

/*--------------------------------------------------------------
# Screen Reader
-------------------------------------------------------------- */
.screen-reader {
	clip-path: inset(50%);
	width: 1px;
	height: 1px;
	overflow: hidden !important;
	position: fixed !important;
	white-space: nowrap !important;
	word-wrap: normal !important;
}

.screen-reader-text {
	position: absolute;
	left: -9999px;
	z-index: 999;
	padding: 1.0rem;
	opacity: 0;
}

a.screen-reader-text:focus {
	color: var(--blue);
}

.screen-reader-text:focus {
	left: 0;
	transform: translateX(0%);
	opacity: 1;
}

/*--------------------------------------------------------------
# Lightbox
-------------------------------------------------------------- */
.lightbox-container {
	display: none;
	position: fixed;
	width: 100%;
	height: 100%;
	color: var(--text-color);
	background-color: var(--lightbox-bg);
}

.image-container {
	position: fixed;
	width: 100%;
	height: 100%;
}

.lightbox-container.active {
	display: block;
	/* place-items: center; */
}

.image-container {
	display: grid;
	/* max-width: 75%;
	max-height: 75%; */
	object-fit: cover;
	/* place-items: center; */
	transition: translate .3s linear;
}

/* .lightbox-container.active {
	display: grid;
	place-items: center;

} */

.image-container > img {
	/* max-width: 75%;
	max-height: 75%; */
	object-fit: cover;
}

.image-transition {
	transition: transform 1s ease-in-out;
}



/*
.image-container > img {
	transition: translate .3s linear;
	transition: opacity 0.5s ease-in-out;
} */

.slide-in {
	transform: translateX(0);
	transition: opacity 0.5s ease;
}

  /* Fade-out animation for old image */
.fade-out {
	opacity: 0;
	transition: opacity 0.5s ease;
  }


.fade-in {
	opacity: 1;
	transform: translateX(0); /* Move to the center */
}

.lightbox-container > *:not(figure) {
	position: absolute;
}

.lightbox-container > button {
	/* display: grid; */
	padding: 1rem; /* allow user more margin to click */
	/* user-select: none; */
}

.image-index {
	top: 50px;
	left: 50px;
	font-size: 1.75rem;
	letter-spacing: 0.1rem;
	cursor: default;
}

.close {
	top: 25px;
	right: 50px;
	font-size: 4rem;
	font-weight: 300;
	cursor: pointer;
}

.arrow {
	top: 50%;
	cursor: pointer;
	user-select: none;
}

#arrow-left {
	left: 50px;
}

#arrow-right {
	right: 50px;
}

.lightbox-container figcaption {
	text-align: right;
	color: var(--text-color);
}

.lightbox-container figcaption:has(span) {
	display: flex !important;
	/* justify-content: space-between; */
}

.lightbox-container figcaption > span:first-child {
	margin-right: auto;
}

.lightbox-container figcaption > span:last-child:before {
	content: "\00a0\2013\00a0";
}

.lightbox-container figcaption > .location + .place::before {
	content: "\00a0 at\00a0";
}
/*
.lightbox-container figcaption > span:nth-last-child(2):before {
	content: "\00a0 at\00a0";
} */

@container body (width < 768px) {

	figcaption {
		font-size: 1rem;
	}

	figcaption > span:first-child:after {
		content: '\A';
		white-space: pre-wrap;
	}

	figcaption > span:nth-child(2):after {
		content: '\00a0\2013\00a0';
	}
}

/*--------------------------------------------------------------
# Post Feedback Form
-------------------------------------------------------------- */
/* remove Chrome(?) background colour */
/* input:is(:-webkit-autofill, -webkit-autofill:hover, -webkit-autofill:focus, -webkit-autofill:active) {
	-webkit-background-clip: text;
	transition: background-color 5000s ease-in-out 0s;
} */

/* form {
	display: grid;
	grid-column: content;
	margin-top: 1rem;
	padding: var(--hover-padding);
	background-color: #ebebeb;
	border-radius: 2px;
	border: 1px solid grey;
} */

/* dialog > :is(input, textarea) {
	margin-bottom: 1rem;
}

@container body (width < 768px) {

	form {
		grid-column: padding;
		border: none;
	}
}

form :is(input[type=email], textarea) {
	width: 100% !important;
	padding: 16px;
	border: 1px solid #8c8f94;
	border-radius: 2px;
}

form textarea {
	height: 200px;
}

form :is(input, textarea)::placeholder {
	transition: none;
} */

/* form :is(input[type='email'], textarea):hover::placeholder {
	opacity: inherit !important;
}

form :is(input[type='email'], textarea):focus::placeholder {
	color: transparent !important;
}

form button {
	cursor: pointer;
}

form > button {
	display: flex;
	column-gap: 0.125rem;
	justify-self: start;
}

form:has( > button:focus-visible) {
	border-color: orange;
	border-width: 2px;
}

form > div > button {
	margin-top: 1rem;
	padding:0.75rem;
	border-radius: 15px;
}

form :is(input[type=email], textarea) {
	border: 1px solid grey;
}

form :is(input[type=email]:not(:focus):not(:placeholder-shown):invalid) {
	border: 2px solid var(--colour-invalid);
}

form :is(input[type=email]:not(:focus):not(:placeholder-shown):valid) {
	border: 2px solid var(--colour-valid);
}

form :is(input[type=email]:user-invalid) {
	border: 2px solid var(--colour-invalid);
}

form :is(input[type=email]:user-valid) {
	border: 2px solid var(--colour-valid);
}


form :is(input, textarea) {
	transition: box-shadow 0.3s ease;
}

form :is(input, textarea):not(:focus, :valid):hover {
	box-shadow: inset 0 0 4px gray;
} */

/* form label {
	margin-bottom: -0.5rem; */
	/* opacity: 0; Start visible */
	/* transition: opacity 0.3s ease;
} */

/* form label:has(+ :is(input, textarea):focus),
form label:has(+ :is(input, textarea):not(:placeholder-shown)){
	opacity: 1;
}

form dialog {
	width: 640px;
	border: 2px solid grey;
	border-radius: 2px;
	background-color: white;
}

::backdrop {
	background-color: rgba(255, 255, 255, 0.5);
} */

/*--------------------------------------------------------------
# DARK MODE
--------------------------------------------------------------*/
.dark-mode-icon {
	display: none;
}

/* .darkmode .light-mode-icon {
	display: none;
}

.darkmode .dark-mode-icon {
	display: block;
} */

.dark-mode-toggle {
	/* z-index: 100; */
	background: transparent;
	cursor: pointer;
}

.dark-mode-toggle  {
	position: relative;
	display: grid;
	margin-right: var(--hover-padding);
	align-self: center;
	place-items: center;
	width: 45px;
	height: 45px;
	margin-left: auto;
	border-radius: 50%;
	transition: background 0.5s, border 0.5s;
	border: 2px solid transparent;
}

.dark-mode-toggle:is(:hover, :focus-visible)  {
	background-color: rgba(var(--darkmode-hover), 0.1);
}

.dark-mode-toggle:focus-visible  {
	border: 2px solid orange;
}

.darkmode .sl-wrapper .sl-image .sl-caption {
	background: rgba(0, 0, 0, 0.4) !important;
	color: rgb(235, 235, 236);
  }

.darkmode .sl-overlay {
	background: rgba(0, 0, 0, 0.8) !important;
}


/*--------------------------------------------------------------
# SNIPPETS
--------------------------------------------------------------*/

/* .wpcf7 form span:has(textarea:focus)::after {
	content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24px' viewBox='0 -960 960 960' width='24px' fill='%23000000'%3E%3Cpath d='M108-236.62v-85.99h504v85.99H108ZM108-438v-86h744v86H108Zm0-201.39v-85.99h744v85.99H108Z'/%3E%3C/svg%3E");
	width: 24px;
	height: 24px;
	display: block;
	color: currentColor;
	position: absolute;
	top: .5rem;
	right: 1rem;
} */

/*
.wpcf7 form span:has(input[type="email"]:focus)::after {
	content: url("data:image/svg+xml, %3Csvg xmlns='http://www.w3.org/2000/svg' height='24px' viewBox='0 -960 960 960' width='24px' fill='%23000000'%3E%3Cpath d='M480-100q-78.77 0-148.14-29.92-69.37-29.92-120.68-81.21-51.31-51.29-81.25-120.63Q100-401.1 100-479.93q0-78.84 29.92-148.21t81.21-120.68q51.29-51.31 120.63-81.25Q401.1-860 479.93-860q78.84 0 148.21 29.93 69.37 29.92 120.68 81.22t81.25 120.65Q860-558.85 860-480v48.77q0 54.77-37.61 93T730-300q-35.39 0-65.62-17.31-30.23-17.31-47.77-47.62Q590.69-334 555.35-317 520-300 480-300q-74.92 0-127.46-52.54Q300-405.08 300-480q0-74.92 52.54-127.46Q405.08-660 480-660q74.92 0 127.46 52.54Q660-554.92 660-480v48.77q0 29.46 20.27 50.35Q700.54-360 730-360q29.46 0 49.73-20.88Q800-401.77 800-431.23V-480q0-134-93-227t-227-93q-134 0-227 93t-93 227q0 134 93 227t227 93h200v60H480Zm0-260q50 0 85-35t35-85q0-50-35-85t-85-35q-50 0-85 35t-35 85q0 50 35 85t85 35Z'/%3E%3C/svg%3E");
	width: 24px;
	height: 24px;
	display: block;
	color: currentColor;
	position: absolute;
	top: 0;
	right: 1rem;
} */
/*
form span:has(input[type="email"]:not(:placeholder-shown))::after {
	content: url("data:image/svg+xml, %3Csvg xmlns='http://www.w3.org/2000/svg' height='24px' viewBox='0 -960 960 960' width='24px' fill='%23000000'%3E%3Cpath d='M480-100q-78.77 0-148.14-29.92-69.37-29.92-120.68-81.21-51.31-51.29-81.25-120.63Q100-401.1 100-479.93q0-78.84 29.92-148.21t81.21-120.68q51.29-51.31 120.63-81.25Q401.1-860 479.93-860q78.84 0 148.21 29.93 69.37 29.92 120.68 81.22t81.25 120.65Q860-558.85 860-480v48.77q0 54.77-37.61 93T730-300q-35.39 0-65.62-17.31-30.23-17.31-47.77-47.62Q590.69-334 555.35-317 520-300 480-300q-74.92 0-127.46-52.54Q300-405.08 300-480q0-74.92 52.54-127.46Q405.08-660 480-660q74.92 0 127.46 52.54Q660-554.92 660-480v48.77q0 29.46 20.27 50.35Q700.54-360 730-360q29.46 0 49.73-20.88Q800-401.77 800-431.23V-480q0-134-93-227t-227-93q-134 0-227 93t-93 227q0 134 93 227t227 93h200v60H480Zm0-260q50 0 85-35t35-85q0-50-35-85t-85-35q-50 0-85 35t-35 85q0 50 35 85t85 35Z'/%3E%3C/svg%3E");
	width: 24px;
	height: 24px;
	display: block;
	color: currentColor;
	position: absolute;
	top: 0;
	right: 1rem;
} */

/* Apply this directly to the iframe or a container */
iframe {
    width: 100%;
    aspect-ratio: 16 / 9; /* Standard widescreen video ratio */
    height: auto; /* Height becomes automatic based on aspect ratio and width */
}

/* Optional container if needed */
.responsive-iframe-container {
   width: 100%;
}


/*--------------------------------------------------------------
# SEARCHFORM
--------------------------------------------------------------*/

form[role=search]  {
	position: relative;
	display: flex;
	width: 2.8rem;
	height: 2.8rem;

	border-width: 2px;
	border-style: solid;
	border-color: var(--text-color);
	border-radius: 5px;

	overflow: hidden;
	transition: width 300ms ease-in-out;

	&:focus-within {
		width: 100% !important;

		input {
			width: calc(100% - 3.8rem);
			opacity: 1;
		}

	}
}

form[role=search] input {
	position: absolute;
	top: 0;
	bottom: 0;
	left: 0;
	width: 100%;
	height: 2.8rem;
	/* background: #f5f5f5; */
	background: transparent;
	flex-grow: 1;
	/* border-width: 2px;
	border-style: solid;
	border-color: var(--text-color);
	border-radius: 5px; */
	/* padding: 0 3.5rem 0 1.5rem; */
	transition: 0.4s;
	opacity: 0;
	z-index: 2;
	/* margin-left: 1rem; */
	cursor: pointer;
}

form[role=search] input:focus-within {
	margin-left: 1rem;
	cursor: text;
}

form[role=search]:hover input {
	border-color: var(--blue);
}

form[role=search]:has(input:focus-visible) {
	border-color: orange;
}

form[role=search]:has(button:focus-visible) {
	border-color: orange;
}

form[role=search]:has(input.mouse-focused) {
	border-color: var(--blue);
}

form[role=search] button {
	width: 2.8rem;
	height: 2.8rem;
	margin-left: auto;
	z-index: 99;
	pointer-events: none;
}

form[role=search]:focus-within button {
	pointer-events: all;
}

form[role=search] button:hover {
	cursor: pointer;
}

form[role=search] button svg {
	vertical-align: bottom;
	margin: auto;
}

form[role=search] button:focus-visible svg {
	color: orange;
}


form[role=search] input {

	&::placeholder {
		transition: none;
	opacity: 0;
	transition: .4s;
	}
	&:hover::placeholder {
		opacity: 1;
	}
	&:focus::placeholder {
		color: transparent;
	}

}

/* .search main > :is(header, .search-result-count) {
	grid-column: content;
} */

/*--------------------------------------------------------------
# TOOLTIP
--------------------------------------------------------------*/

.tooltip {
  padding: 1rem;
}

.tooltip {
    --arrow-color: rgba(0, 0, 0, 0.8); /* Default value - NOW HERE */
    border-radius: 5px;
    z-index: 1000;
    pointer-events: none;
    opacity: 0; /* Initially transparent */
    transition: opacity 0.2s ease; /* Smooth transition for opacity */
}

/* --- Arrow Styles (using ::after pseudo-element) --- */
.tooltip::after {
    content: '';
    position: absolute;
    width: 0;
    height: 0;
    border: 10px solid transparent; /* Adjust size as needed */
}

/* --- Arrow pointing down (tooltip above) --- */
.tooltip-above::after {
    top: 100%;  /* Position at the bottom of the tooltip */
    left: 50%;  /* Initially centered horizontally */
    margin-left: -10px; /* Offset by half the arrow width */
    border-top-color: var(--arrow-color); /* Arrow color (match tooltip background) */
}

/* --- Arrow pointing up (tooltip below) --- */
.tooltip-below::after {
    bottom: 100%; /* Position at the top of the tooltip */
    left: 50%; /* Initially centered horizontally */
    margin-left: -10px; /* Offset by half the arrow width */
    border-bottom-color: var(--arrow-color);
}

/* --- Fade and Show Classes --- */
.tooltip.fade {
    transition: opacity 0.2s ease;  /* Removed this */
}

.tooltip.show {
    display: block; /* Make visible */
    opacity: 1;
}

hr {
	border: none;
    border-top: 2px solid;
}

main > nav > a > [aria-hidden] {
	display: flex;
}