/**
 * Series Module — listing cards, detail hero, description, edit form.
 *
 * Design tokens from tokens.css. Loaded conditionally on the series page.
 *
 * @package NuevaEscocia
 * @see Issue #187
 */

/* .ne-series-intro is defined in events.css (loaded alongside this file) */

/* === Series Card (listing page) === */
.ne-series-card {
	display: block;
	border-radius: var(--ne-radius-lg);
	overflow: hidden;
	background: var(--ne-surface);
	border: 1px solid var(--ne-border-s);
	transition: transform var(--ne-duration) var(--ne-ease),
				border-color var(--ne-duration) var(--ne-ease),
				box-shadow var(--ne-duration) var(--ne-ease);
	text-decoration: none;
	color: inherit;
}

.ne-series-card:hover {
	transform: translateY(-2px);
	border-color: var(--ne-accent-soft);
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.ne-series-card__image {
	position: relative;
	height: 200px;
	overflow: hidden;
}

.ne-series-card__image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform var(--ne-duration) var(--ne-ease);
}

.ne-series-card:hover .ne-series-card__image img {
	transform: scale(1.05);
}

.ne-series-card__placeholder {
	width: 100%;
	height: 100%;
	background: var(--ne-elevated);
	display: flex;
	align-items: center;
	justify-content: center;
}

.ne-series-card__placeholder .ne-series-card__logo {
	width: 80px;
	height: 80px;
	object-fit: contain;
	opacity: 0.6;
}

.ne-series-card__overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(to bottom, transparent 30%, rgba(0, 0, 0, 0.75));
	display: flex;
	align-items: flex-end;
	padding: var(--ne-space-4);
}

.ne-series-card__name {
	font-family: var(--ne-font-display);
	font-size: 1.15rem;
	font-weight: 700;
	color: #fff;
}

.ne-series-card__body {
	padding: var(--ne-space-3) var(--ne-space-4);
}

.ne-series-card__meta {
	display: flex;
	align-items: center;
	gap: var(--ne-space-2);
}

.ne-series-card__fed {
	font-size: 0.8rem;
	color: var(--ne-text-subtle);
}

/* === Series Hero (detail page) === */
.ne-series-hero {
	position: relative;
	min-height: 280px;
	display: flex;
	align-items: flex-end;
	background: var(--ne-elevated);
	overflow: hidden;
}

.ne-series-hero.has-banner {
	min-height: 340px;
}

.ne-series-hero__bg {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.ne-series-hero.has-banner::after {
	content: '';
	position: absolute;
	inset: 0;
	background: linear-gradient(to bottom, transparent 20%, rgba(0, 0, 0, 0.8));
}

.ne-series-hero__content {
	position: relative;
	z-index: 1;
	padding: var(--ne-space-6) var(--ne-space-6) var(--ne-space-5);
	max-width: 1200px;
	width: 100%;
	margin: 0 auto;
}

.ne-series-hero__logo {
	width: 56px;
	height: 56px;
	border-radius: var(--ne-radius-md);
	object-fit: cover;
	margin-bottom: var(--ne-space-3);
	border: 2px solid rgba(255, 255, 255, 0.2);
}

.ne-series-hero__title {
	font-family: var(--ne-font-display);
	font-size: 2rem;
	font-weight: 700;
	color: #fff;
	margin: 0 0 var(--ne-space-3);
}

.ne-series-hero__meta {
	display: flex;
	gap: var(--ne-space-2);
	flex-wrap: wrap;
}

/* === Section Title (reusable) === */
.ne-section__title {
	font-family: var(--ne-font-body);
	font-size: 1.25rem;
	font-weight: 600;
	color: var(--ne-text);
	margin: 0 0 var(--ne-space-4);
}

/* === Series Description === */
.ne-series-desc {
	max-width: 700px;
	margin-bottom: var(--ne-space-6);
}

.ne-series-desc p {
	color: var(--ne-text-subtle);
	line-height: 1.7;
	font-size: 0.95rem;
}

/* === Series Edit (inline form) === */
.ne-series-edit {
	margin-bottom: var(--ne-space-6);
	padding: var(--ne-space-4);
	background: var(--ne-surface);
	border: 1px solid var(--ne-border);
	border-radius: var(--ne-radius-lg);
}

.ne-series-edit__form {
	margin-top: var(--ne-space-4);
}

.ne-series-edit__actions {
	display: flex;
	gap: var(--ne-space-3);
	margin-top: var(--ne-space-4);
}

/* Character count */
.ne-char-count {
	font-size: 0.75rem;
	color: var(--ne-text-subtle);
	margin-top: var(--ne-space-1);
	text-align: right;
}

/* Image upload component */
.ne-image-upload {
	display: flex;
	align-items: center;
	gap: var(--ne-space-3);
}

.ne-image-upload__preview {
	width: 120px;
	height: 80px;
	object-fit: cover;
	border-radius: var(--ne-radius-md);
	border: 1px solid var(--ne-border);
}

.ne-image-upload__placeholder {
	width: 120px;
	height: 80px;
	border-radius: var(--ne-radius-md);
	border: 1px dashed var(--ne-border);
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--ne-text-subtle);
}

.ne-input-file {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.ne-series-edit small {
	display: block;
	margin-top: var(--ne-space-1);
	font-size: 0.75rem;
	color: var(--ne-text-subtle);
}

/* === Responsive === */
@media (max-width: 750px) {
	.ne-series-hero {
		min-height: 200px;
	}
	.ne-series-hero.has-banner {
		min-height: 240px;
	}
	.ne-series-hero__title {
		font-size: 1.5rem;
	}
	.ne-series-hero__logo {
		width: 40px;
		height: 40px;
	}
	.ne-series-hero__content {
		padding: var(--ne-space-4) var(--ne-space-4) var(--ne-space-3);
	}
	.ne-image-upload {
		flex-direction: column;
		align-items: flex-start;
	}
	.ne-series-edit__actions {
		flex-direction: column;
	}
	.ne-series-edit__actions .ne-btn {
		width: 100%;
	}
}
