/* ChamberMate News Shortcode */
.chambermate-news-posts {
	width: min(100%, 860px);
	margin: clamp(2rem, 5vw, 4rem) auto 0;
	display: grid;
	gap: 1.5rem;
}

.chambermate-news-post {
	background: var(--wp--preset--color--base, #fff);
	border: 1px solid color-mix(in srgb, var(--wp--preset--color--contrast, #000) 8%, transparent);
	border-radius: 18px;
	padding: clamp(1.25rem, 3vw, 2rem);
	box-shadow: 0 12px 32px color-mix(in srgb, var(--wp--preset--color--contrast, #000) 6%, transparent);
	/* Keep anchored posts clear of the sticky site header (172px tall on desktop, 2026-11-02). */
	scroll-margin-top: 12rem;
}

.chambermate-news-post:target {
	border-color: var(--wp--preset--color--primary, currentColor);
}

.chambermate-news-header {
	display: flex;
	gap: 1rem;
	align-items: flex-start;
	margin-bottom: 1.25rem;
}

.chambermate-news-heading {
	min-width: 0;
}

.chambermate-news-logo {
	flex: none;
	width: 64px;
	height: 64px;
	object-fit: contain;
	border-radius: 12px;
	border: 1px solid color-mix(in srgb, var(--wp--preset--color--contrast, #000) 8%, transparent);
	background: #fff;
}

.chambermate-news-title {
	margin: 0 0 0.5rem;
	font-size: clamp(1.35rem, 2.5vw, 1.9rem);
	line-height: 1.2;
}

.chambermate-news-company {
	display: inline-flex;
	align-items: center;
	width: fit-content;
	margin: 0 0 0.5rem;
	padding: 0.35rem 0.7rem;
	border-radius: 999px;
	background: var(--wp--preset--color--quaternary, #e5e8ec);
	font-size: 0.9rem;
	font-weight: 700;
	line-height: 1.2;
}

.chambermate-news-meta {
	margin: 0;
	font-size: 0.9rem;
	line-height: 1.4;
	color: color-mix(in srgb, var(--wp--preset--color--contrast, #000) 70%, transparent);
}

.chambermate-news-footer {
	margin-top: 1.25rem;
	padding-top: 1rem;
	border-top: 1px solid color-mix(in srgb, var(--wp--preset--color--contrast, #000) 8%, transparent);
	font-size: 0.9rem;
	line-height: 1.4;
}

.chambermate-news-permalink {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	color: color-mix(in srgb, var(--wp--preset--color--contrast, #000) 70%, transparent);
	text-decoration: underline;
	text-underline-offset: 0.2em;
}

.chambermate-news-permalink:hover,
.chambermate-news-permalink:focus-visible {
	color: var(--wp--preset--color--primary, inherit);
}

.chambermate-news-permalink-icon {
	flex: none;
}

.chambermate-news-description {
	font-size: 1rem;
	line-height: 1.65;
}

.chambermate-news-more > summary {
	display: inline-block;
	cursor: pointer;
	font-weight: 700;
	text-decoration: underline;
	text-decoration-thickness: 2px;
	text-underline-offset: 0.2em;
	color: var(--wp--preset--color--primary, inherit);
	list-style: none;
}

.chambermate-news-more > summary::-webkit-details-marker {
	display: none;
}

.chambermate-news-more > summary:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 4px;
}

/* Once opened, the rest of the post just reads on. */
.chambermate-news-more[open] > summary {
	display: none;
}

.chambermate-news-more > *:last-child {
	margin-bottom: 0;
}

.chambermate-news-description > *:first-child {
	margin-top: 0;
}

.chambermate-news-description > *:last-child {
	margin-bottom: 0;
}

.chambermate-news-description h3 {
	margin: 1.5rem 0 0.75rem;
	font-size: clamp(1.15rem, 2vw, 1.35rem);
	line-height: 1.3;
}

.chambermate-news-description p {
	margin-bottom: 1rem;
}

.chambermate-news-description a {
	text-decoration-thickness: 2px;
	text-underline-offset: 0.2em;
}

.chambermate-news-description img {
	max-width: 100%;
	height: auto;
	border-radius: 12px;
	margin: 1rem 0;
}

.chambermate-news-description ul,
.chambermate-news-description ol {
	padding-left: 1.35rem;
	margin-bottom: 1rem;
}

/* Mobile polish */
@media (max-width: 600px) {
	.chambermate-news-posts {
		width: 100%;
	}

	.chambermate-news-post {
		border-radius: 14px;
		padding: 1.25rem;
	}

	.chambermate-news-company {
		font-size: 0.85rem;
	}

	.chambermate-news-logo {
		width: 48px;
		height: 48px;
	}
}
/* ChamberMate Events */
.chambermate-events {
	width: min(100%, 960px);
	margin: clamp(2rem, 5vw, 4rem) auto 0;
	--cm-line: color-mix(in srgb, var(--wp--preset--color--contrast, #000) 8%, transparent);
	--cm-muted: color-mix(in srgb, var(--wp--preset--color--contrast, #000) 70%, transparent);
}

.chambermate-events [hidden] {
	display: none !important;
}

.chambermate-events .screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.chambermate-events-filters {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin-bottom: 2rem;
}

.chambermate-events-filters button {
	padding: 0.5rem 1rem;
	border: 1px solid var(--cm-line);
	border-radius: 999px;
	background: var(--wp--preset--color--base, #fff);
	color: inherit;
	font: inherit;
	font-size: 0.95rem;
	font-weight: 700;
	line-height: 1.2;
	cursor: pointer;
}

.chambermate-events-filters button:hover {
	border-color: var(--wp--preset--color--primary, currentColor);
}

.chambermate-events-filters button[aria-pressed="true"] {
	background: var(--wp--preset--color--primary, #1f3a68);
	border-color: var(--wp--preset--color--primary, #1f3a68);
	color: var(--wp--preset--color--base, #fff);
}

.chambermate-events-filters button:focus-visible {
	outline: 2px solid var(--wp--preset--color--primary, currentColor);
	outline-offset: 3px;
}

.chambermate-events-month + .chambermate-events-month {
	margin-top: clamp(2rem, 4vw, 3rem);
}

.chambermate-events-month-title {
	margin: 0 0 1rem;
	font-size: clamp(1.35rem, 2.5vw, 1.75rem);
	line-height: 1.2;
}

.chambermate-event {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr) auto;
	gap: clamp(1rem, 2.5vw, 1.5rem);
	align-items: start;
	background: var(--wp--preset--color--base, #fff);
	border: 1px solid var(--cm-line);
	border-radius: 18px;
	padding: clamp(1.25rem, 3vw, 1.75rem);
	box-shadow: 0 12px 32px color-mix(in srgb, var(--wp--preset--color--contrast, #000) 6%, transparent);
	/* Keep anchored events clear of the sticky site header (172px tall on desktop, 2026-11-02). */
	scroll-margin-top: 12rem;
}

.chambermate-event + .chambermate-event {
	margin-top: 1rem;
}

.chambermate-event:target {
	border-color: var(--wp--preset--color--primary, currentColor);
}

.chambermate-event-date {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	width: 4.5rem;
	padding: 0.6rem 0;
	border-radius: 12px;
	background: var(--wp--preset--color--quaternary, #e5e8ec);
	line-height: 1;
	text-align: center;
}

.chambermate-event-date-month {
	font-size: 0.85rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

.chambermate-event-date-day {
	margin-top: 0.3rem;
	font-size: 1.75rem;
	font-weight: 700;
}

.chambermate-event-type {
	margin: 0 0 0.35rem;
	font-size: 0.85rem;
	font-weight: 700;
	color: var(--cm-muted);
}

.chambermate-event-title {
	margin: 0 0 0.75rem;
	font-size: clamp(1.2rem, 2.2vw, 1.5rem);
	line-height: 1.25;
}

.chambermate-event-details {
	display: grid;
	gap: 0.35rem;
	margin: 0 0 1rem;
	font-size: 0.95rem;
	line-height: 1.45;
}

.chambermate-event-details > div {
	display: grid;
	grid-template-columns: 4rem minmax(0, 1fr);
	gap: 0.5rem;
}

.chambermate-event-details dt {
	font-weight: 700;
}

.chambermate-event-details dd {
	margin: 0;
}

.chambermate-event-description {
	font-size: 1rem;
	line-height: 1.65;
}

.chambermate-event-description > *:first-child {
	margin-top: 0;
}

.chambermate-event-description p {
	margin: 0 0 1rem;
}

.chambermate-event-description h3 {
	margin: 1.25rem 0 0.5rem;
	font-size: 1.1rem;
}

.chambermate-event-description img {
	max-width: 100%;
	height: auto;
	border-radius: 12px;
}

.chambermate-event-description a {
	text-decoration-thickness: 2px;
	text-underline-offset: 0.2em;
	overflow-wrap: anywhere;
}

.chambermate-event-link {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	align-items: center;
	margin: 1rem 0 0;
}

.chambermate-event-link a {
	display: inline-block;
	padding: 0.65rem 1.1rem;
	border-radius: 999px;
	background: var(--wp--preset--color--primary, #1f3a68);
	color: var(--wp--preset--color--base, #fff);
	font-weight: 700;
	line-height: 1.2;
	text-decoration: none;
}

.chambermate-event-link a:hover,
.chambermate-event-link a:focus-visible {
	text-decoration: underline;
	text-underline-offset: 0.2em;
}

/* Secondary: the organizer's own page. */
.chambermate-event-link .chambermate-event-learn-more {
	background: transparent;
	color: var(--wp--preset--color--primary, #1f3a68);
	box-shadow: inset 0 0 0 2px currentColor;
}

.chambermate-event-sold-out {
	display: inline-block;
	padding: 0.65rem 1.1rem;
	border-radius: 999px;
	background: var(--wp--preset--color--quaternary, #e5e8ec);
	font-weight: 700;
	line-height: 1.2;
}

/* Most event images are flyers with text on them, so they keep their own shape instead of being cropped. */
.chambermate-event-image {
	width: 200px;
	height: auto;
	border-radius: 12px;
	border: 1px solid var(--cm-line);
}

@media (max-width: 760px) {
	.chambermate-event {
		grid-template-columns: auto minmax(0, 1fr);
	}

	.chambermate-event-image {
		grid-column: 1 / -1;
		grid-row: 1;
		width: auto;
		max-width: 100%;
		max-height: 320px;
	}
}

@media (max-width: 480px) {
	.chambermate-event {
		grid-template-columns: minmax(0, 1fr);
		border-radius: 14px;
	}

	.chambermate-event-date {
		flex-direction: row;
		gap: 0.4rem;
		width: fit-content;
		padding: 0.45rem 0.75rem;
	}

	.chambermate-event-date-day {
		margin-top: 0;
		font-size: 1rem;
	}
}
