/* ================================================================
   OCCA Upcoming Events — "This Week at OCCA" Section
   Design tokens sourced from Figma file oNWWB39kFkMoDZscvSQanJ
   (Parents Hub frame 534:868 + established OCCA design language)
   All rules scoped under .occa-upcoming-section
================================================================ */

/*
DESIGN TOKENS (Figma-sourced):
  SECTION_TITLE_FONT_FAMILY : inherit (matches site body font)
  SECTION_TITLE_FONT_SIZE   : 36px
  SECTION_TITLE_FONT_WEIGHT : 700
  SECTION_TITLE_COLOR       : #1F2937
  SECTION_TITLE_LINE_HEIGHT : 1.2

  SUBTITLE_FONT_SIZE        : 15px
  SUBTITLE_COLOR            : #6F7C8E
  SUBTITLE_LINE_HEIGHT      : 1.6

  SUBHEADING_FONT_SIZE      : 16px
  SUBHEADING_FONT_WEIGHT    : 600
  SUBHEADING_COLOR          : #374151

  SECTION_BACKGROUND        : transparent
  SECTION_PADDING_TOP       : 60px
  SECTION_PADDING_BOTTOM    : 60px

  CARD_BACKGROUND           : #ffffff
  CARD_BORDER_COLOR         : #C9A96E   (admissions gold — Figma-confirmed)
  CARD_BORDER_WIDTH         : 1px
  CARD_BORDER_RADIUS        : 8px
  CARD_PADDING              : 20px
  CARD_GAP_BETWEEN_DATE_BODY: 14px
  CARD_BOX_SHADOW           : 0 6px 24px rgba(0,0,0,0.10)
  CARDS_GRID_GAP            : 20px

  DATE_DAY_FONT_SIZE        : 28px
  DATE_DAY_FONT_WEIGHT      : 700
  DATE_DAY_COLOR            : #1F2937
  DATE_MONTH_FONT_SIZE      : 11px
  DATE_MONTH_FONT_WEIGHT    : 500
  DATE_MONTH_COLOR          : #9CA3AF
  DATE_COLUMN_MIN_WIDTH     : 44px

  CARD_TITLE_FONT_SIZE      : 15px
  CARD_TITLE_FONT_WEIGHT    : 600
  CARD_TITLE_COLOR          : #1F2937

  CARD_DESC_FONT_SIZE       : 13px
  CARD_DESC_COLOR           : #6F7C8E
  CARD_DESC_LINE_HEIGHT     : 1.6
*/

/* ----- Section ----- */
.occa-upcoming-section {
	padding: 60px 0;
	background: transparent;
}

/* ----- Header ----- */
.occa-upcoming-header {
	margin-bottom: 24px;
}

.occa-upcoming-title {
	font-family: inherit;
	font-size: 36px;
	font-weight: 700;
	color: #1F2937;
	line-height: 1.2;
	margin: 0 0 10px;
}

.occa-upcoming-subtitle {
	font-size: 15px;
	color: #6F7C8E;
	line-height: 1.6;
	margin: 0;
	max-width: 620px;
}

/* ----- Subheading ----- */
.occa-upcoming-subheading {
	font-size: 16px;
	font-weight: 600;
	color: #374151;
	margin: 0 0 20px;
}

/* ----- Empty state ----- */
.occa-upcoming-empty {
	font-size: 15px;
	color: #6F7C8E;
	margin: 0;
}

/* ----- Cards grid ----- */
.occa-upcoming-cards {
	display: grid !important;
	grid-template-columns: repeat(3, 1fr) !important;
	gap: 20px !important;
}

/* ----- Individual card ----- */
.occa-upcoming-card {
	display: flex !important;
	flex-direction: row;
	align-items: flex-start;
	gap: 14px;
	padding: 20px;
	background: #ffffff;
	border: 1px solid #C9A96E;
	border-radius: 8px;
	text-decoration: none;
	color: inherit;
	transition: box-shadow 0.2s ease, transform 0.2s ease;
	box-sizing: border-box;
}

.occa-upcoming-card:hover {
	box-shadow: 0 6px 24px rgba(0, 0, 0, 0.10);
	transform: translateY(-3px);
	text-decoration: none;
	color: inherit;
}

/* ----- Date column ----- */
.occa-upcoming-card__date {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: flex-start;
	min-width: 44px;
	flex-shrink: 0;
	padding-top: 2px;
}

.occa-upcoming-card__day {
	display: block;
	font-size: 28px;
	font-weight: 700;
	color: #1F2937;
	line-height: 1;
	letter-spacing: -0.02em;
}

.occa-upcoming-card__month {
	display: block;
	font-size: 11px;
	font-weight: 500;
	color: #9CA3AF;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	margin-top: 3px;
}

/* ----- Body column ----- */
.occa-upcoming-card__body {
	flex: 1;
	min-width: 0;
}

.occa-upcoming-card__title {
	font-size: 15px;
	font-weight: 600;
	color: #1F2937;
	margin: 0 0 6px;
	line-height: 1.4;
}

.occa-upcoming-card__desc {
	font-size: 13px;
	color: #6F7C8E;
	line-height: 1.6;
	margin: 0;
}

/* ----- Event popup (self-contained copy so widget works without the calendar shortcode) ----- */

.occa-popup {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: none;
	align-items: center;
	justify-content: center;
	padding: 20px;
}

.occa-popup.is-open {
	display: flex !important;
}

.occa-popup__overlay {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.45);
	animation: occaFadeIn 0.2s ease;
}

.occa-popup__card {
	position: relative;
	z-index: 1;
	background: #fff;
	border-radius: 12px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18);
	padding: 32px;
	width: 100%;
	max-width: 520px;
	max-height: 85vh;
	overflow-y: auto;
	animation: occaSlideUp 0.25s ease;
}

.occa-popup__close {
	position: absolute;
	top: 14px;
	right: 14px;
	background: none;
	border: none;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
	color: #9CA3AF;
	padding: 4px 8px;
	border-radius: 4px;
	transition: color 0.15s, background 0.15s;
}

.occa-popup__close:hover {
	color: #374151;
	background: #F3F4F6;
}

.occa-popup__header {
	margin-bottom: 10px;
}

.occa-popup__category-badge {
	display: inline-block;
	padding: 3px 10px;
	border-radius: 20px;
	font-size: 0.6875rem;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	background: #DFE4E8;
	color: #374151;
}

.occa-popup__title {
	font-size: 1.25rem;
	font-weight: 700;
	color: #1F2937;
	margin: 0 0 18px;
	padding-right: 20px;
	line-height: 1.3;
}

.occa-popup__meta {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin-bottom: 20px;
}

.occa-popup__meta-row {
	display: flex;
	align-items: flex-start;
	gap: 10px;
}

.occa-popup__meta-icon {
	color: #9CA3AF;
	flex-shrink: 0;
	margin-top: 1px;
}

.occa-popup__meta-text {
	font-size: 0.875rem;
	color: #4B5563;
	line-height: 1.5;
}

.occa-popup__description {
	font-size: 0.875rem;
	color: #374151;
	line-height: 1.7;
	margin-bottom: 20px;
	padding-top: 16px;
	border-top: 1px solid #EDF0F2;
}

.occa-popup__description:empty {
	display: none;
}

.occa-popup__link {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 9px 20px;
	border-radius: 6px;
	background: var(--occa-color-accent, #E27B1B);
	color: #fff;
	font-size: 0.875rem;
	font-weight: 600;
	text-decoration: none;
	transition: opacity 0.15s;
}

.occa-popup__link:hover {
	opacity: 0.88;
	text-decoration: none;
	color: #fff;
}

@keyframes occaFadeIn {
	from { opacity: 0; }
	to   { opacity: 1; }
}

@keyframes occaSlideUp {
	from { transform: translateY(16px); opacity: 0; }
	to   { transform: translateY(0);    opacity: 1; }
}

@media (max-width: 600px) {
	.occa-popup__card {
		position: fixed;
		bottom: 0;
		left: 0;
		right: 0;
		max-width: 100%;
		border-radius: 16px 16px 0 0;
		max-height: 90vh;
		animation: occaSlideUp 0.3s ease;
	}
}

/* ----- Responsive ----- */

/* Tablet: 2 columns */
@media (max-width: 1023px) and (min-width: 768px) {
	.occa-upcoming-cards {
		grid-template-columns: repeat(2, 1fr);
	}
}

/* Mobile: 1 column */
@media (max-width: 767px) {
	.occa-upcoming-section {
		padding: 40px 0;
	}

	.occa-upcoming-title {
		font-size: 27px;
	}

	.occa-upcoming-cards {
		grid-template-columns: 1fr;
	}

	.occa-upcoming-card {
		width: 100%;
	}
}
