/*
 * PA Bible Teaching Fellowship - New Library
 * App styles for content added on top of the captured Squarespace theme.
 * Design tokens from the theme: teal #11404E, gold #D69834,
 * headings 'minerva-modern', body/labels 'europa'.
 */

:root {
	--lib-teal: #11404E;
	--lib-gold: #D69834;
	--lib-gold-dark: #b97f22;
	--lib-sage: hsl(141.18, 14.78%, 77.45%);
	--lib-sage-dark: hsl(141.18, 14.78%, 68%);
	--lib-cream: #fdfdfb;
}

/* ------------------------------- Current Series text links (look like plain text) */
.sqs-html-content a.lib-featured-link,
.sqs-html-content a.lib-featured-link:hover,
.sqs-html-content a.lib-featured-link:focus,
.sqs-html-content a.lib-featured-link:visited {
	color: inherit !important;
	text-decoration: none !important;
	background-image: none !important;
	border: 0 !important;
	opacity: 1 !important;
}

/* ------------------------------- subpage hero (cards section without the cards) */
.lib-hero .user-items-list { padding-top: 7vmax !important; padding-bottom: 9vmax !important; }
.lib-hero .list-section-title { padding-bottom: 0 !important; }

.lib-icon {
	width: 1.35em;
	height: 1.35em;
	fill: none;
	stroke: currentColor;
	stroke-width: 2.2;
	stroke-linecap: round;
	stroke-linejoin: round;
	vertical-align: middle;
}
.lib-btn .lib-icon { width: 1.5em; height: 1.5em; margin: -3px 8px 0 -4px; }

.lib-app-section {
	padding: 50px 0 90px;
	position: relative;
	z-index: 2;
	background: #fff;
}

.lib-content {
	max-width: var(--sqs-site-max-width, 1500px);
	margin: 0 auto;
	padding: 0 var(--sqs-site-gutter, 4vw);
	font-family: europa, sans-serif;
	color: var(--lib-teal);
}

/* ------------------------------- breadcrumbs */
.lib-crumbs {
	font-family: europa, sans-serif;
	font-weight: 700;
	font-size: 11.5px;
	letter-spacing: 2.3px;
	text-transform: uppercase;
	margin: 0 0 35px;
}
.lib-crumbs a { color: var(--lib-gold); text-decoration: none; }
.lib-crumbs a:hover { text-decoration: underline; }
.lib-crumbs span { opacity: .4; margin: 0 6px; }

/* ------------------------------- headings and notes */
.lib-subhead {
	font-family: var(--heading-font-font-family, minerva-modern), serif;
	font-weight: 400;
	font-size: 28px;
	margin: 60px 0 25px;
}
.lib-event-dates {
	font-family: europa, sans-serif;
	font-weight: 700;
	font-size: 12px;
	letter-spacing: 3px;
	text-transform: uppercase;
	margin: -20px 0 30px;
	opacity: .75;
}
.lib-empty { font-size: 17px; line-height: 1.8; }

/* ------------------------------- pill buttons */
.lib-btn {
	display: inline-block;
	background: var(--lib-gold);
	color: #fff;
	font-family: europa, sans-serif;
	font-weight: 700;
	font-size: 11.4px;
	letter-spacing: 2.3px;
	text-transform: uppercase;
	border: 0;
	border-radius: 300px;
	padding: 14px 28px;
	cursor: pointer;
	text-decoration: none;
	transition: background .2s ease, opacity .2s ease;
}
.lib-btn:hover { background: var(--lib-gold-dark); color: #fff; }
.lib-btn--small { padding: 10px 22px; font-size: 10.5px; }

/* ------------------------------- tile grids (series / events) */
.lib-tile-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
	gap: 25px;
}
.lib-tile {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	text-decoration: none;
	color: var(--lib-teal);
	background: #fff;
	border-radius: 15px;
	box-shadow: 0 1px 4px rgba(17, 64, 78, .1), 0 8px 24px rgba(17, 64, 78, .08);
	padding: 30px 22px 28px;
	transition: transform .25s ease, box-shadow .25s ease;
}
.lib-tile:hover {
	transform: translateY(-4px);
	box-shadow: 0 2px 6px rgba(17, 64, 78, .12), 0 14px 34px rgba(17, 64, 78, .14);
}
.lib-tile-img {
	width: 140px;
	height: 140px;
	border-radius: 50%;
	background-size: cover;
	background-position: center;
	margin-bottom: 22px;
}
.lib-tile-title {
	font-family: var(--heading-font-font-family, minerva-modern), serif;
	font-size: 21px;
	line-height: 1.45;
	margin-bottom: 20px;
	flex-grow: 1;
}

/* ------------------------------- series blocks (cover image behind the title)
   Per-series font/size/color comes from the admin-managed CSS inlined by inc.php,
   which targets .lib-series-tile[data-series] .lib-series-tile-title only. */
.lib-series-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
	gap: 25px;
}
.lib-series-tile {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	aspect-ratio: 1 / 1;
	padding: 28px;
	border-radius: 15px;
	overflow: hidden;
	background-color: var(--lib-teal);
	background-size: cover;
	background-position: center;
	text-decoration: none;
	box-shadow: 0 1px 4px rgba(17, 64, 78, .1), 0 8px 24px rgba(17, 64, 78, .08);
	transition: transform .25s ease, box-shadow .25s ease;
}
.lib-series-tile:hover {
	transform: translateY(-4px);
	box-shadow: 0 2px 6px rgba(17, 64, 78, .12), 0 14px 34px rgba(17, 64, 78, .14);
}
.lib-series-tile-title {
	position: relative;
	text-align: center;
	font-family: var(--heading-font-font-family, minerva-modern), serif;
	font-size: 30px;
	line-height: 1.3;
	color: #fff;
	text-shadow: 0 1px 8px rgba(0, 0, 0, .35);
}

/* ------------------------------- white table card */
.lib-card {
	background: #fff;
	border-radius: 15px;
	box-shadow: 0 1px 4px rgba(17, 64, 78, .1), 0 8px 24px rgba(17, 64, 78, .08);
	padding: 30px 34px 34px;
	overflow: hidden;
}

/* ------------------------------- DataTables re-skin */
.lib-card--table table.dataTable {
	font-family: europa, sans-serif;
	font-size: 15px;
	color: var(--lib-teal);
	border-collapse: collapse !important;
	border: 0 !important;
}
.lib-card--table table.dataTable thead th {
	font-family: europa, sans-serif;
	font-weight: 700;
	font-size: 11px;
	letter-spacing: 2.2px;
	text-transform: uppercase;
	color: var(--lib-teal);
	border-bottom: 2px solid var(--lib-teal) !important;
	padding: 12px 10px;
	text-align: left;
}
.lib-card--table table.dataTable tbody td {
	padding: 13px 10px;
	border-top: 1px solid rgba(17, 64, 78, .12);
	line-height: 1.55;
	vertical-align: top;
}
.lib-card--table table.dataTable tbody tr { background: transparent; }
.lib-card--table table.dataTable.stripe tbody tr.odd,
.lib-card--table table.dataTable.display tbody tr.odd { background: rgba(17, 64, 78, .025); }
.lib-card--table table.dataTable.hover tbody tr:hover,
.lib-card--table table.dataTable.display tbody tr:hover { background: rgba(214, 152, 52, .08); }
.lib-card--table table.dataTable tbody td a {
	color: var(--lib-teal);
	font-weight: 700;
	text-decoration: none;
	border-bottom: 1px solid rgba(214, 152, 52, .55);
}
.lib-card--table table.dataTable tbody td a:hover { color: var(--lib-gold-dark); }

.lib-card--table table.dataTable tbody td.lib-actions { white-space: nowrap; vertical-align: middle; text-align: right; }
.lib-action {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	height: 36px;
	background: var(--lib-gold);
	color: #fff !important;
	font-weight: 700;
	font-size: 11.4px;
	letter-spacing: 2.2px;
	text-transform: uppercase;
	border-radius: 300px;
	border-bottom: 0 !important;
	padding: 0 20px;
	margin-left: 8px;
	text-decoration: none;
	vertical-align: middle;
	transition: background .2s ease;
}
.lib-action:hover { background: var(--lib-gold-dark); color: #fff !important; }
.lib-action--dl {
	width: 36px;
	padding: 0;
	background: var(--lib-sage);
	color: var(--lib-teal) !important;
}
.lib-action--dl:hover { background: var(--lib-sage-dark); color: var(--lib-teal) !important; }
.lib-action--dl .lib-icon { width: 18px; height: 18px; }

/* DataTables chrome (length menu, filter box, info, paging) */
.lib-card--table .dataTables_wrapper .dataTables_length,
.lib-card--table .dataTables_wrapper .dataTables_filter,
.lib-card--table .dataTables_wrapper .dataTables_info,
.lib-card--table .dataTables_wrapper .dataTables_paginate {
	font-family: europa, sans-serif;
	font-size: 12px;
	letter-spacing: 1px;
	text-transform: uppercase;
	color: var(--lib-teal);
	margin-bottom: 14px;
}
.lib-card--table .dataTables_wrapper .dataTables_info,
.lib-card--table .dataTables_wrapper .dataTables_paginate { margin-top: 18px; margin-bottom: 0; }

.lib-card--table .dataTables_wrapper .dataTables_filter input,
.lib-card--table .dataTables_wrapper .dataTables_length select {
	font-family: europa, sans-serif;
	font-size: 14px;
	color: var(--lib-teal);
	background: #fff;
	border: 1px solid rgba(17, 64, 78, .35);
	border-radius: 300px;
	padding: 8px 18px;
	margin-left: 8px;
	outline: none;
}
.lib-card--table .dataTables_wrapper .dataTables_length select { padding: 8px 12px; }
.lib-card--table .dataTables_wrapper .dataTables_filter input:focus { border-color: var(--lib-gold); }

.lib-card--table .dataTables_wrapper .dataTables_paginate .paginate_button {
	border: 0 !important;
	background: transparent !important;
	border-radius: 300px;
	color: var(--lib-teal) !important;
	padding: 6px 12px;
}
.lib-card--table .dataTables_wrapper .dataTables_paginate .paginate_button.current,
.lib-card--table .dataTables_wrapper .dataTables_paginate .paginate_button:hover {
	background: var(--lib-gold) !important;
	color: #fff !important;
}
.lib-card--table .dataTables_wrapper .dataTables_paginate .paginate_button.disabled { opacity: .35; }

table.dataTable thead .sorting:before, table.dataTable thead .sorting:after,
table.dataTable thead .sorting_asc:before, table.dataTable thead .sorting_asc:after,
table.dataTable thead .sorting_desc:before, table.dataTable thead .sorting_desc:after { color: var(--lib-gold); }

/* ------------------------------- search form */
.lib-search-form { max-width: 760px; margin: 0 auto 50px; text-align: center; }
.lib-search-row { display: flex; gap: 12px; }
.lib-search-input {
	flex: 1;
	font-family: europa, sans-serif;
	font-size: 16px;
	color: var(--lib-teal);
	background: #fff;
	border: 1px solid rgba(17, 64, 78, .35);
	border-radius: 300px;
	padding: 14px 26px;
	outline: none;
	min-width: 0;
}
.lib-search-input:focus { border-color: var(--lib-gold); }
.lib-search-partial {
	display: inline-block;
	margin-top: 16px;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 2px;
	text-transform: uppercase;
	cursor: pointer;
}
.lib-search-partial input { accent-color: var(--lib-gold); margin-right: 6px; }
.lib-search-hint { font-size: 13.5px; opacity: .7; margin-top: 10px; }
.lib-search-count {
	font-family: var(--heading-font-font-family, minerva-modern), serif;
	font-size: 22px;
	text-align: center;
	margin: 0 0 30px;
}

/* ------------------------------- study materials */
.lib-study-wrap { max-width: 860px; margin: 0 auto; }
.lib-study-wrap .lib-subhead { margin-top: 45px; }
.lib-study-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 16px;
}
.lib-study-item {
	display: flex;
	align-items: center;
	gap: 14px;
	background: #fff;
	border-radius: 15px;
	box-shadow: 0 1px 4px rgba(17, 64, 78, .1), 0 6px 18px rgba(17, 64, 78, .07);
	padding: 16px 20px;
	color: var(--lib-teal);
	text-decoration: none;
	transition: transform .2s ease, box-shadow .2s ease;
}
.lib-study-item:hover {
	transform: translateY(-2px);
	box-shadow: 0 2px 6px rgba(17, 64, 78, .12), 0 10px 24px rgba(17, 64, 78, .12);
}
.lib-study-icon {
	flex-shrink: 0;
	background: var(--lib-gold);
	color: #fff;
	font-weight: 700;
	font-size: 10px;
	letter-spacing: 1.5px;
	border-radius: 8px;
	padding: 8px 10px;
}
.lib-study-title { font-size: 14.5px; line-height: 1.5; font-weight: 700; }

/* ------------------------------- teaching detail (player card) */
.lib-card--player {
	max-width: 860px;
	margin: 0 auto;
	padding: 38px 42px 40px;
	overflow: visible;
}
.lib-player-audio { width: 100%; display: block; margin-bottom: 28px; }
.lib-player-video {
	width: 100%;
	display: block;
	border-radius: 10px;
	margin-bottom: 28px;
	background: #000;
}
.lib-player-embed { margin-bottom: 28px; }
.lib-player-embed iframe { width: 100%; }

.lib-meta {
	margin: 0 0 30px;
	padding: 0;
	border-top: 1px solid rgba(17, 64, 78, .12);
}
.lib-meta-item {
	display: flex;
	gap: 20px;
	padding: 12px 0;
	border-bottom: 1px solid rgba(17, 64, 78, .12);
}
.lib-meta-item dt {
	flex: 0 0 110px;
	font-family: europa, sans-serif;
	font-weight: 700;
	font-size: 11px;
	letter-spacing: 2.2px;
	text-transform: uppercase;
	padding-top: 3px;
}
.lib-meta-item dd {
	margin: 0;
	font-size: 15.5px;
	line-height: 1.6;
}
.lib-player-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.lib-btn--outline {
	background: transparent;
	color: var(--lib-gold);
	box-shadow: inset 0 0 0 2px var(--lib-gold);
}
.lib-btn--outline:hover { background: var(--lib-gold); color: #fff; }

/* ------------------------------- prev / next teaching */
.lib-prevnext {
	max-width: 860px;
	margin: 30px auto 0;
	display: flex;
	gap: 16px;
	justify-content: space-between;
}
.lib-prevnext-spacer { flex: 1; }
.lib-prevnext-link {
	flex: 1;
	max-width: 48%;
	display: block;
	background: #fff;
	border-radius: 15px;
	box-shadow: 0 1px 4px rgba(17, 64, 78, .1), 0 6px 18px rgba(17, 64, 78, .07);
	padding: 18px 22px;
	color: var(--lib-teal);
	text-decoration: none;
	transition: transform .2s ease, box-shadow .2s ease;
}
.lib-prevnext-link:hover {
	transform: translateY(-2px);
	box-shadow: 0 2px 6px rgba(17, 64, 78, .12), 0 10px 24px rgba(17, 64, 78, .12);
}
.lib-prevnext-link--next { text-align: right; }
.lib-prevnext-label {
	display: block;
	font-family: europa, sans-serif;
	font-weight: 700;
	font-size: 10.5px;
	letter-spacing: 2px;
	text-transform: uppercase;
	color: var(--lib-gold);
	margin-bottom: 6px;
}
.lib-prevnext-title {
	font-family: var(--heading-font-font-family, minerva-modern), serif;
	font-size: 16px;
	line-height: 1.45;
}

/* ------------------------------- responsive: tablet and below (matches theme's 768px breakpoint) */
@media (max-width: 767px) {
	.lib-app-section { padding: 34px 0 64px; }
	.lib-crumbs { margin-bottom: 24px; letter-spacing: 1.9px; }
	.lib-subhead { font-size: 24px; margin: 44px 0 20px; }
	.lib-card { padding: 20px 16px 22px; border-radius: 12px; }
	.lib-search-row { flex-direction: column; }
	.lib-btn { width: 100%; text-align: center; }
	.lib-search-form .lib-btn { width: auto; align-self: center; }

	/* Study materials stack full width like the theme's card lists */
	.lib-study-grid { grid-template-columns: 1fr; }

	/* Tile grid: the reference renders its card list 2-up on phones
	   (measured at 390px: 182px cards, 10px gap, 146px circles,
	   ~25px heading-font titles, ~14px pill buttons) */
	.lib-series-grid { grid-template-columns: 1fr; gap: 14px; }
	.lib-series-tile { aspect-ratio: 4 / 3; }
	.lib-tile-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
	.lib-tile { padding: 18px 14px 20px; }
	.lib-tile-img {
		width: min(146px, 100%);
		height: auto;
		aspect-ratio: 1 / 1;
		margin-bottom: 14px;
	}
	.lib-tile-title { font-size: 22px; line-height: 1.55; margin-bottom: 16px; }
	.lib-tile .lib-btn {
		width: auto;
		font-size: 13.5px;
		letter-spacing: 2.2px;
		padding: 17px 26px;
	}

	/* DataTables chrome: stack the length menu / filter and keep everything
	   inside the 390px viewport instead of floating side-by-side. */
	.lib-card--table .dataTables_wrapper .dataTables_length,
	.lib-card--table .dataTables_wrapper .dataTables_filter { float: none; text-align: left; }
	.lib-card--table .dataTables_wrapper .dataTables_filter input { width: 100%; margin-left: 0; margin-top: 6px; }
	.lib-card--table .dataTables_wrapper .dataTables_length select { margin-left: 8px; }
	.lib-card--table .dataTables_wrapper .dataTables_info,
	.lib-card--table .dataTables_wrapper .dataTables_paginate { float: none; text-align: center; }
	.lib-card--table table.dataTable { font-size: 14px; }
	.lib-card--table table.dataTable thead th { font-size: 10px; letter-spacing: 1.6px; padding: 11px 8px; }
	.lib-card--table table.dataTable tbody td { padding: 11px 8px; }
	/* Responsive-plugin expand control + child rows on-brand */
	.lib-card--table table.dataTable > tbody > tr > td.dtr-control { color: var(--lib-gold); }
	.lib-card--table table.dataTable td.child .dtr-title { font-weight: 700; }
	.lib-card--table table.dataTable td.child .lib-action { margin-top: 4px; }

	/* Teaching detail */
	.lib-card--player { padding: 24px 18px 26px; }
	.lib-meta-item { flex-direction: column; gap: 4px; }
	.lib-meta-item dt { flex: none; }
	.lib-prevnext { flex-direction: column; }
	.lib-prevnext-link { max-width: none; }
	.lib-prevnext-spacer { display: none; }
}

