/*
Theme Name:   Lied Randolph Public Library
Theme URI:    https://randolphlibrary.org
Description:  GeneratePress child theme for Lied Randolph Public Library. Adds the Destiny catalog search proxy, larger accessible type, and staff block patterns for the New & Coming Soon shelf.
Author:       Lied Randolph Public Library
Template:     generatepress
Version:      1.0.0
Text Domain:  lrpl
*/

/* ==========================================================================
   1. Design tokens
   ========================================================================== */
/* Keep hexes in sync with lrpl_palette() in inc/colors.php —
   the dashboard shows a warning if they drift. */
:root {
	--lrpl-green:        #3f6b18;
	--lrpl-green-dark:   #2f5211;
	--lrpl-green-light:  #f0f4e7;
	--lrpl-green-band:   #547a24;
	--lrpl-brown:        #8a5a34;
	--lrpl-brown-dark:   #5b3a22;
	--lrpl-ink:          #22261f;
	--lrpl-ink-soft:     #4a5242;
	--lrpl-ink-muted:    #5d6555;
	--lrpl-rule:         #dfe4d3;
	--lrpl-surface:      #f4f6ee;
	--lrpl-radius:       12px;
	--lrpl-tap:          48px;
}

/* ==========================================================================
   2. Typography — larger base so patrons never need browser zoom
   ========================================================================== */
body {
	font-size: 1.0625rem;          /* 17px */
	line-height: 1.65;
	color: var(--lrpl-ink);
	text-wrap: pretty;
}

@media (min-width: 769px) {
	body { font-size: 1.125rem; }  /* 18px */
}

h1, h2, h3, h4,
.entry-title,
.widget-title {
	font-family: 'Zilla Slab', Georgia, 'Times New Roman', serif;
	font-weight: 600;
	line-height: 1.2;
	text-wrap: balance;
}

h1, .entry-title { font-size: clamp(1.7rem, 4.2vw, 2.1rem); }
h2 { font-size: clamp(1.4rem, 3.2vw, 1.6rem); }
h3 { font-size: 1.25rem; }

p, li { max-width: 68ch; }
.lrpl-full p, .lrpl-full li { max-width: none; }

/* ==========================================================================
   3. Links — darkened for contrast, underlined inside body copy
   ========================================================================== */
a { color: var(--lrpl-green); }
a:hover, a:focus { color: var(--lrpl-green-dark); }

.entry-content p a,
.entry-content li a { text-decoration: underline; text-underline-offset: 2px; }

/* ==========================================================================
   4. Focus — GeneratePress suppresses outlines in places; put them back
   ========================================================================== */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible,
.main-navigation a:focus-visible {
	outline: 3px solid var(--lrpl-green-dark) !important;
	outline-offset: 2px !important;
}

.lrpl-skip-link:focus {
	position: fixed;
	top: 8px;
	left: 8px;
	z-index: 9999;
	width: auto;
	height: auto;
	clip: auto;
	clip-path: none;
	padding: 14px 20px;
	background: #fff;
	color: var(--lrpl-green-dark);
	font-weight: 600;
	border-radius: 8px;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

/* ==========================================================================
   5. Touch targets
   ========================================================================== */
.main-navigation .main-nav ul li a,
.wp-block-button__link,
.gb-button {
	min-height: var(--lrpl-tap);
	display: inline-flex;
	align-items: center;
}

/* Size only — never set display here, or the toggle shows on desktop. */
.menu-toggle { min-height: var(--lrpl-tap); }

.main-navigation .main-nav ul li a { padding: 15px 18px; font-size: 1.0625rem; font-weight: 600; }

/* Mobile menu: full-width rows, readable size */
@media (max-width: 768px) {
	.main-navigation .main-nav ul li a {
		min-height: 56px;
		font-size: 1.125rem;
		border-bottom: 1px solid rgba(255, 255, 255, 0.18);
	}
	.menu-toggle { min-width: var(--lrpl-tap); justify-content: center; }
}

/* ==========================================================================
   6. Header band
   ========================================================================== */
.site-header {
	background: linear-gradient(#5f8a2a, var(--lrpl-green-band));
	color: #fff;
}
.site-header a,
.site-header .site-title a,
.site-header .site-description { color: #fff; }

.lrpl-status-pill {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	padding: 9px 14px;
	background: rgba(255, 255, 255, 0.16);
	border-radius: 999px;
	font-weight: 600;
	font-size: 1rem;
	color: #fff;
}
.lrpl-status-pill::before {
	content: "";
	width: 9px;
	height: 9px;
	border-radius: 50%;
	background: #c6f06a;
}
.lrpl-status-pill.is-closed::before { background: #f0b86a; }

/* Header layout: logo + name left, status + phone right, search on its
   own row below. Pairs with the "Header tools" Element in ELEMENTS.md and
   the nav set to "Below Header" in the Customizer. */
.site-header .inside-header {
	flex-wrap: wrap;
	row-gap: 14px;
	padding-top: 14px;
	padding-bottom: 16px;
}
.site-header .site-description {
	color: #dcebc4;
	font-size: 0.875rem;
	margin-top: 2px;
}
.lrpl-header-right {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-left: auto;
}
.site-header .lrpl-header-phone {
	color: #fff;
	font-weight: 600;
	padding: 9px 12px;
	border-radius: 8px;
	text-decoration: none;
}
.site-header .lrpl-header-phone:hover { background: rgba(255, 255, 255, 0.16); }
.lrpl-header-search {
	flex: 1 0 100%;
	max-width: 730px;
}
.site-header .lrpl-searchform input[type="search"] { background: #fff; color: var(--lrpl-ink); }
.lrpl-header-search p {
	margin: 9px 2px 0;
	font-size: 0.9375rem;
	color: #e8f2d6;
}
.site-header .lrpl-header-search p a { color: #fff; font-weight: 600; text-decoration: underline; }
@media (max-width: 768px) {
	.lrpl-header-right { margin-left: 0; }
	.lrpl-header-search { max-width: none; }
}

/* Notification strip — [lrpl_notice style="bar"] in a Hook Element.
   Full-opacity ink on the pale ground so it stays readable. */
.lrpl-notice {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 20px;
	padding: 10px 20px;
	background: var(--lrpl-surface);
	border-bottom: 1px solid #dfe5d2;
	font-size: 0.95rem;
	color: var(--lrpl-ink);
}
.lrpl-notice__status { font-weight: 600; }
.lrpl-notice__status::before {
	content: "";
	display: inline-block;
	width: 9px;
	height: 9px;
	margin-right: 8px;
	border-radius: 50%;
	background: var(--lrpl-green);
	vertical-align: baseline;
}
.lrpl-notice.is-closed .lrpl-notice__status::before { background: #a9631c; }
.lrpl-notice__hours { color: var(--lrpl-ink-muted); }
.lrpl-notice__phone { margin-left: auto; font-weight: 600; }
@media (max-width: 600px) {
	.lrpl-notice__phone { margin-left: 0; }
}

/* Decorative photo band — never put text on top of it */
.lrpl-photo-band {
	height: 140px;
	background-position: center 40%;
	background-size: cover;
	background-repeat: no-repeat;
}

/* ==========================================================================
   7. Primary destination cards (Catalog / OverDrive / Events)
   ========================================================================== */
.lrpl-cards {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(215px, 1fr));
	gap: 14px;
}

.lrpl-card {
	display: block;
	padding: 20px 22px;
	min-height: 116px;
	border-radius: var(--lrpl-radius);
	text-decoration: none !important;
}
.lrpl-card__title { font-family: 'Zilla Slab', Georgia, serif; font-weight: 600; font-size: 1.3rem; line-height: 1.2; margin: 0 0 6px; }
.lrpl-card__note  { font-size: 0.95rem; line-height: 1.45; margin: 0; }

.lrpl-card--catalog   { background: var(--lrpl-green); }
.lrpl-card--overdrive { background: var(--lrpl-brown); }
.lrpl-card--catalog .lrpl-card__title,
.lrpl-card--overdrive .lrpl-card__title { color: #fff; }
.lrpl-card--catalog .lrpl-card__note    { color: #e2f1cb; }
.lrpl-card--overdrive .lrpl-card__note  { color: #f5e6d9; }

.lrpl-card--plain { background: #fff; border: 2px solid #cfd5c1; }
.lrpl-card--plain .lrpl-card__title { color: var(--lrpl-ink); }
.lrpl-card--plain .lrpl-card__note  { color: var(--lrpl-ink-muted); }

.lrpl-card:hover { filter: brightness(0.94); }
.lrpl-card--plain:hover { filter: none; border-color: var(--lrpl-green); background: var(--lrpl-surface); }

/* ==========================================================================
   8. New & Coming Soon shelf (staff-edited grid)
   ========================================================================== */
.lrpl-shelf {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
	gap: 18px;
}

.lrpl-book { min-width: 0; }
.lrpl-book img,
.lrpl-book .lrpl-book__placeholder {
	display: block;
	width: 100%;
	aspect-ratio: 2 / 3;
	object-fit: cover;
	border-radius: 6px;
	border: 1px solid #cfd5c1;
	background: repeating-linear-gradient(135deg, #e7eadd, #e7eadd 7px, #dde2d1 7px, #dde2d1 14px);
}
.lrpl-book__title  { font-weight: 600; font-size: 1rem; line-height: 1.3; margin: 9px 0 0; }
.lrpl-book__author { font-size: 0.95rem; color: var(--lrpl-ink-muted); margin: 0; }
.lrpl-book__label  { font-weight: 600; font-size: 0.9rem; color: var(--lrpl-green); margin: 3px 0 0; }
.lrpl-book__title:empty,
.lrpl-book__author:empty,
.lrpl-book__label:empty { display: none; }

@media (max-width: 600px) {
	.lrpl-shelf {
		display: flex;
		gap: 14px;
		overflow-x: auto;
		scroll-snap-type: x mandatory;
		padding-bottom: 6px;
	}
	.lrpl-book { flex: 0 0 132px; scroll-snap-align: start; }
}

/* ==========================================================================
   9. Hours table
   ========================================================================== */
.lrpl-hours {
	border-collapse: collapse;
	width: 100%;
	max-width: 520px;
	font-size: 1.0625rem;
}
.lrpl-hours th,
.lrpl-hours td { padding: 13px 16px; border: 1px solid var(--lrpl-rule); text-align: left; }
.lrpl-hours th { font-weight: 600; }
.lrpl-hours tbody tr:nth-child(odd) { background: var(--lrpl-surface); }

.lrpl-hours-card { border: 1px solid var(--lrpl-rule); border-radius: var(--lrpl-radius); overflow: hidden; }
.lrpl-hours-card__head { background: var(--lrpl-green); color: #fff; padding: 13px 16px; font-family: 'Zilla Slab', Georgia, serif; font-weight: 600; font-size: 1.1rem; }
.lrpl-hours-card table { border-collapse: collapse; width: 100%; font-size: 1rem; }
.lrpl-hours-card th,
.lrpl-hours-card td { padding: 12px 16px; border-bottom: 1px solid #ecefe4; text-align: left; }
.lrpl-hours-card tr:last-child th,
.lrpl-hours-card tr:last-child td { border-bottom: 0; }

/* ==========================================================================
   10. Events
   ========================================================================== */
.lrpl-event-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.lrpl-event-list li { max-width: none; }

.lrpl-event {
	display: block;
	border: 1px solid var(--lrpl-rule);
	border-left: 4px solid #8ab54a;
	border-radius: 8px;
	padding: 14px 15px;
	text-decoration: none !important;
	color: var(--lrpl-ink);
	min-height: var(--lrpl-tap);
}
.lrpl-event:hover { background: var(--lrpl-surface); }
.lrpl-event__title { font-weight: 600; font-size: 1.0625rem; line-height: 1.3; }
.lrpl-event__when  { font-size: 0.95rem; color: var(--lrpl-ink-muted); margin-top: 3px; }

/* Calendar list rows (mobile-first) */
.lrpl-cal-day { background: var(--lrpl-surface); font-weight: 600; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.07em; color: var(--lrpl-ink-muted); padding: 14px 16px 6px; }
.lrpl-cal-row { display: flex; gap: 14px; padding: 16px; border-bottom: 1px solid #ecefe4; align-items: flex-start; }
.lrpl-cal-date { width: 62px; flex: none; text-align: center; background: var(--lrpl-surface); border-radius: 10px; padding: 9px 0; }
.lrpl-cal-date.is-today { background: var(--lrpl-green); color: #fff; }
.lrpl-cal-row__title { margin: 0; }
.lrpl-cal-row__when { margin: 2px 0 0; color: var(--lrpl-ink-muted); }
.lrpl-cal-row--plain { grid-template-columns: 1fr; }

/* Month grid — [lrpl_calendar] ?view=month */
.lrpl-month__head { display: flex; align-items: center; gap: 12px; margin: 8px 0 14px; }
.lrpl-month__title { margin: 0; font-size: 1.5rem; min-width: 10ch; text-align: center; }
.lrpl-month__nav {
	display: inline-flex; align-items: center; justify-content: center;
	width: var(--lrpl-tap); height: var(--lrpl-tap);
	border: 1px solid var(--lrpl-rule); border-radius: 50%;
	font-size: 1.5rem; text-decoration: none; color: var(--lrpl-ink);
}
.lrpl-month__nav:hover { background: var(--lrpl-surface); }
.lrpl-month__grid {
	display: grid; grid-template-columns: repeat(7, minmax(0, 1fr));
	border-top: 1px solid var(--lrpl-rule); border-left: 1px solid var(--lrpl-rule);
	margin-bottom: 28px;
}
.lrpl-month__dow {
	padding: 8px 6px; font-weight: 600; font-size: 0.875rem; text-align: center;
	background: var(--lrpl-surface);
	border-right: 1px solid var(--lrpl-rule); border-bottom: 1px solid var(--lrpl-rule);
}
.lrpl-month__cell {
	position: relative; min-height: 96px; padding: 6px;
	border-right: 1px solid var(--lrpl-rule); border-bottom: 1px solid var(--lrpl-rule);
}
.lrpl-month__cell.is-empty { background: #fafbf7; }
.lrpl-month__day {
	display: inline-flex; align-items: center; justify-content: center;
	min-width: 32px; height: 32px; border-radius: 50%; font-weight: 600; color: var(--lrpl-ink);
}
a.lrpl-month__day { color: var(--lrpl-green); text-decoration: underline; }
.lrpl-month__cell.is-today .lrpl-month__day { background: var(--lrpl-green); color: #fff; text-decoration: none; }
.lrpl-month__dot { display: none; }
.lrpl-month__titles { list-style: none; margin: 4px 0 0; padding: 0; font-size: 0.8125rem; line-height: 1.3; }
.lrpl-month__titles li { margin: 0 0 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 700px) {
	.lrpl-month__cell { min-height: 54px; padding: 4px 2px; text-align: center; }
	.lrpl-month__titles { display: none; }
	.lrpl-month__dot {
		display: block; width: 7px; height: 7px; margin: 2px auto 0;
		border-radius: 50%; background: var(--lrpl-green);
	}
	.lrpl-month__dow { font-size: 0.75rem; padding: 6px 2px; }
}
.lrpl-cal-date__mon { font-weight: 600; font-size: 0.75rem; text-transform: uppercase; color: var(--lrpl-ink-muted); }
.lrpl-cal-date.is-today .lrpl-cal-date__mon { color: #d8ecbd; }
.lrpl-cal-date__day { font-family: 'Zilla Slab', Georgia, serif; font-weight: 600; font-size: 1.5rem; line-height: 1.1; }

/* Month grid becomes a compact day picker on small screens */
@media (max-width: 768px) {
	.lrpl-month-grid td { padding: 0; }
	.lrpl-month-grid .lrpl-month-cell { min-height: 46px; font-size: 1rem; }
	.lrpl-month-grid .lrpl-month-cell span:not(.lrpl-dot) { font-weight: 600; }
	.lrpl-month-grid .lrpl-event-title { display: none; }
	.lrpl-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--lrpl-green); display: block; margin: 3px auto 0; }
}

/* ==========================================================================
   11. Board minutes archive
   ========================================================================== */
.lrpl-minutes { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--lrpl-rule); }
.lrpl-minutes li { max-width: none; border-bottom: 1px solid var(--lrpl-rule); }
.lrpl-minutes a {
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 18px 8px;
	text-decoration: none !important;
	color: var(--lrpl-ink);
	min-height: var(--lrpl-tap);
}
.lrpl-minutes a:hover { background: var(--lrpl-surface); }
.lrpl-minutes__date { font-weight: 600; font-size: 1rem; color: var(--lrpl-ink-muted); width: 158px; flex: none; }
.lrpl-minutes__title { font-family: 'Zilla Slab', Georgia, serif; font-weight: 600; font-size: 1.15rem; flex: 1; min-width: 0; }
.lrpl-minutes__go { font-weight: 600; font-size: 0.95rem; color: var(--lrpl-green); }

.lrpl-year-filter { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 20px; }
.lrpl-year-filter a {
	min-height: 44px;
	display: inline-flex;
	align-items: center;
	padding: 0 22px;
	border: 2px solid #cfd5c1;
	border-radius: 999px;
	font-weight: 600;
	color: #3a4231;
	text-decoration: none !important;
}
.lrpl-year-filter a[aria-current="true"] { background: var(--lrpl-green); border-color: var(--lrpl-green); color: #fff; }

@media (max-width: 600px) {
	.lrpl-minutes a { flex-wrap: wrap; gap: 4px 12px; }
	.lrpl-minutes__date { width: auto; order: -1; flex: 1 1 100%; }
}

/* ==========================================================================
   12. History book index
   ========================================================================== */
.lrpl-index-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(252px, 1fr)); gap: 16px; }
.lrpl-index-card { border: 1px solid var(--lrpl-rule); border-radius: var(--lrpl-radius); padding: 20px 22px; }
.lrpl-index-card h2 { font-size: 1.3rem; margin: 0 0 10px; }
.lrpl-index-card ul { margin: 0; padding-left: 20px; line-height: 1.95; }

.lrpl-chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.lrpl-chip {
	min-height: 44px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 54px;
	padding: 0 15px;
	border: 1px solid #cfd5c1;
	border-radius: 999px;
	font-weight: 600;
	text-decoration: none !important;
}
.lrpl-chip:hover { background: var(--lrpl-green-light); border-color: var(--lrpl-green); }

/* Long-form history chapters */
.lrpl-prose p { max-width: 66ch; line-height: 1.7; }

/* ==========================================================================
   13. Footer
   ========================================================================== */
.site-footer .lrpl-footer-band { background: var(--lrpl-brown-dark); color: #f3e7dc; padding: 30px 0; }
.site-footer .lrpl-footer-band a { color: #fff; }
.site-footer .lrpl-footer-band h2 {
	font-family: 'Source Sans 3', system-ui, sans-serif;
	font-size: 0.8rem;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: #d9c2ac;
	margin: 0 0 8px;
}

/* ==========================================================================
   14. Print — board minutes and history pages
   ========================================================================== */
@media print {
	.site-header, .main-navigation, .site-footer, .lrpl-searchform, .sidebar { display: none !important; }
	body { font-size: 12pt; color: #000; }
	a { color: #000; text-decoration: underline; }
}
