/* MGH Notified News widget */

.mgh-notified-news {
	padding: 60px 0 0 20px;
	margin-left: auto;
	margin-right: auto;
}

.mgh-notified-news__title {
	margin: 0 0 20px;
	line-height: 1.2;
}

/* Stack track + scroll hint in one grid cell so the hint overlays the row. */
.mgh-notified-news__viewport {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	grid-template-rows: auto;
	position: relative;
}

.mgh-notified-news__track {
	grid-column: 1;
	grid-row: 1;
	min-width: 0;
	width: 100%;
	z-index: 1;
	display: flex;
	flex-direction: row;
	gap: 20px;
	overflow-x: auto;
	overflow-y: hidden;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
	-ms-overflow-style: none;
	cursor: grab;
}

.mgh-notified-news__track::-webkit-scrollbar {
	display: none;
}

.mgh-notified-news__track.is-dragging {
	cursor: grabbing;
	user-select: none;
}

/* Right-edge affordance when the row overflows (toggled via JS). */
.mgh-notified-news__scroll-hint {
	grid-column: 1;
	grid-row: 1;
	z-index: 2;
	display: flex;
	align-items: flex-start;
	justify-content: flex-end;
	min-width: 0;
	pointer-events: none;
	opacity: 0;
	transition: opacity 0.2s ease;
}

/* Match .mgh-notified-news__image-wrap height so the chevron centers on the image strip only. */
.mgh-notified-news__scroll-hint-band {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	width: auto;
	height: 186px;
	box-sizing: border-box;
	padding-right: 0.25rem;
	padding-left: 0.5rem;
}

/* Circular white nav affordance, matching the Jorato cases list card arrows. Acts as a "scroll one item" button. */
.mgh-notified-news__scroll-hint-icon {
	display: block;
	width: 40px;
	height: 40px;
	margin: 0;
	padding: 0;
	border: none;
	border-radius: 50%;
	box-shadow: 0 1px 6px rgba(0, 0, 0, 0.12);
	background-color: rgba(255, 255, 255, 0.9);
	background-image: url("../images/chevron-arrow.svg");
	background-repeat: no-repeat;
	background-position: center;
	background-size: 12px 12px;
	-webkit-appearance: none;
	appearance: none;
	cursor: pointer;
	pointer-events: none;
}

.mgh-notified-news__viewport.mgh-notified-news--overflow:not(.mgh-notified-news--scrolled-end):not(.mgh-scroll-hint-dismissed) .mgh-notified-news__scroll-hint {
	opacity: 1;
}

/* Only allow clicks on the affordance while it is actually shown. */
.mgh-notified-news__viewport.mgh-notified-news--overflow:not(.mgh-notified-news--scrolled-end):not(.mgh-scroll-hint-dismissed) .mgh-notified-news__scroll-hint-icon {
	pointer-events: auto;
}

@media (prefers-reduced-motion: reduce) {
	.mgh-notified-news__scroll-hint {
		transition: none;
	}
}

.mgh-notified-news__card {
	width: 300px;
	flex: 0 0 300px;
}

.mgh-notified-news__card-link {
	display: block;
	flex: 0 0 300px;
	color: inherit;
	text-decoration: none;
	pointer-events: auto;
}

.mgh-notified-news__card-link--clickable,
.mgh-notified-news__card--clickable,
.mgh-notified-news__card-link--clickable .mgh-notified-news__link {
	cursor: pointer;
}

.mgh-notified-news__image-wrap {
	width: 300px;
	height: 186px;
	border-radius: 8px 8px 0 0;
	overflow: hidden;
	background: #f0f0f0;
	margin-bottom: 12px;
}

.mgh-notified-news__image {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 300ms ease-out;
	transform: scale(1);
	pointer-events: none;
	user-select: none;
	-webkit-user-drag: none;
}

.mgh-notified-news__card--clickable:hover .mgh-notified-news__image,
.mgh-notified-news__card--clickable:focus-within .mgh-notified-news__image,
.mgh-notified-news__card-link:hover .mgh-notified-news__image,
.mgh-notified-news__card-link:focus .mgh-notified-news__image,
.mgh-notified-news__card-link:focus-visible .mgh-notified-news__image {
	transform: scale(1.01);
}

.mgh-notified-news__card-title {
	margin: 0 0 8px;
	color: #2c3a60;
	font-family: Poppins, sans-serif;
	font-size: 17px;
	font-weight: 600;
	line-height: 1.2;
}

.mgh-notified-news__summary {
	margin: 0 0 10px;
	color: #2c3a60;
	font-family: Poppins, sans-serif;
	font-size: 14px;
	font-weight: 300;
	line-height: 1.4;
}

.mgh-notified-news__link {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	color: #2c3a60;
	font-family: Poppins, sans-serif;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.4;
}

.mgh-notified-news__card--clickable:hover .mgh-notified-news__link,
.mgh-notified-news__card--clickable:focus-within .mgh-notified-news__link,
.mgh-notified-news__card-link:hover .mgh-notified-news__link,
.mgh-notified-news__card-link:focus .mgh-notified-news__link,
.mgh-notified-news__card-link:focus-visible .mgh-notified-news__link {
	color: #baa558;
}

.mgh-notified-news__link--muted {
	opacity: 0.75;
}

.mgh-notified-news__link-icon {
	display: inline-flex;
	width: 12px;
	height: 12px;
}

.mgh-notified-news__link-icon svg {
	width: 100%;
	height: 100%;
	display: block;
}

.mgh-notified-news__button-wrap {
	margin-top: 30px;
	text-align: left;
}

.mgh-notified-news__button {
	display: inline-block;
	background-color: var(--mgh-gold);
	color: #fff;
	font-size: 14px;
	font-family: Poppins, sans-serif;
	font-weight: 600;
	line-height: 1.4;
	padding: 15px 30px 17px 30px;
	border-radius: 8px;
	text-decoration: none;
	border: none;
	cursor: pointer;
}

.mgh-notified-news__button:hover {
	background-color: var(--mgh-gold-hover);
	color: #fff;
}

.mgh-notified-news__fallback {
	margin: 0;
	color: #4c4c4c;
	font-family: Poppins, sans-serif;
	font-size: 14px;
	line-height: 1.4;
}

@media (min-width: 1280px) {
	.mgh-notified-news {
		padding: 100px 50px 0;
	}

	.mgh-notified-news__track {
		gap: 40px;
	}

	.mgh-notified-news__card-title {
		font-size: 21px;
	}

	.mgh-notified-news__card,
	.mgh-notified-news__card-link {
		flex-basis: 324px;
	}

	.mgh-notified-news__card {
		width: 324px;
	}

	.mgh-notified-news__image-wrap {
		width: 324px;
		height: 182px;
	}

	.mgh-notified-news__scroll-hint-band {
		height: 182px;
	}

	/* Arrow stays visible on desktop (see gallery.js); keep it clickable whenever the row overflows. */
	.mgh-notified-news__viewport.mgh-notified-news--overflow .mgh-notified-news__scroll-hint-icon {
		pointer-events: auto;
	}

	.mgh-notified-news__button-wrap {
		text-align: center;
	}
}
