/* Popshore theme styles that theme.json cannot express. Loaded on the front end and in the editor. */

/* ---------- Helpers ---------- */

/* Only weights 300 and 600 are bundled, so bold text uses 600. */
strong,
b {
	font-weight: 600;
}

.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	width: 1px;
	word-wrap: normal !important;
}

/* Short grey rule under a heading, as in the original design. */
.popshore-rule {
	position: relative;
	padding-bottom: 15px;
	margin-bottom: 15px;
}
.popshore-rule::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: 0;
	width: 30px;
	height: 1px;
	background: #dddddd;
}
.popshore-rule--center::after,
.has-text-align-center.popshore-rule::after {
	left: 50%;
	margin-left: -15px;
}

.popshore-block-placeholder {
	display: inline-block;
	padding: 4px 8px;
	font-size: 12px;
	color: var(--wp--preset--color--muted);
	border: 1px dashed currentColor;
}

/* Legacy class from the Transcend theme, still used in page content (e.g. the red "Pop" in "Popshore"). */
.primary-color {
	color: #cc0000;
}

/* ---------- Top bar and language switcher ---------- */

.popshore-topbar {
	font-size: 0.9em;
	line-height: 20px;
}
.popshore-languages {
	display: flex;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}
.popshore-languages li {
	margin: 0;
	line-height: 0;
}
.popshore-languages a {
	display: inline-block;
	padding: 4px 0;
}

/* ---------- Header ---------- */

.popshore-header {
	position: relative;
	z-index: 50;
	background: var(--wp--preset--color--white);
}
.popshore-header__inner {
	min-height: 80px;
}
.popshore-logo {
	align-self: flex-start;
	padding: 10px 0 0;
	flex-shrink: 1;
}
.popshore-logo img {
	height: auto;
}

/* ---------- Menu block ---------- */

.popshore-menu__list,
.popshore-menu__list ul {
	margin: 0;
	padding: 0;
	list-style: none;
}
.popshore-menu__list a {
	display: block;
	text-decoration: none;
}

/* Main menu, desktop (matches the old Transcend header). */
.popshore-main-menu {
	font-size: 14px;
	line-height: 1.6;
}
.popshore-main-menu .popshore-menu__list {
	display: flex;
	border-right: 1px solid var(--wp--preset--color--border);
}
.popshore-main-menu .popshore-menu__list > li {
	position: relative;
	border-left: 1px solid var(--wp--preset--color--border);
}
.popshore-main-menu .popshore-menu__list a {
	transition: color 0.4s, background-color 0.4s;
}
.popshore-main-menu .popshore-menu__list > li > a {
	padding: 29px 10px;
	color: var(--wp--preset--color--muted);
}
.popshore-main-menu .popshore-menu__list > li.menu-item-has-children > a {
	padding-right: 25px;
}
.popshore-main-menu .popshore-menu__list > li.menu-item-has-children::before {
	content: "";
	position: absolute;
	top: 50%;
	right: 10px;
	margin-top: -2px;
	border: 4px solid transparent;
	border-top-color: #cccccc;
	border-bottom-width: 0;
	pointer-events: none;
}
.popshore-main-menu .popshore-menu__list a:hover,
.popshore-main-menu .popshore-menu__list a:focus {
	text-decoration: none;
}
.popshore-main-menu .popshore-menu__list a:focus-visible {
	color: var(--wp--preset--color--primary);
}
.popshore-main-menu .sub-menu {
	position: absolute;
	top: 100%;
	left: 0;
	margin: 0;
	background: var(--wp--preset--color--white);
	box-shadow: inset 0 10px 3px -8px rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.2);
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.4s, visibility 0.4s;
	z-index: 60;
}
.popshore-main-menu .popshore-menu__list > li:nth-last-child(-n+2) > .sub-menu {
	left: auto;
	right: 0;
}
.popshore-main-menu li:hover > .sub-menu,
.popshore-main-menu li:focus-within > .sub-menu {
	opacity: 1;
	visibility: visible;
}
.popshore-main-menu .sub-menu a {
	width: 220px;
	box-sizing: border-box;
	padding: 8px 10px;
	line-height: 1.5;
	color: #555555;
}
/* Current page and its parent: primary colour, light grey background (after the sub-menu rule so it wins). */
.popshore-main-menu .popshore-menu__list .current-menu-item > a,
.popshore-main-menu .popshore-menu__list .current-menu-ancestor > a,
.popshore-main-menu .popshore-menu__list .current-menu-parent > a,
.popshore-main-menu .popshore-menu__list .sub-menu .current-menu-item > a {
	color: var(--wp--preset--color--primary);
	background: rgba(0, 0, 0, 0.02);
}

/* Menu toggle (shown below 800px): three plain lines, as on the old site. */
.popshore-menu__toggle {
	display: none;
	position: relative;
	width: 30px;
	height: 20px;
	margin: 0 10px 0 0;
	padding: 0;
	border: 0;
	background: transparent;
	cursor: pointer;
}
.popshore-menu__bars,
.popshore-menu__bars::before,
.popshore-menu__bars::after {
	position: absolute;
	left: 0;
	display: block;
	width: 100%;
	height: 2px;
	background: #666666;
	transition: transform 0.3s ease, background-color 0.3s ease;
}
.popshore-menu__bars {
	top: 50%;
	margin-top: -1px;
}
.popshore-menu__bars::before,
.popshore-menu__bars::after {
	content: "";
}
.popshore-menu__bars::before {
	top: -9px;
}
.popshore-menu__bars::after {
	top: 9px;
}
.popshore-menu__toggle:focus-visible .popshore-menu__bars,
.popshore-menu__toggle:focus-visible .popshore-menu__bars::before,
.popshore-menu__toggle:focus-visible .popshore-menu__bars::after {
	background: var(--wp--preset--color--primary);
}

@media (max-width: 800px) {
	.has-mobile-toggle .popshore-menu__toggle {
		display: block;
	}
	/* Full-screen white menu that slides up, with a thin close cross. */
	.has-mobile-toggle .popshore-menu__panel {
		position: fixed;
		inset: 0;
		z-index: 99998;
		overflow: auto;
		box-sizing: border-box;
		padding: 5% 70px 5% 5%;
		background: var(--wp--preset--color--white);
		font-size: 1.2em;
		visibility: hidden;
		opacity: 0;
		transform: translateY(100%);
		transition: transform 0.8s cubic-bezier(0.35, 1, 0.6, 0.97), opacity 0.3s, visibility 0.8s;
	}
	.has-mobile-toggle.is-open .popshore-menu__panel {
		visibility: visible;
		opacity: 1;
		transform: none;
	}
	.has-mobile-toggle.is-open .popshore-menu__toggle {
		position: fixed;
		top: 30px;
		right: 30px;
		z-index: 99999;
		width: 40px;
		height: 40px;
		margin: 0;
	}
	.has-mobile-toggle.is-open .popshore-menu__bars {
		background: transparent;
	}
	.has-mobile-toggle.is-open .popshore-menu__bars::before,
	.has-mobile-toggle.is-open .popshore-menu__bars::after {
		top: 0;
		height: 1px;
		background: #888888;
	}
	.has-mobile-toggle.is-open .popshore-menu__bars::before {
		transform: rotate(45deg);
	}
	.has-mobile-toggle.is-open .popshore-menu__bars::after {
		transform: rotate(-45deg);
	}
	.popshore-main-menu .popshore-menu__list {
		display: block;
		border: 0;
	}
	.popshore-main-menu .popshore-menu__list > li {
		border-left: 0;
		border-top: 1px solid var(--wp--preset--color--border);
	}
	.popshore-main-menu .popshore-menu__list > li:first-child {
		border-top: 0;
	}
	.popshore-main-menu .popshore-menu__list > li.menu-item-has-children::before {
		display: none;
	}
	.popshore-main-menu .popshore-menu__list a,
	.popshore-main-menu .popshore-menu__list > li > a,
	.popshore-main-menu .sub-menu a,
	.popshore-main-menu .popshore-menu__list .current-menu-item > a,
	.popshore-main-menu .popshore-menu__list .current-menu-ancestor > a,
	.popshore-main-menu .popshore-menu__list .current-menu-parent > a,
	.popshore-main-menu .popshore-menu__list .sub-menu .current-menu-item > a {
		width: auto;
		padding: 10px;
		line-height: 1.5;
		color: var(--wp--preset--color--blue);
		background: none;
	}
	.popshore-main-menu .popshore-menu__list a:focus-visible {
		color: var(--wp--preset--color--primary);
	}
	.popshore-main-menu .sub-menu {
		position: static;
		margin: 0 0 0 25px;
		box-shadow: none;
		opacity: 1;
		visibility: visible;
		background: none;
	}
	.popshore-logo img {
		max-width: 180px;
	}
}
html.popshore-menu-open {
	overflow: hidden;
}

/* No gaps between header, page title band, content and footer. */
.wp-site-blocks > * + * {
	margin-block-start: 0;
}

/* Footer menu. */
.popshore-footer-menu .popshore-menu__list {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 10px 34px;
}
.popshore-footer-menu .popshore-menu__list a {
	color: var(--wp--preset--color--white);
	text-transform: uppercase;
	font-size: var(--wp--preset--font-size--small);
}
.popshore-footer-menu .sub-menu {
	display: none;
}

/* ---------- Footer ---------- */

.popshore-footer {
	text-align: center;
}
/* Same rhythm as the old footer: menu, 27px, short rule, 20px, copyright. */
.popshore-footer > * {
	margin-block-start: 0 !important;
	margin-block-end: 0 !important;
}
.popshore-footer .wp-block-separator.popshore-footer__rule {
	width: 60px;
	height: 1px;
	margin: 27px auto 20px !important;
	border: 0;
}
.popshore-copyright {
	margin: 0;
	color: inherit;
	text-transform: uppercase;
	font-size: var(--wp--preset--font-size--small);
}

/* ---------- Page title band ---------- */

.popshore-page-title .popshore-page-title__title,
.popshore-page-title h1 {
	margin: 0;
	color: #dde3ea;
	text-shadow: 0 0 3px rgba(0, 0, 0, 0.3);
}
.popshore-breadcrumb {
	margin-top: 20px;
	color: var(--wp--preset--color--white);
}
.popshore-breadcrumb a {
	color: var(--wp--preset--color--white);
}
.popshore-breadcrumb__sep {
	display: inline-block;
	width: 6px;
	height: 6px;
	margin: 0 12px 2px;
	border-top: 1px solid #bbbbbb;
	border-right: 1px solid #bbbbbb;
	transform: rotate(45deg);
}

/* Classic page content: keep the old list and heading rhythm. */
.popshore-page-content ul {
	padding-left: 25px;
}
.popshore-page-content li {
	margin-bottom: 6px;
}

/* ---------- Section menu (Page with section menu template) ---------- */

.popshore-section-menu__title {
	margin: 0 0 20px;
	font-size: 1.5em;
}
.popshore-section-menu__list {
	margin: 0;
	padding: 0;
	list-style: none;
}
.popshore-section-menu__list li {
	margin: 0;
	border-bottom: 1px solid var(--wp--preset--color--border);
}
.popshore-section-menu__list a {
	position: relative;
	display: block;
	padding: 8px 0 8px 18px;
	color: var(--wp--preset--color--muted);
	text-decoration: none;
	transition: color 0.3s;
}
.popshore-section-menu__list a::before {
	content: "";
	position: absolute;
	left: 2px;
	top: 50%;
	width: 5px;
	height: 5px;
	margin-top: -3px;
	border-top: 1px solid #bbbbbb;
	border-right: 1px solid #bbbbbb;
	transform: rotate(45deg);
}
.popshore-section-menu__list a:hover,
.popshore-section-menu__list a:focus-visible,
.popshore-section-menu__list .is-current > a {
	color: var(--wp--preset--color--primary);
}
.popshore-section-menu__list .is-current > a::before {
	border-color: var(--wp--preset--color--primary);
}
.popshore-section-menu__list ul {
	margin: 0 0 0 18px;
	padding: 0;
	list-style: none;
}
.popshore-section-menu__list ul li:last-child {
	border-bottom: 0;
}
@media (max-width: 781px) {
	.popshore-sidebar {
		margin-top: var(--wp--preset--spacing--40);
		padding-top: var(--wp--preset--spacing--30);
		border-top: 1px solid var(--wp--preset--color--border);
	}
}

/* ---------- Slider ---------- */

.popshore-slider {
	position: relative;
	overflow: hidden;
}
.wp-block-cover.popshore-slide.has-custom-content-position .wp-block-cover__inner-container {
	width: 100% !important;
	max-width: 1180px;
	margin-left: auto !important;
	margin-right: auto !important;
	color: var(--wp--preset--color--heading);
}
.wp-block-cover.popshore-slide {
	padding-left: 20px;
	padding-right: 20px;
}
.popshore-slide .wp-block-cover__inner-container,
.popshore-slide .popshore-slide__caption {
	padding-left: 0 !important;
	padding-right: 0 !important;
}
.popshore-slide__title {
	font-size: clamp(2rem, 4vw, 3em);
	padding-bottom: 20px;
	margin-bottom: 20px;
}
.popshore-slide__title::after {
	width: 60px;
}
.popshore-slide__text {
	font-size: 1.1em;
	color: var(--wp--preset--color--heading);
}

/* Once theme.js has run, stack the slides and fade between them. */
.popshore-slider.is-ready {
	display: grid;
}
.popshore-slider.is-ready > .popshore-slide {
	grid-area: 1 / 1;
	margin: 0 !important;
	opacity: 0;
	visibility: hidden;
	transition: opacity 1s ease, visibility 1s;
}
.popshore-slider.is-ready > .popshore-slide.is-active {
	opacity: 1;
	visibility: visible;
}
.popshore-slider.is-ready > .popshore-slide .popshore-slide__caption {
	transform: translateX(60px);
	opacity: 0;
	transition: transform 1.5s ease, opacity 2s ease;
}
.popshore-slider.is-ready > .popshore-slide.is-active .popshore-slide__caption {
	transform: none;
	opacity: 1;
}
.popshore-slider__pager {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 14px;
	display: flex;
	justify-content: center;
	gap: 10px;
	z-index: 5;
}
.popshore-slider__dot {
	width: 40px;
	height: 8px;
	padding: 0;
	border: 1px solid var(--wp--preset--color--white);
	border-radius: 2px;
	background: transparent;
	cursor: pointer;
	opacity: 0.8;
	transition: background-color 0.4s ease;
}
.popshore-slider__dot[aria-current="true"] {
	background: var(--wp--preset--color--white);
}
.popshore-slider__dot:focus-visible {
	outline: 2px solid var(--wp--preset--color--primary);
	outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce) {
	.popshore-slider.is-ready > .popshore-slide,
	.popshore-slider.is-ready > .popshore-slide .popshore-slide__caption {
		transition: none;
	}
}
@media (max-width: 600px) {
	.popshore-slide {
		min-height: 380px !important;
	}
	.popshore-slide .popshore-slide__caption {
		padding: 16px !important;
		background: rgba(255, 255, 255, 0.75);
	}
}

/* ---------- Features ---------- */

.popshore-feature__icon {
	width: 120px;
	height: 120px;
	margin: 0 auto 20px;
	border-radius: var(--wp--custom--radius);
}
.popshore-feature__icon .wp-block-image {
	margin: 0;
	line-height: 0;
}
.popshore-feature__title {
	font-size: 1.3em;
	margin-top: 0.5em;
}
/* Phones (features stacked in one column): smaller icon squares. */
@media (max-width: 781px) {
	.popshore-feature__icon {
		width: 76px;
		height: 76px;
		margin-bottom: 12px;
	}
	.popshore-feature__icon .wp-block-image {
		width: 32px;
		flex: 0 0 32px;
	}
	.popshore-feature__icon img {
		width: 100% !important;
		height: auto;
	}
}

/* ---------- Team expertise tiles ---------- */

.popshore-tiles {
	margin: 0 !important;
}
.popshore-tiles > .wp-block-column {
	margin: 0 !important;
}
.popshore-tile {
	position: relative;
	overflow: hidden;
	margin: 0;
	line-height: 0;
}
.popshore-tile img {
	display: block;
	width: 100%;
	height: auto;
	transition: transform var(--wp--custom--transition);
}
.popshore-tile a::after {
	content: "";
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.1);
	opacity: 0;
	transition: opacity var(--wp--custom--transition);
}
.popshore-tile figcaption {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	margin: 0;
	padding: 20px 20px 35px;
	color: var(--wp--preset--color--white);
	font-family: var(--wp--preset--font-family--heading);
	font-size: var(--wp--preset--font-size--x-large);
	line-height: 1.2;
	text-align: left;
	text-shadow: 0 1px 3px #111111;
	opacity: 0;
	pointer-events: none;
	transition: opacity var(--wp--custom--transition);
}
.popshore-tile figcaption::after {
	content: "";
	position: absolute;
	left: 20px;
	bottom: 20px;
	width: 30px;
	height: 1px;
	background: #dddddd;
}
.popshore-tile:hover a::after,
.popshore-tile:focus-within a::after,
.popshore-tile:hover figcaption,
.popshore-tile:focus-within figcaption {
	opacity: 1;
}
@media (hover: none) {
	.popshore-tile figcaption,
	.popshore-tile a::after {
		opacity: 1;
	}
}

/* ---------- Offer cards ---------- */

.popshore-section-heading {
	margin-bottom: var(--wp--preset--spacing--40);
}
.popshore-card {
	height: 100%;
	box-sizing: border-box;
}
.popshore-card__title {
	margin: 0;
}
.popshore-card__title a:hover,
.popshore-card__title a:focus {
	text-decoration: none;
	color: var(--wp--preset--color--primary) !important;
}
.popshore-card__title.popshore-rule::after {
	background: #bbbbbb;
}

/* ---------- Forms (WPForms and core) ---------- */

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="url"],
input[type="number"],
input[type="search"],
textarea,
select {
	border: 1px solid #dddddd;
	padding: 8px;
	background: #f6f6f6;
	border-radius: 2px;
	font: inherit;
}
input[type="submit"],
button[type="submit"],
div.wpforms-container-full .wpforms-form button[type="submit"],
.wpforms-submit {
	border: 0;
	border-radius: 2px;
	padding: 10px 20px;
	background: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--white);
	font-weight: 600;
	letter-spacing: 1px;
	text-transform: uppercase;
	cursor: pointer;
}
input[type="submit"]:hover,
button[type="submit"]:hover,
div.wpforms-container-full .wpforms-form button[type="submit"]:hover,
.wpforms-submit:hover {
	background: var(--wp--preset--color--secondary);
}
