/* CornishStuff Day Feed. Fonts and colours inherit from the theme. */
.csdf {
	--csdf-cols: 3;
	--csdf-gap: 24px;
	--csdf-line: #e5e5e5;
	--csdf-muted: #6b6b6b;
	--csdf-hover: #f4f4f4;
}

/* Day navigation bar */
.csdf-nav { margin: 0 0 28px; }
.csdf-nav ul {
	display: flex;
	gap: 4px;
	list-style: none;
	margin: 0;
	padding: 0;
	border-bottom: 1px solid var(--csdf-line);
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
}
.csdf-nav ul::-webkit-scrollbar { display: none; }
.csdf-nav li { flex: 0 0 auto; margin: 0; padding: 0; }
.csdf-nav li::before { display: none; }
.csdf-nav a {
	display: block;
	padding: 10px 16px;
	color: inherit;
	text-decoration: none;
	white-space: nowrap;
	border-bottom: 3px solid transparent;
	margin-bottom: -1px;
	border-radius: 6px 6px 0 0;
}
.csdf-nav a:hover { background: var(--csdf-hover); }
.csdf-nav a.is-active { font-weight: 700; border-bottom-color: currentColor; }
.csdf-nav .csdf-nav-older { margin-left: auto; }

/* Day sections */
.csdf-day { margin: 0 0 36px; }
.csdf-day-head { display: flex; align-items: center; gap: 12px; margin: 0 0 18px; }
.csdf-day-head h2 { margin: 0; font-size: 1.3rem; line-height: 1.2; }
.csdf-day-rule { flex: 1; height: 1px; background: var(--csdf-line); }
.csdf-day-date {
	font-size: .75rem;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: var(--csdf-muted);
	white-space: nowrap;
}

/* Grid and cards */
.csdf-grid {
	display: grid;
	grid-template-columns: repeat(var(--csdf-cols), minmax(0, 1fr));
	gap: var(--csdf-gap);
	list-style: none;
	margin: 0;
	padding: 0;
}
.csdf-card { margin: 0; padding: 0; }
.csdf-card::before { display: none; }
.csdf-link {
	display: flex;
	flex-direction: column;
	height: 100%;
	color: inherit;
	text-decoration: none;
}
.csdf-thumb {
	display: block;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	border-radius: 6px;
	background: #f2f2f2;
}
.csdf-thumb img,
.csdf-img--empty {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .35s ease;
}
.csdf-link:hover .csdf-thumb img { transform: scale(1.04); }
.csdf-body { display: block; padding-top: 10px; }
.csdf-label {
	display: block;
	margin-bottom: 4px;
	font-size: .72rem;
	font-weight: 600;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: var(--csdf-muted);
}
.csdf .csdf-title { margin: 0 0 6px; font-size: 1.05rem; line-height: 1.3; }
.csdf-link:hover .csdf-title { text-decoration: underline; }
.csdf-body time { font-size: .8rem; color: var(--csdf-muted); }

/* Pagination and day links */
.csdf-pagination { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 24px; }
.csdf-pagination .page-numbers {
	display: inline-block;
	min-width: 38px;
	padding: 8px 12px;
	border: 1px solid var(--csdf-line);
	border-radius: 6px;
	text-align: center;
	text-decoration: none;
	color: inherit;
}
.csdf-pagination .page-numbers.current { font-weight: 700; border-color: currentColor; }
.csdf-pagination .page-numbers.dots { border: 0; }
.csdf-daylinks {
	margin-bottom: 110px; /* clear the sticky anchor ad */
	display: flex;
	justify-content: space-between;
	gap: 12px;
	padding-top: 16px;
	border-top: 1px solid var(--csdf-line);
}
.csdf-daylinks a { color: inherit; font-weight: 600; text-decoration: none; }
.csdf-daylinks a:hover { text-decoration: underline; }
.csdf-empty { padding: 24px 0; }

/* Tablet */
@media (max-width: 1024px) {
	.csdf { --csdf-cols: 2 !important; --csdf-gap: 20px; }
}

/* Phone: one column, thumbnail beside headline */
@media (max-width: 640px) {
	.csdf { --csdf-cols: 1 !important; --csdf-gap: 0; }
	.csdf-nav a { padding: 10px 12px; }
	.csdf-nav .csdf-nav-older { margin-left: 0; }
	.csdf-card { border-bottom: 1px solid var(--csdf-line); padding: 14px 0; }
	.csdf-card:first-child { padding-top: 0; }
	.csdf-link { flex-direction: row; gap: 12px; }
	.csdf-thumb { flex: 0 0 38%; aspect-ratio: 4 / 3; }
	.csdf-body { padding-top: 0; }
	.csdf .csdf-title { font-size: 1rem; }
}

/* Brand styling: uses Avada's global colours, so it follows any changes made in Avada > Options */
.csdf {
	--csdf-accent: var(--awb-color4, #ff6d20);
	--csdf-line: var(--awb-color2, #e8edf1);
	--csdf-muted: var(--awb-color5, #63717f);
	--csdf-dark: var(--awb-color8, #191d21);
}
.csdf-nav a:hover { background: none; color: var(--csdf-accent); }
.csdf-nav a.is-active { color: var(--csdf-accent); border-bottom-color: var(--csdf-accent); }
.csdf-day-head h2 { font-weight: 700; color: var(--csdf-dark); }
.csdf-day-head h2::after { content: " //"; color: var(--csdf-accent); font-style: italic; letter-spacing: -.08em; }
.csdf-day-date { color: var(--csdf-dark); font-weight: 600; }
.csdf-label { color: var(--csdf-accent); }
.csdf .csdf-title { transition: color .2s; }
.csdf-link:hover .csdf-title { text-decoration: none; color: var(--csdf-accent); }
.csdf-pagination .page-numbers.current { background: var(--csdf-accent); border-color: var(--csdf-accent); color: #fff; }
.csdf-pagination a.page-numbers:hover { border-color: var(--csdf-accent); color: var(--csdf-accent); }
.csdf-daylinks a:hover { color: var(--csdf-accent); text-decoration: none; }
