/*
Theme Name: Blocksy Child
Template: blocksy
Version: 1.0
Text Domain: blocksy-child
*/

/* ============================================================
   Jimmy Mix — JMAlbum Styling
   ============================================================ */


/* ============================================================
   1. TITLE + META ALIGNMENT
   ============================================================ */
.single-jmalbum .hero-section.is-width-constrained,
.single-jmalbum .entry-header,
.single-jmalbum .page-title,
.single-jmalbum .entry-meta {
	text-align: center;
	margin-left: auto;
	margin-right: auto;
}

.single-jmalbum .page-title {
	margin-bottom: 0;
}

.single-jmalbum .entry-header .page-title {
	margin-bottom: -0.5rem !important;
}

.single-jmalbum .entry-meta {
	margin-top: 0;
	display: inline-flex;
	gap: 1rem;
	justify-content: center;
	flex-wrap: wrap;
	color: var(--ct-meta-color);
}
.jm-meta-tags {
	text-align: center;
	font-weight: 600;
	margin-top: 0rem !important;
	font-size: 0.75rem;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	color: var(--ct-color-text);
}
.jm-featured-hero {
    position: relative;
    width: 100%;
    height: 260px;
    /*margin-bottom: 2rem;*/
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* ============================================================
   1b. Featured image stripe
   ============================================================ */
.jm-featured-hero__bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    filter: brightness(0.45);
    z-index: 1;
}

.jm-featured-hero__overlay {
    position: absolute;
    inset: 0;
   	background-color: var(--theme-palette-color-8);
	opacity: 0.75;
    z-index: 2;
}

.jm-featured-hero__inner {
    position: relative;
    z-index: 3;
    text-align: center;
}

.jm-featured-hero .page-title {
}

.jm-featured-hero .entry-meta,
.jm-featured-hero .jm-meta-tags,
.jm-featured-hero .jm-byline {}

/* ============================================================
   2. BYLINE (Submitter)
   ============================================================ */
.jm-byline {
	margin-top: var(--ct-spacing-sm);
	font-style: italic;
	text-align:center;
}

/* ============================================================
   3. INTRO BLOCK (Profile + Quote)
   ============================================================ */
.jm-intro {
	margin-bottom: var(--ct-spacing-xl);
}

.jm-intro__inner {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-wrap: nowrap;
	gap: var(--ct-spacing-lg);
	max-width: var(--container-width, 900px);
	margin: 0 auto;
	padding: 0 5%;
}

.jm-profile {
	flex: 0 0 33%;
	display: flex;
	justify-content: center;
	padding-top:1rem;
}

.jm-profile__img {
	width: 240px;
	height: 240px;
	object-fit: cover;
	border-radius: 50% !important;
	/*filter: grayscale(100%);*/
	border: 3px solid var(--ct-border-color);
	box-shadow: var(--ct-shadow-sm);
}
/*.jm-profile__img--placeholder {
	filter: grayscale(100%);
}*/

.jm-quote {
	flex: 0 0 60%;
	padding: var(--ct-spacing-lg);
	border-radius: var(--ct-radius-md);
	margin: 0 auto;
}

.jm-quote__text {
	font-style: italic;
	line-height: 1.4;
	margin: 0;
}
/* ============================================================
   Vibe Quote — Album Personality Sentence
   ============================================================ */
.jm-quote__text {
	font-style: italic;
	line-height: 1.4;
	margin: 0;
	font-size: 1.3rem;
	font-weight: 300;
	text-align: center;
}

.jm-quote-mark {
	font-family: var(--ct-headings-font-family);
	font-weight: 700;
	font-size: 2.5rem;
	color: var(--theme-palette-color-3);
	vertical-align: middle;
	padding: 0 0.1em;
}

/* --- Responsive collapse --- */
@media (max-width: 900px) {
	.jm-intro__inner {
		flex-wrap: wrap;
		padding: 0 var(--ct-spacing-md);
		gap: var(--ct-spacing-md);
	}
	.jm-profile,
	.jm-quote {
		flex: 1 1 100%;
		text-align: center;
	}
	.jm-quote {
		padding-top:1rem;
	}
	.jm-profile__img {
		width: 180px;
		height: 180px;
	}
}

/* ============================================================
   4. FAVOURITE TRACK LINE
   ============================================================ */
.jm-fav__line {
	margin: var(--ct-spacing-lg) auto var(--ct-spacing-md);
	margin-top: 20px;
	font-size: 1.3rem;
	color: var(--ct-text-color);
	text-align: left; /* restore original flow under quote */
}
.jm-fav__artist {
	font-weight: 700;
	color: var(--theme-palette-color-3);
}
.jm-fav {
	position: relative;
	padding-bottom: var(--ct-spacing-md);
	margin-bottom: var(--ct-spacing-lg);
}

.jm-fav::after {
	content: "";
	display: block;
	height: 1px;
	margin: var(--ct-spacing-sm) auto 0;
	margin-top:20px;
	background-color: var(--theme-palette-color-5);
}

/* ============================================================
   5. ALBUM COPY
   ============================================================ */
.jm-copy {
	margin-bottom: var(--ct-spacing-xl);
	margin-top: 20px;
}
.jm-copy {
	margin-bottom: var(--ct-spacing-xl);
	position: relative;
	padding-bottom: var(--ct-spacing-md);
}

.jm-copy::after {
	content: "";
	display: block;
	height: 1px;
	margin: var(--ct-spacing-lg) auto 0;
	background-color: var(--theme-palette-color-5);
	opacity: 1;
}
/* ============================================================
   Drop Cap — first paragraph of album copy
   ============================================================ */
.jm-copy p:first-of-type::first-letter {
	float: left;
	font-size: 3.5rem;
	line-height: 1;
	font-weight: 700;
	margin-right: 0.25em;
	margin-top: 0.05em;
	color: var(--theme-palette-color-5);
	font-family: var(--ct-headings-font-family);
}


/* ============================================================
   6. JM ALBUM GRID (4-BLOCK CD INSERT)
   ============================================================ */
.jm-album-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
	gap: var(--ct-spacing-md);
	justify-items: center;
	align-items: stretch;
	margin: var(--ct-spacing-xl) 0;
}

.jm-block {
	position: relative;
	width: 100%;
	aspect-ratio: 1 / 1;
	border-radius: var(--ct-radius-md);
	overflow: hidden;
	background: var(--ct-block-bg, rgba(0, 0, 0, 0));
	box-shadow: var(--ct-shadow-sm);
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	padding: var(--ct-spacing-md);
}

/* --- 6.1 CTA Block --- */
.jm-block--cta .jm-cta-text {
	max-width: 80%;
	margin: 0 auto;
	font-size: 1rem;
	font-weight: 500;
	line-height: 1.6;
}
/* ============================================================
   Vibe CTA — Dynamic closing line
   ============================================================ */
.jm-block--cta {
	text-align: center;
	padding: var(--ct-spacing-xl) var(--ct-spacing-lg);
	position: relative;
}

.jm-cta-text {
	font-size: 1.2rem;
	line-height: 1.6;
	max-width: 80%;
	margin: 0 auto;
}

.jm-cta__album {
	font-style:italic;
	color: var(--theme-palette-color-3);
}

/* --- 6.2 Album Cover Block --- */
.jm-block--cover .jm-cover__img {
	width: 100%;
	height: auto;
	border-radius: var(--ct-radius-md);
	box-shadow: var(--ct-shadow-sm);
}

/* --- 6.3 Tracklist / Back Cover --- */
.jm-block--tracks {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: var(--ct-radius-md);
	color: #fff;
	overflow: hidden;
}

.jm-back-cover {
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: var(--ct-radius-md);
}

.jm-tracklist-fallback {
	position: relative;
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	padding: 2rem;
	overflow: hidden;
}

.jm-tracklist-bg {
	position: absolute;
	inset: 0;
	background-size: cover;
	background-position: center;
	filter: blur(8px) grayscale(50%) brightness(0.6);
	transform: scale(1.1);
	z-index: 1;
}

/* Overlay using theme palette color 8 */
.jm-tracklist-overlay {
	position: absolute;
	inset: 0;
	background: color-mix(in srgb, var(--theme-palette-color-8) 80%, transparent);
	z-index: 2;
}

.jm-tracklist-inner {
	position: relative;
	z-index: 3;
	color: #fff;
	font-size: 0.9rem;
	line-height: 1.5;
	max-width: 80%;
	overflow-y: auto;
	max-height: 100%;
	padding: var(--ct-spacing-md);
}

/* Scrollbar */
.jm-tracklist-inner::-webkit-scrollbar {
	width: 6px;
}
.jm-tracklist-inner::-webkit-scrollbar-thumb {
	background-color: rgba(255, 255, 255, 0.3);
	border-radius: 3px;
}
/* ============================================================
   BACK COVER FLIP — Card Wrapper
   ============================================================ */
.jm-flip-card {
    perspective: 1600px;
    position: relative;
	width: 100%;
    height: 100%;
}

/* inner element that rotates */
.jm-flip-inner {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.7s ease;
}

/* the two faces */
.jm-flip-face {
    position: absolute;
    inset: 0;
    backface-visibility: hidden;
    border-radius: inherit;
    overflow: hidden;
	width: 100%;
    height: 100%;
    display: flex;
}

/* FRONT = back cover image */
.jm-flip-front {
    z-index: 2;
    transform: rotateY(0deg);
}

/* BACK = blurred fallback + tracklist */
.jm-flip-back {
    transform: rotateY(180deg);
    z-index: 1;
}

/* when flipped */
.jm-flip-card.is-flipped .jm-flip-inner {
    transform: rotateY(180deg);
}
/* Front is on top when NOT flipped */
.jm-flip-card:not(.is-flipped) .jm-flip-front {
    z-index: 5;
}
/* Back is on top when flipped */
.jm-flip-card.is-flipped .jm-flip-back {
    z-index: 5;
}
/* ============================================================
   TAP-SAFE: scroll-safe zone (tracklist text)
   ============================================================ */
.scroll-safe {
    touch-action: pan-y;
}

/* ensures clicking on blurred padding still registers flip */
.jm-tracklist-fallback {
    cursor: pointer;
}

/* but NOT inside scroll-safe box */
.scroll-safe {
    cursor: default;
}

/* ============================================================
   AI Free Sticker — Two-Line Version
   ============================================================ */
.jm-ai-sticker {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0,0,0,0.20); /* softer opacity */
    color: #ffffff;
    padding: 6px 6px;
    border-radius: 6px;
    text-align: center;
    z-index: 30;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.jm-ai-sticker .jm-ai-line1 {
    font-size: 0.50rem;
    font-weight: 400;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.jm-ai-sticker .jm-ai-line2 {
    font-size: 0.5rem;       /* slightly larger */
    font-weight: 700;          /* bold */
    letter-spacing: 0.03em;
    margin-top: 2px;
    text-transform: uppercase;
}

.wp-block-heading.has-text-align-center {
	text-align: center;
}

.wp-block-buttons.is-content-justification-center .wp-block-button {
	margin: 0.3rem;
}

/* --- 6.4 Streaming Links --- */
.jm-block--links {
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
}

/* --- Responsive adjustments --- */
@media (max-width: 768px) {
	.jm-album-grid {
		grid-template-columns: 1fr;
	}
	.jm-block {
		aspect-ratio: auto;
		padding: var(--ct-spacing-lg);
	}
}
@media (max-width: 768px) {
  .jm-block--tracks {
    aspect-ratio: 1 / 1 !important;
    padding: 0 !important;
  }
}
@media (max-width: 768px) {
  .jm-tracklist-inner {
    max-height: 100%;
    overflow-y: auto;
    padding: 1rem;
  }
}

@media (max-width: 768px) {
  /* both blocks should fill half the album height */
  .single-jmalbum .jm-block--cta,
  .single-jmalbum .jm-block--links {
    position: relative;
    height: 25vh; /* half the viewport height */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 1.5rem;
  }

  .single-jmalbum .jm-block--cta .jm-cta-text,
  .single-jmalbum .jm-block--links .wp-block-buttons {
    position: relative;
    z-index: 2;
    margin: 0 auto;
  }

/* ============================================================
   7. RATINGS (handled by shortcode)
   ============================================================ */
/* Placeholder only – real styling lives in shortcode JS/CSS */
.jm-ratings {
	text-align: center;
	margin-top: var(--ct-spacing-xl);
}


/* ============================================================
   8. COMMENTS FOOTER
   ============================================================ */
.single-jmalbum .jm-entry-footer {
	margin-top: var(--ct-spacing-xxl);
}


/* ============================================================
   9. UNUSED / STRAGGLER STYLES (outside current template)
   ============================================================ */
/* These selectors do not appear in single-jmalbum.php currently.
   Keep them if you plan to use them globally or in other templates. */

.jm-article {
	max-width: var(--container-width, 780px);
	margin: 0 auto;
}

.jm-cover,
.jm-streams {
	text-align: center;
}

.jm-cover__wrap {
	position: relative;
	display: inline-block;
	max-width: 450px;
	width: 100%;
}

.jm-sticker {
	position: absolute;
	bottom: 10px;
	right: 10px;
	width: 10%;
	aspect-ratio: 1 / 1;
	background: url('/wp-content/themes/blocksy-child/images/jimmymix-sticker.png')
		center/contain no-repeat;
	pointer-events: none;
}

.jm-streams__buttons {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: var(--ct-spacing-sm);
}

.jm-feature-line,
.jm-album-copy {
	/* replaced by .jm-fav__line and .jm-copy */
}
