#day-content {
	max-width: 860px;
	margin: 0 auto 40px;
	padding: 0 16px;
}

/* Back link */
.day-back-link {
	display: inline-block;
	margin-bottom: 18px;
	color: #7ff4fe;
	font-family: 'Montserrat', sans-serif;
	font-size: 0.9rem;
	font-weight: 700;
	text-decoration: none;
}
.day-back-link:hover {
	color: #F37C01;
}
.day-back-arrow {
	font-size: 1.8rem;
	line-height: 1;
	vertical-align: -0.05em;
	display: inline-block;
	transform: scaleY(1.3);
}

/* Page heading */
#day-content h2 {
	margin: 0 0 10px;
	text-align: center;
}

/* ── PUNCH CONNECT submission CTA (opposite the back-to-calendar link) ─── */
#day-nav-row #day-connect-cta {
	justify-self: end;
	display: flex;
	flex-direction: row;
	align-items: center;
	gap: 8px;
	text-decoration: none;
	max-width: 220px;
	text-align: right;
	position: relative;
}
#day-connect-cta img {
	width: 50px;
	height: auto;
	display: block;
	flex-shrink: 0;
}
#day-connect-cta span {
	color: #7ff4fe;
	font-family: 'Montserrat', sans-serif;
	font-size: 0.8rem;
	font-weight: 700;
	line-height: 1.15;
}
#day-connect-cta:hover span {
	color: #F37C01;
}
#day-connect-new-badge {
	position: absolute;
	top: -23px;
	right: 53px;
	width: 48px;
	height: auto;
	transform: rotate(30deg);
}

/* ── Date + prev/next navigation ────────────────────────── */
#day-date-nav {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 16px;
	margin: 0;
}

/* Back link (left) + date nav (centered) on one row */
#day-nav-row {
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	align-items: center;
	margin-top: 28px;
	margin-bottom: 24px;
}
#day-nav-row .day-back-link {
	justify-self: start;
	margin-bottom: 0;
}
#day-date-display {
	font-family: 'Montserrat', sans-serif;
	font-size: 1.3rem;
	font-weight: 700;
	color: #ddd;
	min-width: 180px;
	text-align: center;
}
.day-nav-arrow {
	background: none;
	border: none;
	color: #7ff4fe;
	font-size: 2.2rem;
	font-weight: 700;
	line-height: 1;
	margin-bottom: 4px;
	cursor: pointer;
	padding: 0 6px;
	transition: color .2s;
}
.day-nav-arrow:hover {
	color: #F37C01;
}

/* ── Media placeholders ─────────────────────────────────── */
.day-media-row {
	display: flex;
	gap: 16px;
	margin-bottom: 16px;
}
.day-media-placeholder {
	flex: 1 1 0;
	aspect-ratio: 1 / 1;
	background: #071e25;
	border: 2px dashed #3a6070;
	border-radius: 10px;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	color: #3a6070;
	font-family: 'Montserrat', sans-serif;
	font-size: 1.05rem;
	font-weight: 700;
	padding: 0 5px;
}
.day-media-row .day-media-placeholder:first-child {
	position: relative;
	overflow: hidden;
}
.day-media-placeholder.hv-has-image {
	background: #000;
	border-style: solid;
}

/* ── Helioviewer image + caption ────────────────────────── */
.sv-img-container {
	position: absolute;
	inset: 0;
}
.svimg {
	width: 100%;
	height: 100%;
	object-fit: contain;
	cursor: pointer;
	display: block;
	border-radius: 8px;
}
.svcap {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	background: rgba(0, 0, 0, 0.65);
	text-align: center;
	padding: 5px 8px;
	border-radius: 0 0 8px 8px;
}
.svcap p {
	margin: 0;
	color: #ccc;
	font-size: 0.82rem;
	font-family: 'Montserrat', sans-serif;
	font-weight: 400;
}

/* ── File listing ───────────────────────────────────────── */
.day-files-section {
	margin-top: 16px;
	margin-bottom: 30px;
}
.day-files-section h3 {
	margin: 0 0 8px;
}

/* Cadence toggle (mosaic vs. trefoil), below the page title */
#day-cadence-control {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
	margin: 0 0 20px;
}

/* FITS/JP2 toggle group */
#day-files-toggle-group {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 12px;
}
.cal-toggle-label {
	font-family: 'Montserrat', sans-serif;
	font-size: 1rem;
	font-weight: 700;
	color: #888;
	transition: color .2s;
	user-select: none;
}
.cal-toggle-label-active {
	color: #fff;
}
.cal-toggle-switch {
	position: relative;
	display: inline-block;
	width: 52px;
	height: 28px;
	cursor: pointer;
}
.cal-toggle-switch input {
	opacity: 0;
	width: 0;
	height: 0;
	position: absolute;
}
.cal-toggle-slider {
	position: absolute;
	inset: 0;
	background: #7ff4fe;
	border-radius: 28px;
	transition: background .25s;
}
.cal-toggle-slider::before {
	content: '';
	position: absolute;
	width: 22px;
	height: 22px;
	left: 3px;
	top: 3px;
	background: #051e24;
	border-radius: 50%;
	transition: transform .25s;
}
.cal-toggle-switch input:checked + .cal-toggle-slider::before {
	transform: translateX(24px);
}
.cal-toggle-switch:focus-within .cal-toggle-slider {
	outline: 2px solid #F37C01;
	outline-offset: 2px;
}
.day-files-box {
	background: #071e25;
	border: 2px solid #3a6070;
	border-radius: 10px;
	max-height: 320px;
	overflow-y: auto;
	padding: 6px 14px;
	margin-bottom: 5px;
}
.day-files-list {
	list-style: none;
	margin: 0;
	padding: 0;
	font-family: 'Courier New', Courier, monospace;
	font-size: 0.85rem;
}
.day-files-list li {
	padding: 5px 0;
	border-bottom: 1px solid #0f2e38;
	color: #bbb;
}
.day-files-list li:last-child {
	border-bottom: none;
}
.day-files-list a {
	color: #7ff4fe;
	text-decoration: none;
}
.day-files-list a:hover {
	color: #F37C01;
}
.day-no-data {
	color: #ddd;
	font-style: normal;
	font-family: 'Source Sans Pro', sans-serif;
	padding: 12px 0;
}
.day-loading {
	color: #7ff4fe;
	font-style: italic;
	padding: 12px 0;
	opacity: 0.6;
}

/* ── NASA directory link ────────────────────────────────── */
.day-dir-link {
	display: inline-block;
	margin-top: 0px;
	font-size: 0.82rem;
	color: #7ff4fe;
	text-decoration: none;
	margin-left: 15px;
	/* font-family: 'Courier New', Courier, monospace; */
}
.day-dir-link:hover {
	color: #F37C01;
}

/* ── Halo CME table ─────────────────────────────────────── */
.day-cme-wrap {
	overflow-x: auto;
	border: 1px solid #3a6070;
	margin-bottom: 5px;
	border-radius: 6px;
	background: #071e25;
}
.day-cme-table {
	border-collapse: collapse;
	font-size: 0.82rem;
	white-space: nowrap;
	width: 100%;
}
.day-cme-table th {
	background: #0f2e38;
	color: #aaa;
	font-weight: 700;
	text-align: left;
	padding: 6px 10px;
	border-bottom: 1px solid #3a6070;
	border-right: 1px solid #1a3a45;
}
.day-cme-table th:last-child { border-right: none; }
.day-cme-table td {
	color: #ddd;
	padding: 6px 10px;
	border-right: 1px solid #0f2e38;
	vertical-align: top;
}
.day-cme-table td:last-child { border-right: none; }
.day-cme-table tbody tr:nth-child(even) td { background: #091e25; }

/* ── K-Cor external link ────────────────────────────────── */
.day-kcor-link {
	color: #7ff4fe;
	text-decoration: none;
}
.day-kcor-link:hover {
	color: #F37C01;
}

/* ── Helioviewer no-image state ─────────────────────────── */
.sv-no-image {
	color: #7a9aa8;
	font-style: italic;
	text-align: center;
	padding: 16px;
	font-size: 0.95rem;
	padding: 0 10px;
}
.sv-no-image p {
	margin: 0;
}

/* ── Responsive ─────────────────────────────────────────── */
@media screen and (max-width: 790px) {
	#day-nav-row {
		display: grid;
		grid-template-columns: 1fr 1fr;
		grid-template-areas:
			"back connect"
			"nav  nav";
		align-items: center;
		row-gap: 8px;
		column-gap: 8px;
	}
	#day-nav-row .day-back-link {
		grid-area: back;
		justify-self: start;
		margin-bottom: 0;
	}
	#day-nav-row #day-connect-cta {
		grid-area: connect;
		justify-self: end;
	}
	#day-nav-row #day-date-nav {
		grid-area: nav;
		justify-self: center;
	}
}

@media screen and (max-width: 440px) {
	#day-nav-row {
		display: flex;
		flex-direction: column;
		align-items: center;
		gap: 8px;
	}
	#day-nav-row .day-back-link {
		align-self: flex-start;
		margin-bottom: 0;
		order: 2;
	}
	#day-nav-row #day-connect-cta {
		align-self: flex-end;
		order: 1;
	}
	#day-nav-row #day-date-nav {
		order: 3;
	}
}

.day-type-subtitle {
	color: #fff;
	font-family: 'Source Sans Pro', sans-serif;
	margin: -4px 0 0 0;
	font-size: 0.95rem;
	text-align: center;
	margin-bottom: 50px;
}

@media screen and (max-width: 700px) {
	.day-media-row {
		flex-direction: column;
	}
	.day-media-placeholder {
		flex: 0 0 auto;
		width: 100%;
		aspect-ratio: 1 / 1;
	}
}
