/* Violin Time site styles (on top of Twenty Seventeen). */

@font-face {
	font-family: "Loved by the King";
	src: url("LovedbytheKing.ttf") format("truetype");
	font-display: swap;
}

:root {
	--vt-brown: #8a4f0a;
	--vt-brown-dark: #6f3f07;
	--vt-amber: #c97910;
	--vt-cream: #fffbea;
	--vt-line: #eadfc6;
	--vt-muted: #74685b;
	--vt-nav-bg: #c8b49d;
	--vt-nav-ink: #2e1c06;
}

/* ---------- Page titles and reading width ---------- */

.page .entry-header .entry-title,
.twentyseventeen-front-page .panel-content .entry-title,
body.page:not(.twentyseventeen-front-page) .entry-title {
	color: var(--vt-brown);
	font-family: "Loved by the King", cursive;
	font-size: 2.5rem;
	font-weight: 400;
	letter-spacing: 0;
	line-height: 1.2;
	text-transform: none;
}

.twentyseventeen-front-page .panel-content .entry-header {
	text-align: center;
}

@media screen and (min-width: 48em) {
	.page.page-one-column:not(.twentyseventeen-front-page) #primary,
	.page-one-column .panel-content .wrap {
		max-width: 860px;
	}

	.woocommerce-account.page-one-column:not(.twentyseventeen-front-page) #primary {
		max-width: 1000px;
	}

	.page .entry-content {
		font-size: 1.0625rem;
	}

	.page.page-one-column .entry-header,
	.twentyseventeen-front-page.page-one-column .entry-header {
		margin-bottom: 2em;
	}

	.twentyseventeen-front-page .panel-content .wrap {
		padding-top: 4em;
	}
}

/* ---------- Home page header: photo, logo and video card ---------- */

/* The logo is part of the header overlay on the home page. */
.twentyseventeen-front-page .site-branding {
	visibility: hidden;
}

.vt-hero {
	bottom: 0;
	left: 0;
	pointer-events: none;
	position: absolute;
	right: 0;
	top: 0;
	z-index: 3; /* above the theme's darkening gradient */
}

.vt-hero > * {
	pointer-events: auto;
}

/* Undo the theme's full-screen positioning of header images for our own images. */
.has-header-image .custom-header-media .vt-hero img {
	left: auto;
	max-width: 100%;
	min-height: 0;
	min-width: 0;
	padding: 0;
	position: static;
	top: auto;
	-webkit-transform: none;
	transform: none;
}

.has-header-image .custom-header-media .vt-hero .vt-hero__logo {
	height: auto;
	position: absolute;
	right: 16px;
	top: 16px;
	width: 42vw;
	max-width: 220px;
}

.vt-video {
	aspect-ratio: 16 / 9;
	background: #000;
	border-radius: 10px;
	bottom: 16px;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
	overflow: hidden;
	position: absolute;
	right: 16px;
	transition: width 0.35s ease;
	width: 46vw;
	max-width: 280px;
}

.vt-video__play {
	background: none;
	border: 0;
	border-radius: 0;
	box-shadow: none;
	cursor: pointer;
	display: block;
	height: 100%;
	margin: 0;
	padding: 0;
	position: relative;
	text-align: left;
	width: 100%;
}

.vt-video__play:hover,
.vt-video__play:focus {
	background: none;
}

.vt-video__play:focus-visible {
	outline: 3px solid #fff;
	outline-offset: -3px;
}

.has-header-image .custom-header-media .vt-hero .vt-video__poster {
	height: 100%;
	object-fit: cover;
	transition: transform 0.4s ease, opacity 0.4s ease;
	width: 100%;
}

.vt-video__play:hover .vt-video__poster {
	opacity: 0.85;
}

.vt-video__play::after {
	background: linear-gradient(to top, rgba(0, 0, 0, 0.75), rgba(0, 0, 0, 0) 60%);
	content: "";
	inset: 0;
	position: absolute;
}

.vt-video__icon {
	background: rgba(201, 121, 16, 0.92);
	border-radius: 50%;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
	height: 52px;
	left: 50%;
	position: absolute;
	top: 42%;
	transform: translate(-50%, -50%);
	transition: transform 0.2s ease, background 0.2s ease;
	width: 52px;
	z-index: 1;
}

.vt-video__icon::before {
	border-bottom: 10px solid transparent;
	border-left: 16px solid #fff;
	border-top: 10px solid transparent;
	content: "";
	left: 54%;
	position: absolute;
	top: 50%;
	transform: translate(-50%, -50%);
}

.vt-video__play:hover .vt-video__icon,
.vt-video__play:focus-visible .vt-video__icon {
	background: var(--vt-brown);
	transform: translate(-50%, -50%) scale(1.08);
}

.vt-video__caption {
	bottom: 10px;
	color: #fff;
	font-size: 0.8125rem;
	font-weight: 600;
	left: 12px;
	line-height: 1.3;
	position: absolute;
	right: 12px;
	text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
	z-index: 1;
}

.vt-video__eyebrow {
	color: #ffd391;
	display: block;
	font-size: 0.6875rem;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

.vt-video iframe {
	border: 0;
	display: block;
	height: 100%;
	width: 100%;
}

.vt-video__close {
	background: rgba(0, 0, 0, 0.65);
	border: 0;
	border-radius: 50%;
	color: #fff;
	cursor: pointer;
	font-size: 22px;
	height: 34px;
	line-height: 34px;
	padding: 0;
	position: absolute;
	right: 8px;
	text-align: center;
	top: 8px;
	width: 34px;
	z-index: 2;
}

.vt-video__close:hover,
.vt-video__close:focus {
	background: var(--vt-brown);
}

.vt-video__play[hidden],
.vt-video__close[hidden] {
	display: none;
}

/* While playing, the close button sits just outside the card so it doesn't cover YouTube's controls. */
.vt-video.is-playing {
	overflow: visible;
}

.vt-video.is-playing iframe {
	border-radius: 10px;
}

.vt-video.is-playing .vt-video__close {
	right: -14px;
	top: -14px;
}

/* Phones: the playing video opens full width over the page (moved to <body> by site.js). */
@media screen and (max-width: 47.9375em) {
	/* Keep the girl and violin in view when the photo is cropped to a narrow screen. */
	.twentyseventeen-front-page.has-header-image .custom-header-media #wp-custom-header > img {
		-o-object-position: 32% 50%;
		object-position: 32% 50%;
	}

	.vt-video__eyebrow {
		display: none;
	}

	.vt-video__icon {
		height: 40px;
		top: 40%;
		width: 40px;
	}

	.vt-video__icon::before {
		border-bottom-width: 8px;
		border-left-width: 13px;
		border-top-width: 8px;
	}

	.vt-video__caption {
		bottom: 8px;
		font-size: 0.75rem;
		left: 10px;
		overflow: hidden;
		right: 10px;
		text-overflow: ellipsis;
		white-space: nowrap;
	}

	.vt-video.is-playing iframe {
		border-radius: 0;
	}

	.vt-video.is-playing .vt-video__close {
		right: 8px;
		top: -44px;
	}

	.vt-video.is-playing {
		border-radius: 0;
		bottom: auto;
		left: 0;
		max-width: none;
		position: fixed;
		right: 0;
		top: 50%;
		transform: translateY(-50%);
		width: 100%;
		z-index: 1001;
	}

	.vt-video-backdrop {
		background: rgba(0, 0, 0, 0.8);
		inset: 0;
		position: fixed;
		z-index: 1000;
	}
}

@media screen and (min-width: 48em) {
	/* A little shorter than full screen, so the menu and page start show. */
	.twentyseventeen-front-page.has-header-image .custom-header-media {
		height: 86vh;
	}

	.admin-bar.twentyseventeen-front-page.has-header-image .custom-header-media {
		height: calc(86vh - 32px);
	}

	.has-header-image .custom-header-media .vt-hero .vt-hero__logo {
		max-width: 400px;
		right: 6vw;
		top: clamp(28px, 7vh, 80px);
		width: 26vw;
	}

	/* About a quarter of the header width, bottom right, above the menu bar. */
	.vt-video {
		bottom: calc(72px + 5vh);
		max-width: 440px;
		min-width: 280px;
		right: 6vw;
		width: 25vw;
	}

	.vt-video.is-playing {
		max-width: 760px;
		width: 44vw;
	}

	.vt-video__icon {
		height: 64px;
		width: 64px;
	}

	.vt-video__icon::before {
		border-bottom-width: 12px;
		border-left-width: 19px;
		border-top-width: 12px;
	}

	.vt-video__caption {
		font-size: 0.9375rem;
		left: 16px;
		bottom: 14px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.vt-video,
	.vt-video__icon,
	.has-header-image .custom-header-media .vt-hero .vt-video__poster {
		transition: none;
	}
}

/* ---------- My Account > Downloads ---------- */

.vt-downloads__intro {
	color: var(--vt-muted);
	margin-bottom: 1.25em;
}

.vt-downloads {
	display: grid;
	gap: 18px;
	list-style: none;
	margin: 0 0 1.5em;
	padding: 0;
}

.vt-download {
	align-items: flex-start;
	background: var(--vt-cream);
	border: 1px solid var(--vt-line);
	border-radius: 12px;
	display: flex;
	gap: 20px;
	margin: 0;
	padding: 18px;
}

.entry-content .vt-download a,
.entry-content .vt-download a:hover,
.entry-content .vt-download a:focus {
	box-shadow: none;
}

.vt-download__cover {
	flex: none;
	width: 88px;
}

.vt-download__cover img {
	border-radius: 4px;
	box-shadow: 0 3px 10px rgba(0, 0, 0, 0.18);
	display: block;
	height: auto;
	width: 100%;
}

.vt-download__body {
	flex: 1;
	min-width: 0;
}

.vt-download__title {
	font-size: 1.125rem;
	font-weight: 700;
	letter-spacing: 0;
	line-height: 1.3;
	margin: 0 0 6px;
	padding: 0;
	text-transform: none;
}

.vt-download__title a {
	color: inherit;
	text-decoration: none;
}

.vt-download__meta {
	color: var(--vt-muted);
	font-size: 0.875rem;
	line-height: 1.5;
	margin: 0 0 12px;
}

.woocommerce-account .vt-download a.button.vt-download__button {
	background: var(--vt-brown);
	border-radius: 999px;
	color: #fff;
	display: inline-block;
	font-size: 0.9375rem;
	font-weight: 600;
	line-height: 1.2;
	padding: 0.7em 1.5em;
	text-decoration: none;
}

.woocommerce-account .vt-download a.button.vt-download__button:hover,
.woocommerce-account .vt-download a.button.vt-download__button:focus {
	background: var(--vt-brown-dark);
	color: #fff;
}

.vt-download__status {
	color: var(--vt-brown);
	display: inline-block;
	font-size: 0.875rem;
	margin-left: 12px;
}

@media screen and (max-width: 30em) {
	.vt-download {
		gap: 14px;
		padding: 14px;
	}

	.vt-download__cover {
		width: 64px;
	}

	.vt-download__status {
		display: block;
		margin: 8px 0 0;
	}
}

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

/* The theme narrows this line to leave room for a social menu, which this site doesn't use. */
@media screen and (min-width: 48em) {
	.site-footer .site-info {
		float: none;
		width: auto;
	}
}

/* ---------- Menu bar: coloured bar with the logo on the left ---------- */

.navigation-top {
	background: var(--vt-nav-bg);
	border-bottom: 0;
	border-top: 0;
	box-shadow: 0 2px 8px rgba(59, 36, 5, 0.15);
}

.navigation-top a,
.navigation-top .main-navigation a,
.navigation-top .menu-toggle,
.navigation-top .dropdown-toggle {
	color: var(--vt-nav-ink);
}

.navigation-top .icon {
	fill: var(--vt-nav-ink);
}

.navigation-top .main-navigation a:hover,
.navigation-top .main-navigation a:focus {
	color: var(--vt-brown-dark);
}

/* Current page: an underline rather than the theme's grey text, which is hard to read on this colour. */
.navigation-top .current-menu-item > a,
.navigation-top .current_page_item > a {
	box-shadow: inset 0 -2px 0 var(--vt-nav-ink);
	color: var(--vt-nav-ink);
}

/* Submenus keep their white background and dark text. */
.navigation-top .main-navigation ul ul a {
	color: #222;
	box-shadow: none;
}

/* No scroll-down arrow in the menu bar. */
.site-header .navigation-top .menu-scroll-down {
	display: none;
}

.vt-nav-logo {
	align-items: center;
	display: flex;
	flex: none;
}

.vt-nav-logo img {
	display: block;
	height: 36px;
	width: auto;
}

.navigation-top .menu-toggle,
.navigation-top .menu-toggle:hover,
.navigation-top .menu-toggle:focus {
	background: transparent;
}

/* The theme outlines the Menu button after every tap; keep the outline for keyboard focus only. */
.navigation-top .menu-toggle:focus:not(:focus-visible) {
	outline: none;
}

.navigation-top .menu-toggle:focus-visible {
	outline: 2px solid var(--vt-nav-ink);
	outline-offset: 2px;
}

/* Desktop: logo on the left, menu on the right. */
@media screen and (min-width: 48em) {
	.navigation-top .wrap {
		align-items: center;
		display: flex;
	}

	.navigation-top .wrap > nav,
	.navigation-top nav {
		margin-left: auto;
		margin-right: -1.25em; /* line the last item's text up with the content edge */
	}

	.vt-nav-logo img {
		height: 40px;
	}
}

/* Phones: Menu button on the right; the logo slides in once the header logo has
   scrolled away, and the bar sticks to the top of the screen (site.js). */
@media screen and (max-width: 47.9375em) {
	.navigation-top {
		position: relative;
		z-index: 900;
	}

	.navigation-top .menu-toggle {
		margin-left: auto;
		margin-right: 0;
		min-height: 56px;
	}

	.navigation-top .main-navigation li,
	.navigation-top .main-navigation > div > ul {
		border-color: rgba(59, 36, 5, 0.18);
	}

	.navigation-top .main-navigation .current-menu-item > a,
	.navigation-top .main-navigation li li.current-menu-item a {
		box-shadow: none;
		font-weight: 800;
	}

	.vt-nav-logo {
		height: 56px;
		left: 16px;
		opacity: 0;
		pointer-events: none;
		position: absolute;
		top: 0;
		transform: translateX(-10px);
		transition: opacity 0.25s ease, transform 0.25s ease;
		z-index: 1;
	}

	.vt-nav-show-logo .vt-nav-logo {
		opacity: 1;
		pointer-events: auto;
		transform: none;
	}

	.navigation-top.vt-nav-fixed {
		left: 0;
		position: fixed;
		right: 0;
		top: 0;
	}

	/* A long open menu scrolls inside the bar instead of running off the screen. */
	.vt-nav-fixed .main-navigation.toggled-on > div {
		max-height: calc(100vh - 56px);
		overflow-y: auto;
	}

	/* Menu open: dim and blur the page behind the bar, and stop it scrolling. */
	.vt-menu-backdrop {
		-webkit-backdrop-filter: blur(4px);
		backdrop-filter: blur(4px);
		background: rgba(30, 18, 4, 0.5);
		inset: 0;
		opacity: 0;
		pointer-events: none;
		position: fixed;
		transition: opacity 0.25s ease, visibility 0s linear 0.25s; /* hide only after fading out */
		visibility: hidden;
		z-index: 899; /* just below the menu bar */
	}

	.vt-menu-backdrop.is-visible {
		opacity: 1;
		pointer-events: auto;
		transition-delay: 0s;
		visibility: visible;
	}

	html.vt-menu-open,
	html.vt-menu-open body {
		overflow: hidden;
	}
}

/* The backdrop only exists for the phone menu. */
@media screen and (min-width: 48em) {
	.vt-menu-backdrop {
		display: none;
	}
}

@media screen and (max-width: 47.9375em) and (prefers-reduced-motion: reduce) {
	.vt-nav-logo,
	.vt-menu-backdrop {
		transition: none;
	}
}

/* ---------- Home page: series headings and book cards ---------- */

.entry-content h3.vt-series-heading {
	border-top: 1px solid var(--vt-line);
	color: var(--vt-brown);
	font-family: "Loved by the King", cursive;
	font-size: 2rem;
	font-weight: 400;
	letter-spacing: 0;
	line-height: 1.2;
	margin: 2.5em 0 0.25em;
	padding-top: 1.25em;
	text-align: center;
	text-transform: none;
}

.entry-content .vt-series-note {
	color: var(--vt-muted);
	margin-bottom: 1.75em;
	text-align: center;
}

.vt-books {
	margin: 0 0 1em;
}

.entry-content .vt-books__grid {
	display: grid;
	gap: 32px 28px;
	justify-content: center;
	list-style: none;
	margin: 0;
	padding: 0;
}

.vt-books__grid--1 { grid-template-columns: minmax(0, 260px); }
.vt-books__grid--2 { grid-template-columns: repeat(2, minmax(0, 260px)); }
.vt-books__grid--3 { grid-template-columns: repeat(3, minmax(0, 260px)); }

.vt-book {
	display: flex;
	flex-direction: column;
	margin: 0;
	text-align: center;
}

.entry-content .vt-book a,
.entry-content .vt-book a:hover,
.entry-content .vt-book a:focus {
	box-shadow: none;
}

.vt-book__cover {
	display: block;
}

.vt-book__img {
	aspect-ratio: 718 / 1024;
	border-radius: 4px;
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
	display: block;
	height: auto;
	object-fit: cover;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
	width: 100%;
}

.vt-book__cover:hover .vt-book__img {
	box-shadow: 0 10px 24px rgba(0, 0, 0, 0.24);
	transform: translateY(-2px);
}

.entry-content h4.vt-book__title {
	color: #333;
	font-size: 1rem;
	font-weight: 700;
	letter-spacing: 0;
	margin: 14px 0 10px;
	padding: 0;
	text-transform: none;
}

.vt-book__actions {
	display: flex;
	gap: 8px;
	justify-content: center;
	margin-top: auto;
}

.vt-book__actions > * {
	flex: 1 1 0;
}

.entry-content .vt-btn {
	border: 2px solid var(--vt-brown);
	border-radius: 999px;
	cursor: pointer;
	display: block;
	font-size: 0.875rem;
	font-weight: 700;
	line-height: 1.2;
	padding: 0.6em 0.75em;
	text-align: center;
	text-decoration: none;
	transition: background 0.15s ease, color 0.15s ease;
}

.entry-content .vt-btn--preview {
	background: #fff;
	color: var(--vt-brown);
}

.entry-content .vt-btn--preview:hover,
.entry-content .vt-btn--preview:focus {
	background: var(--vt-cream);
	color: var(--vt-brown-dark);
}

.entry-content .vt-btn--buy {
	background: var(--vt-brown);
	color: #fff;
}

.entry-content .vt-btn--buy:hover,
.entry-content .vt-btn--buy:focus {
	background: var(--vt-brown-dark);
	border-color: var(--vt-brown-dark);
	color: #fff;
}

.vt-buy {
	position: relative;
}

.vt-buy summary {
	list-style: none;
}

.vt-buy summary::-webkit-details-marker {
	display: none;
}

.vt-buy[open] summary {
	background: var(--vt-brown-dark);
	border-color: var(--vt-brown-dark);
}

.vt-buy__menu {
	background: #fff;
	border: 1px solid var(--vt-line);
	border-radius: 10px;
	box-shadow: 0 10px 28px rgba(0, 0, 0, 0.16);
	left: 50%;
	min-width: 190px;
	padding: 6px;
	position: absolute;
	top: calc(100% + 6px);
	transform: translateX(-50%);
	z-index: 20;
}

.entry-content .vt-buy__menu a {
	align-items: center;
	border-radius: 6px;
	color: #333;
	display: flex;
	font-size: 0.9375rem;
	gap: 12px;
	justify-content: space-between;
	padding: 9px 12px;
	text-decoration: none;
	white-space: nowrap;
}

.entry-content .vt-buy__menu a:hover,
.entry-content .vt-buy__menu a:focus {
	background: var(--vt-cream);
	color: var(--vt-brown-dark);
}

.vt-buy__price {
	color: var(--vt-brown);
	font-weight: 700;
}

.entry-content .vt-books__note {
	color: var(--vt-muted);
	font-size: 0.9375rem;
	font-style: italic;
	margin: 1.75em auto 0;
	max-width: 680px;
	text-align: center;
}

@media screen and (max-width: 47.9375em) {
	.vt-books__grid--2,
	.vt-books__grid--3 {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.entry-content .vt-books__grid {
		gap: 28px 16px;
	}

	.vt-book__actions {
		flex-direction: column;
	}
}

@media (prefers-reduced-motion: reduce) {
	.vt-book__img {
		transition: none;
	}
}
