/* Psytrance Events — party finder. Inherits fonts and colours from the theme. */

.pte-finder { margin: 18px 0 32px; }
.pte-finder__status { padding: 18px 0; opacity: 0.85; }
.pte-finder__status--error { color: #a12626; opacity: 1; }
.pte-finder__note { font-size: 0.82em; opacity: 0.7; margin: 6px 0 0; }

/* ---------- Controls ---------- */
.pte-finder__controls {
	display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
	padding: 14px; border: 1px solid rgba(0, 0, 0, 0.1); border-radius: 8px;
}
.pte-finder__controls select,
.pte-finder__controls input[type="search"],
.pte-finder__near {
	min-height: 44px; padding: 8px 12px; font: inherit; max-width: 100%;
	border: 1px solid rgba(0, 0, 0, 0.3); border-radius: 6px; background: #fff; color: #1a1a1a;
}
.pte-finder__search { flex: 1 1 220px; }
.pte-finder__controls select { flex: 0 1 auto; }
/* Themes style every <button>; these keep our own look (hence !important). */
.pte-finder button.pte-finder__near {
	cursor: pointer; font-weight: 600; text-transform: none; letter-spacing: 0; box-shadow: none;
	background: #fff !important; color: #1a1a1a !important; border: 1px solid rgba(0, 0, 0, 0.3) !important;
}
.pte-finder button.pte-finder__near[aria-pressed="true"] {
	background: #1a1a1a !important; color: #fff !important; border-color: #1a1a1a !important;
}
.pte-finder__controls [hidden] { display: none; }
@media (max-width: 640px) {
	.pte-finder__controls { display: grid; grid-template-columns: 1fr 1fr; padding: 12px; }
	.pte-finder__search { grid-column: 1 / -1; }
	.pte-finder__controls select,
	.pte-finder__controls input[type="search"],
	.pte-finder button.pte-finder__near { width: 100%; min-width: 0; }
}

.pte-finder__controls select:focus-visible,
.pte-finder__controls input:focus-visible,
.pte-finder__near:focus-visible,
.pte-finder button:focus-visible,
.pte-finder a:focus-visible,
.pte-finder summary:focus-visible {
	outline: 3px solid #2f6fed; outline-offset: 2px;
}

/* ---------- Map ---------- */
.pte-finder__map {
	height: var(--pte-map-height, 440px); max-height: 70vh; min-height: 240px;
	margin-top: 14px; border-radius: 8px; overflow: hidden;
	border: 1px solid rgba(0, 0, 0, 0.1); background: #e8eef0; z-index: 0;
}
@media (max-width: 640px) {
	.pte-finder__map { height: min(var(--pte-map-height, 440px), 52vh); }
}
.pte-finder .pte-pin, .pte-finder .pte-cluster { cursor: pointer; }
.pte-pin span {
	display: block; width: 18px; height: 18px; margin: 2px; border-radius: 50%;
	background: #7a2ee6; border: 3px solid #fff; box-shadow: 0 1px 5px rgba(0, 0, 0, 0.45);
}
.pte-finder .pte-cluster {
	display: flex; align-items: center; justify-content: center; border-radius: 50%;
	background: #1a1a1a; color: #fff; font-weight: 700; font-size: 13px;
	border: 3px solid #fff; box-shadow: 0 1px 6px rgba(0, 0, 0, 0.4);
}
.pte-finder__popup { display: grid; gap: 3px; min-width: 170px; font-size: 14px; line-height: 1.35; }
.pte-finder__popup a { font-weight: 600; }

/* ---------- Summary ---------- */
.pte-finder__summary { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 18px 0 4px; }
.pte-finder__count { font-weight: 700; }
.pte-finder button.pte-finder__clear,
.pte-finder button.pte-finder__onmap,
.pte-finder .pte-finder__calmenu button {
	background: none !important; border: 0 !important; border-radius: 0; padding: 0 !important; margin: 0; min-height: 0;
	font: inherit; font-weight: 400; color: inherit !important; text-transform: none; letter-spacing: 0;
	text-decoration: underline; cursor: pointer; box-shadow: none !important; width: auto; line-height: inherit;
}
.pte-finder .pte-finder__calmenu button {
	width: 100%; padding: 11px 14px !important; text-decoration: none; color: #1a1a1a !important;
}
.pte-finder .pte-finder__calmenu button:hover { background: rgba(0, 0, 0, 0.05) !important; }
.pte-finder__summary [hidden] { display: none; }

/* ---------- List ---------- */
.pte-finder__month {
	margin: 26px 0 10px; padding-bottom: 6px; font-size: 1.2em;
	border-bottom: 2px solid rgba(0, 0, 0, 0.12);
}
.pte-finder__cards {
	list-style: none; margin: 0; padding: 0;
	display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px;
}
@media (max-width: 400px) {
	.pte-finder__cards { grid-template-columns: 1fr; }
}
.pte-finder__card {
	display: flex; gap: 14px; margin: 0; padding: 14px;
	border: 1px solid rgba(0, 0, 0, 0.1); border-radius: 8px; background: #fff; color: #1a1a1a;
}
.pte-finder__thumb { flex: 0 0 72px; }
.pte-finder__thumb img {
	width: 72px; height: 72px; object-fit: cover; border-radius: 6px; display: block; background: #14121f;
}
.pte-finder__body { flex: 1 1 auto; min-width: 0; }
.pte-finder__badges { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 4px; }
.pte-finder__badges:empty { display: none; }
.pte-finder__badges .pte-badge { margin-right: 0; }
.pte-badge--now { background: #0a7a3d; }
.pte-badge--status { background: #a12626; }
.pte-finder__title { margin: 0 0 4px; font-size: 1.05em; line-height: 1.3; overflow-wrap: anywhere; }
.pte-finder__title a { text-decoration: none; color: inherit; }
.pte-finder__title a:hover { text-decoration: underline; }
.pte-finder__date, .pte-finder__place, .pte-finder__org { margin: 0; font-size: 0.9em; line-height: 1.45; }
.pte-finder__date { font-weight: 600; }
.pte-finder__tz { font-weight: 400; opacity: 0.65; font-size: 0.9em; }
.pte-finder__place, .pte-finder__org { opacity: 0.85; overflow-wrap: anywhere; }

.pte-finder__actions {
	display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: flex-start;
	margin-top: 8px; font-size: 0.88em;
}
.pte-finder__link { font-weight: 600; }
.pte-finder__cal { position: relative; }
.pte-finder__cal summary { cursor: pointer; text-decoration: underline; list-style: none; }
.pte-finder__cal summary::-webkit-details-marker { display: none; }
.pte-finder__calmenu {
	position: absolute; z-index: 30; left: 0; top: calc(100% + 6px); min-width: 210px;
	display: grid; background: #fff; color: #1a1a1a;
	border: 1px solid rgba(0, 0, 0, 0.15); border-radius: 8px; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.14);
}
.pte-finder__calmenu a,
.pte-finder .pte-finder__calmenu button { display: block; padding: 11px 14px; text-align: left; text-decoration: none; color: #1a1a1a; }
.pte-finder__calmenu a:hover,
.pte-finder__calmenu button:hover { background: rgba(0, 0, 0, 0.05); }

.pte-finder__more { display: block; margin: 22px auto 0; }
.pte-finder__more[hidden] { display: none; }
.pte-finder__credit { margin-top: 22px; font-size: 0.85em; opacity: 0.8; }
