/**
 * Xamera – Teamtailor-jobb: stilar (synkade med Lucas designjusteringar 2026-08-07).
 * Den här filen är källan – gör ni ändringar i Oxygen/på annat håll, synka in dem
 * hit så följer de med i framtida pluginversioner.
 * Stäng av helt: add_filter( 'xamera_tt_load_css', '__return_false' );
 */

.tt-jobs {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.tt-job {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	padding: 28px 36px;
	background: #FAFAFA;
	text-decoration: none;
	color: inherit;
	transition: background-color 0.15s ease;
	border-radius: 2px;
}

.tt-job:hover {
	background: #ededed;
}

.tt-job:hover .tt-job__arrow,
.tt-job:focus-visible .tt-job__arrow {
	transform: translateX(5px);
}

.tt-job__content {
	display: block;
	min-width: 0;
}

.tt-job__title {
	display: block;
	margin: 0 0 6px;
	font-size: clamp(20px, 15.5px + 0.9375vw, 26px);
	line-height: 1.25;
	font-weight: 400;
	color: #3a3a3a;
}

.tt-job__meta {
	display: block;
	margin: 0;
	font-size: 15px;
	color: #6c6c6c;
}

.tt-job__arrow {
	flex: 0 0 auto;
	display: flex;
	color: #3a3a3a;
	transition: 0.2s transform ease;
}

.tt-job__arrow svg {
	width: 20px;
	height: 20px;
}

@media (prefers-reduced-motion: reduce) {
	.tt-job__arrow {
		transition: none;
	}
}

/* Filterrad ------------------------------------------------------------ */

/*
 * Viktigt: hidden-attributet (som JS-filtreringen använder) förlorar mot
 * varje egen display-regel på korten. Den här regeln säkrar att dolda kort
 * verkligen döljs – ta inte bort den om ni stylar .tt-job i Oxygen.
 */
.tt-filter [hidden] {
	display: none !important;
}

.tt-filter__bar {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-bottom: 28px;
}

.tt-filter__search-input {
	flex: 1 1 240px;
	padding: 12px 16px;
	border: 1px solid #d5d5d5;
	background: #fff;
	font: inherit;
	color: #3a3a3a;
}

/* Egna dropdowns --------------------------------------------------------- */

.tt-dd {
	position: relative;
}

.tt-dd__btn {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 12px 16px;
	border: 1px solid #d5d5d5;
	background: #fff;
	font: inherit;
	color: #3a3a3a;
	cursor: pointer;
	transition: border-color 0.15s ease, background-color 0.15s ease;
}

.tt-dd__btn:hover {
	border-color: #3a3a3a;
}

.tt-dd__btn--active {
	border-color: #3a3a3a;
	background: #f6f6f6;
}

.tt-dd__chevron {
	display: flex;
	transition: transform 0.22s ease;
}

.tt-dd__chevron svg {
	width: 16px;
	height: 16px;
}

.tt-dd--open .tt-dd__chevron {
	transform: rotate(180deg);
}

.tt-dd__panel {
	position: absolute;
	top: calc(100% + 6px);
	left: 0;
	z-index: 60;
	min-width: 100%;
	width: max-content;
	max-width: 320px;
	max-height: 340px;
	overflow: auto;
	margin: 0;
	padding: 6px 0;
	list-style: none;
	background: #fff;
	border: 1px solid #e2e2e2;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.tt-dd__option {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 16px;
	padding: 10px 16px;
	cursor: pointer;
	white-space: nowrap;
	color: #3a3a3a;
}

.tt-dd__option:hover,
.tt-dd__option--focus {
	background: #f4f4f4;
}

.tt-dd__option[aria-selected="true"] {
	font-weight: 600;
}

/* Gråade val utan jobb – syns men går inte att välja. */
.tt-dd__option--disabled,
.tt-dd__option--disabled:hover {
	color: #bbbbbb;
	cursor: default;
	background: transparent;
}

.tt-dd__count {
	color: #9a9a9a;
	font-size: 13px;
}

.tt-dd__option--disabled .tt-dd__count {
	color: #c9c9c9;
}

/* Räknare + chips -------------------------------------------------------- */

.tt-filter__meta {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	flex-wrap: wrap;
	margin-bottom: 20px;
}

.tt-filter__count {
	margin: 0;
	font-size: 14px;
	color: #6c6c6c;
}

.tt-filter__chips {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
}

.tt-filter__chips-list {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
}

.tt-chip {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 7px 12px;
	background: #efefef;
	border: 0;
	font: inherit;
	font-size: 13px;
	color: #3a3a3a;
	cursor: pointer;
	transition: background-color 0.15s ease;
}

.tt-chip:hover {
	background: #e2e2e2;
}

.tt-chip__x {
	font-size: 15px;
	line-height: 1;
}

.tt-filter__clear,
.tt-filter__empty-clear {
	background: none;
	border: 0;
	padding: 0;
	font: inherit;
	font-size: 13px;
	color: #3a3a3a;
	text-decoration: underline;
	cursor: pointer;
}

/* Diagnospanel (?tt_debug=1) --------------------------------------------- */

.tt-debug {
	margin-bottom: 24px;
	padding: 12px 16px;
	background: #fff8e1;
	border: 1px solid #e5d28a;
	font-size: 13px;
}

.tt-debug pre {
	overflow: auto;
	margin: 8px 0 0;
}

/* Fokus ------------------------------------------------------------------ */

.tt-filter__search-input:focus-visible,
.tt-dd__btn:focus-visible,
.tt-chip:focus-visible,
.tt-filter__clear:focus-visible,
.tt-filter__empty-clear:focus-visible,
.tt-filter__more-btn:focus-visible {
	outline: 2px solid #3a3a3a;
	outline-offset: 1px;
}

/* Tomt läge + Ladda fler ---------------------------------------------- */

.tt-filter__empty,
.tt-jobs__empty,
.tt-jobs__fallback {
	color: #6c6c6c;
}

.tt-jobs__empty a,
.tt-jobs__fallback a {
	color: #6c6c6c;
	text-decoration: underline;
}

.tt-jobs__empty a:hover,
.tt-jobs__fallback a:hover {
	color: #B9B9B9;
	text-decoration: underline;
}

.tt-filter__more {
	display: flex;
	justify-content: center;
	margin-top: 36px;
}

.tt-filter__more-btn {
	background: #3a3a3a;
	color: #fff;
	border: 0;
	padding: 16px 40px;
	font-size: 13px;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	cursor: pointer;
	transition: background-color 0.15s ease;
}

.tt-filter__more-btn:hover {
	background: #262626;
}

/* Mobil ---------------------------------------------------------------- */

@media (max-width: 640px) {
	.tt-job {
		padding: 20px;
	}

	.tt-dd {
		flex: 1 1 calc(50% - 6px);
	}

	.tt-dd__btn {
		width: 100%;
		justify-content: space-between;
	}

	.tt-dd__panel {
		width: 100%;
		max-width: none;
	}
}
