/**
 * CDB Movie Profile Card — Block Styles
 *
 * CSS Naming Convention: cdb-movie-profile-card--{element}
 * Shared admin placeholder styles use: cdb-profile-card--{element}
 *
 * Design System: Technomancy
 * Variables: var(--cs-brand), var(--cs-brand-2), var(--flex-gray-*),
 *            var(--body-fcolor), var(--flex-bg-color-2)
 */

/* =========================================================
   Admin Placeholder (shared across all three blocks)
   ========================================================= */

.cdb-profile-card--admin-placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 200px;
	border: 2px dashed var(--cs-brand, #8b5cf6);
	border-radius: 8px;
	background-color: var(--flex-bg-color-2, #111);
	padding: 24px;
}

.cdb-profile-card--placeholder-inner {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	text-align: center;
}

.cdb-profile-card--placeholder-icon {
	font-size: 32px;
	color: var(--cs-brand, #8b5cf6);
}

.cdb-profile-card--placeholder-title {
	font-size: 1rem;
	font-weight: 700;
	color: var(--body-fcolor, #fff);
	margin: 0;
}

.cdb-profile-card--placeholder-hint {
	font-size: 0.8rem;
	color: var(--flex-gray-4, #888);
	margin: 0;
}

/* =========================================================
   Card Wrapper
   ========================================================= */

.cdb-movie-profile-card-wrapper {
	display: flex;
	flex-direction: row;
	gap: 0;
	background-color: var(--flex-gray-1);
	border: 1px solid var(--cs-brand-60);
	border-left: 4px solid var(--cs-brand);
	border-top: 2px solid var(--cs-brand);
	border-radius: 8px;
	box-shadow: var(--shadow-1);
	overflow: hidden;
	font-family: inherit;
	container-type: inline-size;
	margin-block: 2rem;
}

/* =========================================================
   Poster Column
   ========================================================= */

.cdb-movie-profile-card--poster-col {
	position: relative;
	flex: 0 0 270px;
	width: 270px;
	min-height: 330px;
	overflow: hidden;
}

.cdb-movie-profile-card--poster-img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: top center;
}

.cdb-movie-profile-card--poster-placeholder {
	width: 100%;
	height: 100%;
	min-height: 330px;
	background-color: var(--flex-gray-1, #1a1a1a);
}

.cdb-movie-profile-card--poster-overlay {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	padding: 16px 14px 14px;
	background: linear-gradient(to top, rgba(10, 10, 15, 0.96) 0%, rgba(10, 10, 15, 0.7) 60%, rgba(10, 10, 15, 0) 100%);
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
}

/* =========================================================
   Cinescore Badge
   ========================================================= */

.cdb-movie-profile-card--cinescore-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: oklch(0 0 0 / 0.65);
    color: #fff;
    border-radius: 4px;
    border: 1.5px solid var(--cs-brand-70, #8b5cf6);
    padding: 4px 8px;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    line-height: 1;
}

.cdb-movie-profile-card--cinescore-icon {
	font-size: 0.65rem;
	line-height: 1;
}

.cdb-movie-profile-card--cinescore-icon::before {
    content: "";
    display: inline-block;
    width: 1.5rem;
    height: 1.5rem;
    margin-right: 4px;
    background-image: url(https://cinesist.com/wp-content/uploads/2026/05/Cinesist-Black-and-Purple-Icon-Logomark.webp);
    background-size: contain;
    background-repeat: no-repeat;
    vertical-align: middle;
}

[data-theme="dark"] 
.cdb-movie-profile-card--cinescore-icon::before {
	content: "";
    display: inline-block;
    width: 1.5rem;
    height: 1.5rem;
    margin-right: 4px;
    background-image: url(https://cinesist.com/wp-content/uploads/2026/05/Cinesist-White-Spy-Icon-Logomark.webp);
    background-size: contain;
    background-repeat: no-repeat;
    vertical-align: middle;
}

.cdb-movie-profile-card--cinescore-label {
	font-weight: 400;
	opacity: 0.75;
}

/* =========================================================
   Poster Overlay Title
   ========================================================= */

.cdb-movie-profile-card--title-link {
	text-decoration: none;
	width: 100%;
}
.cdb-movie-profile-card--title-link:hover {
  --decoration-type: underline;
  text-decoration: var(--decoration-type);
  --decoration-color: var(--cs-brand);
  text-decoration-color: var(--decoration-color);
  --underline-thickness: 2px;
  text-decoration-thickness: var(--underline-thickness);
  --underline-offset: 3px;
  text-underline-offset: var(--underline-offset);
}

.cdb-movie-profile-card--title {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.25;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.9);
}

/* =========================================================
   Intel Column
   ========================================================= */

.cdb-movie-profile-card--intel-col {
	flex: 1 1 auto;
	position: relative;
	padding: 18px 22px;
	display: flex;
	flex-direction: column;
	gap: 14px;
	overflow: hidden;
}

/* =========================================================
   Tags Row (Rating Pill + Genre Tags)
   ========================================================= */

.cdb-movie-profile-card--tags-row {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	align-items: center;
}
.cdb-movie-profile-card--tags-row::after {
	content: "🎬";
	display: inline-flex;
	position: absolute;
	right: 2rem;
	top: 1rem;
	font-family: var(--font-emoji);
	font-size: var(--cs-font-size-h1);
	opacity: 0.35;
	width: 3rem;
	height: 3rem;
	margin-right: 4px;
	vertical-align: middle;
	align-items: center;
}

.cdb-movie-profile-card--rating-pill {
	display: inline-block;
	padding: 3px 10px;
	border: 1.5px solid var(--cs-brand, #8b5cf6);
	border-radius: 4px;
	color: var(--cs-brand, #8b5cf6);
	font-size: 0.7rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-decoration: none;
	text-transform: uppercase;
	line-height: 1.4;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.cdb-movie-profile-card--rating-pill:hover {
	background-color: var(--cs-brand, #8b5cf6);
	color: #fff;
}

.cdb-movie-profile-card--genre-tag {
	display: inline-block;
	padding: 3px 9px;
	border: 1px solid var(--flex-gray-3, #444);
	border-radius: 4px;
	color: var(--flex-gray-6, #aaa);
	font-size: 0.7rem;
	font-weight: 500;
	text-decoration: none;
	line-height: 1.4;
	transition: border-color 0.2s ease, color 0.2s ease;
}

.cdb-movie-profile-card--genre-tag:hover {
	border-color: var(--cs-brand, #8b5cf6);
	color: var(--cs-brand, #8b5cf6);
}

/* =========================================================
   Meta Row (Date / Runtime)
   ========================================================= */

.cdb-movie-profile-card--meta-row {
	display: flex;
	flex-direction: row;
	flex-wrap: wrap;
	gap: 24px;
	align-items: center;
}

.cdb-movie-profile-card--meta-item {
	display: flex;
	flex-direction: row;
	align-items: baseline;
	gap: 10px;
}

.cdb-movie-profile-card--meta-label {
	font-size: 0.7rem;
	font-weight: 700;
	color: var(--body-fcolor, #fff);
	text-transform: uppercase;
}
.cdb-movie-profile-card--meta-label.release-date {
	flex: 0 0 90px;
}

.cdb-movie-profile-card--meta-label.runtime {
	flex: 0 0 50px;
}

.cdb-movie-profile-card--meta-value {
	font-size: 0.8rem;
	color: var(--flex-gray-600);
	font-weight: 400;
}

/* =========================================================
   Crew Section
   ========================================================= */

.cdb-movie-profile-card--crew-section {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.cdb-movie-profile-card--crew-row {
	display: flex;
	align-items: baseline;
	gap: 10px;
}

.cdb-movie-profile-card--crew-label {
	flex: 0 0 90px;
	font-size: 0.7rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--primary-text-color);
}

.cdb-movie-profile-card--crew-value {
	font-size: 0.82rem;
	color: var(--flex-gray-600);
	flex: 1 1 auto;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.cdb-profile-card--person-link {
	color: var(--cs-brand, #8b5cf6);
	text-decoration: none;
	font-weight: 600;
	transition: opacity 0.2s ease;
}

.cdb-profile-card--person-link:hover {
	opacity: 0.8;
}

.cdb-profile-card--job-link {
	color: var(--flex-gray-5, #999);
	text-decoration: none;
	font-size: 0.75rem;
	transition: color 0.2s ease;
}

.cdb-profile-card--job-link:hover {
	color: var(--cs-brand, #8b5cf6);
}

.cdb-profile-card--crew-sep {
	color: var(--flex-gray-4, #888);
}

.cdb-profile-card--overflow {
	color: var(--flex-gray-4, #888);
	font-size: 0.8rem;
}

/* =========================================================
   Cast Section (Compact Sleek Cards)
   ========================================================= */

.cdb-movie-profile-card--cast-section {
	margin-top: auto;
}

.cdb-movie-profile-card--cast-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 8px;
}

.cdb-movie-profile-card--cast-label {
	font-size: 0.7rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--primary-text-color);
}

.cdb-movie-profile-card--see-all {
	font-size: 0.72rem;
	font-weight: 600;
	color: var(--cs-brand);
	text-decoration: none;
	transition: opacity 0.2s ease;
}

.cdb-movie-profile-card--see-all:hover {
	opacity: 0.75;
}

.cdb-movie-profile-card--cast-strip {
	display: flex;
	flex-wrap: nowrap;
	gap: 12px;
	max-width: 400px;
}

.cdb-movie-profile-card--cast-item {
	display: flex;
	flex-direction: column;
	width: 110px;
	flex: 0 0 110px;
	background-color: var(--flex-gray-2, #1f1f1f);
	border: 1px solid var(--cs-brand-60, rgba(139, 92, 246, 0.4));
	border-radius: 6px;
	overflow: hidden;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
	transition: transform 0.2s ease, border-color 0.2s ease;
}

.cdb-movie-profile-card--cast-item:hover {
	transform: translateY(-2px);
	border-color: var(--cs-brand, #8b5cf6);
}

.cdb-movie-profile-card--cast-avatar {
	position: relative;
	width: 100%;
	height: 110px;
	overflow: hidden;
	background-color: var(--flex-gray-1, #141414);
}

.cdb-movie-profile-card--cast-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: top center;
	display: block;
}

.cdb-movie-profile-card--avatar-placeholder {
	width: 100%;
	height: 100%;
	background-color: var(--flex-gray-2, #2a2a2a);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 0.9rem;
	font-weight: 700;
	color: var(--cs-brand, #8b5cf6);
}

.cdb-movie-profile-card--actor-overlay {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	padding: 14px 4px 4px;
	background: linear-gradient(to top, rgba(0, 0, 0, 0.92) 0%, rgba(0, 0, 0, 0.6) 60%, rgba(0, 0, 0, 0) 100%);
	display: flex;
	align-items: flex-end;
}

.cdb-movie-profile-card--actor-name {
	font-size: 0.72rem;
	font-weight: 700;
	color: #ffffff;
	line-height: 1.15;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	width: 100%;
	text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
}

.cdb-movie-profile-card--actor-name a {
	color: #ffffff;
	text-decoration: none;
	transition: color 0.2s ease;
}

.cdb-movie-profile-card--actor-name a:hover {
	color: var(--cs-brand, #8b5cf6);
}

.cdb-movie-profile-card--character-subtext {
	padding: 4px 4px 6px;
	background-color: var(--flex-gray-2, #1f1f1f);
	text-align: center;
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 28px;
}

.cdb-movie-profile-card--character-name {
	font-size: 0.66rem;
	color: var(--flex-gray-6, #bbb);
	line-height: 1.2;
	overflow: hidden;
	text-overflow: ellipsis;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	font-weight: 500;
}

.cdb-profile-card--character-link {
	color: var(--cs-brand, #8b5cf6);
	text-decoration: none;
	transition: opacity 0.2s ease;
}

.cdb-profile-card--character-link:hover {
	opacity: 0.85;
}

/* =========================================================
   Responsive
   ========================================================= */

@container (max-width: 520px) {
	.cdb-movie-profile-card-wrapper {
		flex-direction: column;
	}

	.cdb-movie-profile-card--poster-col {
		flex: 0 0 auto;
		width: 100%;
		min-height: 240px;
		max-height: 320px;
	}

	.cdb-movie-profile-card--cast-strip {
		justify-content: center;
	}
}

@media (max-width: 480px) {
	.cdb-movie-profile-card-wrapper {
		flex-direction: column;
	}

	.cdb-movie-profile-card--poster-col {
		width: 100%;
		min-height: 240px;
		max-height: 300px;
	}
}
