/**
 * GMcal Calendar Styles.
 *
 * Uses GM brand tokens (Indigo+Honey palette for web).
 * Overrides FullCalendar defaults for GM look and feel.
 */

/* ── Layout ── */

.gmcal-wrap {
	max-width: 1200px;
	margin: 0 auto;
	padding: 20px;
	font-family: 'Source Serif 4', Georgia, serif;
}

/* ── Toolbar ── */

.gmcal-toolbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 12px;
	margin-bottom: 20px;
	padding: 12px 16px;
	background: #F8F5EC; /* CREAM */
	border: 1px solid #E8D5AD; /* CREAM_DIM */
	border-radius: 8px;
}

.gmcal-toolbar-left,
.gmcal-toolbar-right {
	display: flex;
	gap: 6px;
}

.gmcal-title {
	font-family: 'Playfair Display', Georgia, serif;
	font-size: 1.3rem;
	color: #2B2D5E; /* FOREST_MID / Indigo */
	margin: 0;
}

.gmcal-btn,
.gmcal-view-btn {
	padding: 6px 14px;
	border: 1px solid #2B2D5E;
	border-radius: 6px;
	background: transparent;
	color: #2B2D5E;
	font-family: inherit;
	font-size: 0.85rem;
	cursor: pointer;
	transition: background 0.15s, color 0.15s;
}

.gmcal-btn:hover,
.gmcal-view-btn:hover {
	background: #2B2D5E;
	color: #F8F5EC;
}

.gmcal-view-btn.active {
	background: #2B2D5E;
	color: #D4A84B; /* GOLD_BRIGHT / Honey */
	border-color: #D4A84B;
}

/* ── FullCalendar Overrides ── */

.fc {
	--fc-border-color: #E8D5AD;
	--fc-today-bg-color: rgba(212, 168, 75, 0.08);
	--fc-event-border-color: transparent;
	--fc-page-bg-color: #FAFAF0;
}

.fc .fc-daygrid-day-number {
	color: #1A0E05; /* INK */
	font-size: 0.9rem;
}

.fc .fc-col-header-cell-cushion {
	color: #2B2D5E;
	font-weight: 600;
	text-transform: uppercase;
	font-size: 0.75rem;
	letter-spacing: 0.05em;
}

.fc .fc-event {
	border-radius: 4px;
	padding: 2px 6px;
	font-size: 0.82rem;
	cursor: pointer;
	transition: transform 0.1s, box-shadow 0.1s;
}

.fc .fc-event:hover {
	transform: translateY(-1px);
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.fc .fc-daygrid-more-link {
	color: #D4A84B;
	font-weight: 600;
}

/* ── Detail Panel ── */

.gmcal-detail {
	position: fixed;
	right: 0;
	top: 0;
	width: 400px;
	max-width: 90vw;
	height: 100vh;
	background: #FAFAF0;
	border-left: 3px solid #D4A84B;
	box-shadow: -4px 0 24px rgba(0, 0, 0, 0.1);
	padding: 32px 24px;
	overflow-y: auto;
	z-index: 9999;
	transition: transform 0.2s ease;
}

.gmcal-detail-close {
	position: absolute;
	top: 12px;
	right: 16px;
	background: none;
	border: none;
	font-size: 1.5rem;
	color: #1A0E05;
	cursor: pointer;
	line-height: 1;
}

.gmcal-detail-title {
	font-family: 'Playfair Display', Georgia, serif;
	font-size: 1.4rem;
	color: #2B2D5E;
	margin: 0 0 12px 0;
}

.gmcal-detail-meta {
	display: flex;
	flex-direction: column;
	gap: 4px;
	font-size: 0.9rem;
	color: #4A4E8A;
	margin-bottom: 16px;
}

.gmcal-detail-description {
	font-size: 0.95rem;
	line-height: 1.6;
	color: #1A0E05;
	margin-bottom: 20px;
}

.gmcal-detail-rsvp {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 16px;
	background: #F0EEE9;
	border-radius: 8px;
	margin-bottom: 20px;
}

.gmcal-detail-rsvp-count {
	font-size: 0.9rem;
	color: #2B2D5E;
}

.gmcal-rsvp-btn {
	padding: 10px 24px;
	background: #2B2D5E;
	color: #F8F5EC;
	border: 2px solid #D4A84B;
	border-radius: 8px;
	font-family: inherit;
	font-size: 0.95rem;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.15s, transform 0.1s;
}

.gmcal-rsvp-btn:hover {
	background: #D4A84B;
	color: #1A0E05;
	transform: translateY(-1px);
}

.gmcal-rsvp-btn:disabled {
	cursor: default;
	transform: none;
}

/* ── Responsive ── */

@media ( max-width: 768px ) {
	.gmcal-toolbar {
		flex-direction: column;
		align-items: stretch;
	}

	.gmcal-toolbar-left,
	.gmcal-toolbar-right {
		justify-content: center;
	}

	.gmcal-title {
		text-align: center;
		font-size: 1.1rem;
	}

	.gmcal-detail {
		width: 100vw;
		max-width: 100vw;
	}
}

/* ── Reduced Motion ── */

@media ( prefers-reduced-motion: reduce ) {
	.fc .fc-event,
	.gmcal-detail,
	.gmcal-btn,
	.gmcal-view-btn,
	.gmcal-rsvp-btn {
		transition: none;
	}

	.fc .fc-event:hover {
		transform: none;
	}
}

/* -- Filter Pills (v3.1) -- */

.gmcal-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
    padding: 12px 16px;
    background: #F8F5EC;
    border: 1px solid #E8D5AD;
    border-radius: 8px;
}

.gmcal-filter-group {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.gmcal-filter-pill {
    padding: 6px 14px;
    border: 1px solid #2B2D5E;
    border-radius: 20px;
    background: transparent;
    color: #2B2D5E;
    font-family: 'Source Serif 4', Georgia, serif;
    font-size: 0.82rem;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    min-height: 36px;
}

.gmcal-filter-pill:hover {
    background: #F0EEE9;
}

.gmcal-filter-pill.active {
    background: #2B2D5E;
    color: #D4A84B;
    border-color: #D4A84B;
}

/* -- Scroll container for list view with many events -- */

.fc-list {
    max-height: 70vh;
    overflow-y: auto;
}

/* -- Tablet-first tweaks (v3.1) -- */

@media ( min-width: 768px ) and ( max-width: 1024px ) {
    .gmcal-wrap {
        max-width: 820px;
        padding: 16px;
    }
    .gmcal-filter-pill {
        min-height: 44px;
        padding: 8px 16px;
        font-size: 0.88rem;
    }
}

@media ( max-width: 767px ) {
    .gmcal-filters {
        padding: 8px 12px;
        gap: 6px;
    }
    .gmcal-filter-pill {
        padding: 5px 10px;
        font-size: 0.78rem;
        min-height: 36px;
    }
    .gmcal-filter-group {
        gap: 4px;
    }
}
