/* C434 Calendar — Public-facing CSS
   Clean, neutral styles that work alongside any WordPress theme.
   =============================================================================== */

/* ── Container ──────────────────────────────────────────────────────────────── */
.c434-public-wrap {
	font-family: inherit;
	color: inherit;
	line-height: 1.5;
	margin: 0 0 32px;
}

/* ── Loading state ───────────────────────────────────────────────────────────── */
.c434-loading {
	text-align: center;
	color: #6b7280;
	padding: 32px;
	font-style: italic;
}

/* ── Area filter buttons ─────────────────────────────────────────────────────── */
.c434-pub-area-filters,
.c434-area-filters {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 16px;
}

.c434-pub-area-btn,
.c434-area-btn {
	padding: 5px 14px;
	border-radius: 999px;
	border: 2px solid #d1d5db;
	background: #fff;
	color: #374151;
	font-size: 13px;
	font-weight: 500;
	cursor: pointer;
	transition: all .15s;
}
.c434-pub-area-btn:hover,
.c434-area-btn:hover  { border-color: #9ca3af; }

/* Active state uses the area's own color (set via --area-color CSS var) */
.c434-pub-area-btn.active {
	color: #fff;
	background: var(--area-color, #1e2a3b);
	border-color: var(--area-color, #1e2a3b);
}
.c434-area-btn.active { color: #fff; background: #1e2a3b; border-color: #1e2a3b; }

/* ── Calendar nav ────────────────────────────────────────────────────────────── */
.c434-pub-cal-header {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 12px;
}
.c434-pub-cal-month-label {
	flex: 1;
	font-size: 18px;
	font-weight: 700;
	margin: 0;
}
.c434-pub-cal-nav,
.c434-pub-nav-btn {
	padding: 6px 12px;
	border: 1px solid #d1d5db;
	border-radius: 6px;
	background: #fff;
	cursor: pointer;
	font-size: 14px;
	color: #374151;
	transition: background .15s;
}
.c434-pub-cal-nav:hover,
.c434-pub-nav-btn:hover { background: #f9fafb; }

/* ── Public calendar DOW header ──────────────────────────────────────────────── */
.c434-pub-cal-dow,
.c434-pub-grid-header {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	background: #f8fafc;
	border: 1px solid #e2e8f0;
	border-bottom: none;
	border-radius: 6px 6px 0 0;
}
.c434-pub-cal-dow > div,
.c434-pub-dow { text-align: center; padding: 8px 4px; font-size: 11px; font-weight: 700; color: #6b7280; text-transform: uppercase; }

/* ── Public calendar grid ────────────────────────────────────────────────────── */
.c434-pub-cal-grid,
.c434-pub-grid {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	gap: 1px;
	background: #e2e8f0;
	border: 1px solid #e2e8f0;
	border-radius: 0 0 6px 6px;
	overflow: hidden;
	margin-bottom: 20px;
}

.c434-pub-cal-day,
.c434-pub-day {
	background: #fff;
	min-height: 80px;
	min-width: 0;
	padding: 6px;
	overflow: hidden;
}
.c434-pub-cal-day.other-month,
.c434-pub-day.other-month { background: #f8fafc; color: #9ca3af; }
.c434-pub-cal-day.today,
.c434-pub-day.today { background: #eff6ff; }

.c434-pub-cal-day-num,
.c434-pub-day-num {
	display: block;
	font-size: 12px;
	font-weight: 600;
	color: #374151;
	margin-bottom: 3px;
}
.c434-pub-cal-day.today .c434-pub-cal-day-num,
.c434-pub-day.today .c434-pub-day-num {
	color: #2563eb;
	font-weight: 700;
}

.c434-pub-cal-event,
.c434-pub-event {
	display: block;
	font-size: 11px;
	font-weight: 500;
	padding: 2px 6px;
	border-radius: 4px;
	margin-bottom: 2px;
	white-space: normal;
	word-break: break-word;
	cursor: pointer;
	border: none;
	width: 100%;
	text-align: left;
	transition: filter .15s;
}
.c434-pub-cal-event:hover,
.c434-pub-event:hover { filter: brightness(.9); }

.c434-pub-cal-sub-label {
	display: block;
	font-size: 0.82em;
	opacity: 0.88;
	font-weight: normal;
	margin-top: 1px;
}

.c434-event-item-sub {
	font-size: 12px;
	color: #4b5563;
	margin: 1px 0 4px;
	font-style: italic;
}

/* ── Events list ─────────────────────────────────────────────────────────────── */
.c434-events-list { list-style: none; margin: 0; padding: 0; }

.c434-event-item {
	display: flex;
	gap: 16px;
	padding: 14px 0;
	border-bottom: 1px solid #f1f5f9;
	cursor: pointer;
	transition: background .15s;
}
.c434-event-item:last-child { border-bottom: none; }
.c434-event-item:hover { background: #f8fafc; border-radius: 6px; padding-left: 8px; }

.c434-event-date-col {
	flex-shrink: 0;
	width: 52px;
	text-align: center;
	background: #1e2a3b;
	color: #fff;
	border-radius: 6px;
	padding: 6px 4px;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
}
.c434-event-date-month { font-size: 10px; text-transform: uppercase; font-weight: 600; opacity: .8; }
.c434-event-date-day   { font-size: 22px; font-weight: 800; line-height: 1; }

.c434-event-info { flex: 1; min-width: 0; }
.c434-event-thumb {
	flex-shrink: 0;
	width: 64px;
	height: 64px;
	border-radius: 6px;
	object-fit: cover;
	background: #e2e8f0;
	align-self: center;
}
.c434-event-info-title {
	font-size: 15px;
	font-weight: 600;
	color: #0f172a;
	margin: 0 0 4px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.c434-event-info-meta { font-size: 12px; color: #6b7280; display: flex; gap: 10px; flex-wrap: wrap; }
.c434-event-area-badge {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	font-size: 11.5px;
	font-weight: 600;
}
.c434-event-area-dot {
	display: inline-block;
	width: 8px;
	height: 8px;
	border-radius: 50%;
}

/* ── Announcements grid ──────────────────────────────────────────────────────── */
.c434-announcements {
	display: grid;
	grid-template-columns: repeat(var(--c434-cols, 2), 1fr);
	gap: 20px;
	margin-bottom: 20px;
}

.c434-announcement-card {
	background: #fff;
	border-radius: 10px;
	overflow: hidden;
	cursor: pointer;
	box-shadow: 0 2px 8px rgba(0,0,0,.08);
	transition: box-shadow .2s, transform .2s;
}
.c434-announcement-card:hover {
	box-shadow: 0 8px 24px rgba(0,0,0,.14);
	transform: translateY(-3px);
}

/* Image area */
.c434-ann-img-wrap {
	position: relative;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	background: #1e2a3b;
}
.c434-ann-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}
.c434-ann-img-placeholder {
	width: 100%;
	height: 100%;
}

/* Area name bar between image and footer */
.c434-ann-area-bar {
	width: 100%;
	padding: 7px 14px;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .7px;
	text-align: center;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* Footer below image */
.c434-ann-footer {
	padding: 10px 14px 13px;
}
.c434-ann-title {
	font-size: 14px;
	font-weight: 700;
	color: #0f172a;
	margin: 0 0 3px;
	line-height: 1.35;
}
.c434-ann-sub-label {
	font-size: 12px;
	color: #4b5563;
	font-style: italic;
	margin: 0 0 4px;
	line-height: 1.3;
}
.c434-ann-date {
	font-size: 12px;
	color: #6b7280;
}

/* In-card schedule summary and occurrence navigation */
.c434-ann-schedule {
	font-size: 12px;
	color: #374151;
	font-weight: 600;
	margin: 0 0 4px;
}
.c434-ann-skip-note {
	font-size: 11px;
	color: #dc2626;
	font-style: italic;
	margin: 0 0 4px;
}
.c434-ann-occ-row {
	display: flex;
	align-items: center;
	gap: 4px;
	margin: 4px 0 2px;
}
.c434-ann-prev,
.c434-ann-next {
	background: none;
	border: 1px solid #d1d5db;
	border-radius: 4px;
	width: 22px;
	height: 22px;
	font-size: 15px;
	line-height: 1;
	padding: 0;
	cursor: pointer;
	color: #374151;
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
}
.c434-ann-prev:hover:not([disabled]),
.c434-ann-next:hover:not([disabled]) { background: #f3f4f6; }
.c434-ann-prev[disabled],
.c434-ann-next[disabled] { color: #d1d5db; cursor: default; }
.c434-ann-occ-date {
	flex: 1;
	font-size: 12px;
	color: #6b7280;
	text-align: center;
}
.c434-ann-nav-label {
	font-size: 11px;
	color: #9ca3af;
	margin: 0 0 2px;
	text-align: center;
}

/* ── Modal overlay ───────────────────────────────────────────────────────────── */
/* Portal modal classes (kept for compatibility) */
.c434-modal-overlay-wrap {
	position: fixed;
	inset: 0;
	z-index: 9999;
	display: flex;
	align-items: center;
	justify-content: center;
}
.c434-modal-overlay {
	position: absolute;
	inset: 0;
	background: rgba(0,0,0,.5);
}
.c434-modal-content {
	position: relative;
	background: #fff;
	border-radius: 10px;
	width: 90%;
	max-width: 540px;
	max-height: 90vh;
	overflow-y: auto;
	box-shadow: 0 20px 40px rgba(0,0,0,.2);
	z-index: 1;
}
.c434-modal-close-btn {
	position: absolute;
	top: 12px;
	right: 14px;
	background: none;
	border: none;
	font-size: 22px;
	cursor: pointer;
	color: #6b7280;
	line-height: 1;
}
.c434-modal-close-btn:hover { color: #0f172a; }
.c434-modal-inner { padding: 24px; }

.c434-modal-event-title { font-size: 20px; font-weight: 700; margin: 0 0 10px; padding-right: 28px; color: #0f172a; }
.c434-modal-event-area  { margin-bottom: 10px; }
.c434-modal-event-meta  { font-size: 13px; color: #6b7280; margin-bottom: 14px; }
.c434-modal-event-img   { width: 100%; height: auto; border-radius: 6px; margin-bottom: 14px; display: block; }
.c434-modal-event-desc  { font-size: 14px; line-height: 1.65; color: #374151; margin-bottom: 14px; }
.c434-modal-event-links { border-top: 1px solid #f1f5f9; padding-top: 12px; }
.c434-modal-event-links a { display: inline-block; color: #2563eb; text-decoration: none; margin-right: 12px; font-size: 13.5px; }
.c434-modal-event-links a:hover { text-decoration: underline; }

/* Public shortcode modal classes (used by public.js) */
.c434-pub-modal-overlay {
	position: fixed;
	inset: 0;
	z-index: 2147483647;
	display: flex;
	align-items: flex-start;
	justify-content: center;
	background: rgba(0,0,0,.5);
	overflow-y: auto;
	padding: 24px 16px;
	box-sizing: border-box;
}
.c434-pub-modal {
	position: relative;
	background: #fff;
	border-radius: 10px;
	width: 90%;
	max-width: 540px;
	flex-shrink: 0;
	overflow-y: visible;
	box-shadow: 0 20px 40px rgba(0,0,0,.2);
	padding: 24px;
}
.c434-pub-modal-close {
	position: absolute;
	top: 12px;
	right: 14px;
	background: none;
	border: none;
	font-size: 22px;
	cursor: pointer;
	color: #6b7280;
	line-height: 1;
}
.c434-pub-modal-close:hover { color: #0f172a; }
.c434-pub-event-title  { font-size: 20px; font-weight: 700; margin: 0 0 10px; padding-right: 28px; color: #0f172a; }
.c434-pub-event-area   { display: flex; align-items: center; gap: 6px; margin-bottom: 10px; }
.c434-pub-dot          { display: inline-block; width: 10px; height: 10px; border-radius: 50%; }
.c434-pub-event-meta   { font-size: 13px; color: #6b7280; margin-bottom: 14px; }
.c434-pub-event-occ-note { font-size: 13px; color: #374151; background: #f0fdf4; border-left: 3px solid #22c55e; padding: 8px 12px; border-radius: 4px; margin-bottom: 14px; }
.c434-pub-event-image  { width: 100%; max-height: 40vh; object-fit: cover; border-radius: 6px; margin-bottom: 14px; display: block; }
.c434-pub-event-desc   { font-size: 14px; line-height: 1.65; color: #374151; margin-bottom: 14px; }
.c434-pub-event-links  { list-style: none; margin: 0; padding: 0; border-top: 1px solid #f1f5f9; padding-top: 12px; }
.c434-pub-event-links a { color: #2563eb; text-decoration: none; font-size: 13.5px; }
.c434-pub-event-links a:hover { text-decoration: underline; }
.c434-pub-event-rooms  { font-size: 13px; color: #6b7280; margin-top: 10px; border-top: 1px solid #f1f5f9; padding-top: 10px; }
.c434-pub-loading { text-align: center; color: #6b7280; padding: 32px; font-style: italic; }

/* ── Pagination ──────────────────────────────────────────────────────────────── */
.c434-pub-pagination {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
	margin-top: 16px;
}
.c434-pub-page-info {
	font-size: 13px;
	color: #6b7280;
	font-weight: 500;
	min-width: 52px;
	text-align: center;
}
.c434-pub-nav-btn:disabled {
	opacity: 0.35;
	cursor: default;
}

/* ── Responsive ─────────────────────────────────────────────────────────────── */
@media (max-width: 600px) {
	.c434-announcements { grid-template-columns: 1fr !important; }
	/* Scroll the calendar horizontally rather than hiding events or clipping columns */
	.c434-pub-cal-wrap { overflow-x: auto; }
	.c434-pub-cal-dow,
	.c434-pub-cal-grid { min-width: 490px; }
	.c434-event-item { gap: 10px; }
}
