/**
 * Quantum Events — Public CSS
 * Material Design card system, list/grid layouts, modal, responsive.
 *
 * CSS custom properties defined in class-qev-typography.php / qev-themes.css.
 * @package Q_Events
 */

/* ==================================================================
   1. Custom property defaults (fallback if typography class doesn't run)
   ================================================================== */
:root {
	--qev-primary:      var(--nectar-accent-color, #309eba);
	--qev-accent:       var(--nectar-extra-color-1, #614b79);
	--qev-secondary:    var(--nectar-extra-color-2, #cedc00);
	--qev-text:         var(--nectar-extra-color-3, #1f2937);
	--qev-heading:      var(--nectar-extra-color-3, #111827);
	--qev-card-bg:      #fff;
	--qev-card-border:  #e0e0e0;
	--qev-card-radius:  8px;
	--qev-card-shadow:  0 2px 8px rgba(0,0,0,.12);
	--qev-font-size-base: inherit;
}

/* ==================================================================
   2. Wrapper / Container
   ================================================================== */
.qev-wrapper {
	font-size: var(--qev-font-size-base);
	color: var(--qev-text);
	line-height: 1.6;
}

.qev-container {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 16px;
}

/* ==================================================================
   3. Filter bar
   ================================================================== */
.qev-filter-bar {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 24px;
}

.qev-shortcode-controls,
.qev-archive-controls {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 24px;
}

.qev-search-group {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 8px 12px;
	border: 1px solid var(--qev-card-border);
	border-radius: 999px;
	background: var(--qev-card-bg);
}

.qev-search-input {
	border: 0;
	background: transparent;
	min-width: 220px;
	padding: 0;
	outline: none;
	font: inherit;
	color: inherit;
}

.qev-search-btn,
.qev-layout-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	border-radius: 999px;
	border: 1px solid var(--qev-card-border);
	background: var(--qev-card-bg);
	color: var(--qev-primary);
	text-decoration: none;
}

.qev-layout-toggle {
	display: inline-flex;
	gap: 8px;
}

.qev-layout-btn.active,
.qev-layout-btn:hover,
.qev-search-btn:hover {
	background: var(--qev-primary);
	color: #fff;
}

.qev-filter-btn {
	padding: 6px 16px;
	border-radius: 20px;
	border: 1px solid var(--qev-primary);
	background: transparent;
	color: var(--qev-primary);
	cursor: pointer;
	font-size: .875rem;
	transition: background .2s, color .2s;
}

.qev-filter-btn:hover,
.qev-filter-btn.active {
	background: var(--qev-primary);
	color: #fff;
}

/* ==================================================================
   4. Event list (vertical)
   ================================================================== */
.qev-event-list--list {
	display: flex;
	flex-direction: column;
	gap: var(--qev-card-gap, 20px);
}

.qev-event-list--list .qev-card-wrap {
	width: 100%;
}

/* ==================================================================
   5. Event grid
   ================================================================== */
.qev-event-list--grid.qev-grid {
	display: grid;
	gap: var(--qev-card-gap, 24px);
}

.qev-grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.qev-grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.qev-grid-cols-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 900px) {
	.qev-grid-cols-3,
	.qev-grid-cols-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
	.qev-grid-cols-2,
	.qev-grid-cols-3,
	.qev-grid-cols-4 { grid-template-columns: 1fr; }
}

/* ==================================================================
   6. Card base (Material)
   ================================================================== */
.qev-card {
	background: var(--qev-card-bg);
	border: 1px solid var(--qev-card-border);
	border-radius: var(--qev-card-radius);
	box-shadow: var(--qev-card-shadow);
	overflow: hidden;
	color: var(--qev-text);
	text-align: left;
	transition: box-shadow .2s, transform .2s;
}

.qev-card:hover {
	box-shadow: 0 6px 20px rgba(0,0,0,.18);
	transform: translateY(-2px);
}

/* List card layout */
.qev-card--list {
	display: flex;
	flex-direction: row;
}

.qev-card--list-style-style1 {
	position: relative;
}

.qev-card--list-style-style1 .qev-card__left {
	position: relative;
	z-index: 2;
}

.qev-card--list-style-style1.qev-card--auto-image .qev-card__left {
	position: absolute;
	left: 14px;
	top: 14px;
	z-index: 4;
	margin-left: 0;
	padding: 0;
}

.qev-card--list-style-style1.qev-card--auto-image .qev-card__image--left,
.qev-card--list-style-style1.qev-card--auto-image .qev-card__image--right,
.qev-card--list-style-style1.qev-card--auto-image .qev-card__image--top,
.qev-card--list-style-style1.qev-card--auto-image .qev-card__image--background {
	position: relative;
}

.qev-card--list-style-style2 {
	display: grid;
	grid-template-columns: 130px 1fr 240px;
	align-items: stretch;
	background: linear-gradient(90deg, color-mix(in srgb, var(--qev-primary) 9%, #fff) 0, #fff 44%);
}

.qev-card--list-style-style2 .qev-card__left {
	border-right: 1px solid var(--qev-card-border);
	min-width: 0;
	background: color-mix(in srgb, var(--qev-primary) 12%, #fff);
}

.qev-card--list-style-style2 .qev-card__right {
	padding: var(--qev-card-padding, 16px);
}

.qev-card--list-style-style2 .qev-card__image {
	order: 3;
	height: 100%;
}

.qev-card--list-style-style2 .qev-card__image img {
	height: 100%;
	object-fit: cover;
}

.qev-card--list.qev-card--image-right {
	flex-direction: row-reverse;
}

.qev-card--list.qev-card--image-top,
.qev-card--list.qev-card--image-background {
	flex-direction: column;
}

.qev-card--auto-image .qev-card__image--left,
.qev-card--auto-image .qev-card__image--right {
	flex: 0 0 220px;
	width: 220px;
	max-width: 35%;
}

.qev-card--auto-image .qev-card__image--top,
.qev-card--auto-image .qev-card__image--background {
	width: 100%;
}

.qev-card__left {
	flex: 0 0 auto;
	padding: var(--qev-card-padding, 20px);
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: flex-start;
	min-width: 80px;
}

.qev-card__right {
	flex: 1 1 auto;
	display: flex;
	flex-direction: column;
	padding: var(--qev-card-padding, 16px) var(--qev-card-padding, 20px) var(--qev-card-padding, 16px) 0;
	gap: 4px;
}

.qev-card--list.qev-card--image-right .qev-card__right {
	padding: var(--qev-card-padding, 16px) 0 var(--qev-card-padding, 16px) var(--qev-card-padding, 20px);
}

.qev-card--list.qev-card--image-top .qev-card__right,
.qev-card--list.qev-card--image-background .qev-card__right {
	padding: 0 var(--qev-card-padding, 20px) var(--qev-card-padding, 16px);
}

.qev-card--list.qev-card--image-top .qev-card__left,
.qev-card--list.qev-card--image-background .qev-card__left {
	padding-top: var(--qev-card-padding, 20px);
}

.qev-card__right-top    { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; }
.qev-card__right-body   { flex: 1 1 auto; display: flex; flex-direction: column; gap: 8px; }
.qev-card__right-footer { margin-top: auto; }

/* Grid card layout */
.qev-card--grid {
	display: flex;
	flex-direction: column;
}

.qev-card__header { position: relative; overflow: hidden; }
.qev-card__body   { flex: 1 1 auto; padding: var(--qev-card-padding, 16px); display: flex; flex-direction: column; gap: 8px; }
.qev-card__footer { padding: calc(var(--qev-card-padding, 16px) * .75) var(--qev-card-padding, 16px); border-top: 1px solid var(--qev-card-border); }

.qev-card--grid.qev-card--image-background .qev-card__header {
	min-height: 220px;
	background: #111;
}

/* ==================================================================
   7. Date badge
   ================================================================== */
.qev-date-badge {
	display: flex;
	flex-direction: column;
	align-items: center;
	background: var(--qev-primary);
	color: #fff;
	border-radius: 6px;
	padding: 8px 10px;
	min-width: 56px;
	text-align: center;
	line-height: 1.1;
}

.qev-date-badge__day   { font-size: 1.75rem; font-weight: 700; line-height: 1; }
.qev-date-badge__month { font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; }
.qev-date-badge__year  { font-size: .7rem; opacity: .85; }
.qev-date-badge__separator { font-size: .7rem; opacity: .75; margin: 2px 0; }
.qev-date-badge__end  { font-size: .75rem; }

/* ==================================================================
   8. Card fields
   ================================================================== */

/* Image */
.qev-card__image { overflow: hidden; background: #f5f5f5; }
.qev-card__image--background {
	position: relative;
}

.qev-card__image--background::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(0,0,0,.08), rgba(0,0,0,.35));
	pointer-events: none;
}

.qev-card__image img,
.qev-event-image {
	width: 100%;
	height: auto;
	display: block;
	object-fit: cover;
	aspect-ratio: 16 / 9;
	transition: transform .3s;
}
.qev-card:hover .qev-event-image { transform: scale(1.03); }

.qev-card--auto-image .qev-event-image {
	height: 100%;
	min-height: 180px;
}

/* Title */
.qev-card__title {
	margin: 0;
	font-size: var(--qev-title-size, 1.125rem);
	font-weight: var(--qev-title-weight, 600);
	line-height: 1.3;
	color: var(--qev-heading, inherit);
}

.qev-card__title-link {
	color: var(--qev-heading, var(--qev-text));
	text-decoration: none;
}

.qev-card__title-link:hover { color: var(--qev-primary); }

/* Excerpt */
.qev-card__excerpt {
	margin: 4px 0 0;
	font-size: .9rem;
	color: var(--qev-text);
	opacity: 1;
}

/* Categories / tags */
.qev-category-tag,
.qev-tag {
	display: inline-block;
	font-size: .75rem;
	padding: 2px 10px;
	border-radius: 12px;
	text-decoration: none;
	line-height: 1.5;
}

.qev-category-tag {
	background: var(--qev-accent);
	color: #000;
}

.qev-tag {
	border: 1px solid currentColor;
	color: inherit;
	opacity: .75;
}

.qev-card__categories,
.qev-card__tags {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
}

/* Venue */
.qev-card__venue {
	display: flex;
	align-items: center;
	gap: 4px;
	font-size: .875rem;
	opacity: .85;
}

.qev-venue-link { color: inherit; }
.qev-venue-link:hover { color: var(--qev-primary); }

/* Date range / time */
.qev-card__date-range,
.qev-card__time {
	display: flex;
	align-items: center;
	gap: 4px;
	font-size: .875rem;
	flex-wrap: wrap;
}

.qev-timezone { font-size: .75rem; opacity: .7; margin-left: 4px; }

/* Organizer */
.qev-card__organizer { font-size: .875rem; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.qev-organizer-name  { display: flex; align-items: center; gap: 4px; font-weight: 500; }
.qev-organizer-email,
.qev-organizer-phone { color: var(--qev-primary); text-decoration: none; }
.qev-organizer-email:hover,
.qev-organizer-phone:hover { text-decoration: underline; }

/* CTA */
.qev-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 9px 20px;
	border-radius: 4px;
	font-size: .875rem;
	font-weight: 500;
	cursor: pointer;
	text-decoration: none;
	border: 2px solid transparent;
	transition: background .2s, color .2s, box-shadow .2s;
	position: relative;
	overflow: hidden;
	/* Material ripple base */
}

.qev-btn--primary {
	background: var(--qev-button-bg, var(--qev-primary));
	color: var(--qev-button-text, #fff);
}

.qev-btn--primary:hover {
	background: color-mix(in srgb, var(--qev-primary) 80%, #000);
	box-shadow: 0 2px 8px rgba(0,0,0,.2);
}

.qev-btn--full { width: 100%; }

/* Ripple */
.qev-btn .qev-ripple {
	position: absolute;
	border-radius: 50%;
	background: rgba(255,255,255,.35);
	transform: scale(0);
	animation: qev-ripple .5s linear;
	pointer-events: none;
}

@keyframes qev-ripple {
	to { transform: scale(4); opacity: 0; }
}

/* ==================================================================
   9. Month calendar shortcode
   ================================================================== */
.qev-calendar-wrap {
	border: 1px solid var(--qev-card-border);
	border-radius: var(--qev-card-radius);
	background: var(--qev-card-bg);
	color: var(--qev-text);
	overflow: hidden;
}

.qev-calendar-wrap--style2 {
	box-shadow: 0 10px 34px rgba(0,0,0,.16);
}

.qev-calendar-wrap--style2 .qev-calendar-toolbar {
	background: linear-gradient(90deg, color-mix(in srgb, var(--qev-primary) 85%, #fff), color-mix(in srgb, var(--qev-accent) 38%, #fff));
	color: #fff;
}

.qev-calendar-wrap--style2 .qev-calendar-title {
	color: #fff;
}

.qev-calendar-wrap--style2 .qev-calendar-nav {
	border-color: rgba(255,255,255,.55);
	background: rgba(255,255,255,.2);
	color: #fff;
}

.qev-calendar-wrap--style2 .qev-calendar-day {
	transition: box-shadow .2s ease, transform .2s ease;
}

.qev-calendar-wrap--style2 .qev-calendar-day:hover {
	box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--qev-primary) 28%, #fff);
	transform: translateY(-1px);
}

.qev-calendar-toolbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	padding: 12px 14px;
	border-bottom: 1px solid var(--qev-card-border);
	background: color-mix(in srgb, var(--qev-primary) 8%, #fff);
}

.qev-calendar-filters {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	align-items: center;
	padding: 12px 14px;
	border-bottom: 1px solid var(--qev-card-border);
	background: #fff;
}

.qev-calendar-filters select {
	min-width: 170px;
	padding: 6px 8px;
	border: 1px solid var(--qev-card-border);
	border-radius: 4px;
	font: inherit;
}

.qev-calendar-weekend-toggle {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: .875rem;
}

.qev-calendar-title {
	margin: 0;
	font-size: 1.05rem;
	font-weight: 600;
	color: var(--qev-heading, var(--qev-text));
}

.qev-calendar-nav {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	border-radius: 999px;
	text-decoration: none;
	border: 1px solid var(--qev-card-border);
	background: #fff;
	color: var(--qev-primary);
	font-weight: 700;
}

.qev-calendar-nav:hover {
	background: var(--qev-primary);
	color: #fff;
	border-color: var(--qev-primary);
}

.qev-calendar {
	width: 100%;
	border-collapse: collapse;
	table-layout: fixed;
}

.qev-calendar th,
.qev-calendar td {
	border: 1px solid var(--qev-card-border);
	vertical-align: top;
}

.qev-calendar th {
	padding: 8px;
	text-align: center;
	font-size: .8rem;
	text-transform: uppercase;
	letter-spacing: .04em;
	color: var(--qev-heading, var(--qev-text));
	background: color-mix(in srgb, var(--qev-primary) 4%, #fff);
}

.qev-calendar-day {
	padding: 8px;
	min-height: 108px;
	background: #fff;
}

.qev-calendar-day.is-outside-month {
	background: color-mix(in srgb, var(--qev-card-border) 20%, #fff);
	opacity: .7;
}

.qev-calendar-day.is-today {
	background: color-mix(in srgb, var(--qev-accent) 14%, #fff);
}

.qev-calendar-day__num {
	font-size: .85rem;
	font-weight: 600;
	margin-bottom: 6px;
	color: var(--qev-heading, var(--qev-text));
}

.qev-calendar-events {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 5px;
}

.qev-calendar-event-link {
	display: block;
	text-decoration: none;
	padding: 4px 6px;
	border-radius: 5px;
	background: color-mix(in srgb, var(--qev-primary) 10%, #fff);
	color: var(--qev-text);
	font-size: .78rem;
	line-height: 1.3;
}

.qev-calendar-event-link:hover {
	background: color-mix(in srgb, var(--qev-primary) 22%, #fff);
}

.qev-calendar-event-time {
	margin-right: 6px;
	font-weight: 600;
	color: var(--qev-primary);
}

.qev-calendar-event-title {
	word-break: break-word;
}

@media (max-width: 800px) {
	.qev-calendar th {
		font-size: .72rem;
	}

	.qev-calendar-day {
		min-height: 86px;
		padding: 6px;
	}

	.qev-calendar-event-link {
		padding: 3px 5px;
		font-size: .72rem;
	}

	.qev-calendar-filters {
		padding: 10px;
	}

	.qev-calendar-filters select {
		min-width: 132px;
	}
}

/* ==================================================================
   10. Map shortcode
   ================================================================== */
.qev-map-wrap {
	display: grid;
	grid-template-columns: 1.3fr 1fr;
	gap: 18px;
	align-items: start;
	color: var(--qev-text);
}

.qev-map-wrap--address_only {
	grid-template-columns: 1fr;
}

.qev-map-wrap--style2 .qev-map-list-item {
	box-shadow: 0 8px 28px rgba(0,0,0,.13);
	border: 1px solid color-mix(in srgb, var(--qev-primary) 24%, #fff);
}

.qev-map-wrap--style2 .qev-map-list-btn {
	background: color-mix(in srgb, var(--qev-primary) 8%, #fff);
}

.qev-map-canvas {
	width: 100%;
	border: 1px solid var(--qev-card-border);
	border-radius: var(--qev-card-radius);
	background: #fafafa;
}

.qev-osm-map {
	width: 100%;
	border: 1px solid var(--qev-card-border);
	border-radius: var(--qev-card-radius);
	overflow: hidden;
}

.qev-map-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 10px;
	max-height: 560px;
	overflow: auto;
}

.qev-map-list-item {
	border: 1px solid var(--qev-card-border);
	border-radius: var(--qev-card-radius);
	background: var(--qev-card-bg);
	overflow: hidden;
}

.qev-map-list-btn {
	width: 100%;
	display: block;
	text-align: left;
	padding: 12px;
	border: 0;
	background: transparent;
	cursor: pointer;
	color: inherit;
}

.qev-map-list-btn.is-static {
	cursor: default;
}

.qev-map-list-btn.is-active,
.qev-map-list-btn:hover {
	background: color-mix(in srgb, var(--qev-primary) 10%, #fff);
}

.qev-map-wrap--style2 .qev-map-list-btn.is-active,
.qev-map-wrap--style2 .qev-map-list-btn:hover {
	background: color-mix(in srgb, var(--qev-primary) 18%, #fff);
}

.qev-map-list-title {
	display: block;
	font-weight: 600;
	margin-bottom: 4px;
}

.qev-map-list-meta,
.qev-map-list-address {
	display: block;
	font-size: .85rem;
	opacity: .85;
}

.qev-map-list-links {
	display: flex;
	gap: 12px;
	padding: 0 12px 12px;
	font-size: .85rem;
}

.qev-map-list-links a {
	color: var(--qev-primary);
	text-decoration: none;
}

.qev-map-list-links a:hover {
	text-decoration: underline;
}

@media (max-width: 900px) {
	.qev-card--list-style-style2 {
		grid-template-columns: 1fr;
	}

	.qev-card--list-style-style2 .qev-card__left {
		border-right: 0;
		border-bottom: 1px solid var(--qev-card-border);
	}

	.qev-map-wrap {
		grid-template-columns: 1fr;
	}

	.qev-map-list {
		max-height: none;
	}
}

/* ==================================================================
   11. No events
   ================================================================== */
.qev-no-events {
	padding: 40px 20px;
	text-align: center;
	background: var(--qev-card-bg);
	border: 1px dashed var(--qev-card-border);
	border-radius: var(--qev-card-radius);
	color: inherit;
	opacity: .7;
}

/* ==================================================================
	12. Pagination
   ================================================================== */
.qev-pagination {
	margin-top: 32px;
	display: flex;
	justify-content: center;
}

.qev-pagination .page-numbers {
	display: flex;
	list-style: none;
	margin: 0;
	padding: 0;
	gap: 4px;
}

.qev-pagination .page-numbers li a,
.qev-pagination .page-numbers li span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 36px;
	height: 36px;
	border-radius: 4px;
	padding: 0 8px;
	text-decoration: none;
	border: 1px solid var(--qev-card-border);
	color: var(--qev-primary);
	font-size: .875rem;
	transition: background .2s;
}

.qev-pagination .page-numbers li .current,
.qev-pagination .page-numbers li a:hover {
	background: var(--qev-primary);
	color: #fff;
	border-color: var(--qev-primary);
}

/* ==================================================================
	13. Single event page
   ================================================================== */
.qev-single-wrap {
	display: grid;
	grid-template-columns: 1fr 320px;
	gap: 32px;
	align-items: start;
}

@media (max-width: 800px) {
	.qev-single-wrap { grid-template-columns: 1fr; }
}


	.qev-card--list,
	.qev-card--list.qev-card--image-right {
		flex-direction: column;
	}

	.qev-card--auto-image .qev-card__image--left,
	.qev-card--auto-image .qev-card__image--right {
		width: 100%;
		max-width: none;
	}

	.qev-card__right,
	.qev-card--list.qev-card--image-right .qev-card__right {
		padding: 0 var(--qev-card-padding, 16px) var(--qev-card-padding, 16px);
	}
/* Header */
.qev-single-header__image { position: relative; border-radius: var(--qev-card-radius); overflow: hidden; margin-bottom: 20px; }
.qev-single-hero-image { width: 100%; height: auto; display: block; max-height: 500px; object-fit: cover; }

.qev-single-header__date-overlay {
	position: absolute;
	top: 16px;
	left: 16px;
}

.qev-single-header__categories { margin-bottom: 8px; display: flex; gap: 6px; flex-wrap: wrap; }
.qev-single-header__title { margin: 0 0 16px; }

/* Sidebar blocks */
.qev-sidebar-block {
	background: var(--qev-card-bg);
	border: 1px solid var(--qev-card-border);
	border-radius: var(--qev-card-radius);
	padding: var(--qev-card-padding, 20px);
	margin-bottom: 20px;
}

.qev-countdown {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 8px;
	margin-top: 16px;
}

.qev-countdown > span {
	display: flex;
	flex-direction: column;
	align-items: center;
	padding: 10px 8px;
	border-radius: 8px;
	background: color-mix(in srgb, var(--qev-primary) 12%, #fff);
}

.qev-countdown b {
	font-size: 1.1rem;
	line-height: 1;
}

.qev-countdown small {
	text-transform: uppercase;
	letter-spacing: .08em;
	font-size: .65rem;
	opacity: .8;
}

.qev-widget-list {
	display: grid;
	gap: 12px;
}

.qev-widget-list--grid {
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.qev-widget-card .qev-card {
	box-shadow: none;
	border-radius: 10px;
}

.qev-widget-card .qev-card:hover {
	transform: none;
	box-shadow: none;
}

.qev-widget-card .qev-card__left,
.qev-widget-card .qev-card__body,
.qev-widget-card .qev-card__footer,
.qev-widget-card .qev-card__right {
	padding: 12px;
}

.qev-widget-card .qev-card__image--left,
.qev-widget-card .qev-card__image--right,
.qev-widget-card .qev-card__image--top,
.qev-widget-card .qev-card__image--background {
	width: 100%;
	max-width: none;
	flex-basis: auto;
}

.qev-widget-card .qev-event-image {
	min-height: 120px;
	aspect-ratio: 4 / 3;
}

.qev-widget-card .qev-card__title {
	font-size: 1rem;
}

.qev-widget-card .qev-card__excerpt,
.qev-widget-card .qev-card__organizer,
.qev-widget-card .qev-card__tags {
	display: none;
}

.qev-widget-card .qev-btn {
	padding: 8px 12px;
	font-size: .85rem;
}

.qev-widget-item {
	display: flex;
	gap: 12px;
	padding: 12px;
	border: 1px solid var(--qev-card-border);
	border-radius: 10px;
	background: var(--qev-card-bg);
}

.qev-widget-list--grid .qev-widget-item {
	flex-direction: column;
}

.qev-widget-thumb {
	flex: 0 0 84px;
	max-width: 84px;
	border-radius: 8px;
	overflow: hidden;
}

.qev-widget-thumb__img {
	display: block;
	width: 100%;
	height: 84px;
	object-fit: cover;
}

.qev-widget-item__content {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.qev-widget-title {
	font-weight: 600;
	text-decoration: none;
	color: var(--qev-heading, inherit);
}

.qev-widget-date,
.qev-widget-venue {
	font-size: .85rem;
	opacity: .8;
}

.qev-client-empty[hidden] {
	display: none;
}

.qev-sidebar-block__title {
	margin: 0 0 12px;
	font-size: .875rem;
	text-transform: uppercase;
	letter-spacing: .08em;
	color: var(--qev-primary);
}

.qev-details-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.qev-details-item {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	font-size: .9rem;
}

.qev-details-label { font-weight: 500; flex-shrink: 0; width: 48px; }
.qev-details-value { color: inherit; }

/* Calendar buttons */
.qev-calendar-btns { display: flex; flex-direction: column; gap: 8px; }
.qev-cal-btn {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 10px 14px;
	border: 1px solid var(--qev-card-border);
	border-radius: 4px;
	text-decoration: none;
	font-size: .875rem;
	color: inherit;
	transition: background .2s;
}
.qev-cal-btn:hover { background: #f5f5f5; }
.qev-cal-icon { font-weight: 700; }

/* Directions link */
.qev-directions-link {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	font-size: .875rem;
	color: var(--qev-primary);
	text-decoration: none;
	margin-top: 8px;
}
.qev-directions-link:hover { text-decoration: underline; }

/* Map embed */
.qev-map-embed { margin-top: 12px; border-radius: var(--qev-card-radius); overflow: hidden; }

/* Venue address */
.qev-venue-address { font-style: normal; font-size: .875rem; margin: 4px 0; }

/* Agenda */
.qev-single-segments { margin-top: 32px; }
.qev-segment-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 16px; }
.qev-segment-item {
	padding: 16px;
	border-left: 3px solid var(--qev-primary);
	background: var(--qev-card-bg);
	border-radius: 0 var(--qev-card-radius) var(--qev-card-radius) 0;
}
.qev-segment-time { font-size: .8rem; color: var(--qev-primary); font-weight: 600; display: block; margin-bottom: 4px; }
.qev-segment-title { display: block; font-size: 1rem; margin-bottom: 4px; }
.qev-segment-desc { margin: 0; font-size: .875rem; opacity: .8; }

/* Section title */
.qev-section-title { font-size: 1.25rem; margin: 0 0 16px; }

/* Single GF form inline */
.qev-single-gf-form { padding: 0; }

/* ==================================================================
   12. Modal overlay
   ================================================================== */
.qev-modal-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0,0,0,.55);
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
}

.qev-modal-overlay[hidden] { display: none; }

.qev-modal {
	background: #fff;
	border-radius: var(--qev-card-radius);
	box-shadow: 0 24px 64px rgba(0,0,0,.35);
	width: 100%;
	max-width: 560px;
	max-height: 90vh;
	overflow-y: auto;
	animation: qev-modal-in .2s ease;
}

@keyframes qev-modal-in {
	from { opacity: 0; transform: translateY(20px); }
	to   { opacity: 1; transform: translateY(0); }
}

.qev-modal__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 20px 24px 16px;
	border-bottom: 1px solid #e0e0e0;
}

.qev-modal__title { margin: 0; font-size: 1.125rem; }

.qev-modal__close {
	background: none;
	border: none;
	font-size: 1.5rem;
	line-height: 1;
	cursor: pointer;
	color: #555;
	padding: 4px 8px;
	border-radius: 4px;
	transition: background .15s;
}
.qev-modal__close:hover { background: #f5f5f5; color: #000; }

.qev-modal__body { padding: 24px; }

/* Loading spinner */
.qev-modal__loading {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 32px 0;
	gap: 12px;
}

.qev-spinner {
	width: 32px;
	height: 32px;
	border: 3px solid var(--qev-card-border);
	border-top-color: var(--qev-primary);
	border-radius: 50%;
	animation: qev-spin .7s linear infinite;
}

@keyframes qev-spin { to { transform: rotate(360deg); } }

/* ==================================================================
   13. Shortcode wrap
   ================================================================== */
.qev-shortcode-wrap { position: relative; }

/* ==================================================================
   14. Responsive tweaks
   ================================================================== */
@media (max-width: 600px) {
	.qev-card--list { flex-direction: column; }
	.qev-shortcode-controls,
	.qev-archive-controls { align-items: stretch; }
	.qev-search-group { width: 100%; }
	.qev-search-input { min-width: 0; width: 100%; }
	.qev-widget-list--grid { grid-template-columns: 1fr; }
	.qev-card__left { flex-direction: row; padding: 12px 16px; align-items: center; gap: 12px; }
	.qev-card__right { padding: 0 16px 16px; }
}
