/*
Theme Name:     Happy Harmony Child
Template:       kadence
Description:    Kadence child theme — Songs library, download gating, quiet part color accents.
Author:         Involve Media
Version:        0.12.0
*/

/* ---------- Part color palette ----------
   Muted hues + very light companion tints. Change vars to rebrand. */
:root {
	--hhc-soprano:     #b05668;   --hhc-soprano-bg:  #f7ebee;
	--hhc-alto:        #8e6b94;   --hhc-alto-bg:     #f1eaf3;
	--hhc-tenor:       #5c8a80;   --hhc-tenor-bg:    #e9f0ee;
	--hhc-bass:        #5e77a1;   --hhc-bass-bg:     #eaeff6;
	--hhc-practice:    #a67a3e;   --hhc-practice-bg: #f5ede0;
	--hhc-lyrics:      #6b6b6b;   --hhc-lyrics-bg:   #eeeeee;
	--hhc-other:       #8c6c5a;   --hhc-other-bg:    #f0e9e2;
}

/* Per-part vars — set --hhc-color and --hhc-color-bg on whatever element gets the .hhc-part--X class. */
.hhc-part--soprano  { --hhc-color: var(--hhc-soprano);  --hhc-color-bg: var(--hhc-soprano-bg); }
.hhc-part--alto     { --hhc-color: var(--hhc-alto);     --hhc-color-bg: var(--hhc-alto-bg); }
.hhc-part--tenor    { --hhc-color: var(--hhc-tenor);    --hhc-color-bg: var(--hhc-tenor-bg); }
.hhc-part--bass     { --hhc-color: var(--hhc-bass);     --hhc-color-bg: var(--hhc-bass-bg); }
.hhc-part--practice { --hhc-color: var(--hhc-practice); --hhc-color-bg: var(--hhc-practice-bg); }
.hhc-part--lyrics   { --hhc-color: var(--hhc-lyrics);   --hhc-color-bg: var(--hhc-lyrics-bg); }
.hhc-part--other    { --hhc-color: var(--hhc-other);    --hhc-color-bg: var(--hhc-other-bg); }

/* ---------- Badge: tinted background, colored text. Subtle. ---------- */
.hhc-part-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 1.7rem;
	height: 1.7rem;
	border-radius: 50%;
	background: var(--hhc-color-bg, #f3f4f6);
	color: var(--hhc-color, #374151);
	font-size: 0.8rem;
	font-weight: 700;
	line-height: 1;
	flex: 0 0 auto;
}

/* ---------- Archive page ---------- */
.hhc-song-archive {
	max-width: 960px;
	margin: 3rem auto;
	padding: 0 1.5rem;
}

.hhc-song-archive__header {
	display: flex;
	align-items: baseline;
	gap: 1rem;
	flex-wrap: wrap;
	margin-bottom: 1.25rem;
}

.hhc-song-archive__meta { margin: 0; color: #6b7280; font-size: 0.95rem; }
.hhc-song-archive__controls { margin-bottom: 1rem; }

.hhc-song-archive__search {
	width: 100%;
	max-width: 420px;
	padding: 0.65rem 0.9rem;
	border: 1px solid #d1d5db;
	border-radius: 8px;
	font-size: 1rem;
	background: #fff;
}
.hhc-song-archive__search:focus {
	outline: none;
	border-color: #6b7280;
	box-shadow: 0 0 0 3px rgba(107, 114, 128, 0.18);
}

.hhc-song-archive__legend {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 1.25rem;
	padding: 0.75rem 1rem;
	margin: 0 0 1.5rem 0;
	list-style: none;
	border: 1px solid #e5e7eb;
	border-radius: 8px;
	background: #fafafa;
	font-size: 0.85rem;
	color: #374151;
}
.hhc-song-archive__legend li { display: inline-flex; align-items: center; gap: 0.4rem; }

.hhc-song-archive__list {
	list-style: none;
	padding: 0;
	margin: 0;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 0.75rem;
}

.hhc-song-archive__link {
	display: flex;
	align-items: center;
	min-height: 3.4rem;
	padding: 0.75rem 1rem;
	border: 1px solid #e5e7eb;
	border-radius: 8px;
	background: #fff;
	text-decoration: none;
	color: #111827;
	transition: border-color 120ms ease, box-shadow 120ms ease;
}

.hhc-song-archive__title {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	line-height: 1.3;
	font-weight: 600;
	font-size: 0.98rem;
	word-break: break-word;
}
.hhc-song-archive__link:hover {
	border-color: #9ca3af;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
	color: #111827;
}

.hhc-song-archive__parts { display: flex; flex-wrap: wrap; gap: 0.3rem; }

.hhc-song-archive__empty { margin-top: 1.5rem; color: #6b7280; font-style: italic; }

/* ---------- Single song page ---------- */
.hhc-song-single {
	max-width: 820px;
	margin: 3rem auto;
	padding: 0 1.5rem;
}

.hhc-song__header { margin-bottom: 1rem; }
.hhc-song__back-top a,
.hhc-song__back a { color: #4b5563; text-decoration: none; font-size: 0.9rem; }
.hhc-song__back-top a:hover,
.hhc-song__back a:hover { color: #111827; text-decoration: underline; }

.hhc-song__notes { margin-bottom: 2rem; color: #374151; }

.hhc-song__files {
	display: grid;
	grid-template-columns: 1fr;
	gap: 0.6rem;
	margin: 1.5rem 0 2rem;
}

.hhc-song__file {
	padding: 0.75rem 1rem;
	border: 1px solid #e5e7eb;
	border-radius: 8px;
	background: #fff;
}

.hhc-song__file-head {
	display: grid;
	grid-template-columns: auto 1fr auto;
	gap: 0.85rem;
	align-items: center;
}

.hhc-song__file-meta { min-width: 0; }

.hhc-song__file-label {
	font-weight: 600;
	color: #1f2937;
	font-size: 0.95rem;
	line-height: 1.2;
}

.hhc-song__filename {
	font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
	font-size: 0.75rem;
	color: #9ca3af;
	margin-top: 0.15rem;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.hhc-song__player {
	width: 100%;
	max-width: 100%;
	margin-top: 0.75rem;
	height: 36px;
}

.hhc-song__actions {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 0.25rem;
}

.hhc-song__download {
	display: inline-block;
	padding: 0.45rem 0.9rem;
	background: #1f2937;
	color: #fff;
	text-decoration: none;
	border-radius: 6px;
	font-size: 0.85rem;
	white-space: nowrap;
	font-weight: 500;
}
.hhc-song__download:hover { background: #111827; color: #fff; }

.hhc-song__direct {
	font-size: 0.72rem;
	color: #9ca3af;
	text-decoration: underline;
	text-underline-offset: 2px;
}
.hhc-song__direct:hover { color: #4b5563; }

.hhc-song__back { margin-top: 2rem; }

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
	.hhc-song__file-head {
		grid-template-columns: auto 1fr;
		row-gap: 0.75rem;
	}
	.hhc-song__actions {
		grid-column: 1 / -1;
		flex-direction: row;
		justify-content: space-between;
		align-items: center;
	}
	.hhc-song__filename { white-space: normal; }
}

/* ========================================================================
   EVENTS
   ======================================================================== */

.hhc-events-archive {
	max-width: 1000px;
	margin: 3rem auto;
	padding: 0 1.5rem;
}

.hhc-events-archive__header {
	display: flex;
	align-items: baseline;
	gap: 1rem;
	flex-wrap: wrap;
	margin-bottom: 1rem;
}

.hhc-events-archive__meta { margin: 0; color: #6b7280; font-size: 0.95rem; }

.hhc-events-archive__tabs {
	display: inline-flex;
	border: 1px solid #e5e7eb;
	border-radius: 8px;
	background: #f9fafb;
	padding: 0.25rem;
	margin-bottom: 1.75rem;
}

.hhc-events-archive__tab {
	padding: 0.45rem 1rem;
	font-size: 0.9rem;
	color: #4b5563;
	text-decoration: none;
	border-radius: 6px;
}

.hhc-events-archive__tab.is-active {
	background: #fff;
	color: #111827;
	box-shadow: 0 1px 2px rgba(0,0,0,0.06);
	font-weight: 600;
}

.hhc-events-archive__tab:hover { color: #111827; }

.hhc-events-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 0.85rem;
}

.hhc-event-card {
	border: 1px solid #e5e7eb;
	border-left: 4px solid var(--hhc-color, #9ca3af);
	border-radius: 10px;
	background: #fff;
	overflow: hidden;
	transition: border-color 120ms ease, box-shadow 120ms ease;
}

.hhc-event-card:hover {
	border-color: #9ca3af;
	border-left-color: var(--hhc-color, #6b7280);
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.hhc-event-card__link {
	display: grid;
	grid-template-columns: 180px 1fr;
	text-decoration: none;
	color: inherit;
}

.hhc-event-card:not(:has(.hhc-event-card__image)) .hhc-event-card__link {
	grid-template-columns: 1fr;
}

.hhc-event-card__image {
	background-size: cover;
	background-position: center;
	background-color: #f3f4f6;
	min-height: 140px;
}

.hhc-event-card__body {
	display: grid;
	grid-template-columns: 64px 1fr;
	gap: 1rem;
	padding: 1rem 1.25rem;
	align-items: start;
}

.hhc-event-card__date {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 0.4rem 0.6rem;
	border-radius: 8px;
	background: var(--hhc-color-bg, #f3f4f6);
	color: var(--hhc-color, #1f2937);
	line-height: 1;
	min-width: 56px;
}

.hhc-event-card__month {
	text-transform: uppercase;
	font-size: 0.7rem;
	font-weight: 700;
	letter-spacing: 0.08em;
}

.hhc-event-card__day {
	font-size: 1.6rem;
	font-weight: 700;
	margin-top: 0.15rem;
}

.hhc-event-card__main { min-width: 0; }

.hhc-event-card__cat {
	display: inline-block;
	padding: 0.15rem 0.55rem;
	font-size: 0.72rem;
	font-weight: 600;
	color: var(--hhc-color, #6b7280);
	background: var(--hhc-color-bg, #f3f4f6);
	border-radius: 99px;
	letter-spacing: 0.01em;
	margin-bottom: 0.4rem;
}

.hhc-event-card__title {
	margin: 0 0 0.3rem;
	font-size: 1.05rem;
	font-weight: 600;
	color: #111827;
	line-height: 1.3;
}

.hhc-event-card__meta {
	margin: 0;
	font-size: 0.85rem;
	color: #6b7280;
}

.hhc-events-archive__empty {
	padding: 3rem 1rem;
	text-align: center;
	color: #6b7280;
	border: 1px dashed #e5e7eb;
	border-radius: 10px;
	background: #fafafa;
}

.hhc-events-archive__pagination {
	display: flex;
	flex-wrap: wrap;
	gap: 0.3rem;
	margin-top: 2rem;
	justify-content: center;
}

.hhc-events-archive__page {
	padding: 0.45rem 0.8rem;
	border: 1px solid #e5e7eb;
	border-radius: 6px;
	text-decoration: none;
	color: #374151;
	background: #fff;
	font-size: 0.9rem;
}

.hhc-events-archive__page.is-active {
	background: #1f2937;
	color: #fff;
	border-color: #1f2937;
}

.hhc-events-archive__page:hover {
	border-color: #9ca3af;
}

@media (max-width: 640px) {
	.hhc-event-card__link { grid-template-columns: 1fr; }
	.hhc-event-card__image { min-height: 160px; }
}

/* ---------- Single event page ---------- */

.hhc-event-single {
	max-width: 980px;
	margin: 2rem auto 3rem;
	padding: 0 1.5rem;
}

.hhc-event-single__back-top a,
.hhc-event-single__back a {
	color: #4b5563;
	text-decoration: none;
	font-size: 0.9rem;
}
.hhc-event-single__back-top a:hover,
.hhc-event-single__back a:hover { color: #111827; text-decoration: underline; }

.hhc-event-single__header {
	border-bottom: 3px solid var(--hhc-color, #e5e7eb);
	padding-bottom: 1rem;
	margin-bottom: 2rem;
}

.hhc-event-single__header .entry-title {
	margin: 0.5rem 0 0.4rem;
	line-height: 1.15;
}

.hhc-event-single__lead {
	margin: 0;
	color: #4b5563;
	font-size: 1rem;
}

.hhc-event-single__layout {
	display: grid;
	grid-template-columns: 1fr 300px;
	gap: 2.25rem;
}

@media (max-width: 760px) {
	.hhc-event-single__layout { grid-template-columns: 1fr; }
}

.hhc-event-single__content { line-height: 1.65; color: #1f2937; }
.hhc-event-single__no-content { color: #9ca3af; }


.hhc-event-single__image {
	margin: 0 0 1.25rem;
	border-radius: 10px;
	overflow: hidden;
	background: #f3f4f6;
}
.hhc-event-single__image img {
	display: block;
	width: 100%;
	height: auto;
	max-height: 320px;
	object-fit: cover;
}

.hhc-event-single__no-content { display: none; }

.hhc-event-single__info {
	padding: 1.25rem 1.4rem;
	background: #f9fafb;
	border: 1px solid #e5e7eb;
	border-radius: 10px;
	font-size: 0.95rem;
	align-self: start;
}

.hhc-event-single__info h2 {
	margin: 0 0 0.75rem;
	font-size: 0.8rem;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	color: #6b7280;
	font-weight: 700;
}

.hhc-event-single__info dl {
	margin: 0;
	display: grid;
	gap: 0.85rem;
}
.hhc-event-single__info dt {
	font-weight: 600;
	color: #374151;
	font-size: 0.8rem;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	margin-bottom: 0.15rem;
}
.hhc-event-single__info dd {
	margin: 0;
	color: #1f2937;
	line-height: 1.5;
}
.hhc-event-single__info a {
	color: var(--hhc-color, #2563eb);
	text-decoration: none;
}
.hhc-event-single__info a:hover { text-decoration: underline; }

.hhc-event-single__ics {
	margin-top: 1.25rem;
	padding-top: 1rem;
	border-top: 1px solid #e5e7eb;
}
.hhc-event-single__ics-label {
	margin: 0 0 0.5rem;
	font-size: 0.78rem;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: #6b7280;
	font-weight: 700;
}
.hhc-event-single__ics-btn {
	display: inline-block;
	padding: 0.4rem 0.8rem;
	margin: 0.2rem 0.3rem 0.2rem 0;
	background: #1f2937;
	color: #fff !important;
	text-decoration: none !important;
	border-radius: 6px;
	font-size: 0.82rem;
}
.hhc-event-single__ics-btn:hover { background: #111827; text-decoration: none !important; }

.hhc-event-single__back { margin-top: 3rem; }

.hhc-event-single__map {
	margin-top: 0.6rem;
	border-radius: 8px;
	overflow: hidden;
	background: #eef0f3;
}
.hhc-event-single__map iframe {
	display: block;
	width: 100% !important;
	height: 220px !important;
	border: 0;
}
.hhc-event-single__map-link {
	display: inline-block;
	margin-top: 0.4rem;
	font-size: 0.85rem;
}

/* ========================================================================
   BLOCKS (shortcode-rendered sections for home/landing pages)
   ======================================================================== */

.hhc-block {
	max-width: 1000px;
	margin: 2.5rem auto;
	padding: 0 1.5rem;
}

.hhc-block__header {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 1rem;
	margin-bottom: 1.25rem;
	padding-bottom: 0.75rem;
	border-bottom: 2px solid #e5e7eb;
}

.hhc-block__title {
	margin: 0;
	font-size: 1.4rem;
	font-weight: 600;
	color: #111827;
}

.hhc-block__more {
	color: #4b5563;
	text-decoration: none;
	font-size: 0.9rem;
	font-weight: 500;
	white-space: nowrap;
}
.hhc-block__more:hover { color: #111827; text-decoration: underline; }

.hhc-block__empty {
	padding: 2rem 1rem;
	text-align: center;
	color: #6b7280;
	border: 1px dashed #e5e7eb;
	border-radius: 10px;
	background: #fafafa;
}

.hhc-block__note {
	margin-top: 0.75rem;
	color: #9ca3af;
	font-size: 0.85rem;
}

.hhc-block__song-list {
	grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)) !important;
}

/* ========================================================================
   AUTH UI — floating login/logout link + locked block treatment
   ======================================================================== */

.hhc-auth-link {
	position: fixed;
	top: 0.6rem;
	right: 0.6rem;
	z-index: 9999;
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.35rem 0.75rem;
	background: #1f2937;
	color: #fff;
	border-radius: 999px;
	font-size: 0.78rem;
	font-weight: 500;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
	line-height: 1;
}

.hhc-auth-link a {
	color: #fff;
	text-decoration: none;
	padding: 0.15rem 0.35rem;
}
.hhc-auth-link a:hover { color: #f3f4f6; text-decoration: underline; }

.hhc-auth-link__user {
	color: #9ca3af;
	font-weight: 400;
	padding-right: 0.3rem;
	border-right: 1px solid #4b5563;
}

/* ---------- Locked songs block (non-members) ---------- */

.hhc-block--locked .hhc-block__header {
	border-bottom-color: #e5e7eb;
}

.hhc-block__locked {
	padding: 2.5rem 1.5rem;
	text-align: center;
	background: #fafafa;
	border: 1px solid #e5e7eb;
	border-radius: 10px;
}

.hhc-block__locked p {
	margin: 0 0 1rem;
	color: #4b5563;
}

.hhc-block__login-btn {
	display: inline-block;
	padding: 0.6rem 1.2rem;
	background: #1f2937;
	color: #fff !important;
	text-decoration: none !important;
	border-radius: 6px;
	font-weight: 500;
	font-size: 0.9rem;
}
.hhc-block__login-btn:hover { background: #111827; }

@media (max-width: 480px) {
	.hhc-auth-link__user { display: none; }
}
