/**
 * Explore Page — Dark Theme Styles
 *
 * Filter UI, results grid, keyword tags, and search bar.
 * Matches the DM site aesthetic: dark greys, gold accents,
 * Fjalla One + Slabo 27px typography.
 *
 * @package PLDMHelper
 */

/* ── Discover Section ──────────────────────────────────────── */
.dm-explore-discover {
	margin-top: 50px;
	padding: 40px;
	background: rgba(0, 0, 0, 0.3);
	border-radius: 0;
	border: 1px solid rgba(255, 255, 255, 0.05);
}

/* ── Search Bar ────────────────────────────────────────────── */
.dm-explore-search-wrap {
	margin-bottom: 25px;
}

.dm-explore-search-input {
	width: 100%;
	padding: 14px 20px;
	border: 2px solid rgba(255, 255, 255, 0.1);
	border-radius: 6px;
	background: rgba(0, 0, 0, 0.4);
	color: #D2F3F9;
	font-family: 'Slabo 27px', serif;
	font-size: 16px;
	transition: border-color 0.3s ease;
	box-sizing: border-box;
}

.dm-explore-search-input:focus {
	outline: none;
	border-color: var(--dm-accent, #9E7E26);
}

.dm-explore-search-input::placeholder {
	color: rgba(210, 243, 249, 0.4);
}

/* ── Autocomplete Dropdown ─────────────────────────────────── */
.dm-explore-autocomplete {
	position: absolute;
	top: 100%;
	left: 0;
	right: 0;
	z-index: 100;
	background: #1a2a2e;
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-top: none;
	border-radius: 0;
	max-height: 400px;
	overflow-y: auto;
	display: none;
	box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
}

.dm-ac-item {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 16px;
	cursor: pointer;
	transition: background 0.15s ease;
	border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.dm-ac-item:last-child {
	border-bottom: none;
}

.dm-ac-item:hover {
	background: rgba(158, 126, 38, 0.15);
}

.dm-ac-action {
	background: rgba(0, 0, 0, 0.3);
	font-style: italic;
}

.dm-ac-action:hover {
	background: rgba(158, 126, 38, 0.2);
}

.dm-ac-badge {
	display: inline-block;
	padding: 2px 8px;
	border-radius: 3px;
	font-family: 'Fjalla One', sans-serif;
	font-size: 10px;
	text-transform: uppercase;
	letter-spacing: 1px;
	color: #fff;
	white-space: nowrap;
	min-width: 60px;
	text-align: center;
}

.dm-ac-item[data-type="camera"] .dm-ac-badge {
	background: #317D89;
}

.dm-ac-item[data-type="lens"] .dm-ac-badge {
	background: #9E7E26;
}

.dm-ac-item[data-type="keyword"] .dm-ac-badge {
	background: #4A7A5B;
}

.dm-ac-item[data-type="category"] .dm-ac-badge {
	background: #5B6A8A;
}

.dm-ac-label {
	font-family: 'Slabo 27px', serif;
	font-size: 14px;
	color: rgba(210, 243, 249, 0.85);
}

.dm-ac-label strong {
	color: var(--dm-accent, #9E7E26);
	font-weight: 700;
}

/* ── Filter Row ────────────────────────────────────────────── */
.dm-explore-filter-row {
	display: flex;
	gap: 15px;
	flex-wrap: wrap;
	margin-bottom: 20px;
}

.dm-explore-filter-group {
	flex: 1;
	min-width: 180px;
}

.dm-explore-filter-label {
	display: block;
	font-family: 'Fjalla One', sans-serif;
	color: var(--dm-medium, #317D89);
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 1.5px;
	margin-bottom: 6px;
}

.dm-explore-filter-select {
	width: 100%;
	padding: 10px 30px 10px 14px;
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: 4px;
	background: rgba(0, 0, 0, 0.4);
	color: #D2F3F9;
	font-family: 'Slabo 27px', serif;
	font-size: 14px;
	cursor: pointer;
	appearance: auto;
}

.dm-explore-filter-select:focus {
	outline: none;
	border-color: var(--dm-accent, #9E7E26);
}

.dm-explore-filter-select option {
	background: #1e2f33;
	color: #D2F3F9;
}

/* ── Keyword Tags ──────────────────────────────────────────── */
.dm-explore-keywords-section {
	margin-bottom: 20px;
}

.dm-explore-keyword-cloud {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.dm-keyword-tag {
	padding: 5px 14px;
	border: 1px solid rgba(255, 255, 255, 0.15);
	border-radius: 20px;
	background: transparent;
	color: rgba(210, 243, 249, 0.7);
	font-family: 'Slabo 27px', serif;
	font-size: 13px;
	cursor: pointer;
	transition: all 0.2s ease;
}

.dm-keyword-tag:hover {
	border-color: var(--dm-accent, #9E7E26);
	color: #fff !important;
	background: var(--dm-accent, #9E7E26);
}

.dm-keyword-tag.active {
	background: var(--dm-accent, #9E7E26);
	border-color: var(--dm-accent, #9E7E26);
	color: #fff;
}

/* ── Keywords Section (Separate Block) ─────────────────────── */
.dm-explore-keywords-section-wrap {
	margin-top: 40px;
	margin-bottom: 40px;
	padding: 40px;
	background: rgba(0, 0, 0, 0.3);
	border-radius: 0;
	border: 1px solid rgba(255, 255, 255, 0.05);
}

.dm-explore-results-meta {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 10px;
	margin: 20px 0 15px;
	padding-bottom: 12px;
	border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

#dm-explore-result-count {
	font-family: 'Slabo 27px', serif;
	color: rgba(210, 243, 249, 0.7);
	font-size: 14px;
}

.dm-explore-active-pills {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	flex: 1;
}

.dm-filter-pill {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 3px 8px 3px 3px;
	border-radius: 4px;
	background: rgba(255, 255, 255, 0.08);
	border: 1px solid rgba(255, 255, 255, 0.1);
	font-family: 'Slabo 27px', serif;
	font-size: 12px;
	color: rgba(210, 243, 249, 0.85);
	transition: background 0.2s ease;
}

.dm-filter-pill:hover {
	background: rgba(255, 255, 255, 0.12);
}

.dm-pill-badge {
	display: inline-block;
	padding: 1px 6px;
	border-radius: 3px;
	font-family: 'Fjalla One', sans-serif;
	font-size: 9px;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	color: #fff;
}

.dm-pill-badge-camera   { background: #317D89; }
.dm-pill-badge-lens     { background: #9E7E26; }
.dm-pill-badge-iso      { background: #6B5B8A; }
.dm-pill-badge-category { background: #5B6A8A; }
.dm-pill-badge-search   { background: #8A5B5B; }
.dm-pill-badge-keyword  { background: #4A7A5B; }

.dm-pill-remove {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 16px;
	height: 16px;
	border: none;
	background: rgba(255, 255, 255, 0.1);
	color: rgba(210, 243, 249, 0.6);
	border-radius: 50%;
	font-size: 12px;
	line-height: 1;
	cursor: pointer;
	padding: 0;
	transition: all 0.15s ease;
}

.dm-pill-remove:hover {
	background: rgba(255, 80, 80, 0.4);
	color: #fff;
}

.dm-explore-clear-btn {
	padding: 6px 16px;
	border: 1px solid var(--dm-accent, #9E7E26);
	border-radius: 4px;
	background: transparent;
	color: var(--dm-accent, #9E7E26);
	font-family: 'Fjalla One', sans-serif;
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 1px;
	cursor: pointer;
	transition: all 0.2s ease;
}

.dm-explore-clear-btn:hover {
	background: var(--dm-accent, #9E7E26);
	color: #fff;
}

/* ── Results Grid (CSS Columns Masonry) ────────────────────── */
.dm-explore-results {
	column-count: 4;
	column-gap: 15px;
}

.dm-explore-image-card {
	break-inside: avoid;
	margin-bottom: 15px;
	border-radius: 0;
	overflow: hidden;
	background: #111;
	border: 1px solid rgba(255, 255, 255, 0.05);
	transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.dm-explore-image-card:hover {
	transform: translateY(-3px);
	box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
	border-color: var(--dm-accent, #9E7E26);
}

.dm-explore-image-link {
	display: block;
}

.dm-explore-image-card img {
	width: 100%;
	height: auto;
	display: block;
	transition: transform 0.4s ease;
}

.dm-explore-image-card:hover img {
	transform: scale(1.03);
}

.dm-explore-image-meta {
	padding: 10px 12px;
	font-family: 'Slabo 27px', serif;
	font-size: 11px;
	color: rgba(210, 243, 249, 0.5);
	line-height: 1.4;
	background: rgba(0, 0, 0, 0.6);
}

/* ── No Results ────────────────────────────────────────────── */
.dm-explore-no-results {
	text-align: center;
	color: rgba(210, 243, 249, 0.5);
	font-family: 'Slabo 27px', serif;
	font-size: 16px;
	padding: 40px 20px;
}

/* ── Loading ───────────────────────────────────────────────── */
.dm-explore-loading {
	text-align: center;
	padding: 40px;
	color: rgba(210, 243, 249, 0.5);
	font-family: 'Slabo 27px', serif;
	column-span: all;
}

.dm-explore-spinner {
	display: inline-block;
	width: 20px;
	height: 20px;
	border: 2px solid rgba(255, 255, 255, 0.2);
	border-top-color: var(--dm-accent, #9E7E26);
	border-radius: 50%;
	animation: dm-spin 0.6s linear infinite;
	vertical-align: middle;
	margin-right: 8px;
}

@keyframes dm-spin {
	to { transform: rotate(360deg); }
}

.dm-explore-filters-loading {
	text-align: center;
	padding: 20px;
	color: rgba(210, 243, 249, 0.5);
	font-family: 'Slabo 27px', serif;
}

/* ── Load More ─────────────────────────────────────────────── */
.dm-explore-load-more-wrap {
	text-align: center;
	margin-top: 30px;
}

.dm-explore-load-more-btn {
	padding: 12px 40px;
	border: 2px solid var(--dm-accent, #9E7E26);
	border-radius: 4px;
	background: transparent;
	color: var(--dm-accent, #9E7E26);
	font-family: 'Fjalla One', sans-serif;
	font-size: 14px;
	text-transform: uppercase;
	letter-spacing: 2px;
	cursor: pointer;
	transition: all 0.3s ease;
}

.dm-explore-load-more-btn:hover {
	background: var(--dm-accent, #9E7E26);
	color: #fff;
}

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 992px) {
	.dm-explore-results {
		column-count: 3;
	}

	.dm-explore-discover {
		padding: 25px;
	}
}

@media (max-width: 768px) {
	.dm-explore-filter-row {
		flex-direction: column;
	}

	.dm-explore-filter-group {
		min-width: 100%;
	}

	.dm-explore-results {
		column-count: 2;
	}

	.dm-explore-results-meta {
		flex-direction: column;
		gap: 10px;
		text-align: center;
	}
}

@media (max-width: 480px) {
	.dm-explore-results {
		column-count: 1;
	}

	.dm-explore-discover {
		padding: 15px;
	}
}

/* ── Lightbox (Meow Lightbox mwl-theme-flat replica) ────── */
body.no-scroll { overflow: hidden; }

.dm-lb {
	display: none;
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 99999;
	background: #000;
	overflow: hidden;
	touch-action: none;
	cursor: default;
}

.dm-lb--dragging {
	cursor: grabbing;
}

.dm-lb--zoomed .dm-lb__img {
	cursor: zoom-out;
	transition: transform 0.3s ease;
}

.dm-lb__img {
	transition: transform 0.3s ease;
	cursor: zoom-in;
}

/* ── Top Bar ───────────────────────────────────────────── */
.dm-lb__top-bar {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	width: 100%;
	height: auto;
	padding: 20px;
	background: transparent;
	display: flex;
	flex-direction: row;
	justify-content: space-between;
	align-items: flex-start;
	pointer-events: none;
	box-sizing: border-box;
	z-index: 10;
}

.dm-lb__top-bar > * {
	pointer-events: auto;
}

.dm-lb__counter {
	color: #fff;
	font-size: 14px;
	font-family: sans-serif;
	opacity: 0.85;
	text-shadow: 1px 1px 10px rgba(255, 255, 255, 0.5);
}

.dm-lb__actions {
	display: flex;
	flex-direction: row;
	align-items: center;
	gap: 5px;
	margin-left: auto;
}

/* ── Action Buttons (close, etc.) ──────────────────────── */
.dm-lb__btn {
	background: transparent !important;
	border: none;
	border-radius: 50%;
	width: 40px;
	height: 40px;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: all 0.2s ease;
	margin: 0;
	position: relative;
	color: #fff;
	overflow: visible;
	padding: 0;
	text-decoration: none;
}

.dm-lb__btn:hover {
	color: #fff;
}

.dm-lb__btn svg {
	width: 20px;
	height: 20px;
	stroke: #fff;
	fill: none;
	position: static;
	display: block;
	flex-shrink: 0;
}

/* Tooltip */
.dm-lb__btn[data-tooltip]::before {
	content: attr(data-tooltip);
	position: absolute;
	top: calc(110%);
	left: 50%;
	transform: translateX(-50%);
	background: rgba(0, 0, 0, 0.7);
	border-radius: 8px;
	padding: 6px 12px;
	color: #fff;
	font-size: 11px;
	font-family: sans-serif;
	white-space: nowrap;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.2s ease, visibility 0.2s ease;
	pointer-events: none;
	z-index: 100;
}

.dm-lb__btn[data-tooltip]:hover::before {
	opacity: 1;
	visibility: visible;
}

@media (min-width: 769px) {
	.dm-lb__btn[data-tooltip]::before {
		font-size: 13px;
	}
}

/* ── Navigation Arrows ─────────────────────────────────── */
.dm-lb__arrow {
	position: fixed;
	top: 50%;
	transform: translateY(-50%);
	z-index: 10;
	height: 50px;
	width: 50px;
	margin: 0 25px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: transparent !important;
	border: none;
	border-radius: 999px;
	transition: none;
	cursor: pointer;
	padding: 0;
	color: #fff;
	outline: none;
	box-shadow: none;
}

.dm-lb__arrow svg {
	height: 32px;
	width: 32px;
	position: static;
	margin: auto;
	fill: #fff;
}

.dm-lb__arrow--prev {
	left: 0;
}

.dm-lb__arrow--prev svg {
	transform: translateX(4px);
}

.dm-lb__arrow--next {
	right: 0;
}

.dm-lb__arrow--next svg {
	transform: scale(-1, 1) translateX(4px);
}

.dm-lb__arrow:hover,
.dm-lb__arrow:active,
.dm-lb__arrow:focus,
.dm-lb__arrow:focus-visible {
	background: transparent !important;
	transform: translateY(-50%) !important;
	outline: none !important;
	box-shadow: none !important;
	top: 50% !important;
	margin: 0 25px !important;
	position: fixed !important;
	color: #fff !important;
	border: none !important;
	padding: 0 !important;
}

/* ── Scroll Wrap / Content Area ────────────────────────── */
.dm-lb__scroll-wrap {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
}

.dm-lb__track {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	will-change: transform;
}

.dm-lb__slide {
	flex: 0 0 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	max-height: 80vh;
}

.dm-lb__slide--prev {
	position: absolute;
	right: 100%;
	top: 0;
	bottom: 0;
}

.dm-lb__slide--next {
	position: absolute;
	left: 100%;
	top: 0;
	bottom: 0;
}

.dm-lb__img {
	max-width: 90vw;
	max-height: 80vh;
	object-fit: contain;
	transition: opacity 0.3s ease;
	backface-visibility: hidden;
	-webkit-backface-visibility: hidden;
	user-select: none;
	-webkit-user-drag: none;
}

.dm-lb__spinner {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
}

/* ── Caption (below image) — mwl__metadata--flat style ─── */
.dm-lb__caption {
	position: static;
	transform: none;
	width: auto;
	max-width: none;
	max-height: none;
	padding: 0;
	margin: 0;
	background: transparent;
	border: none;
	border-radius: 0;
	box-shadow: none;
	overflow: visible;
	text-align: center;
	color: #fff;
	user-select: text;
	-webkit-user-select: text;
	margin-top: 8px;
	transition: opacity 0.2s ease;
}

.dm-lb--hide-info .dm-lb__caption {
	display: none;
}

.dm-lb--hide-info .dm-lb__slide {
	max-height: 95vh;
}

.dm-lb--hide-info .dm-lb__img {
	max-height: 95vh;
}

.dm-lb__title {
	margin: 4px 12px 2px;
	font-size: 15px;
	font-weight: normal;
	font-family: sans-serif;
	color: #fff;
	text-align: center;
}

.dm-lb__title::before,
.dm-lb__title::after {
	display: none;
}

@media (min-width: 769px) {
	.dm-lb__title {
		font-size: 20px;
	}
}

/* ── EXIF Row (icon + text items) ──────────────────────── */
.dm-lb__exifs {
	margin-top: 4px;
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 2px 12px;
	font-family: sans-serif;
	user-select: text;
	-webkit-user-select: text;
	max-width: 90%;
	margin-left: auto;
	margin-right: auto;
}

.dm-lb__exif {
	display: inline-flex;
	align-items: center;
	line-height: 1;
}

.dm-lb__exif--full {
	width: 100%;
	justify-content: center;
}

.dm-lb__exif svg {
	display: inline-block;
	vertical-align: middle;
	height: 16px !important;
	width: auto;
	stroke: #fff;
	fill: none;
	margin-right: 3px;
	flex-shrink: 0;
}

@media (min-width: 769px) {
	.dm-lb__exif svg {
		height: 18px !important;
	}
}

.dm-lb__exif span {
	display: inline-block;
	line-height: 20px;
	vertical-align: middle;
	font-size: 11px;
	color: #fff;
}

@media (min-width: 769px) {
	.dm-lb__exif span {
		font-size: 13px;
		line-height: 24px;
	}
}

/* ── Lightbox Responsive ───────────────────────────────── */
@media (max-width: 768px) {
	.dm-lb__slide {
		max-width: 96vw;
	}

	.dm-lb__img {
		max-width: 96vw;
	}

	.dm-lb__arrow {
		width: 40px;
		height: 40px;
		margin: 0 10px;
	}

	.dm-lb__arrow svg {
		height: 24px;
		width: 24px;
	}
}


