/* ==========================================================================
   EVENT FILTER v1.1.0 — Vega-inspirerad styling
   --------------------------------------------------------------------------
   Filtret injiceras av scripts/event-filter.js precis ovanfor sokformularet
   pa evenemangssidan. Den befintliga checkbox-filtret (event-tags-checkboxes)
   doljs har — sokformularet for ovrigt forblir.

   v1.1.0 (polish):
   - Fri entre flyttad till egen rad ovanfor Scen (matchar v1.1.3 av JS:en)
   - Mindre avstand mellan sidhuvud och filter
   - Doljer sidrubriken "EVENEMANG & BILJETTER" pa evenemangssidan
   - Fri entre visuellt diskretare an huvudfiltren
   ========================================================================== */


/* --------------------------------------------------------------------------
   0. PAGE-LEVEL JUSTERINGAR
   -------------------------------------------------------------------------- */

/* Dolj sidrubriken pa evenemangssidan — titeln renderas i header.php rad 111
   som h1.entry-title inuti #site-header (inte i article .entry-header).
   Sida 235 kor default-mallen lokalt; page-id-235 traffar bara den sidan. */
.page-id-235 #site-header h1.entry-title {
	display: none !important;
}

/* Minska avstandet mellan header och innehallet.
   .entry-content sitter inuti .post-inner, inte direkt i article. */
main#site-content > article .entry-content {
	padding-top: 20px !important;
}


/* --------------------------------------------------------------------------
   1. DOLJ DET GAMLA: kategori-checkboxarna och submit-knappen
   -------------------------------------------------------------------------- */

fieldset.event-tags-checkboxes {
	display: none !important;
}

form.search-events input[type="submit"] {
	display: none !important;
}


/* --------------------------------------------------------------------------
   2. SNYGGA TILL SOKFALTET
   -------------------------------------------------------------------------- */

form.search-events {
	display:    block !important;
	margin:     0 0 30px 0 !important;
	width:      100% !important;
	background: transparent !important;
	padding:    0 !important;
	border:     none !important;
}

form.search-events input[type="text"].search-field {
	width:               100% !important;
	background:          transparent !important;
	border:              none !important;
	border-bottom:       1px solid rgba(255,255,255,0.4) !important;
	border-radius:       0 !important;
	color:               white !important;
	font-family:         var(--bold-font) !important;
	font-size:           16px !important;
	padding:             12px 0 12px 32px !important;
	outline:             none !important;
	-webkit-appearance:  none !important;
	background-image:    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E") !important;
	background-repeat:   no-repeat !important;
	background-position: 4px center !important;
	background-size:     18px !important;
	transition:          border-color 0.2s ease !important;
}

form.search-events input[type="text"].search-field:focus {
	border-bottom-color: white !important;
}

form.search-events input[type="text"].search-field::placeholder {
	color: rgba(255,255,255,0.4) !important;
}


/* --------------------------------------------------------------------------
   3. FILTRETS LAYOUT
   -------------------------------------------------------------------------- */

.kl-filter {
	display:        flex;
	flex-direction: column;
	gap:            14px;
	margin:         0 0 24px 0;
	padding:        0;
	font-family:    var(--bold-font);
	color:          white;
}

.kl-filter__row {
	display:     flex;
	align-items: center;
	gap:         16px;
	flex-wrap:   wrap;
}

.kl-filter__label {
	min-width:        80px;
	font-size:        15px;
	letter-spacing:   0.08em;
	text-transform:   uppercase;
	color:            white;
	font-weight:      700;
}

/* Fri entre-rad: lite mindre vertikalt utrymme, ovanfor Scen */
.kl-filter__row--fri-entre {
	margin-bottom: -4px;  /* slipa ihop mot Scen-raden */
}

.kl-filter__buttons {
	display: flex;
	gap:     8px;
	flex-wrap: wrap;
}


/* --------------------------------------------------------------------------
   4. PILL-KNAPPAR (scen & typ)
   -------------------------------------------------------------------------- */

.kl-filter__pill {
	display:         inline-flex;
	align-items:     center;
	justify-content: center;
	padding:         8px 18px;
	background:      transparent;
	color:           white;
	border:          1px solid rgba(255,255,255,0.4);
	border-radius:   0;
	font-family:     var(--bold-font);
	font-size:       12px;
	letter-spacing:  0.05em;
	text-transform:  uppercase;
	cursor:          pointer;
	opacity:         0.7;
	transition:      border-color 0.15s ease, opacity 0.15s ease, background 0.15s ease;
	white-space:     nowrap;
	line-height:     1.2;
}

.kl-filter__pill:hover {
	border-color: white;
	opacity:      1;
}

.kl-filter__pill.is-active {
	border-color: white;
	opacity:      1;
	background:   rgba(255,255,255,0.12);
	box-shadow:   inset 0 0 0 1px white;
}


/* --------------------------------------------------------------------------
   5. FRI ENTRE-KRYSSRUTA
   -------------------------------------------------------------------------- */

.kl-filter__fri-entre {
	display:         inline-flex;
	align-items:     center;
	gap:             8px;
	cursor:          pointer;
	font-size:       12px;
	letter-spacing:  0.05em;
	text-transform:  uppercase;
	color:           rgba(255,255,255,0.65);
	transition:      color 0.15s ease;
}

.kl-filter__fri-entre:hover {
	color: white;
}

.kl-filter__fri-entre input[type="checkbox"] {
	-webkit-appearance: none;
	appearance:         none;
	width:              16px;
	height:             16px;
	border:             1px solid rgba(255,255,255,0.6);
	border-radius:      0;
	background:         transparent;
	cursor:             pointer;
	position:           relative;
	margin:             0;
	flex-shrink:        0;
}

.kl-filter__fri-entre input[type="checkbox"]:checked {
	background: white;
}

.kl-filter__fri-entre input[type="checkbox"]:checked::after {
	content:    '';
	position:   absolute;
	top:        2px;
	left:       5px;
	width:      4px;
	height:     8px;
	border:     solid black;
	border-width: 0 2px 2px 0;
	transform:  rotate(45deg);
}


/* --------------------------------------------------------------------------
   6. GENRE-DROPDOWN
   -------------------------------------------------------------------------- */

.kl-filter__dropdown {
	position: relative;
	display:  inline-block;
}

.kl-filter__dropdown-toggle {
	display:         inline-flex;
	align-items:     center;
	gap:             10px;
	padding:         8px 16px;
	background:      transparent;
	color:           white;
	border:          1px solid rgba(255,255,255,0.4);
	border-radius:   0;
	font-family:     var(--bold-font);
	font-size:       12px;
	letter-spacing:  0.05em;
	text-transform:  uppercase;
	cursor:          pointer;
	min-width:       180px;
	justify-content: space-between;
	transition:      border-color 0.15s ease;
}

.kl-filter__dropdown-toggle:hover {
	border-color: white;
}

.kl-filter--dropdown-open .kl-filter__dropdown-toggle {
	border-color: white;
}

.kl-filter__dropdown-arrow {
	font-size: 10px;
	transition: transform 0.2s ease;
	display: inline-block;
}

.kl-filter--dropdown-open .kl-filter__dropdown-arrow {
	transform: rotate(180deg);
}

.kl-filter__dropdown-menu {
	position:       absolute;
	top:            calc(100% + 4px);
	left:           0;
	min-width:      100%;
	max-height:     320px;
	overflow-y:     auto;
	background:     #0a0a0a;
	border:         1px solid rgba(255,255,255,0.3);
	padding:        6px 0;
	z-index:        50;
	display:        flex;
	flex-direction: column;
	gap:            0;
}

.kl-filter__dropdown-menu[hidden] {
	display: none !important;
}

.kl-filter__checkbox {
	display:     flex;
	align-items: center;
	gap:         10px;
	padding:     8px 16px;
	cursor:      pointer;
	color:       white;
	font-size:   13px;
	font-family: var(--bold-font);
	text-transform: uppercase;
	letter-spacing: 0.03em;
	white-space: nowrap;
	transition:  background 0.1s ease;
}

.kl-filter__checkbox:hover {
	background: rgba(255,255,255,0.08);
}

.kl-filter__checkbox input[type="checkbox"] {
	-webkit-appearance: none;
	appearance:         none;
	width:              14px;
	height:             14px;
	border:             1px solid rgba(255,255,255,0.6);
	border-radius:      0;
	background:         transparent;
	cursor:             pointer;
	position:           relative;
	margin:             0;
	flex-shrink:        0;
}

.kl-filter__checkbox input[type="checkbox"]:checked {
	background: white;
}

.kl-filter__checkbox input[type="checkbox"]:checked::after {
	content:    '';
	position:   absolute;
	top:        1px;
	left:       4px;
	width:      4px;
	height:     8px;
	border:     solid black;
	border-width: 0 2px 2px 0;
	transform:  rotate(45deg);
}


/* --------------------------------------------------------------------------
   7. RENSA-KNAPP
   -------------------------------------------------------------------------- */

.kl-filter__clear {
	background:     transparent;
	color:          rgba(255,255,255,0.6);
	border:         none;
	font-family:    var(--bold-font);
	font-size:      11px;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	cursor:         pointer;
	padding:        4px 8px;
	text-decoration: underline;
	transition:     color 0.15s ease;
}

.kl-filter__clear:hover {
	color: white;
}


/* --------------------------------------------------------------------------
   8. EMPTY-STATE
   -------------------------------------------------------------------------- */

.kl-filter__empty {
	margin-top:     8px;
	padding:        12px 0;
	font-size:      14px;
	letter-spacing: 0.03em;
	color:          rgba(255,255,255,0.7);
	font-family:    var(--bold-font);
}


/* --------------------------------------------------------------------------
   9. MOBIL (<= 699px)
   -------------------------------------------------------------------------- */

@media (max-width: 699px) {

	.kl-filter {
		gap: 12px;
		margin: 0 0 20px 0;
	}

	.kl-filter__row {
		gap:       10px;
		flex-wrap: wrap;
	}

	.kl-filter__label {
		min-width:     100%;
		flex-basis:    100%;
		margin-bottom: 2px;
		font-size:     16px;
	}

	.kl-filter__row--fri-entre .kl-filter__label {
		display: none;  /* Tom label tar plats — slopa pa mobil */
	}

	.kl-filter__pill {
		padding:   6px 12px;
		font-size: 11px;
	}

	.kl-filter__dropdown-toggle {
		min-width:  100%;
		flex-basis: 100%;
	}

	.kl-filter__dropdown-menu {
		max-height: 60vh;
	}
}
