/*
Theme Name: PCLoadout
Description: Child theme of Extendable for PCLoadout — computer repairs, support and custom builds.
Author: PCLoadout
Template: extendable
Version: 1.1.0
Requires at least: 6.6
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: pcloadout
*/

/* Custom styles for PCLoadout go below this line.
---------------------------------------------------------------------------- */

/* Header: light-blue text, same as the live site. */
.pcl-header {
	color: #add8e6;
}

/* Header: dark glass as soon as the page is scrolled, and always on pages without a
   dark hero. Extendable only darkens it via scroll-driven animations, which Firefox and
   Safari do not support. header.js adds .is-scrolled in every browser.
   !important beats the running animation. */
.pcl-header.ext-header-glass {
	transition: background-color 300ms ease, box-shadow 300ms ease;
}

header.wp-block-template-part.is-scrolled .pcl-header.ext-header-glass,
body:not(:has(.ext-hero-section--full-screen)) .pcl-header.ext-header-glass {
	background-color: rgb(16 16 16 / 0.85) !important;
	-webkit-backdrop-filter: blur(24px) !important;
	backdrop-filter: blur(24px) !important;
	box-shadow: 0 14px 28px -10px rgb(0 0 0 / 0.14), 0 -14px 28px -10px rgb(0 0 0 / 0.14);
}

/* Keep the logo in colour; Extendable turns it white on dark headers. */
header.wp-block-template-part .pcl-header .wp-block-site-logo {
	filter: none !important;
}

header.wp-block-template-part .pcl-header .wc-block-customer-account__link,
header.wp-block-template-part .pcl-header .wc-block-mini-cart__button {
	color: #ffffff !important;
}

.pcl-header-phone a {
	color: #ffffff;
	font-weight: 700;
	text-decoration: none;
	white-space: nowrap;
}

/* Homepage hero: dark background, height follows the content. */
.pcl-hero.wp-block-cover {
	min-height: auto !important;
	background: #111b27;
}

/* Google rating in the homepage hero. */
.pcl-rating {
	margin-top: 1rem;
	font-size: 0.95rem;
}

.pcl-rating a {
	display: inline-flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.35rem;
	padding: 0.4rem 0.8rem;
	border: 1px solid rgb(255 255 255 / 0.25);
	border-radius: 999px;
	background: rgb(255 255 255 / 0.08);
	color: #fefefe;
	text-decoration: none;
}

.pcl-rating a:hover,
.pcl-rating a:focus-visible {
	background: rgb(255 255 255 / 0.16);
}

.pcl-rating__stars {
	color: #fbbc04;
	letter-spacing: 0.05em;
}

/* Footer contact details. */
.pcl-footer a {
	color: inherit;
}

/* PC configurator on the product page. */
.pcl-configurator {
	display: grid;
	gap: 0.75rem;
	margin: 1.5rem 0;
	padding: 1.25rem;
	border-radius: 0.5rem;
	background: var(--wp--preset--color--tertiary);
}

.pcl-configurator__row {
	display: grid;
	gap: 0.25rem;
	margin: 0;
}

.pcl-configurator label,
.pcl-configurator__label {
	font-weight: 600;
}

.pcl-configurator select {
	width: 100%;
	padding: 0.6rem 0.75rem;
	border: 1px solid var(--wp--preset--color--foreground);
	border-radius: 4px;
	background: var(--wp--preset--color--background);
	font: inherit;
}

.pcl-configurator__preview {
	width: 100%;
	max-width: 220px;
	height: auto;
	margin-top: 0.4rem;
	border-radius: 0.5rem;
	background: #ffffff;
}

.pcl-configurator__preview[hidden] {
	display: none;
}

.pcl-configurator small {
	opacity: 0.75;
}

.pcl-configurator__total {
	margin: 0.5rem 0 0;
	font-size: var(--wp--preset--font-size--medium);
}

/* Expected delivery when a part is temporarily sold out. */
.pcl-configurator__delivery {
	margin: 0.5rem 0 0;
	padding: 0.6rem 0.8rem;
	border-left: 3px solid #f5a623;
	background: rgba(245, 166, 35, 0.1);
	font-size: 0.875rem;
	line-height: 1.5;
}

.pcl-configurator__delivery[hidden] {
	display: none;
}

/* Product photos open in a full-screen viewer when clicked. */
.woocommerce-product-gallery__image a {
	cursor: zoom-in;
}

/* Note under the product photos. */
.pcl-photo-note {
	margin: 0.75rem 0 0;
	font-size: 0.8rem;
	line-height: 1.5;
	opacity: 0.75;
}

/* Expected fps per game, under the product photos. */
.pcl-fps {
	display: grid;
	gap: 1.1rem;
	margin-top: 1.5rem;
	padding: 1.25rem 1.25rem 1rem;
	border-radius: 0.75rem;
	background: #111b27;
	color: #f2f4f8;
	font-size: 0.875rem;
}

.pcl-fps[hidden] {
	display: none;
}

.pcl-fps__title {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	margin: 0;
	font-weight: 700;
	font-size: 1rem;
	letter-spacing: 0.01em;
}

.pcl-fps__title span {
	padding: 0.1rem 0.5rem;
	border-radius: 999px;
	background: rgb(255 255 255 / 0.1);
	font-size: 0.75rem;
	font-weight: 600;
}

.pcl-fps__game {
	display: grid;
	gap: 0.45rem;
}

.pcl-fps__name {
	display: flex;
	align-items: center;
	gap: 0.4rem;
	margin: 0;
	font-weight: 700;
}

.pcl-fps__info {
	display: inline-grid;
	place-items: center;
	width: 1.05rem;
	height: 1.05rem;
	border-radius: 50%;
	background: rgb(255 255 255 / 0.18);
	font-size: 0.7rem;
	font-weight: 700;
	cursor: help;
}

.pcl-fps__head {
	display: flex;
	justify-content: space-between;
	gap: 1rem;
	color: rgb(242 244 248 / 0.8);
}

.pcl-fps__value {
	color: #ffffff;
	font-variant-numeric: tabular-nums;
	letter-spacing: 0.02em;
}

.pcl-fps__track {
	height: 0.35rem;
	margin-top: 0.3rem;
	border-radius: 999px;
	background: rgb(255 255 255 / 0.1);
	overflow: hidden;
}

/* Logo colours for native, NVIDIA-like green for DLSS. */
.pcl-fps__bar {
	height: 100%;
	border-radius: 999px;
	background: linear-gradient(90deg, #2b8cff, #8a4dff 55%, #ff3cac);
	box-shadow: 0 0 10px rgb(138 77 255 / 0.6);
	transition: width 400ms ease;
}

.pcl-fps__bar--dlss {
	background: linear-gradient(90deg, #1fd1a5, #76b900);
	box-shadow: 0 0 10px rgb(118 185 0 / 0.5);
}

.pcl-fps__line + .pcl-fps__line {
	margin-top: 0.15rem;
}

/* Over mij: rounded photo with space between photo and text. */
.wp-block-media-text__media img {
	border-radius: 0.75rem;
}

.wp-block-media-text .wp-block-media-text__content {
	padding: 0 0 0 var(--wp--preset--spacing--40, 2rem);
}

@media (max-width: 600px) {
	.wp-block-media-text.is-stacked-on-mobile .wp-block-media-text__content {
		padding: 1.25rem 0 0;
	}
}

/* Legal links: never break a link over two lines. */
.pcl-legal-links a {
	white-space: nowrap;
}
