/*
Theme Name:   Astra Child
Theme URI:    https://rainbowladapress.com/
Description:  A child theme for the Astra WordPress theme
Author:       Rainbow Lada Press
Author URI:   https://rainbowladapress.com/
Template:     astra
Version:      1.0.0
Text Domain: astra-child
*/

/* === Custom Fonts === */
@font-face {
  font-family: 'MyAtkinsonHyperlegibleNextVF';
  src: url('fonts/MyAtkinsonHyperlegibleNextVF-Variable.woff2') format('woff2-variations');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'MyFrauncesVF';
  src: url('fonts/MyFrauncesVF-Variable.woff2') format('woff2-variations');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* === Apply Fonts === */
body {
  font-family: 'MyAtkinsonHyperlegibleNextVF', sans-serif;
}

h1, .entry-content h1 { font-family: 'MyFrauncesVF', serif; font-weight: 600; }
h2, .entry-content h2 { font-family: 'MyFrauncesVF', serif; font-weight: 600; }
h3, .entry-content h3 { font-family: 'MyFrauncesVF', serif; font-weight: 500; }
h4, h5, h6,
.entry-content h4, .entry-content h5, .entry-content h6 {
  font-family: 'MyFrauncesVF', serif; font-weight: 500;
}

/* === Book title: responsive size, scoped to single book pages only === */
.single-book h1 {
	font-size: clamp(1.6rem, 1rem + 2.4vw, 2.4rem);
	line-height: 1.2;
	text-wrap: balance;
	text-transform: capitalize;
}

/* Optional: keep the "Book Details" section heading (H2) from rendering
   larger than a short/clamped book title. 1.2rem sits below the title's
   1.6rem floor, so it's always visually subordinate to the title while
   staying identical across every book. Uncomment to enable. */
.single-book h2 {
	font-size: 1.3rem;
	line-height: 1.25;
}


/* === Description (rendered HTML from [rlp_meta_html]) === */
.rlp-meta-html p,
.rlp-meta-html ul,
.rlp-meta-html ol {
	margin: 0 0 0.9em 0;
}
.rlp-meta-html ul {
	list-style: disc outside;
	padding-left: 1.5em;
}
.rlp-meta-html ol {
	list-style: decimal outside;
	padding-left: 1.5em;
}
.rlp-meta-html li {
	margin: 0 0 0.25em 0;
}
.rlp-meta-html p:last-child,
.rlp-meta-html ul:last-child,
.rlp-meta-html ol:last-child {
	margin-bottom: 0;
}

/* === Read more / truncation === */
.rlp-meta-html--truncatable .rlp-meta-html__inner {
	max-height: 12em;
	overflow: hidden;
	position: relative;
	transition: max-height 0.35s ease;
}
.rlp-meta-html--truncatable.is-expanded .rlp-meta-html__inner {
	max-height: 5000px;
}
/* Fade only when the text is actually clipped: collapsed AND overflowing.
   The extra :not(.no-overflow) is the fix -- without it, short descriptions
   (which get .no-overflow from the JS and no "Read more" button) still drew
   the fade over their last line. */
.rlp-meta-html--truncatable:not(.is-expanded):not(.no-overflow) .rlp-meta-html__inner::after {
	content: "";
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	height: 3em;
	background: linear-gradient(to bottom, transparent, #FFFBE7);
}
/* Short descriptions don't need the clamp at all -- let them size naturally
   so there's no chance of a 1-2px clip at the tolerance boundary. */
.rlp-meta-html--truncatable.no-overflow .rlp-meta-html__inner {
	max-height: none;
}

.rlp-meta-html__toggle {
	background: none;
	border: none;
	color: #2E2E2E;
	font-weight: 600;
	cursor: pointer;
	padding: 0.5em 0 0;
	font-size: inherit;
}
.rlp-meta-html__toggle:hover,
.rlp-meta-html__toggle:focus,
.rlp-meta-html__toggle:active {
	background: none;
	background-color: transparent;
	box-shadow: none;
	color: #2E2E2E;
}
.rlp-meta-html__toggle:focus-visible {
	outline: 2px solid #357A75;
	outline-offset: 2px;
}
.rlp-meta-html__toggle::after {
	content: "";
	display: inline-block;
	width: 0.45em;
	height: 0.45em;
	margin-left: 0.4em;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: rotate(45deg);
	transition: transform 0.2s ease;
	vertical-align: middle;
}
.rlp-meta-html--truncatable.is-expanded .rlp-meta-html__toggle::after {
	transform: rotate(-135deg);
}

.rlp-meta-html--truncatable.no-overflow .rlp-meta-html__toggle {
	display: none;
}

/* === Purchase links intro (eyebrow label above the buttons) === */
.rlp-purchase-links__intro {
	font-size: 0.85em;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: #2E2E2E;
}

/* === Book Details card: uniform detail lines === */
.rlp-detail,
.rlp-isbn,
.rlp-pub-date {
	display: block;
	margin: 0 0 0.2em 0;
}

/*.rlp-byline { font-style: italic; color: #2E2E2E; }*/
