/*
 * Wy'East Community Church Calendar — front-end styles
 * All selectors are scoped under .wyeast-calendar-wrap so nothing here
 * leaks into or is overridden by the site theme's global styles.
 * Palette: MVM brand — dark green #1A2B28, gold #8B6914, cream #FDF8EF,
 * navy #1A2E50 (used sparingly as a secondary accent), gray #555555.
 * (Variable names keep the "wyeast-" prefix from earlier versions; only
 * the color values have changed to match Mountain Veteran Ministries.)
 */

.wyeast-calendar-wrap {
	--wyeast-navy: #1A2B28;        /* MVM dark green — primary accent */
	--wyeast-navy-light: #2F4A42;  /* lighter green for hover states */
	--wyeast-gold: #8B6914;        /* MVM gold — secondary accent */
	--wyeast-tan: #FDF8EF;         /* MVM cream — soft backgrounds */
	--wyeast-tan-dark: #E4D6AD;    /* muted gold hairline for borders */
	--wyeast-ink: #2C2C2C;
	--wyeast-gray: #555555;        /* MVM gray */
	--wyeast-white: #FFFFFF;

	font-family: Georgia, 'Times New Roman', Times, serif;
	color: var(--wyeast-ink);
	width: 100%;
	max-width: 100%;
	margin: 1.5em 0;
	box-sizing: border-box;
}

.wyeast-calendar-wrap *,
.wyeast-calendar-wrap *::before,
.wyeast-calendar-wrap *::after {
	box-sizing: border-box;
}

/* Optional full-bleed breakout: [wyeast_calendar width="full"] adds this
   class so the calendar spans the browser width, ignoring the theme's
   narrower content column. Omit the attribute (or use width="normal")
   to keep the calendar inside the normal content width instead. */
.wyeast-calendar-wrap.wyeast-full-bleed {
	width: 100vw;
	max-width: 100vw;
	position: relative;
	left: 50%;
	right: 50%;
	margin-left: -50vw;
	margin-right: -50vw;
	padding: 0 clamp(16px, 4vw, 56px);
}

/* ---------- Month grid header ---------- */

.wyeast-calendar-wrap .wyeast-cal-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	background: var(--wyeast-navy);
	color: var(--wyeast-white);
	padding: 0.75em 1.25em;
	border-radius: 4px 4px 0 0;
}

.wyeast-calendar-wrap .wyeast-cal-title {
	margin: 0;
	font-size: 24px;
	font-weight: 600;
	letter-spacing: 0.02em;
	color: var(--wyeast-white);
}

.wyeast-calendar-wrap .wyeast-cal-nav {
	color: var(--wyeast-tan);
	text-decoration: none;
	font-size: 20px;
	padding: 0.25em 0.7em;
	border: 1px solid rgba(255, 255, 255, 0.35);
	border-radius: 3px;
}

.wyeast-calendar-wrap .wyeast-cal-nav:hover {
	background: rgba(255, 255, 255, 0.12);
}

/* ---------- Grid ---------- */

.wyeast-calendar-wrap .wyeast-cal-grid {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	border-left: 1px solid var(--wyeast-tan-dark);
	border-top: 1px solid var(--wyeast-tan-dark);
	background: var(--wyeast-white);
}

.wyeast-calendar-wrap .wyeast-cal-grid-header {
	border-top: none;
}

.wyeast-calendar-wrap .wyeast-cal-dayname {
	background: var(--wyeast-tan);
	text-align: center;
	font-size: 13px;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	padding: 0.65em 0;
	border-right: 1px solid var(--wyeast-tan-dark);
	border-bottom: 1px solid var(--wyeast-tan-dark);
	color: var(--wyeast-navy);
	font-weight: 700;
}

.wyeast-calendar-wrap .wyeast-cal-cell {
	min-height: 130px;
	border-right: 1px solid var(--wyeast-tan-dark);
	border-bottom: 1px solid var(--wyeast-tan-dark);
	padding: 8px 8px 10px;
	vertical-align: top;
	font-size: 13px;
}

.wyeast-calendar-wrap .wyeast-cal-cell-empty {
	background: #FAFAF7;
}

.wyeast-calendar-wrap .wyeast-cal-daynum {
	display: inline-block;
	font-size: 14px;
	font-weight: 700;
	color: var(--wyeast-gray);
	margin-bottom: 5px;
}

.wyeast-calendar-wrap .wyeast-cal-today {
	background: var(--wyeast-tan);
}

.wyeast-calendar-wrap .wyeast-cal-today .wyeast-cal-daynum {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	background: var(--wyeast-gold);
	color: var(--wyeast-white);
}

.wyeast-calendar-wrap .wyeast-cal-event-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.wyeast-calendar-wrap .wyeast-cal-event-pill {
	margin-bottom: 4px;
}

.wyeast-calendar-wrap .wyeast-cal-event-pill a {
	display: block;
	background: var(--wyeast-navy);
	color: var(--wyeast-white);
	text-decoration: none;
	border-radius: 3px;
	padding: 3px 6px;
	font-family: Arial, Helvetica, sans-serif;
	line-height: 1.35;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.wyeast-calendar-wrap .wyeast-cal-event-pill a:hover {
	background: var(--wyeast-navy-light);
}

.wyeast-calendar-wrap .wyeast-cal-time {
	font-weight: 700;
	margin-right: 4px;
	font-size: 11px;
	color: var(--wyeast-tan);
}

.wyeast-calendar-wrap .wyeast-cal-event-title {
	font-size: 12.5px;
}

/* ---------- Upcoming events list ---------- */

.wyeast-calendar-wrap.wyeast-events-list {
	width: 100%;
	max-width: 100%;
}

.wyeast-calendar-wrap .wyeast-events-ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.wyeast-calendar-wrap .wyeast-event-item {
	padding: 16px 0;
	border-bottom: 1px solid var(--wyeast-tan-dark);
}

.wyeast-calendar-wrap .wyeast-event-item:first-child {
	padding-top: 0;
}

.wyeast-calendar-wrap .wyeast-event-date-badge {
	flex: 0 0 58px;
	text-align: center;
	background: var(--wyeast-navy);
	color: var(--wyeast-white);
	border-radius: 4px;
	padding: 7px 0;
	height: fit-content;
	font-family: Arial, Helvetica, sans-serif;
}

.wyeast-calendar-wrap .wyeast-event-month {
	display: block;
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--wyeast-tan);
}

.wyeast-calendar-wrap .wyeast-event-day {
	display: block;
	font-size: 21px;
	font-weight: 700;
	line-height: 1.2;
}

.wyeast-calendar-wrap .wyeast-event-info {
	flex: 1;
}

.wyeast-calendar-wrap .wyeast-event-link {
	font-size: 19px;
	font-weight: 700;
	color: var(--wyeast-navy);
	text-decoration: none;
}

.wyeast-calendar-wrap .wyeast-event-link:hover {
	text-decoration: underline;
}

.wyeast-calendar-wrap .wyeast-event-meta {
	font-family: Arial, Helvetica, sans-serif;
	font-size: 13px;
	color: var(--wyeast-gray);
	margin-top: 3px;
}

.wyeast-calendar-wrap .wyeast-event-meta span {
	margin-right: 12px;
}

.wyeast-calendar-wrap .wyeast-meta-recurring {
	display: inline-block;
	background: var(--wyeast-tan);
	color: var(--wyeast-navy);
	border-radius: 3px;
	padding: 1px 6px;
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.wyeast-calendar-wrap .wyeast-event-excerpt {
	font-size: 14.5px;
	margin: 6px 0 0;
	color: var(--wyeast-ink);
}

.wyeast-calendar-wrap .wyeast-event-signup {
	display: inline-block;
	margin-top: 6px;
	font-family: Arial, Helvetica, sans-serif;
	font-size: 13px;
	font-weight: 700;
	color: var(--wyeast-gold);
	text-decoration: none;
	border-bottom: 2px solid var(--wyeast-gold);
}

.wyeast-calendar-wrap .wyeast-no-events {
	font-style: italic;
	color: var(--wyeast-gray);
}

/* ---------- Status badges & cancelled/postponed states ---------- */

.wyeast-calendar-wrap .wyeast-status-badge {
	display: inline-block;
	margin-left: 8px;
	font-family: Arial, Helvetica, sans-serif;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	padding: 2px 7px;
	border-radius: 3px;
	color: var(--wyeast-white);
	vertical-align: middle;
}

.wyeast-calendar-wrap .wyeast-status-cancelled {
	background: #8B1A1A;
}

.wyeast-calendar-wrap .wyeast-status-postponed {
	background: var(--wyeast-gold);
}

.wyeast-calendar-wrap .wyeast-event-cancelled .wyeast-event-link {
	text-decoration: line-through;
	color: var(--wyeast-gray);
}

.wyeast-calendar-wrap .wyeast-cal-event-pill.wyeast-cal-cancelled a {
	background: #8B1A1A !important;
	text-decoration: line-through;
}

.wyeast-calendar-wrap .wyeast-cal-status-flag {
	margin-right: 3px;
	font-size: 11px;
}

.wyeast-calendar-wrap .wyeast-meta-category {
	font-style: italic;
}

.wyeast-calendar-wrap .wyeast-meta-daterange {
	font-weight: 700;
}

/* ---------- Legend ---------- */

.wyeast-calendar-wrap .wyeast-cal-legend {
	font-family: Arial, Helvetica, sans-serif;
	font-size: 12.5px;
	color: var(--wyeast-gray);
	margin: 10px 2px 0;
}

.wyeast-calendar-wrap .wyeast-legend-item {
	margin-right: 16px;
}

.wyeast-calendar-wrap .wyeast-legend-flag {
	margin-right: 3px;
}

/* ---------- Event thumbnails in the list view ---------- */

.wyeast-calendar-wrap .wyeast-event-thumb {
	flex: 0 0 80px;
	width: 80px;
	height: 80px;
	object-fit: cover;
	border-radius: 4px;
}

/* ---------- Event rows are clickable anchors (JS modal, no post permalink) ---------- */

.wyeast-calendar-wrap .wyeast-event-row-link {
	display: flex;
	gap: 18px;
	text-decoration: none;
	color: inherit;
	cursor: pointer;
}

.wyeast-calendar-wrap .wyeast-event-row-link:hover .wyeast-event-link {
	text-decoration: underline;
}

/* ---------- Event detail modal ---------- */
/* Rendered at document body level (outside .wyeast-calendar-wrap), so
   colors are declared directly rather than via the scoped CSS variables
   above. Kept in sync with the MVM palette by hand. */

body.wyeast-modal-open {
	overflow: hidden;
}

.wyeast-modal-overlay {
	position: fixed;
	inset: 0;
	background: rgba(20, 26, 22, 0.62);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 100000;
	padding: 20px;
}

.wyeast-modal-overlay[hidden] {
	display: none;
}

.wyeast-modal-box {
	background: #FFFFFF;
	border-radius: 6px;
	max-width: 480px;
	width: 100%;
	max-height: 85vh;
	overflow-y: auto;
	padding: 28px 26px 24px;
	position: relative;
	font-family: Georgia, 'Times New Roman', Times, serif;
	color: #2C2C2C;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
	border-top: 4px solid #1A2B28;
}

.wyeast-modal-close {
	position: absolute;
	top: 10px;
	right: 14px;
	background: none;
	border: none;
	font-size: 26px;
	line-height: 1;
	cursor: pointer;
	color: #555555;
}

.wyeast-modal-close:hover {
	color: #1A2B28;
}

.wyeast-modal-title {
	margin: 0 24px 8px 0;
	font-size: 22px;
	color: #1A2B28;
}

.wyeast-modal-status {
	display: inline-block;
	font-family: Arial, Helvetica, sans-serif;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	padding: 2px 8px;
	border-radius: 3px;
	color: #fff;
	margin-bottom: 8px;
}

.wyeast-modal-status.wyeast-status-cancelled { background: #8B1A1A; }
.wyeast-modal-status.wyeast-status-postponed { background: #8B6914; }

.wyeast-modal-date {
	font-family: Arial, Helvetica, sans-serif;
	font-weight: 700;
	margin: 4px 0;
	color: #8B6914;
}

.wyeast-modal-location,
.wyeast-modal-category {
	font-family: Arial, Helvetica, sans-serif;
	font-size: 14px;
	color: #555555;
	margin: 2px 0;
}

.wyeast-modal-image {
	width: 100%;
	border-radius: 4px;
	margin: 12px 0;
}

.wyeast-modal-description {
	font-size: 15.5px;
	line-height: 1.5;
	margin-top: 12px;
}

.wyeast-modal-signup {
	display: inline-block;
	margin-top: 14px;
	font-family: Arial, Helvetica, sans-serif;
	font-size: 13px;
	font-weight: 700;
	color: #8B6914;
	text-decoration: none;
	border-bottom: 2px solid #8B6914;
}

/* ---------- Small screens ---------- */

@media (max-width: 700px) {
	.wyeast-calendar-wrap .wyeast-cal-cell {
		min-height: 72px;
		font-size: 11px;
	}
	.wyeast-calendar-wrap .wyeast-cal-event-title {
		display: none; /* show only the time on very small screens */
	}
	.wyeast-calendar-wrap .wyeast-cal-event-pill a {
		text-align: center;
	}
	.wyeast-calendar-wrap.wyeast-full-bleed {
		padding: 0 16px;
	}
}
