/**
 * YA eBundles — Frontend Styles
 *
 * Mobile-first, single breakpoint at 768px.
 * CSS Custom Properties allow easy theming via theme/child-theme overrides.
 *
 * @package YogaAktuell\EBundles
 */

/* ---------- Grid ---------- */

div.ya-ebundle-grid {
	--ya-eb-color-active:    #2bb789;
	--ya-eb-color-locked:    #de6800;
	--ya-eb-color-featured:  #de6800;
	--ya-eb-color-on-accent: #ffffff;
	--ya-eb-radius:          6px;
	--ya-eb-gap:             1.5rem;
	--ya-eb-font:            'Montserrat', sans-serif;
	--cols:                  4;

	display: grid !important;
	grid-template-columns: 1fr;
	gap: var(--ya-eb-gap);
	font-family: var(--ya-eb-font);
	box-sizing: border-box;
}

@media (min-width: 768px) {
	div.ya-ebundle-grid {
		grid-template-columns: repeat(var(--cols), 1fr);
	}
}

/* ---------- Card ---------- */

.ya-ebundle-card {
	position: relative;
	display: flex;
	flex-direction: column;
	border-radius: var(--ya-eb-radius);
	overflow: hidden;
	background: #fff;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
	transition: box-shadow 0.2s ease;
}

.ya-ebundle-card:hover,
.ya-ebundle-card:focus-within {
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

/* ---------- Media ---------- */

.ya-ebundle-card__media {
	position: relative;
	aspect-ratio: 16 / 10;
	overflow: hidden;
}

.ya-ebundle-card__media picture,
.ya-ebundle-card__media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.ya-ebundle-card {
	min-width: 0;
}

/* ---------- Badge (status marker top-left) ---------- */

.ya-ebundle-card__badge {
	position: absolute;
	top: 12px;
	left: 12px;
	width: 12px;
	height: 12px;
	border-radius: 50%;
	z-index: 1;
}

.ya-ebundle-card__badge--active {
	background: var(--ya-eb-color-active);
}

.ya-ebundle-card__badge--locked {
	background: var(--ya-eb-color-locked);
}

/* ---------- Featured label (top-right) ---------- */

.ya-ebundle-card__featured-label {
	position: absolute;
	top: 12px;
	right: 0;
	padding: 4px 10px;
	background: var(--ya-eb-color-featured);
	color: var(--ya-eb-color-on-accent);
	font-size: 11px;
	font-weight: 500;
	letter-spacing: 0.3px;
	border-radius: 4px 0 0 4px;
	z-index: 1;
}

/* ---------- Title ---------- */

.ya-ebundle-card__title {
	margin: 0;
	padding: 21px 16px 0;
	font-size: 16px;
	font-weight: 600;
	line-height: 1.3;
	color: #222;
}

/* ---------- Meta (status/price + button) ---------- */

.ya-ebundle-card__meta {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 12px 16px 16px;
	margin-top: auto;
}

.ya-ebundle-card__status,
.ya-ebundle-card__price {
	font-size: 14px;
	font-weight: 500;
	line-height: 1.4;
}

.ya-ebundle-card__status {
	color: var(--ya-eb-color-active);
}

.ya-ebundle-card__price {
	color: #333;
}

/* ---------- Button ---------- */

.ya-ebundle-card__button {
	display: inline-block;
	padding: 10px 16px;
	border: none;
	border-radius: var(--ya-eb-radius);
	font-family: var(--ya-eb-font);
	font-size: 14px;
	font-weight: 600;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
	transition: opacity 0.2s ease;
}

.ya-ebundle-card__button:hover,
.ya-ebundle-card__button:focus {
	opacity: 0.88;
	text-decoration: none;
}

.ya-ebundle-card__button--active {
	background: var(--ya-eb-color-active);
	color: var(--ya-eb-color-on-accent);
}

.ya-ebundle-card__button--locked {
	background: var(--ya-eb-color-locked);
	color: var(--ya-eb-color-on-accent);
}

/* ---------- Empty state ---------- */

.ya-ebundle-grid--empty {
	display: block;
	padding: 2rem;
	text-align: center;
	color: #666;
}

/* ==========================================================================
   Articles Block
   ========================================================================== */

.ya-ebundle-articles {
	--ya-eb-articles-cols: 3;
	font-family: var(--ya-eb-font, 'Montserrat', sans-serif);
}

/* ---------- Shared byline ---------- */

.ya-ebundle-articles__hero-byline,
.ya-ebundle-articles__item-byline,
.ya-ebundle-articles__grid-byline {
	color: var(--ya-eb-color-locked, #de6800);
	font-size: 13px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	margin-top: 4px;
}

/* ---------- Shared excerpt ---------- */

.ya-ebundle-articles__hero-excerpt,
.ya-ebundle-articles__item-excerpt,
.ya-ebundle-articles__grid-excerpt {
	font-size: 14px;
	line-height: 1.5;
	color: #555;
	margin-top: 6px;
}

/* ---------- Notice (editor placeholder) ---------- */

.ya-ebundle-articles--notice {
	padding: 1.5rem;
	background: #fef3e4;
	border-left: 4px solid var(--ya-eb-color-locked, #de6800);
	color: #333;
	font-size: 14px;
}

/* ==========================================================================
   Hero-List Layout
   ========================================================================== */

.ya-ebundle-articles--hero-list {
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--ya-eb-gap, 1.5rem);
}

@media (min-width: 768px) {
	.ya-ebundle-articles--hero-list {
		grid-template-columns: 1fr 1fr;
	}
}

/* ---------- Hero ---------- */

.ya-ebundle-articles__hero-link {
	display: block;
	text-decoration: none;
	color: inherit;
}

.ya-ebundle-articles__hero-link:hover .ya-ebundle-articles__hero-title {
	text-decoration: underline;
}

.ya-ebundle-articles__hero-link:hover .ya-ebundle-articles__hero-image {
	opacity: 0.88;
}

.ya-ebundle-articles__hero-image {
	display: block;
	width: 100%;
	max-width: 100%;
	height: auto;
	aspect-ratio: 16 / 10;
	object-fit: cover;
	border-radius: var(--ya-eb-radius, 6px);
	transition: opacity 0.2s ease;
}

.ya-ebundle-articles__hero-title {
	margin: 10px 0 0;
	font-size: 22px;
	font-weight: 700;
	line-height: 1.3;
	color: #222;
}

/* ---------- List (right column) ---------- */

.ya-ebundle-articles__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.ya-ebundle-articles__item {
	display: grid;
	grid-template-columns: 80px 1fr;
	gap: 0 12px;
}

.ya-ebundle-articles__item-image-link {
	grid-row: 1;
	grid-column: 1;
}

.ya-ebundle-articles__item-image {
	display: block;
	width: 80px;
	height: 80px;
	aspect-ratio: 1 / 1;
	object-fit: cover;
	border-radius: var(--ya-eb-radius, 6px);
	transition: opacity 0.2s ease;
}

.ya-ebundle-articles__item-image-link:hover .ya-ebundle-articles__item-image {
	opacity: 0.88;
}

.ya-ebundle-articles__item-content {
	grid-row: 1;
	grid-column: 2;
	min-width: 0;
}

.ya-ebundle-articles__item-link {
	text-decoration: none;
	color: inherit;
}

.ya-ebundle-articles__item-link:hover .ya-ebundle-articles__item-title {
	text-decoration: underline;
}

.ya-ebundle-articles__item-title {
	margin: 0;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.3;
	color: #222;
}

/* ==========================================================================
   Grid Layout
   ========================================================================== */

.ya-ebundle-articles--grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--ya-eb-gap, 1.5rem);
}

@media (min-width: 768px) {
	.ya-ebundle-articles--grid {
		grid-template-columns: repeat(var(--ya-eb-articles-cols), 1fr);
	}
}

.ya-ebundle-articles__grid-link {
	display: block;
	text-decoration: none;
	color: inherit;
}

.ya-ebundle-articles__grid-link:hover .ya-ebundle-articles__grid-title {
	text-decoration: underline;
}

.ya-ebundle-articles__grid-link:hover .ya-ebundle-articles__grid-image {
	opacity: 0.88;
}

.ya-ebundle-articles__grid-image {
	display: block;
	width: 100%;
	max-width: 100%;
	height: auto;
	aspect-ratio: 16 / 10;
	object-fit: cover;
	border-radius: var(--ya-eb-radius, 6px);
	transition: opacity 0.2s ease;
}

.ya-ebundle-articles__grid-title {
	margin: 8px 0 0;
	font-size: 16px;
	font-weight: 600;
	line-height: 1.3;
	color: #222;
}
