/**
 * Events List Page Styles (Sidebar Layout)
 *
 * Matches venue directory page layout with sidebar filters
 * Uses .gsg-directory classes from gsg-public.css as base
 *
 * @package    Gay_Sauna_Guide
 * @subpackage Gay_Sauna_Guide/public/css
 * @since      1.18.0 (Phase 7)
 */

/* Main Page Container - Match venues page with dark theme */
.gsg-events-page {
	background: var(--gsg-background-dark, #1b2026);
	padding: var(--gsg-spacing-xl, 3rem) 0;
}

.gsg-events-container {
	max-width: var(--gsg-container-width, 1240px);
	margin: 0 auto;
	padding: 0 var(--gsg-spacing-md, 1.5rem);
	display: grid;
	grid-template-columns: 260px 1fr;
	gap: var(--gsg-spacing-xl, 3rem);
}

/* Mobile Filter Toggle - Inherits from .gsg-directory__filters-toggle */
/* Additional mobile-specific styling for events if needed */

/* Sidebar - Dark theme to match venues directory styling */
.gsg-events-sidebar {
	background: var(--gsg-slate-dark, #4A5663);
	border-radius: var(--gsg-radius-xs, 2px);
	padding: var(--gsg-spacing-md, 1.5rem);
	position: sticky;
	top: var(--gsg-spacing-md, 1.5rem);
	height: fit-content;
}

/* Sidebar Header */
.gsg-events-sidebar .gsg-sidebar-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: var(--gsg-spacing-md, 1.5rem);
	padding-bottom: var(--gsg-spacing-sm, 1rem);
	border-bottom: 1px solid var(--gsg-slate-light, #6B7785);
}

.gsg-events-sidebar .gsg-directory__filters-title,
.gsg-events-sidebar .gsg-sidebar-header h3 {
	margin: 0;
	font-size: 1.125rem;
	color: var(--gsg-white, #fff);
}

/* Clear Filters Link */
.gsg-events-sidebar .gsg-clear-filters,
.gsg-events-sidebar .gsg-directory__clear-filters {
	font-size: 0.875rem;
	color: var(--gsg-accent-orange, #C76B36);
	text-decoration: none;
	transition: color 0.2s;
	background: none !important;
	border: none !important;
	padding: 0 !important;
	cursor: pointer;
}

.gsg-events-sidebar .gsg-clear-filters:hover,
.gsg-events-sidebar .gsg-directory__clear-filters:hover {
	color: var(--gsg-accent-teal, #2BC1BF);
	background: none !important;
	transform: none !important;
}

/* Filter Form */
.gsg-events-sidebar .gsg-filter-group,
.gsg-events-sidebar .gsg-filter-section {
	margin-bottom: var(--gsg-spacing-md, 1.5rem);
}

.gsg-events-sidebar .gsg-filter-group h4,
.gsg-events-sidebar .gsg-filter-label {
	font-size: 0.875rem;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: var(--gsg-white, #fff);
	margin: 0 0 var(--gsg-spacing-sm, 1rem);
	font-weight: 600;
	display: flex;
	align-items: center;
	gap: var(--gsg-spacing-xs, 0.5rem);
}

/* Filter Labels - Dashicons */
.gsg-events-sidebar .gsg-filter-label .dashicons {
	font-size: 18px;
	width: 18px;
	height: 18px;
	color: var(--gsg-white, #fff);
}

/* Filter Labels - Font Awesome icons */
.gsg-events-sidebar .gsg-filter-label i {
	font-size: 16px;
	color: var(--gsg-white, #fff);
}

/* Filter Inputs */
.gsg-events-sidebar .gsg-filter-select,
.gsg-events-sidebar .gsg-filter-input {
	width: 100%;
	padding: var(--gsg-spacing-sm, 1rem);
	border: 1px solid var(--gsg-border-color, #E1E4E8);
	border-radius: var(--gsg-radius-sm, 4px);
	font-size: 0.875rem;
	color: var(--gsg-primary-dark, #121316);
	background: var(--gsg-white, #fff);
	transition: border-color 0.2s;
}

.gsg-events-sidebar .gsg-filter-select:focus,
.gsg-events-sidebar .gsg-filter-input:focus {
	outline: none;
	border-color: var(--gsg-accent-teal, #2BC1BF);
}

/* Custom Date Range */
.gsg-custom-date-range {
	margin-top: 12px;
}

.gsg-filter-sublabel {
	display: block;
	margin-top: 12px;
	margin-bottom: 6px;
	font-size: 13px;
	font-weight: 600;
	color: var(--gsg-white, #fff);
}

/* Filter Search with Dashicons */
.gsg-events-sidebar .gsg-filter-search .dashicons {
	position: absolute;
	right: 12px;
	top: 50%;
	transform: translateY(-50%);
	color: var(--gsg-primary-gray, #8E99A6);
	pointer-events: none;
	font-size: 18px;
	width: 18px;
	height: 18px;
}

.gsg-events-sidebar .gsg-filter-search .gsg-filter-input {
	padding-right: 2.5rem;
}

/* Apply Filters Button - Match venues page dark theme (cyan-bright not teal!) */
.gsg-events-sidebar .gsg-btn-apply-filters,
.gsg-events-sidebar button.gsg-btn-apply-filters,
.gsg-events-page .gsg-filter-submit {
	width: 100%;
	padding: var(--gsg-spacing-sm, 1rem) !important;
	background: var(--gsg-cyan-bright, #3ECFC4) !important;
	color: var(--gsg-primary-dark, #121316) !important;
	border: none !important;
	border-radius: var(--gsg-radius-xs, 2px) !important;
	font-size: 0.875rem !important;
	font-weight: 700 !important;
	text-transform: uppercase !important;
	letter-spacing: 0.05em !important;
	cursor: pointer !important;
	transition: opacity 0.2s !important;
	margin-top: var(--gsg-spacing-md, 1.5rem) !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	gap: 0.5rem !important;
}

.gsg-events-sidebar .gsg-btn-apply-filters:hover,
.gsg-events-sidebar button.gsg-btn-apply-filters:hover,
.gsg-events-page .gsg-filter-submit:hover {
	background: var(--gsg-cyan-bright, #3ECFC4) !important;
	opacity: 0.9 !important;
}

.gsg-events-sidebar .gsg-btn-apply-filters .dashicons,
.gsg-events-sidebar .gsg-btn-apply-filters i {
	font-size: 18px;
	width: 18px;
	height: 18px;
}

/* Main Content Area - Inherits from .gsg-directory__main */
.gsg-events-main {
	/* Additional events-specific main area styling if needed */
}

/* Results Header - Match venues page dark theme styling */
.gsg-results-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: var(--gsg-spacing-lg, 2rem);
	padding-bottom: var(--gsg-spacing-sm, 1rem);
	border-bottom: 2px solid var(--gsg-border-color, #E1E4E8);
}

.gsg-results-count {
	font-size: 1.125rem;
	font-weight: 600;
	color: var(--gsg-white, #fff);
}

.gsg-results-count strong {
	font-weight: 700;
	color: var(--gsg-white, #fff);
}

/* Loading Indicator */
.gsg-events-loading {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	padding: 60px 20px;
	font-size: 16px;
	color: var(--gsg-white, #fff);
	background: var(--gsg-slate-dark, #4A5663);
	border-radius: var(--gsg-radius-xs, 2px);
}

.gsg-spin {
	animation: spin 1s linear infinite;
}

@keyframes spin {
	from { transform: rotate(0deg); }
	to { transform: rotate(360deg); }
}

/* Events Grid */
.gsg-events-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: var(--gsg-spacing-lg, 2rem);
	margin-bottom: var(--gsg-spacing-xl, 3rem);
}

/* Responsive grid breakpoints */
@media (max-width: 1200px) {
	.gsg-events-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 768px) {
	.gsg-events-grid {
		grid-template-columns: 1fr;
	}

	.gsg-events-container {
		grid-template-columns: 1fr;
		gap: var(--gsg-spacing-lg, 2rem);
	}
}

/* Event Card - Dark theme to match venue cards */
.gsg-event-card {
	background: var(--gsg-slate-medium, #53616D);
	border-radius: var(--gsg-radius-xs, 2px);
	overflow: hidden;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	cursor: pointer;
	display: flex;
	flex-direction: column;
}

.gsg-event-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.gsg-event-card__image {
	position: relative;
	width: calc(100% - 36px);
	margin: 18px;
	padding-bottom: calc((100% - 36px) / 1.5); /* 3:2 aspect ratio (340x226) */
	overflow: hidden;
	background: var(--gsg-background-light, #f8f8f8);
	border-radius: var(--gsg-radius-xs, 2px);
}

.gsg-event-card__image img {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: var(--gsg-radius-xs, 2px);
	transition: transform 0.3s ease;
}

.gsg-event-card:hover .gsg-event-card__image img {
	transform: scale(1.05);
}

.gsg-event-card__category {
	position: absolute;
	top: 12px;
	left: 12px;
	background: var(--gsg-teal-bright, #35CCBD);
	color: var(--gsg-white, #fff);
	padding: 5px 10px;
	border-radius: var(--gsg-radius-xs, 2px);
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.gsg-event-card__content {
	padding: 18px;
	display: flex;
	flex-direction: column;
	gap: 10px;
	flex: 1;
}

.gsg-event-card__title {
	margin: 0 0 10px 0;
	padding-bottom: 10px;
	font-size: 20px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 1px;
	color: #FFFFFF;
	line-height: 1.3;
	border-bottom: 1px solid var(--gsg-white, #fff);
}

.gsg-event-card__info {
	background: #95A6B6B0;
	border: 1px solid var(--gsg-border-light, #95a6b6);
	border-radius: var(--gsg-radius-xs, 2px);
	padding: 12px;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.gsg-event-card__venue {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 14px;
	color: var(--gsg-white, #fff);
	font-weight: 500;
}

.gsg-event-card__venue .dashicons,
.gsg-event-card__venue i {
	color: var(--gsg-white, #fff);
	background: var(--gsg-orange-bright);
	font-size: 11px;
	width: 24px;
	height: 24px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	flex-shrink: 0;
	text-align: center;
	line-height: 1;
}

.gsg-event-card__city {
	color: var(--gsg-white, #fff);
}

.gsg-event-card__location {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 14px;
	color: var(--gsg-white, #fff);
	font-weight: 500;
}

.gsg-event-card__location .dashicons,
.gsg-event-card__location i {
	color: var(--gsg-white, #fff);
	background: var(--gsg-orange-bright);
	font-size: 11px;
	width: 24px;
	height: 24px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	flex-shrink: 0;
	text-align: center;
	line-height: 1;
}

.gsg-event-card__meta {
	display: flex;
	flex-direction: column;
	gap: 6px;
	font-size: 13px;
	color: var(--gsg-white, #fff);
}

.gsg-event-card__date,
.gsg-event-card__time {
	display: flex;
	align-items: center;
	gap: 5px;
}

.gsg-event-card__meta .dashicons,
.gsg-event-card__meta i {
	color: var(--gsg-white, #fff);
	background: var(--gsg-orange-bright);
	font-size: 11px;
	width: 24px;
	height: 24px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	flex-shrink: 0;
	text-align: center;
	line-height: 1;
}

.gsg-event-card__description {
	font-size: 14px;
	line-height: 1.6;
	color: var(--gsg-white, #fff);
	margin-top: auto;
}

.gsg-event-card__button {
	margin-top: auto;
	display: flex;
	justify-content: flex-start;
}

.gsg-event-card__cta {
	background-color: #35CCBD;
	color: var(--gsg-white, #fff);
	font-size: 13px;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.6px;
	border-radius: 2px 2px 2px 2px;
	padding: 11px 15px 10px 15px;
	display: inline-flex;
	align-items: center;
	gap: 4px;
	cursor: pointer;
	transition: all 0.3s ease;
	text-decoration: none;
}

.gsg-event-card__cta i {
	font-size: 11px;
}

.gsg-event-card__cta i:last-child {
	margin-left: -4px;
}

.gsg-event-card:hover .gsg-event-card__cta {
	background-color: var(--gsg-cyan-bright, #3ECFC4);
}

/* Empty State */
.gsg-events-empty {
	grid-column: 1 / -1;
	text-align: center;
	padding: 60px 30px;
	background: var(--gsg-slate-dark, #4A5663);
	border-radius: var(--gsg-radius-xs, 2px);
}

.gsg-events-empty .dashicons {
	font-size: 48px;
	width: 48px;
	height: 48px;
	color: var(--gsg-white, #fff);
	margin-bottom: 15px;
}

.gsg-events-empty p {
	font-size: 18px;
	color: var(--gsg-white, #fff);
	margin: 0 0 20px 0;
}

/* Pagination - Match venues page styling */
.gsg-events-pagination {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: var(--gsg-spacing-sm, 1rem);
	margin-top: var(--gsg-spacing-xl, 3rem);
	padding-top: var(--gsg-spacing-lg, 2rem);
	border-top: 1px solid var(--gsg-border-color, #E1E4E8);
}

.gsg-events-pagination .gsg-pagination-btn,
.gsg-events-pagination button.gsg-pagination-btn {
	display: inline-flex !important;
	align-items: center !important;
	gap: var(--gsg-spacing-xs, 0.5rem) !important;
	padding: var(--gsg-spacing-sm, 1rem) var(--gsg-spacing-md, 1.5rem) !important;
	background: var(--gsg-white, #fff) !important;
	border: 1px solid var(--gsg-border-color, #E1E4E8) !important;
	border-radius: var(--gsg-radius-sm, 4px) !important;
	color: var(--gsg-primary-dark, #121316) !important;
	text-decoration: none !important;
	font-weight: 600 !important;
	font-size: 0.875rem !important;
	cursor: pointer !important;
	transition: all 0.2s !important;
}

.gsg-events-pagination .gsg-pagination-btn:hover,
.gsg-events-pagination button.gsg-pagination-btn:hover {
	background: var(--gsg-accent-teal, #2BC1BF) !important;
	color: var(--gsg-white, #fff) !important;
	border-color: var(--gsg-accent-teal, #2BC1BF) !important;
	transform: none !important;
	box-shadow: none !important;
}

.gsg-events-pagination .gsg-pagination-btn:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

.gsg-pagination-btn .dashicons {
	font-size: 16px;
	width: 16px;
	height: 16px;
}

.gsg-pagination-info {
	font-size: 1rem;
	color: var(--gsg-white, #fff);
	font-weight: 600;
}

/* Responsive Styles - Match venues directory mobile behavior */

@media (max-width: 768px) {
	/* Mobile filter toggle - styled like venues page with dark theme */
	.gsg-events-sidebar .gsg-directory__filters-header .gsg-directory__filters-toggle,
	.gsg-events-sidebar .gsg-directory__filters-header .gsg-mobile-filter-toggle {
		display: flex !important;
		align-items: center;
		gap: var(--gsg-spacing-sm, 1rem);
		width: 100%;
		padding: var(--gsg-spacing-md, 1.5rem) !important;
		background: var(--gsg-cyan-bright, #3ECFC4) !important;
		color: var(--gsg-primary-dark, #121316) !important;
		border: none !important;
		border-radius: var(--gsg-radius-xs, 2px);
		font-size: 1rem !important;
		font-weight: 700 !important;
		font-family: inherit;
		cursor: pointer;
		transition: all 0.2s ease;
		order: 1;
		margin-bottom: var(--gsg-spacing-sm, 1rem);
		box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
		justify-content: flex-start;
	}

	.gsg-events-sidebar .gsg-directory__filters-header .gsg-directory__filters-toggle:hover,
	.gsg-events-sidebar .gsg-directory__filters-header .gsg-mobile-filter-toggle:hover {
		opacity: 0.9;
		transform: translateY(-1px);
		box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
	}

	.gsg-events-sidebar .gsg-directory__filters-header .gsg-directory__filters-toggle:active,
	.gsg-events-sidebar .gsg-directory__filters-header .gsg-mobile-filter-toggle:active {
		transform: translateY(0);
	}

	/* Active state (when filters are open) */
	.gsg-events-sidebar .gsg-directory__filters-header .gsg-directory__filters-toggle.active,
	.gsg-events-sidebar .gsg-directory__filters-header .gsg-mobile-filter-toggle.active {
		background: var(--gsg-orange-bright, #FF6B35) !important;
		color: var(--gsg-white, #fff) !important;
	}

	.gsg-directory__filters-toggle > span:not(.dashicons),
	.gsg-mobile-filter-toggle > span:not(.dashicons) {
		flex: 1;
		text-align: left;
	}

	.gsg-directory__filters-toggle-icon {
		transition: transform 0.3s ease;
		font-size: 0.875rem !important;
		width: 20px !important;
		height: 20px !important;
	}

	.gsg-directory__filters-toggle.active .gsg-directory__filters-toggle-icon {
		transform: rotate(180deg);
	}

	/* Hide desktop title */
	.gsg-events-sidebar .gsg-directory__filters-title {
		display: none;
	}

	/* Position clear all button */
	.gsg-events-sidebar .gsg-directory__clear-filters,
	.gsg-events-sidebar .gsg-clear-filters {
		order: 2;
		width: 100%;
		text-align: center;
		padding: var(--gsg-spacing-xs, 0.5rem);
	}

	/* Hide filter form by default on mobile */
	.gsg-events-sidebar .gsg-directory__filter-form {
		max-height: 0 !important;
		overflow: hidden !important;
		opacity: 0 !important;
		transition: max-height 0.3s ease, opacity 0.3s ease !important;
		background: var(--gsg-slate-dark, #4A5663);
		border-radius: var(--gsg-radius-xs, 2px);
		padding: 0 !important;
		margin-top: 0 !important;
	}

	/* Show filter form when open */
	.gsg-events-sidebar .gsg-directory__filter-form.open {
		max-height: 2000px !important;
		overflow: visible !important;
		opacity: 1 !important;
		padding: var(--gsg-spacing-md, 1.5rem) !important;
		margin-top: var(--gsg-spacing-sm, 1rem) !important;
	}

	/* Adjust sidebar for mobile */
	.gsg-events-sidebar {
		position: static;
		padding: 0;
		background: transparent;
		margin-bottom: var(--gsg-spacing-lg, 2rem);
	}

	.gsg-events-sidebar .gsg-directory__filters-header {
		flex-wrap: wrap;
		border-bottom: none;
		padding-bottom: 0;
		margin-bottom: var(--gsg-spacing-sm, 1rem);
	}

	/* Events-specific responsive overrides */
	/* Image maintains square aspect ratio on mobile via padding-bottom */
}
