/**
 * Events Widget Styles
 *
 * Prefix: tamuk-ev-
 * Layouts: grid, list, timeline
 *
 * @package TAMUK_Foundation
 * @since   1.0.0
 */

/* ==========================================================================
   Section & Header
   ========================================================================== */

.tamuk-ev-section {
	font-family: 'Source Sans 3', 'Source Sans Pro', sans-serif;
	color: #333;
	line-height: 1.6;
}

/* -- Page-level header block -- */
.tamuk-ev-page-header {
	background: linear-gradient(145deg, #003399 0%, #001a4d 100%);
	border-radius: 14px;
	padding: 2rem 2.5rem;
	margin-bottom: 1.5rem;
	position: relative;
	overflow: hidden;
}

/* Subtle pattern texture */
.tamuk-ev-page-header::before {
	content: '';
	position: absolute;
	inset: 0;
	background: repeating-linear-gradient(
		-45deg,
		transparent,
		transparent 28px,
		rgba(255, 255, 255, 0.018) 28px,
		rgba(255, 255, 255, 0.018) 56px
	);
	pointer-events: none;
}

.tamuk-ev-page-header-inner {
	position: relative;
	z-index: 1;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1.5rem;
}

.tamuk-ev-page-header-text {
	flex: 1;
	min-width: 0;
}

/* Legacy header — hide */
.tamuk-ev-header { display: none; }
.tamuk-ev-accent-bar { display: none; }

.tamuk-ev-heading {
	font-family: 'Cinzel', serif;
	font-weight: 700;
	font-size: 1.65rem;
	color: #fff;
	margin: 0;
	line-height: 1.25;
}

/* Gold accent under heading */
.tamuk-ev-heading::after {
	content: '';
	display: block;
	width: 50px;
	height: 3px;
	background: #FCC10F;
	border-radius: 2px;
	margin-top: 0.5rem;
}

/* -- Search inside header -- */
.tamuk-ev-search {
	position: relative;
	flex: 0 0 280px;
	max-width: 280px;
}

.tamuk-ev-search-icon {
	display: none;
}

.tamuk-ev-search-input {
	width: 100%;
	padding: 0.55rem 1rem 0.55rem 42px !important;
	font-size: 0.875rem;
	font-family: 'Source Sans 3', sans-serif;
	border: 1.5px solid #e5e7eb;
	border-radius: 9999px;
	background-color: #fff;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%239CA3AF' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: 14px center;
	background-size: 16px 16px;
	color: #333;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.tamuk-ev-search-input::placeholder {
	color: #9CA3AF;
}

.tamuk-ev-search-input:focus {
	outline: none;
	border-color: #003399;
	box-shadow: 0 0 0 3px rgba(0, 51, 153, 0.1);
}

/* ==========================================================================
   Filter Bar — scrollable row with contained pills
   ========================================================================== */

.tamuk-ev-filters {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
	margin-bottom: 1.25rem;
	padding: 0.75rem 1rem;
	background: #f8f9fb;
	border: 1px solid #e5e7eb;
	border-radius: 10px;
	position: relative;
}

.tamuk-ev-filter-pill {
	display: inline-flex;
	align-items: center;
	padding: 0.35rem 1rem;
	border: 1.5px solid #d1d5db;
	border-radius: 50px;
	background: #fff;
	color: #374151;
	font-family: 'Source Sans 3', 'Source Sans Pro', sans-serif;
	font-size: 0.8rem;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.2s ease;
	line-height: 1.4;
	white-space: nowrap;
	flex-shrink: 0;
}

.tamuk-ev-filter-pill:hover {
	background: #f0f4ff;
	border-color: #003399;
	color: #003399;
}

.tamuk-ev-filter-pill:focus-visible {
	outline: 2px solid #003399;
	outline-offset: 2px;
}

.tamuk-ev-filter-pill.is-active {
	background: #003399;
	color: #fff;
	border-color: #003399;
}

.tamuk-ev-filter-pill.is-active:hover {
	background: #002266;
	border-color: #002266;
}

/* -- "More" dropdown -- */
.tamuk-ev-filter-more {
	position: relative;
	flex-shrink: 0;
}

.tamuk-ev-filter-more-btn {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	background: #fff;
	border-style: dashed;
}

.tamuk-ev-filter-more-btn svg {
	transition: transform 0.2s ease;
}

.tamuk-ev-filter-more-btn[aria-expanded="true"] svg {
	transform: rotate(180deg);
}

.tamuk-ev-filter-dropdown {
	display: none;
	position: absolute;
	top: calc(100% + 6px);
	right: 0;
	z-index: 20;
	min-width: 200px;
	max-height: 280px;
	overflow-y: auto;
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 10px;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
	padding: 0.5rem;
}

.tamuk-ev-filter-dropdown.is-open {
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
}

.tamuk-ev-filter-dropdown-item {
	width: 100%;
	text-align: left;
	border-radius: 6px;
	border-color: transparent;
	background: transparent;
	padding: 0.45rem 0.85rem;
}

.tamuk-ev-filter-dropdown-item:hover {
	background: #f0f4ff;
	border-color: transparent;
}

.tamuk-ev-filter-dropdown-item.is-active {
	background: #003399;
	color: #fff;
	border-color: transparent;
}

/* ==========================================================================
   Shared Meta & Badges
   ========================================================================== */

.tamuk-ev-type-badge {
	display: inline-block;
	padding: 0.2rem 0.75rem;
	background: #FCC10F;
	color: #003399;
	font-size: 0.75rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	border-radius: 50px;
	line-height: 1.4;
}

.tamuk-ev-card-meta {
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
	margin-top: 0.5rem;
}

.tamuk-ev-meta-time,
.tamuk-ev-meta-location {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	font-size: 0.85rem;
	color: #666;
	line-height: 1.4;
}

.tamuk-ev-icon {
	flex-shrink: 0;
}

.tamuk-ev-details-link {
	display: inline-flex;
	align-items: center;
	gap: 0.3rem;
	margin-top: 0.75rem;
	font-size: 0.875rem;
	font-weight: 600;
	color: #003399;
	text-decoration: none;
	transition: gap 0.25s ease, color 0.25s ease;
}

.tamuk-ev-details-link:hover {
	color: #002266;
	gap: 0.6rem;
}

.tamuk-ev-details-link:focus-visible {
	outline: 2px solid #003399;
	outline-offset: 2px;
}

.tamuk-ev-arrow {
	transition: transform 0.25s ease;
}

.tamuk-ev-details-link:hover .tamuk-ev-arrow {
	transform: translateX(3px);
}

.tamuk-ev-no-events {
	text-align: center;
	color: #666;
	font-size: 1rem;
	padding: 3rem 1rem;
}

/* ==========================================================================
   Grid Layout
   ========================================================================== */

.tamuk-ev-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 1.5rem;
}

.tamuk-ev-card {
	background: #fff;
	border-radius: 8px;
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
	overflow: hidden;
	transition: transform 0.3s ease, box-shadow 0.3s ease, opacity 0.25s ease;
	opacity: 0;
	animation: tamukEvFadeInUp 0.5s ease forwards;
	animation-delay: calc(var(--card-index, 0) * 0.08s);
}

.tamuk-ev-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 8px 28px rgba(0, 0, 0, 0.14);
}

.tamuk-ev-card-image-wrap {
	position: relative;
	overflow: hidden;
}

.tamuk-ev-card-image {
	width: 100%;
	aspect-ratio: 16 / 10;
	background-size: cover;
	background-position: center;
	background-color: #e9ecef;
	transition: transform 0.4s ease;
}

.tamuk-ev-card:hover .tamuk-ev-card-image {
	transform: scale(1.04);
}

.tamuk-ev-card-image--placeholder {
	background: linear-gradient(135deg, #003399 0%, #00286E 100%);
	display: flex;
	align-items: center;
	justify-content: center;
}

.tamuk-ev-card-image--placeholder::after {
	content: '';
	display: block;
	width: 48px;
	height: 48px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.15);
}

.tamuk-ev-date-badge {
	position: absolute;
	top: 12px;
	left: 12px;
	z-index: 2;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	width: 56px;
	padding: 6px 4px;
	background: #003399;
	color: #fff;
	border-radius: 6px;
	text-align: center;
	line-height: 1;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.tamuk-ev-date-badge-month {
	font-size: 0.65rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	margin-bottom: 1px;
}

.tamuk-ev-date-badge-day {
	font-size: 1.35rem;
	font-weight: 700;
	font-family: 'Cinzel', serif;
}

.tamuk-ev-date-badge-time {
	font-size: 0.55rem;
	font-weight: 600;
	letter-spacing: 0.02em;
	opacity: 0.75;
	margin-top: 3px;
	padding-top: 3px;
	border-top: 1px solid rgba(255, 255, 255, 0.2);
	width: 100%;
}

.tamuk-ev-card-body {
	padding: 1.25rem;
}

.tamuk-ev-card-title {
	font-family: 'Cinzel', serif;
	font-size: 1.05rem;
	font-weight: 700;
	line-height: 1.3;
	margin: 0.5rem 0 0;
}

.tamuk-ev-card-title a {
	color: #003399;
	text-decoration: none;
	transition: color 0.2s ease;
}

.tamuk-ev-card-title a:hover {
	color: #FCC10F;
}

.tamuk-ev-card-subtitle {
	font-size: 0.9rem;
	color: #555;
	margin: 0.25rem 0 0;
	line-height: 1.4;
}

/* ==========================================================================
   List Layout
   ========================================================================== */

.tamuk-ev-list {
	display: flex;
	flex-direction: column;
	gap: 0;
}

.tamuk-ev-list-item {
	display: flex;
	align-items: center;
	gap: 1.5rem;
	padding: 1.25rem 1rem;
	border-bottom: 1px solid #e8e8e8;
	border-left: 4px solid #FCC10F;
	background: #fff;
	transition: background-color 0.25s ease, opacity 0.25s ease;
	opacity: 0;
	animation: tamukEvFadeInUp 0.5s ease forwards;
	animation-delay: calc(var(--card-index, 0) * 0.06s);
}

.tamuk-ev-list-item:first-child {
	border-top: 1px solid #e8e8e8;
}

.tamuk-ev-list-item:hover {
	background: #f8f9ff;
}

.tamuk-ev-list-date {
	flex-shrink: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	width: 64px;
	text-align: center;
}

.tamuk-ev-list-day {
	font-family: 'Cinzel', serif;
	font-size: 2rem;
	font-weight: 700;
	color: #003399;
	line-height: 1;
}

.tamuk-ev-list-month {
	font-size: 0.8rem;
	font-weight: 600;
	text-transform: uppercase;
	color: #666;
	letter-spacing: 0.05em;
	margin-top: 2px;
}

.tamuk-ev-list-content {
	flex: 1;
	min-width: 0;
}

.tamuk-ev-list-title {
	font-family: 'Cinzel', serif;
	font-size: 1.05rem;
	font-weight: 700;
	margin: 0;
	line-height: 1.3;
}

.tamuk-ev-list-title a {
	color: #003399;
	text-decoration: none;
	transition: color 0.2s ease;
}

.tamuk-ev-list-title a:hover {
	color: #FCC10F;
}

.tamuk-ev-list-subtitle {
	font-size: 0.875rem;
	color: #555;
	margin: 0.2rem 0 0;
}

.tamuk-ev-list-actions {
	flex-shrink: 0;
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 0.5rem;
}

/* ==========================================================================
   Timeline Layout
   ========================================================================== */

.tamuk-ev-timeline {
	position: relative;
	padding: 2rem 0;
}

.tamuk-ev-timeline-line {
	position: absolute;
	left: 50%;
	top: 0;
	bottom: 0;
	width: 2px;
	background: #FCC10F;
	transform: translateX(-50%);
}

.tamuk-ev-timeline-item {
	position: relative;
	display: flex;
	align-items: flex-start;
	margin-bottom: 2.5rem;
	width: 100%;
	opacity: 0;
	animation: tamukEvFadeInUp 0.5s ease forwards;
	animation-delay: calc(var(--card-index, 0) * 0.1s);
	transition: opacity 0.25s ease;
}

.tamuk-ev-timeline-item:last-child {
	margin-bottom: 0;
}

/* Left-aligned cards */
.tamuk-ev-timeline-item--left {
	justify-content: flex-start;
	padding-right: calc(50% + 2rem);
}

/* Right-aligned cards */
.tamuk-ev-timeline-item--right {
	justify-content: flex-end;
	padding-left: calc(50% + 2rem);
}

.tamuk-ev-timeline-dot {
	position: absolute;
	left: 50%;
	top: 1.5rem;
	transform: translateX(-50%);
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
}

.tamuk-ev-timeline-dot::before {
	content: '';
	display: block;
	width: 16px;
	height: 16px;
	background: #fff;
	border: 3px solid #FCC10F;
	border-radius: 50%;
	box-shadow: 0 0 0 4px #fff;
}

.tamuk-ev-timeline-dot-date {
	position: absolute;
	white-space: nowrap;
	font-size: 0.75rem;
	font-weight: 600;
	color: #003399;
	background: #fff;
	padding: 0.15rem 0.5rem;
	border-radius: 3px;
	top: -1.6rem;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

.tamuk-ev-timeline-card {
	background: #fff;
	border-radius: 8px;
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
	overflow: hidden;
	width: 100%;
	transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.tamuk-ev-timeline-card:hover {
	transform: translateY(-3px);
	box-shadow: 0 6px 24px rgba(0, 0, 0, 0.12);
}

.tamuk-ev-timeline-image {
	width: 100%;
	height: 160px;
	background-size: cover;
	background-position: center;
	background-color: #e9ecef;
}

.tamuk-ev-timeline-body {
	padding: 1rem 1.25rem;
}

.tamuk-ev-timeline-title {
	font-family: 'Cinzel', serif;
	font-size: 1rem;
	font-weight: 700;
	margin: 0 0 0.35rem;
	line-height: 1.3;
}

.tamuk-ev-timeline-title a {
	color: #003399;
	text-decoration: none;
	transition: color 0.2s ease;
}

.tamuk-ev-timeline-title a:hover {
	color: #FCC10F;
}

/* ==========================================================================
   Entrance Animation
   ========================================================================== */

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

/* ==========================================================================
   Responsive: Tablet (1024px)
   ========================================================================== */

@media (max-width: 1024px) {
	.tamuk-ev-grid {
		grid-template-columns: repeat(2, 1fr);
	}

	.tamuk-ev-heading {
		font-size: 1.75rem;
	}

	/* Timeline: shift to left-aligned */
	.tamuk-ev-timeline-line {
		left: 20px;
	}

	.tamuk-ev-timeline-item--left,
	.tamuk-ev-timeline-item--right {
		padding-left: 3.5rem;
		padding-right: 0;
		justify-content: flex-start;
	}

	.tamuk-ev-timeline-dot {
		left: 20px;
	}
}

/* ==========================================================================
   Responsive: Mobile (768px)
   ========================================================================== */

@media (max-width: 768px) {
	.tamuk-ev-grid {
		grid-template-columns: 1fr;
		gap: 1.25rem;
	}

	.tamuk-ev-heading {
		font-size: 1.3rem;
	}

	.tamuk-ev-page-header {
		padding: 1.5rem 1.25rem;
		border-radius: 10px;
	}

	.tamuk-ev-page-header-inner {
		flex-direction: column;
		align-items: stretch;
		gap: 1rem;
	}

	.tamuk-ev-search {
		flex: 1 1 100%;
		max-width: 100%;
	}

	.tamuk-ev-filters {
		padding: 0.6rem 0.75rem;
	}

	.tamuk-ev-list-item {
		flex-wrap: wrap;
		gap: 0.75rem;
	}

	.tamuk-ev-list-date {
		width: 50px;
	}

	.tamuk-ev-list-day {
		font-size: 1.5rem;
	}

	.tamuk-ev-list-actions {
		width: 100%;
		flex-direction: row;
		align-items: center;
		justify-content: space-between;
		padding-left: calc(50px + 0.75rem);
	}

	.tamuk-ev-filters {
		gap: 0.4rem;
	}

	.tamuk-ev-filter-pill {
		padding: 0.3rem 0.85rem;
		font-size: 0.8rem;
	}
}

/* ==========================================================================
   Responsive: Small Mobile (480px)
   ========================================================================== */

@media (max-width: 480px) {
	.tamuk-ev-heading {
		font-size: 1.3rem;
	}

	.tamuk-ev-card-body {
		padding: 1rem;
	}

	.tamuk-ev-date-badge {
		width: 44px;
		height: 48px;
		top: 8px;
		left: 8px;
	}

	.tamuk-ev-date-badge-month {
		font-size: 0.6rem;
	}

	.tamuk-ev-date-badge-day {
		font-size: 1.15rem;
	}

	.tamuk-ev-timeline-line {
		left: 12px;
	}

	.tamuk-ev-timeline-item--left,
	.tamuk-ev-timeline-item--right {
		padding-left: 2.5rem;
	}

	.tamuk-ev-timeline-dot {
		left: 12px;
	}

	.tamuk-ev-timeline-body {
		padding: 0.75rem 1rem;
	}

	.tamuk-ev-list-item {
		padding: 1rem 0.75rem;
	}

	.tamuk-ev-list-actions {
		padding-left: 0;
	}
}

/* ==========================================================================
   Reduced Motion
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
	.tamuk-ev-card,
	.tamuk-ev-list-item,
	.tamuk-ev-timeline-item {
		animation: none;
		opacity: 1;
	}

	.tamuk-ev-card:hover {
		transform: none;
	}

	.tamuk-ev-card:hover .tamuk-ev-card-image {
		transform: none;
	}

	.tamuk-ev-timeline-card:hover {
		transform: none;
	}

	.tamuk-ev-details-link:hover .tamuk-ev-arrow {
		transform: none;
	}

	.tamuk-ev-filter-pill,
	.tamuk-ev-details-link,
	.tamuk-ev-card,
	.tamuk-ev-timeline-card {
		transition: none;
	}
}

/* Search input focus is defined in the section bar styles above. */

/* ===========================
   AJAX Pagination
   =========================== */
.tamuk-ev-pagination {
	margin-top: var(--space-8, 2rem);
}

.tamuk-ev-page-controls {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: var(--space-4, 1rem);
}

.tamuk-ev-page-btn {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 0.5rem 1.25rem;
	background: var(--tamuk-blue, #003399);
	color: #fff;
	border: none;
	border-radius: var(--radius-full, 9999px);
	font-family: var(--font-body, 'Source Sans 3', sans-serif);
	font-size: var(--text-sm, 0.875rem);
	font-weight: 600;
	cursor: pointer;
	transition: background 0.15s ease, transform 0.15s ease;
}

.tamuk-ev-page-btn:hover {
	background: var(--tamuk-blue-dark, #002266);
	transform: translateY(-1px);
}

.tamuk-ev-page-btn:active {
	transform: translateY(0);
}

.tamuk-ev-page-info {
	font-size: var(--text-sm, 0.875rem);
	color: var(--tamuk-gray-500, #6B7280);
	font-weight: 500;
}

/* AJAX-loaded cards: skip entrance animation to prevent flicker */
.tamuk-ev--ajax-loaded .tamuk-ev-card,
.tamuk-ev--ajax-loaded .tamuk-ev-list-item,
.tamuk-ev--ajax-loaded .tamuk-ev-timeline-item {
	animation: none;
	opacity: 1;
}

/* ==========================================================================
   Featured Event Cards (Facebook sync)
   ========================================================================== */

.tamuk-ev-card--featured {
	border: 2px solid #FCC10F;
	box-shadow: 0 2px 12px rgba(252, 193, 15, 0.15);
	position: relative;
}

.tamuk-ev-card--featured:hover {
	box-shadow: 0 8px 28px rgba(252, 193, 15, 0.2);
	border-color: #FCC10F;
}

.tamuk-ev-card--featured .tamuk-ev-date-badge {
	background: #FCC10F;
	color: #003399;
}

.tamuk-ev-list-item--featured {
	border-left: 4px solid #FCC10F;
	background: linear-gradient(90deg, rgba(252, 193, 15, 0.04) 0%, transparent 30%);
}

.tamuk-ev-featured-badge {
	display: inline-flex;
	align-items: center;
	gap: 3px;
	padding: 2px 8px;
	background: linear-gradient(135deg, #FCC10F, #f0b400);
	color: #003399;
	font-size: 0.65rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	border-radius: 3px;
	margin-bottom: 0.35rem;
}

.tamuk-ev-empty {
	text-align: center;
	padding: var(--space-10, 2.5rem);
	color: var(--tamuk-gray-400, #9CA3AF);
	font-size: var(--text-base, 1rem);
}
