/*
 * Clinch Episodes: layout and carousel mechanics only.
 * Colours, fonts, sizes and spacing come from each widget's Style tab
 * (defaults point at the site's cc- global variables).
 */

.cce-featured,
.cce-browser {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.cce-featured h2,
.cce-featured h3,
.cce-featured p,
.cce-browser h2,
.cce-browser h3,
.cce-browser p {
	margin: 0;
}

.cce-featured [hidden],
.cce-browser [hidden] {
	display: none !important;
}

.cce-sr {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

.cce-icon {
	display: block;
	flex: 0 0 auto;
}

/* ---------- header row ---------- */

.cce-head {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 16px;
	padding-inline: var(--cce-edge, 0px);
}

.cce-head-title {
	display: flex;
	align-items: baseline;
	gap: 20px;
	flex-wrap: wrap;
	min-width: 0;
}

.cce-h2 {
	border-left-style: solid;
}

.cce-h2--plain {
	border-left: 0;
	padding-left: 0;
}

.cce-arrows {
	display: flex;
	gap: 8px;
}

.cce-featured .cce-arrow,
.cce-browser .cce-arrow {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	border-width: 1px;
	border-style: solid;
	border-radius: 0;
	background-color: transparent;
	line-height: 0;
	cursor: pointer;
	transition: background-color 0.2s, border-color 0.2s;
}

.cce-featured .cce-arrow[aria-disabled="true"],
.cce-browser .cce-arrow[aria-disabled="true"] {
	opacity: 0.35;
	cursor: default;
}

/* ---------- scrolling track ---------- */

.cce-viewport {
	overflow-x: auto;
	overflow-y: hidden;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	scroll-padding-inline: var(--cce-edge, 0px);
	overscroll-behavior-x: contain;
	scrollbar-width: none;
}

.cce-viewport::-webkit-scrollbar {
	display: none;
}

.cce-track {
	display: flex;
	gap: var(--cce-gap, 16px);
}

/* ---------- featured card ---------- */

.cce-featured .cce-track {
	gap: 0;
}

.cce-feat-card {
	flex: 0 0 100%;
	display: flex;
	height: var(--cce-card-h, 560px);
	scroll-snap-align: start;
	min-width: 0;
}

.cce-feat-media {
	flex: 0 0 var(--cce-media-w, 760px);
	max-width: 60%;
	overflow: hidden;
}

.cce-feat-img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center 30%;
}

.cce-feat-body {
	flex: 1 1 0;
	min-width: 0;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	gap: 24px;
}

.cce-feat-top {
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.cce-feat-meta {
	display: flex;
	align-items: center;
	gap: 12px;
}

.cce-badge {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 7px 12px;
}

.cce-badge-dot {
	width: 8px;
	height: 8px;
	border-radius: 4px;
}

.cce-feat-title a,
.cce-feat-title a:hover {
	color: inherit;
	text-decoration: none;
}

.cce-feat-summary {
	max-width: 480px;
}

.cce-feat-bottom {
	display: flex;
	flex-direction: column;
	gap: 22px;
}

.cce-feat-people,
.cce-tile-people {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.cce-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.cce-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	text-decoration: none;
	transition: background-color 0.2s;
}

.cce-ico {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 50px;
	height: 50px;
	border-radius: 25px;
	text-decoration: none;
	transition: background-color 0.2s;
}

.cce-dots {
	display: flex;
	justify-content: center;
	gap: 8px;
	padding-top: 6px;
}

.cce-featured .cce-dot {
	width: 10px;
	height: 10px;
	padding: 0;
	border: 0;
	border-radius: 5px;
	cursor: pointer;
	transition: width 0.25s, background-color 0.25s;
}

.cce-featured .cce-dot[aria-current="true"] {
	width: 28px;
}

/* ---------- search and filters ---------- */

.cce-filters {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	gap: 16px 28px;
	padding-inline: var(--cce-edge, 0px);
}

.cce-search {
	display: flex;
	align-items: center;
	gap: 10px;
	width: var(--cce-search-w, 340px);
	max-width: 100%;
	padding: 0 14px;
	border-width: 1px;
	border-style: solid;
	transition: border-color 0.2s;
}

.cce-browser .cce-search input {
	flex: 1 1 auto;
	min-width: 0;
	height: 100%;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: transparent;
	box-shadow: none;
	outline: none;
}

.cce-browser .cce-search input::placeholder {
	color: inherit;
	opacity: 0.6;
}

.cce-browser .cce-search input::-webkit-search-cancel-button {
	filter: invert(1);
}

.cce-chip-group {
	display: flex;
	flex-direction: column;
	gap: 8px;
	min-width: 0;
}

.cce-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.cce-browser .cce-chip,
.cce-browser .cce-clear {
	display: inline-flex;
	align-items: center;
	padding: 0 14px;
	border-width: 1px;
	border-style: solid;
	border-radius: 0;
	white-space: nowrap;
	cursor: pointer;
	transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}

.cce-browser .cce-clear {
	height: 36px;
}

.cce-browser .cce-chip:not([aria-pressed="true"]),
.cce-browser .cce-chip:not([aria-pressed="true"]):hover,
.cce-browser .cce-chip:not([aria-pressed="true"]):focus,
.cce-browser .cce-clear,
.cce-browser .cce-clear:hover,
.cce-browser .cce-clear:focus {
	background-color: transparent;
}

.cce-empty {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 12px;
	padding-inline: var(--cce-edge, 0px);
}

/* ---------- episode tiles ---------- */

.cce-browser .cce-track {
	padding: 10px var(--cce-edge, 0px) 4px;
}

.cce-tile {
	flex: 0 0 var(--cce-card-w, 336px);
	display: flex;
	flex-direction: column;
	text-decoration: none;
	scroll-snap-align: start;
	transition: background-color 0.2s;
}

.cce-tile:hover,
.cce-tile:focus {
	text-decoration: none;
}

.cce-tile-img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 1 / 1;
	object-fit: cover;
}

.cce-tile-date,
.cce-tile-guest,
.cce-tile-aff {
	display: block;
}

.cce-tile-people {
	gap: 3px;
}

/* ---------- latest episodes (home) ---------- */

.cce-latest {
	display: flex;
	gap: var(--cce-lt-gap, 12px);
	height: var(--cce-lt-h, 652px);
}

.cce-latest h3,
.cce-latest p {
	margin: 0;
}

.cce-lt-tile {
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	min-width: 0;
	text-decoration: none;
	transition: background-color 0.2s;
}

.cce-lt-tile:hover,
.cce-lt-tile:focus {
	text-decoration: none;
}

.cce-lt-feature {
	flex: 1 1 0;
	gap: 32px;
}

.cce-lt-top {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 20px;
}

.cce-lt-head {
	display: flex;
	flex-direction: column;
	gap: 10px;
	min-width: 0;
}

.cce-lt-small .cce-lt-head {
	gap: 6px;
}

.cce-lt-badge {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	flex: 0 0 auto;
	padding: 7px 12px;
}

.cce-lt-badge-dot {
	width: 8px;
	height: 8px;
	border-radius: 4px;
}

.cce-lt-bottom,
.cce-lt-foot {
	display: flex;
	justify-content: space-between;
	align-items: flex-end;
	gap: 24px;
}

.cce-lt-foot {
	gap: 12px;
}

.cce-lt-info {
	display: flex;
	flex-direction: column;
	gap: 14px;
	min-width: 0;
}

.cce-lt-people {
	display: flex;
	flex-direction: column;
	gap: 4px;
	min-width: 0;
}

.cce-lt-guest,
.cce-lt-aff {
	display: block;
}

.cce-lt-aff {
	opacity: 0.8;
}

.cce-lt-icons {
	display: flex;
	gap: 8px;
}

.cce-lt-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: 20px;
}

.cce-lt-photo {
	display: block;
	flex: 0 0 auto;
	object-fit: cover;
}

.cce-lt-feature .cce-lt-photo {
	width: var(--cce-lt-photo, 360px);
	height: var(--cce-lt-photo, 360px);
}

.cce-lt-small .cce-lt-photo {
	width: var(--cce-lt-photo-sm, 168px);
	height: var(--cce-lt-photo-sm, 168px);
}

.cce-lt-grid {
	flex: 1 1 0;
	min-width: 0;
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	grid-template-rows: repeat(2, minmax(0, 1fr));
	gap: var(--cce-lt-gap, 12px);
}

.cce-lt-small {
	gap: 12px;
}

@media (max-width: 1024px) {
	.cce-latest {
		flex-direction: column;
		height: auto;
	}

	.cce-lt-feature {
		flex: 0 0 auto;
		min-height: 440px;
	}

	.cce-lt-grid {
		flex: 0 0 auto;
		grid-template-rows: repeat(2, auto);
	}

	.cce-lt-small {
		min-height: 300px;
	}
}

@media (max-width: 767px) {
	/* Newest episode: date + badge, title, photo, then guest + icons. */
	.cce-lt-feature {
		flex-direction: row;
		flex-wrap: wrap;
		align-items: center;
		gap: 16px;
		min-height: 0;
	}

	.cce-lt-feature .cce-lt-top,
	.cce-lt-feature .cce-lt-head,
	.cce-lt-feature .cce-lt-bottom,
	.cce-lt-feature .cce-lt-info {
		display: contents;
	}

	.cce-lt-feature .cce-lt-date { order: 1; flex: 1 1 auto; }
	.cce-lt-feature .cce-lt-badge { order: 2; gap: 6px; padding: 5px 9px; }
	.cce-lt-feature .cce-lt-title { order: 3; width: 100%; }
	.cce-lt-feature .cce-lt-photo { order: 4; width: 100%; height: auto; aspect-ratio: 1 / 1; }
	.cce-lt-feature .cce-lt-people { order: 5; flex: 1 1 0; }
	.cce-lt-feature .cce-lt-icons { order: 6; gap: 6px; }

	.cce-lt-badge-dot {
		width: 7px;
		height: 7px;
	}

	/* Other episodes: two columns of date, title, photo, guest. */
	.cce-lt-grid {
		grid-template-rows: auto;
	}

	.cce-lt-small {
		justify-content: flex-start;
		gap: 10px;
		min-height: 0;
	}

	.cce-lt-small .cce-lt-head,
	.cce-lt-small .cce-lt-foot {
		display: contents;
	}

	.cce-lt-small .cce-lt-title { min-height: 44px; }
	.cce-lt-small .cce-lt-photo { order: 3; width: 100%; height: auto; aspect-ratio: 1 / 1; }
	.cce-lt-small .cce-lt-people { order: 4; gap: 3px; }
}

/* ---------- Spotify player ---------- */

.cce-spotify iframe,
.cce-calendar iframe {
	display: block;
	width: 100%;
	border: 0;
}

/* ---------- page password form ---------- */
.cce-pw {
	margin: 0;
}

.cce-pw-label {
	display: block;
}

.cce-pw-row {
	display: flex;
	align-items: stretch;
}

.cce-pw .cce-pw-input {
	flex: 1 1 auto;
	width: 100%;
	min-width: 0;
	margin: 0;
}

.cce-pw .cce-pw-submit {
	flex: 0 0 auto;
	margin: 0;
	cursor: pointer;
}

/* ---------- previous / next episode ---------- */

.cce-epnav {
	display: flex;
	gap: 16px;
}

.cce-epnav-card {
	flex: 1 1 0;
	min-width: 0;
	display: flex;
	align-items: center;
	gap: 18px;
	padding: 14px;
	text-decoration: none;
	transition: background-color 0.2s;
}

.cce-epnav-card:hover,
.cce-epnav-card:focus {
	text-decoration: none;
}

.cce-epnav-card--next {
	flex-direction: row-reverse;
	margin-left: auto;
}

.cce-epnav-img {
	display: block;
	flex: 0 0 auto;
	object-fit: cover;
}

.cce-epnav-text {
	display: flex;
	flex-direction: column;
	gap: 6px;
	min-width: 0;
}

.cce-epnav-card--next .cce-epnav-text {
	align-items: flex-end;
	text-align: right;
}

.cce-epnav-label {
	display: inline-flex;
	align-items: center;
	gap: 8px;
}

/* ---------- share ---------- */

.cce-share {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
}

.cce-share .cce-share-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	border: 0;
	border-radius: 50%;
	line-height: 0;
	text-decoration: none;
	cursor: pointer;
	transition: background-color 0.2s;
}

/* ---------- comments ---------- */

.cce-comments {
	display: flex;
	flex-direction: column;
	gap: 24px;
}

.cce-comment-list {
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.cce-comment-list .children {
	margin: 12px 0 0 24px;
	padding: 0;
	list-style: none;
}

.cce-comment {
	padding: 18px 20px;
}

.cce-comment-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 6px 12px;
	margin: 0 0 6px;
}

.cce-comment-text p {
	margin: 0 0 8px;
}

.cce-comments .cce-cf {
	display: flex;
	flex-direction: column;
	gap: 16px;
	margin: 0;
}

.cce-cf p {
	margin: 0;
}

.cce-cf .comment-form-comment,
.cce-cf .comment-form-author,
.cce-cf .comment-form-email {
	display: flex;
	flex-direction: column;
	gap: 7px;
}

.cce-cf .comment-form-cookies-consent {
	display: flex;
	align-items: flex-start;
	gap: 10px;
}

.cce-cf .comment-form-cookies-consent input {
	margin-top: 4px;
}

.cce-cf .comment-form-cookies-consent label {
	text-transform: none;
	letter-spacing: 0;
	font-weight: 400;
}

.cce-comments .cce-cf input[type="text"],
.cce-comments .cce-cf input[type="email"],
.cce-comments .cce-cf input[type="url"],
.cce-comments .cce-cf textarea {
	width: 100%;
	max-width: 100%;
	padding: 13px 14px;
	border-width: 1px;
	border-style: solid;
	border-radius: 0;
	box-shadow: none;
	outline: none;
}

.cce-comments .cce-cf .form-submit {
	margin: 0;
}

.cce-comments .cce-cf .cce-cf-submit {
	border: 0;
	border-radius: 0;
	cursor: pointer;
	transition: background-color 0.2s;
}

/* ---------- device visibility ---------- */

.cce-only-phone {
	display: none;
}

@media (max-width: 1024px) {
	.cce-feat-media {
		max-width: 50%;
	}
}

@media (max-width: 767px) {
	.cce-only-wide {
		display: none !important;
	}

	.cce-only-phone {
		display: inline;
	}

	.cce-head {
		align-items: center;
	}

	.cce-head-title--stack {
		flex-direction: column;
		align-items: flex-start;
		gap: 4px;
	}

	.cce-feat-card {
		flex-direction: column;
		height: auto;
	}

	.cce-feat-media {
		flex: 0 0 auto;
		max-width: none;
		aspect-ratio: 1 / 1;
	}

	.cce-feat-body,
	.cce-feat-top,
	.cce-feat-bottom {
		gap: 10px;
	}

	.cce-feat-meta {
		justify-content: space-between;
	}

	.cce-feat-meta .cce-counter {
		display: block;
	}

	.cce-feat-title {
		min-height: 1.8em;
	}

	.cce-feat-people {
		gap: 3px;
	}

	.cce-actions {
		margin-top: 6px;
	}

	.cce-btn {
		flex: 1 1 100%;
	}

	.cce-filters {
		flex-direction: column;
		align-items: stretch;
		flex-wrap: nowrap;
		gap: 14px;
	}

	.cce-search {
		width: 100%;
	}

	.cce-chips {
		flex-wrap: nowrap;
		overflow-x: auto;
		scrollbar-width: none;
		margin-inline: calc(-1 * var(--cce-edge, 0px));
		padding-inline: var(--cce-edge, 0px);
	}

	.cce-chips::-webkit-scrollbar {
		display: none;
	}

	.cce-epnav {
		flex-direction: column;
	}

	.cce-comments .cce-cf .cce-cf-submit {
		width: 100%;
	}
}
