/* ==========================================================================
   Art Data Model — Filter Bar, Archive, Exhibitions List, Countdown styles
   All selectors are prefixed adm- to avoid conflicts with Divi or other plugins.
   CSS custom properties are defined in exhibition.css (:root {}).
   See STYLES.md in the plugin folder for a full selector reference.
   ========================================================================== */

/* ── Archive wrapper (artwork archive + artist archive) ─────────────────── */

.adm-archive-wrap {
	max-width: 1200px;
	margin: 0 auto;
	padding: 2.5rem 1.5rem 4rem;
}

.adm-archive-header {
	margin-bottom: 1.5rem;
}

.adm-archive-title {
	font-size: var(--adm-font-h1);
	margin: 0 0 0.6rem;
	line-height: 1.2;
	color: var(--adm-text-h1);
}

/* ── Filter bar ──────────────────────────────────────────────────────────── */

.adm-filter-bar {
	background: var(--adm-filter-bg);
	border: 1px solid var(--adm-filter-border);
	border-radius: 6px;
	padding: 1rem 1.25rem 1rem;
	margin-bottom: 2rem;
}

.adm-filter-bar__fields {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem 1rem;
	align-items: flex-end;
}

.adm-filter-bar__field {
	display: flex;
	flex-direction: column;
	gap: 0.3rem;
	min-width: 140px;
	flex: 1 1 140px;
}

.adm-filter-bar__field--price {
	min-width: 200px;
	flex: 1 1 200px;
}

.adm-filter-bar__label {
	font-size: 0.75rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: var(--adm-text-muted);
}

.adm-filter-bar__select,
.adm-filter-bar__input {
	font-size: 0.875rem;
	padding: 0.4rem 0.65rem;
	border: 1px solid var(--adm-input-border);
	border-radius: 4px;
	background: var(--adm-input-bg);
	color: var(--adm-text);
	width: 100%;
	box-sizing: border-box;
	height: 36px;
}

.adm-filter-bar__select:focus,
.adm-filter-bar__input:focus {
	outline: none;
	border-color: var(--adm-text-muted);
	box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.08);
}

.adm-filter-bar__price-range {
	display: flex;
	align-items: center;
	gap: 0.4rem;
}

.adm-filter-bar__price-range .adm-filter-bar__input {
	flex: 1;
}

.adm-filter-bar__price-sep {
	font-size: 0.85rem;
	color: var(--adm-text-muted);
	flex-shrink: 0;
}

.adm-filter-bar__actions {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	margin-top: 0.9rem;
	flex-wrap: wrap;
}

.adm-filter-bar__submit {
	padding: 0.45rem 1.3rem;
	font-size: 0.875rem;
	font-weight: 600;
	color: var(--adm-btn-text);
	background: var(--adm-btn-bg);
	border: none;
	border-radius: 4px;
	cursor: pointer;
	transition: background 0.15s ease;
}

.adm-filter-bar__submit:hover {
	background: var(--adm-btn-hover-bg);
}

.adm-filter-bar__clear {
	font-size: 0.82rem;
	color: var(--adm-text-muted);
	text-decoration: underline;
	cursor: pointer;
}

.adm-filter-bar__clear:hover {
	color: var(--adm-text);
}

/* ── Artist grid ─────────────────────────────────────────────────────────── */

.adm-artist-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 2rem;
	margin: 1.5rem 0;
}

.adm-artist-card {
	background: var(--adm-card-bg);
	border: 1px solid var(--adm-card-border);
	border-radius: 6px;
	overflow: hidden;
	transition: box-shadow 0.2s ease;
}

.adm-artist-card:hover {
	box-shadow: 0 4px 18px rgba(0, 0, 0, 0.10);
}

.adm-artist-card__photo-link {
	display: block;
	aspect-ratio: 3 / 2;
	overflow: hidden;
	background: var(--adm-filter-bg);
}

.adm-artist-card__photo {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.3s ease;
}

.adm-artist-card:hover .adm-artist-card__photo {
	transform: scale(1.03);
}

.adm-artist-card__info {
	padding: 1rem 1.1rem 1.2rem;
}

.adm-artist-card__name {
	font-size: var(--adm-font-h2);
	font-weight: 600;
	margin: 0 0 0.4rem;
	line-height: 1.3;
	color: var(--adm-text);
}

.adm-artist-card__name a {
	color: inherit;
	text-decoration: none;
}

.adm-artist-card__name a:hover {
	text-decoration: underline;
}

.adm-artist-card__statement {
	font-size: 0.85rem;
	color: var(--adm-text-secondary);
	margin: 0 0 0.5rem;
	line-height: 1.5;
}

.adm-artist-card__count {
	font-size: 0.78rem;
	color: var(--adm-text-light);
	margin: 0 0 0.7rem;
}

.adm-artist-card__link {
	font-size: 0.82rem;
	font-weight: 600;
	color: var(--adm-text);
	text-decoration: underline;
}

.adm-artist-card__link:hover {
	color: var(--adm-text-muted);
}

/* ── Exhibitions list (shortcode) ────────────────────────────────────────── */

.adm-exhibitions-list {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
	gap: 2rem;
	margin: 1.5rem 0;
}

.adm-exhibitions-list.adm-columns-1 { grid-template-columns: 1fr; }
.adm-exhibitions-list.adm-columns-2 { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); }
.adm-exhibitions-list.adm-columns-3 { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.adm-exhibitions-list.adm-columns-4 { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }

.adm-exhibition-card {
	background: var(--adm-card-bg);
	border: 1px solid var(--adm-card-border);
	border-radius: 6px;
	overflow: hidden;
	transition: box-shadow 0.2s ease;
}

.adm-exhibition-card:hover {
	box-shadow: 0 4px 18px rgba(0, 0, 0, 0.10);
}

.adm-exhibition-card__image-link {
	display: block;
	aspect-ratio: 16 / 7;
	overflow: hidden;
	background: var(--adm-filter-bg);
	position: relative;
}

.adm-exhibition-card__image {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.3s ease;
}

.adm-exhibition-card:hover .adm-exhibition-card__image {
	transform: scale(1.02);
}

.adm-exhibition-card__image-placeholder {
	width: 100%;
	height: 100%;
	background: linear-gradient(135deg, var(--adm-filter-bg) 0%, var(--adm-card-border) 100%);
}

.adm-exhibition-card__body {
	padding: 1rem 1.15rem 1.25rem;
}

.adm-exhibition-card__title {
	font-size: var(--adm-font-h2);
	font-weight: 600;
	margin: 0 0 0.35rem;
	line-height: 1.3;
	color: var(--adm-text-h3);
}

.adm-exhibition-card__title a {
	color: inherit;
	text-decoration: none;
}

.adm-exhibition-card__title a:hover {
	text-decoration: underline;
}

.adm-exhibition-card__dates {
	font-size: 0.85rem;
	color: var(--adm-text-secondary);
	margin: 0 0 0.25rem;
}

.adm-exhibition-card__location {
	font-size: 0.82rem;
	color: var(--adm-text-muted);
	margin: 0 0 0.5rem;
}

.adm-exhibition-card__location a {
	color: inherit;
	text-decoration: underline dotted;
}

.adm-exhibition-card__location a:hover {
	color: var(--adm-text);
}

.adm-exhibition-card__location::before {
	content: '📍 ';
}

.adm-exhibition-card__desc {
	font-size: 0.85rem;
	color: var(--adm-text-muted);
	margin: 0;
	line-height: 1.5;
}

/* ── Status / date badges ────────────────────────────────────────────────── */

.adm-badge {
	display: inline-block;
	font-size: 0.68rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	padding: 3px 8px;
	border-radius: 3px;
	color: #fff;
	line-height: 1.5;
	vertical-align: middle;
	margin-bottom: 0.5rem;
}

/* When used as an overlay on the exhibition card image */
.adm-exhibition-card__image-link .adm-badge {
	position: absolute;
	top: 10px;
	left: 10px;
	margin-bottom: 0;
	z-index: 2;
}

.adm-badge--now-on   { background: var(--adm-badge-now-on); }
.adm-badge--upcoming { background: var(--adm-badge-upcoming); }
.adm-badge--past     { background: var(--adm-badge-past); }
.adm-badge--archived { background: var(--adm-badge-archived); }

/* Pulsing "Now On" animation */
.adm-badge--pulse {
	animation: adm-pulse 2s ease-in-out infinite;
}

@keyframes adm-pulse {
	0%, 100% { box-shadow: 0 0 0 0 rgba(39, 174, 96, 0.55); }
	50%       { box-shadow: 0 0 0 6px rgba(39, 174, 96, 0); }
}

/* ── Latest exhibition (shortcode) ───────────────────────────────────────── */

.adm-latest-exhibition {
	display: flex;
	flex-direction: column;
	gap: 1rem;
	background: var(--adm-card-bg);
	border: 1px solid var(--adm-card-border);
	border-radius: 6px;
	overflow: hidden;
	max-width: 680px;
}

.adm-latest-exhibition__image-link {
	display: block;
	aspect-ratio: 16 / 6;
	overflow: hidden;
	background: var(--adm-filter-fg);
}

.adm-latest-exhibition__image {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.3s ease;
}

.adm-latest-exhibition:hover .adm-latest-exhibition__image {
	transform: scale(1.02);
}

.adm-latest-exhibition__body {
	padding: 1.25rem 1.4rem 1.5rem;
}

.adm-latest-exhibition__title {
	font-size: var(--adm-font-h2);
	font-weight: 600;
	margin: 0 0 0.4rem;
	line-height: 1.25;
	color: var(--adm-text-h3);
}

.adm-latest-exhibition__title a {
	color: inherit;
	text-decoration: none;
}

.adm-latest-exhibition__title a:hover {
	text-decoration: underline;
}

.adm-latest-exhibition__dates {
	font-size: 0.9rem;
	color: var(--adm-text-secondary);
	margin: 0 0 0.3rem;
}

.adm-latest-exhibition__location {
	font-size: 0.85rem;
	color: var(--adm-text-muted);
	margin: 0 0 1rem;
}

.adm-latest-exhibition__location::before {
	content: '📍 ';
}

.adm-latest-exhibition__location a {
	color: inherit;
	text-decoration: underline dotted;
}

.adm-latest-exhibition__location a:hover {
	color: var(--adm-text);
}

.adm-latest-exhibition__link {
	display: inline-block;
	margin-top: 0.6rem;
	padding: 0.45rem 1.2rem;
	font-size: 0.875rem;
	font-weight: 600;
	color: var(--adm-btn-text);
	background: var(--adm-btn-bg);
	border-radius: 4px;
	text-decoration: none;
	transition: background 0.15s ease;
}

.adm-latest-exhibition__link:hover {
	background: var(--adm-btn-hover-bg);
	color: var(--adm-btn-text);
}

/* ── Countdown ───────────────────────────────────────────────────────────── */

.adm-countdown {
	display: flex;
	gap: 0.75rem;
	margin: 0.5rem 0 0.75rem;
	align-items: flex-start;
}

.adm-countdown__unit {
	display: flex;
	flex-direction: column;
	align-items: center;
	min-width: 44px;
}

.adm-countdown__num {
	font-size: 1.6rem;
	font-weight: 700;
	line-height: 1;
	color: var(--adm-text);
}

.adm-countdown__label {
	font-size: 0.62rem;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--adm-text-muted);
	margin-top: 0.2rem;
}

/* ── Responsive ──────────────────────────────────────────────────────────── */

@media (max-width: 600px) {
	.adm-filter-bar__fields {
		gap: 0.6rem;
	}

	.adm-filter-bar__field {
		min-width: calc(50% - 0.5rem);
		flex-basis: calc(50% - 0.5rem);
	}

	.adm-filter-bar__field--price {
		min-width: 100%;
		flex-basis: 100%;
	}

	.adm-artist-grid {
		grid-template-columns: 1fr 1fr;
		gap: 1.25rem;
	}

	.adm-exhibitions-list {
		grid-template-columns: 1fr;
	}

	.adm-archive-wrap {
		padding: 1.5rem 1rem 3rem;
	}
}

@media (max-width: 400px) {
	.adm-artist-grid {
		grid-template-columns: 1fr;
	}
}
