/* =============================================================
   Parish Events Manager — Public Calendar  (larger, bold layout)
   ============================================================= */

/* ---- Wrapper ---- */
.pem-pub-wrap {
	font-family: inherit;
	color: inherit;
	max-width: 1300px;
	margin: 0 auto;
}

/* ---- Header bar ---- */
.pem-pub-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 14px;
	margin-bottom: 24px;
	padding-bottom: 16px;
	border-bottom: 3px solid #c9a84c;
}

.pem-pub-title {
	margin: 0 !important;
	font-size: 1.9rem !important;
	font-weight: 800 !important;
	color: #1a3a54 !important;
	letter-spacing: .01em;
}

.pem-pub-select {
	border: 1.5px solid #c9a84c;
	border-radius: 8px;
	padding: 10px 16px;
	font-size: 1rem;
	background: #fff;
	cursor: pointer;
	color: #1a3a54;
	min-width: 200px;
	font-weight: 600;
}
.pem-pub-select:focus { outline: 2px solid #c9a84c; outline-offset: 2px; }

/* ---- Two-column body ---- */
.pem-pub-body {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 360px;
	gap: 28px;
	align-items: start;
}

@media (max-width: 960px) {
	.pem-pub-body { grid-template-columns: 1fr; }
	.pem-pub-panel { position: static; }
}

/* ---- Calendar column ---- */
.pem-pub-cal-col { min-width: 0; }

/* ---- FullCalendar core overrides ---- */
#pem-public-calendar {
	font-size: 1rem;
}
#pem-public-calendar .fc-theme-standard td,
#pem-public-calendar .fc-theme-standard th {
	border-color: #ddd;
}
#pem-public-calendar .fc-theme-standard .fc-scrollgrid {
	border-color: #ddd;
	border-radius: 10px;
	overflow: hidden;
	box-shadow: 0 2px 16px rgba(0,0,0,.08);
}

/* Day-of-week header row */
#pem-public-calendar .fc-col-header-cell {
	background: #1a3a54;
	color: #fff;
	font-size: 0.9rem;
	font-weight: 700;
	letter-spacing: .07em;
	text-transform: uppercase;
	padding: 12px 0;
}
#pem-public-calendar .fc-col-header-cell a { color: #fff !important; }

/* Day number cells — taller */
#pem-public-calendar .fc-daygrid-day {
	min-height: 110px;
}
#pem-public-calendar .fc-daygrid-day-frame {
	min-height: 110px;
}
#pem-public-calendar .fc-daygrid-day-number {
	font-size: 1rem;
	font-weight: 600;
	color: #333;
	padding: 8px 10px;
}

/* Today highlight */
#pem-public-calendar .fc-day-today {
	background: #fffbeb !important;
}
#pem-public-calendar .fc-day-today .fc-daygrid-day-number {
	background: #c9a84c;
	color: #fff;
	border-radius: 50%;
	width: 34px;
	height: 34px;
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 6px;
	padding: 0;
	font-weight: 800;
	font-size: 1rem;
}

/* Selected date */
#pem-public-calendar .fc-day-selected {
	background: #f5f0e8 !important;
	box-shadow: inset 0 0 0 3px #c9a84c;
}

/* Event pills */
#pem-public-calendar .fc-event {
	border: none;
	border-radius: 5px;
	font-size: 0.84rem;
	font-weight: 700;
	padding: 3px 8px;
	cursor: default;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	margin-bottom: 2px;
}
#pem-public-calendar .fc-event:hover { filter: brightness(.88); }
#pem-public-calendar .fc-event-time { font-weight: 600; opacity: .85; }

/* Toolbar */
#pem-public-calendar .fc-toolbar { margin-bottom: 16px; }
#pem-public-calendar .fc-toolbar-title {
	font-size: 1.35rem !important;
	font-weight: 800;
	color: #1a3a54;
}
#pem-public-calendar .fc-button {
	background: #1a3a54 !important;
	border-color: #1a3a54 !important;
	border-radius: 7px !important;
	font-size: 0.88rem !important;
	font-weight: 600 !important;
	padding: 7px 14px !important;
	text-transform: capitalize;
}
#pem-public-calendar .fc-button:hover  { background: #2d2d5e !important; }
#pem-public-calendar .fc-button:focus  { box-shadow: 0 0 0 3px rgba(201,168,76,.5) !important; }
#pem-public-calendar .fc-button-active { background: #c9a84c !important; border-color: #c9a84c !important; }

/* "more" events link */
#pem-public-calendar .fc-more-link {
	font-size: 0.8rem;
	color: #c9a84c;
	font-weight: 700;
}

/* List view */
#pem-public-calendar .fc-list-event-title  { font-size: 1rem; }
#pem-public-calendar .fc-list-event-time   { font-size: 0.9rem; }
#pem-public-calendar .fc-list-day-cushion  { background: #1a3a54; color: #fff; padding: 10px 16px; }
#pem-public-calendar .fc-list-day-text,
#pem-public-calendar .fc-list-day-side-text { color: #fff !important; font-size: 0.95rem; }

/* ---- Legend ---- */
.pem-pub-legend {
	display: flex;
	flex-wrap: wrap;
	gap: 10px 22px;
	margin-top: 18px;
	padding: 14px 18px;
	background: #f9f7f3;
	border-radius: 8px;
	border: 1px solid #e8e2d8;
}
.pem-pub-legend-item {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 0.88rem;
	color: #444;
	font-weight: 500;
}
.pem-pub-legend-dot {
	width: 13px;
	height: 13px;
	border-radius: 4px;
	flex-shrink: 0;
}

/* ---- Day panel ---- */
.pem-pub-panel { position: sticky; top: 80px; }

.pem-pub-panel-inner {
	background: #fff;
	border: 1.5px solid #e0dbd0;
	border-radius: 12px;
	overflow: hidden;
	box-shadow: 0 4px 24px rgba(0,0,0,.10);
	min-height: 380px;
}

/* ---- Hint (no date selected) ---- */
.pem-pub-hint {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
	min-height: 340px;
	color: #bbb;
	font-size: 1rem;
	padding: 32px;
	margin: 0;
}
.pem-pub-hint-icon {
	font-size: 3rem;
	margin-bottom: 14px;
	opacity: .3;
}

/* ---- Day header ---- */
.pem-day-header {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 18px 20px 14px;
	background: #1a3a54;
	color: #fff;
}
.pem-day-icon  { font-size: 1.8rem; opacity: .8; flex-shrink: 0; }
.pem-day-label { font-weight: 800; font-size: 1.05rem; line-height: 1.3; }
.pem-day-sub   { font-size: 0.78rem; opacity: .6; letter-spacing: .05em; text-transform: uppercase; margin-top: 2px; }

/* ---- Empty state ---- */
.pem-day-empty {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
	padding: 44px 28px;
	color: #bbb;
	font-size: 0.95rem;
	gap: 10px;
}
.pem-day-empty::before {
	content: "—";
	font-size: 1.6rem;
	opacity: .3;
}

/* ---- Section title ---- */
.pem-day-section-title {
	font-size: 0.72rem;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: .12em;
	color: #bbb;
	padding: 16px 20px 4px;
}

/* ---- Day list ---- */
.pem-day-list { list-style: none; margin: 0; padding: 0 0 10px; }

.pem-day-item {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	padding: 13px 20px;
	border-bottom: 1px solid #f2f0eb;
	transition: background .12s;
}
.pem-day-item:last-child { border-bottom: none; }
.pem-day-item:hover { background: #faf8f4; }

.pem-day-item-dot {
	width: 12px;
	height: 12px;
	border-radius: 50%;
	background: var(--item-color, #999);
	flex-shrink: 0;
	margin-top: 5px;
}
.pem-day-item-body { flex: 1; min-width: 0; }

.pem-day-item-name {
	font-weight: 700;
	font-size: 1rem;
	color: #1a3a54;
	line-height: 1.3;
}
.pem-day-item-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 14px;
	margin-top: 4px;
}
.pem-day-item-time {
	font-size: 0.84rem;
	color: #c9a84c;
	font-weight: 700;
}
.pem-day-item-loc {
	font-size: 0.84rem;
	color: #888;
}

/* ---- Spinner ---- */
.pem-pub-loading {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 200px;
}
.pem-pub-spinner {
	width: 36px;
	height: 36px;
	border: 4px solid #ece8e0;
	border-top-color: #c9a84c;
	border-radius: 50%;
	animation: pem-spin .7s linear infinite;
}
@keyframes pem-spin { to { transform: rotate(360deg); } }

/* ---- Responsive tweaks ---- */
@media (max-width: 600px) {
	.pem-pub-title { font-size: 1.4rem !important; }
	#pem-public-calendar { font-size: 0.9rem; }
	#pem-public-calendar .fc-daygrid-day { min-height: 70px; }
	#pem-public-calendar .fc-daygrid-day-frame { min-height: 70px; }
	#pem-public-calendar .fc-toolbar-title { font-size: 1.05rem !important; }
	#pem-public-calendar .fc-button { font-size: 0.78rem !important; padding: 5px 9px !important; }
	.pem-pub-panel-inner { min-height: 260px; }
}
