/* Events archive - custom card grid replacing TEC's list view. Cards reuse the
   .idu-card / .idu-grid classes from idu-listings.css so they match /rooms/.
   The sidebar form, mobile filter drawer, and header tools reuse
   .idu-facet / .idu-facet-label / .idu-sort / .idu-view-switch / .idu-filter-*
   from idu-listings.css too, so font size and spacing match the other
   archives automatically - this file only adds the truly events-specific
   bits (search/select inputs, date badge, when-line, category badge
   repositioning). */
.idu-events-archive.idu-archive {
	padding-block:80px;
}

/* sidebar form controls - .idu-facet / .idu-facet-label spacing + type come
   from idu-listings.css (same classes the FacetWP sidebars use). */
.idu-events-archive .idu-events-filterform {
	margin-bottom: 0;
}
.idu-events-archive .idu-events-search,
.idu-events-archive .idu-events-filterform select {
	width:100%;
	padding:12px 16px;
	border:1px solid var(--idu-listings-line);
	border-radius:var(--idu-listings-radius-sm);
	background:var(--idu-listings-white);
	font-size:16px;
	color:var(--idu-listings-ink);
	box-sizing:border-box;
}
/* header tools: .idu-archive-head / .idu-archive-head-tools / .idu-sort /
   .idu-view-switch all come from idu-listings.css - no overrides needed,
   except zeroing the theme's generic `form { margin-bottom: 2rem }` reset,
   which would otherwise misalign the sort form against the view switch. */
.idu-events-archive .idu-events-sortform {
	margin:0 !important;
}

/* square date badge on the card image */
.idu-event-card .idu-card-media {
	position:relative;
}
.idu-event-card .idu-ev-date {
	position:absolute;
	top:10px;
	left:10px;
	width:52px;
	height:52px;
	display:flex;
	flex-direction:column;
	align-items:center;
	justify-content:center;
	background:var(--idu-listings-white);
	border-radius:var(--idu-listings-radius-sm);
	box-shadow:var(--idu-listings-shadow);
	line-height:1;
}
.idu-event-card .idu-ev-date-day {
	font-size:19px;
	font-weight:800;
	color:var(--idu-listings-ink);
}
.idu-event-card .idu-ev-date-month {
	font-size:11px;
	font-weight:600;
	text-transform:uppercase;
	letter-spacing:.05em;
	color:var(--idu-listings-muted);
	margin-top:2px;
}
/* category badge moves right so it never collides with the date */
.idu-event-card .idu-badge {
	left:auto;
	right:10px;
}

/* when-line under the title */
.idu-event-card .idu-ev-when {
	display:flex;
	align-items:center;
	gap:6px;
	font-size:13px;
	color:var(--idu-listings-muted);
}
.idu-event-card .idu-ev-when svg {
	width:14px;
	height:14px;
	flex:none;
}

/* safety: hide any stray TEC chrome if another plugin prints it */
.idu-events-archive .tribe-events-c-subscribe-dropdown,
.idu-events-archive .tribe-events-c-view-selector,
.idu-events-archive .tribe-events-c-top-bar {
	display:none !important;
}

/* community dropdown: force full sidebar width (idu-community.css sizes it for the inline bar) */
.idu-events-archive .idu-events-filterform select.idu-community-filter {
	width:100% !important;
	max-width:100% !important;
	min-width:0 !important;
	box-sizing:border-box;
}

@media (max-width: 600px) {
	.tribe-events-page-template .bb-grid {
		margin-inline: 0 !important;
	}
}

/* nationality flag, directly under the date badge */
.idu-event-card .idu-ev-flag { position:absolute; top:68px; left:10px; width:52px; display:flex; justify-content:center; }
.idu-event-card .idu-ev-flag .idu-nationality-flag { display:inline-flex; align-items:center; justify-content:center; width:30px; height:30px; border-radius:50%; overflow:hidden; border:2px solid var(--idu-listings-white); background:var(--idu-listings-white); box-shadow:var(--idu-listings-shadow-sm); }
.idu-event-card .idu-ev-flag .idu-nationality-flag svg { width:auto; height:100%; flex:none; }
