/* Leitarniðurstöður (Leitarniðurstöður.dc.html; mobile: Farsími.dc.html M2). */

.gs-search-top {
	padding-top: 24px;
}

/* ---------- Heading ---------- */

.gs-search-head {
	padding-top: 24px;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.gs-search-head__row {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: flex-end;
	gap: 16px;
	padding-bottom: 14px;
	border-bottom: var(--gs-frame) solid var(--gs-ink);
}

.gs-search-head__title {
	font-size: 56px;
	font-weight: 800;
	line-height: .95;
	font-stretch: 62%;
	text-transform: uppercase;
	text-wrap: balance;
}

.gs-search-head__count {
	color: var(--gs-muted);
}

.gs-search-head__tools {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
}

.gs-viewswitch {
	display: flex;
	border: 2px solid var(--gs-ink);
}

.gs-viewswitch__btn {
	padding: 7px 12px;
	font-size: 13px;
	font-weight: 800;
	font-stretch: 75%;
	text-transform: uppercase;
	text-decoration: none;
	color: var(--gs-ink);
	background: var(--gs-surface);
	transition:
		background var(--gs-medium) var(--gs-ease),
		color var(--gs-medium) var(--gs-ease);
}

.gs-viewswitch__btn + .gs-viewswitch__btn {
	border-left: 2px solid var(--gs-ink);
}

.gs-viewswitch__btn .gs-icon {
	display: none;
}

.gs-viewswitch__btn.is-active {
	background: var(--gs-btn-bg);
	color: var(--gs-btn-fg);
}

.gs-sortbox {
	position: relative;
	height: 36px;
	display: flex;
	align-items: center;
	border: 2px solid var(--gs-ink);
	background: var(--gs-surface);
	font-size: 14px;
	font-weight: 500;
}

.gs-sortbox label {
	height: 100%;
	display: flex;
	align-items: center;
	gap: 4px;
	padding-left: 12px;
	cursor: pointer;
}

.gs-sortbox select {
	height: 100%;
	padding: 0 32px 0 0;
	border: 0;
	background: transparent;
	color: var(--gs-ink);
	font: inherit;
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
}

.gs-sortbox select:focus-visible {
	outline: none;
}

.gs-sortbox:focus-within {
	box-shadow: var(--gs-focus);
}

.gs-sortbox::after {
	content: '▼';
	position: absolute;
	right: 12px;
	font-size: 11px;
	pointer-events: none;
}

.gs-sortbox--mobile {
	display: none;
}

.gs-notice {
	margin-bottom: 14px;
	padding: 10px 12px;
	border: 2px solid var(--gs-ink);
	background: var(--gs-yellow-soft);
	font-size: 13px;
	line-height: 1.45;
}

.gs-search-mobilebar,
.gs-results__mcount,
.gs-filters__sheethead,
.gs-filters__show,
.gs-pager__more {
	display: none;
}

/* ---------- Body: filters · results · ads ---------- */

.gs-search-body {
	padding-top: 24px;
	padding-bottom: 24px;
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	gap: 32px;
}

.gs-filters {
	flex: 0 1 var(--gs-filters);
	min-width: 0;
	border-top: var(--gs-frame) solid var(--gs-ink);
}

.gs-results {
	flex: 1 1 520px;
	min-width: 0;
	display: flex;
	flex-direction: column;
}

.gs-search-side {
	flex: 0 1 var(--gs-sidebar);
	display: flex;
	flex-direction: column;
	gap: 24px;
}

/* Accordion: rows animate 0fr → 1fr; the "+" turns into "×", the square does not rotate. */
.gs-acc {
	border-bottom: 1px solid var(--gs-ink);
}

.gs-acc__head {
	width: 100%;
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 12px 0;
	border: 0;
	background: none;
	color: var(--gs-ink);
	font-size: 14px;
	font-weight: 700;
	text-align: left;
}

.gs-acc__sign {
	width: 20px;
	height: 20px;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 2px solid var(--gs-ink);
	background: var(--gs-surface);
	font-size: 16px;
	font-weight: 800;
	line-height: 1;
	transition: background var(--gs-fast) var(--gs-ease);
}

.gs-acc__sign span {
	display: block;
	transition: transform var(--gs-medium) var(--gs-ease);
}

.gs-acc.is-open .gs-acc__sign {
	background: var(--gs-yellow);
	color: var(--gs-on-yellow);
}

.gs-acc.is-open .gs-acc__sign span {
	transform: rotate(45deg);
}

.gs-acc__body {
	display: grid;
	grid-template-rows: 0fr;
	transition: grid-template-rows var(--gs-medium) var(--gs-ease);
}

.gs-acc.is-open .gs-acc__body {
	grid-template-rows: 1fr;
}

.gs-acc__inner {
	overflow: hidden;
	display: flex;
	flex-direction: column;
	gap: 8px;
	opacity: 0;
	transition: opacity var(--gs-medium) var(--gs-ease);
}

.gs-acc.is-open .gs-acc__inner {
	padding-bottom: 14px;
	opacity: 1;
}

.gs-check {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 14px;
	cursor: pointer;
}

.gs-check input,
.gs-switchrow input {
	position: absolute;
	opacity: 0;
	width: 1px;
	height: 1px;
}

.gs-check__box {
	flex: none;
	width: 16px;
	height: 16px;
	border: 2px solid var(--gs-ink);
	background: var(--gs-surface);
	transition: background var(--gs-fast) var(--gs-ease);
}

.gs-check input:checked + .gs-check__box {
	background: var(--gs-ink);
}

.gs-check input:focus-visible + .gs-check__box,
.gs-switchrow input:focus-visible + .gs-switch {
	box-shadow: var(--gs-focus);
}

.gs-check__label {
	flex: 1;
	min-width: 0;
}

.gs-check__n {
	font-size: 12px;
	color: var(--gs-muted);
}

.gs-switchrow {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 14px 0;
	border-bottom: 1px solid var(--gs-ink);
	font-size: 14px;
	font-weight: 700;
	cursor: pointer;
}

.gs-switch {
	width: 40px;
	height: 22px;
	padding: 2px;
	display: flex;
	border: 2px solid var(--gs-ink);
	background: var(--gs-surface);
	transition: background var(--gs-medium) var(--gs-ease);
}

.gs-switch span {
	width: 14px;
	height: 14px;
	background: var(--gs-ink);
	transition: transform var(--gs-medium) var(--gs-ease), background var(--gs-medium) var(--gs-ease);
}

.gs-switchrow input:checked + .gs-switch {
	background: var(--gs-ink);
}

.gs-switchrow input:checked + .gs-switch span {
	background: var(--gs-yellow);
	transform: translateX(18px);
}

.gs-filters__apply {
	margin-top: 14px;
}

.gs-filters__ad {
	padding-top: 24px;
}

/* ---------- Active filter chips ---------- */

.gs-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	padding-bottom: 14px;
}

.gs-fchip {
	border: 2px solid var(--gs-btn-bg);
	background: var(--gs-btn-bg);
	color: var(--gs-btn-fg);
	padding: 3px 9px;
	font-size: 13px;
	font-weight: 600;
	text-decoration: none;
}

.gs-fchip:hover {
	color: var(--gs-btn-fg);
	text-decoration: line-through;
}

.gs-chips__clear {
	padding: 5px 4px;
	font-size: 13px;
	font-weight: 600;
	color: var(--gs-ink);
}

/* ---------- Views ---------- */

.gs-view {
	display: none;
}

.gs-search-body[data-view="list"] .gs-view--list,
.gs-search-body[data-view="cards"] .gs-view--cards,
.gs-search-body[data-view="map"] .gs-view--map,
.gs-search-body[data-view="table"] .gs-view--table {
	display: block;
	animation: gs-fade-in var(--gs-slow) var(--gs-ease) both;
}

/* List */

.gs-hits {
	border-top: var(--gs-frame) solid var(--gs-ink);
}

.gs-hit {
	display: grid;
	grid-template-columns: 40px minmax(0, 1fr) auto;
	align-items: center;
	gap: 14px;
	padding: 14px 12px 14px 0;
	border-bottom: 1px solid var(--gs-line);
}

.gs-hit__letter {
	font-size: 28px;
	font-weight: 900;
	font-stretch: 62%;
	text-align: center;
}

.gs-hit__main {
	display: flex;
	flex-direction: column;
	gap: 3px;
	min-width: 0;
}

.gs-hit__title {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
}

.gs-hit__name {
	font-size: 17px;
	font-weight: 700;
	color: var(--gs-ink);
	text-decoration: none;
}

.gs-hit__name:hover {
	text-decoration: underline;
	text-underline-offset: 3px;
}

.gs-hit__meta {
	font-size: 13px;
	color: var(--gs-body);
}

.gs-hit__facts {
	font-weight: 600;
}

.gs-hit__facts.is-open {
	color: var(--gs-open);
}

.gs-hit__kt {
	font-size: 12px;
	font-weight: 500;
	color: var(--gs-muted);
}

.gs-hit__more {
	font-size: 16px;
	font-weight: 500;
	color: var(--gs-ink);
	text-decoration: none;
}

.gs-hit--former {
	background: var(--gs-archive-panel);
	color: var(--gs-archive-ink);
	border-bottom-color: var(--gs-ink);
}

.gs-hit--former .gs-hit__name,
.gs-hit--former .gs-hit__meta {
	color: var(--gs-archive-ink);
}

.gs-hit__archive {
	font-size: 14px;
	font-weight: 700;
	color: var(--gs-archive-ink);
	text-decoration: underline;
	text-underline-offset: 3px;
}

.gs-hits__ad {
	padding: 20px 0;
	border-bottom: 1px solid var(--gs-line);
}

/* Cards */

.gs-cards {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
	gap: 16px;
}

.gs-card {
	display: flex;
	flex-direction: column;
	border: 2px solid var(--gs-ink);
	background: var(--gs-surface);
	color: var(--gs-ink);
	text-decoration: none;
	transition:
		transform var(--gs-fast) var(--gs-ease),
		box-shadow var(--gs-fast) var(--gs-ease);
}

.gs-card:hover {
	transform: translate(-3px, -3px);
	box-shadow: 4px 4px 0 var(--gs-shadow);
}

.gs-card__body {
	flex: 1;
	padding: 14px;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.gs-card__top {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 8px;
}

.gs-card__ini {
	flex: none;
	width: 52px;
	height: 52px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--gs-btn-bg);
	color: var(--gs-btn-fg);
	font-size: 24px;
	font-weight: 900;
	font-stretch: 62%;
}

.gs-card__name {
	font-size: 22px;
	font-weight: 800;
	line-height: 1;
	font-stretch: 65%;
	text-transform: uppercase;
}

.gs-card__addr {
	font-size: 13px;
	line-height: 1.45;
	color: var(--gs-body);
}

.gs-card__kt {
	font-size: 12px;
	font-weight: 500;
	color: var(--gs-muted);
}

.gs-card__foot {
	padding: 10px 14px;
	border-top: 1px solid var(--gs-ink);
	font-size: 13px;
	font-weight: 700;
}

.gs-card--former {
	border: 1px dashed var(--gs-archive-rule);
	background: var(--gs-archive-panel);
	color: var(--gs-archive-ink);
}

.gs-card--former:hover {
	box-shadow: 4px 4px 0 var(--gs-archive-ink);
}

.gs-card--former .gs-card__ini {
	background: none;
	color: var(--gs-archive-ink);
	border: 2px dashed var(--gs-archive-rule);
}

.gs-card--former .gs-card__addr {
	color: var(--gs-archive-ink);
}

.gs-card--former .gs-card__foot {
	border-top: 1px dashed var(--gs-archive-rule);
}

.gs-cards__ad {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 8px;
	border: 1px dashed var(--gs-line);
}

/* Map */

.gs-mapview {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
	height: 620px;
	border: 2px solid var(--gs-ink);
	background: var(--gs-surface);
}

.gs-mapview__list {
	overflow-y: auto;
	border-right: 2px solid var(--gs-ink);
}

.gs-mapview__row {
	width: 100%;
	display: grid;
	grid-template-columns: 30px minmax(0, 1fr);
	gap: 10px;
	padding: 11px 12px;
	border: 0;
	border-bottom: 1px solid var(--gs-line);
	background: transparent;
	color: var(--gs-ink);
	text-align: left;
	transition: background var(--gs-fast) var(--gs-ease);
}

.gs-mapview__row.is-selected {
	background: var(--gs-yellow-soft);
}

.gs-mapview__pin {
	width: 26px;
	height: 26px;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 2px solid var(--gs-ink);
	background: var(--gs-surface);
	font-size: 13px;
	font-weight: 800;
}

.gs-mapview__row.is-selected .gs-mapview__pin {
	background: var(--gs-yellow);
	color: var(--gs-on-yellow);
}

.gs-mapview__text {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.gs-mapview__name {
	font-size: 15px;
	font-weight: 700;
}

.gs-mapview__addr {
	font-size: 12px;
	color: var(--gs-muted);
}

.gs-mapview__map {
	position: relative;
	overflow: hidden;
	background: var(--gs-surface-2);
}

/* maplibre-gl.css sets .maplibregl-map { position: relative }, which would collapse this to 0px. */
.gs-mapview__canvas,
.gs-mapview__canvas.maplibregl-map {
	position: absolute;
	inset: 0;
}

.gs-mapview__area {
	position: absolute;
	top: 12px;
	left: 50%;
	transform: translateX(-50%);
	z-index: 2;
	box-shadow: 3px 3px 0 var(--gs-shadow);
	animation: gs-fade-in var(--gs-medium) var(--gs-ease) both;
}

.gs-mapview__area[hidden] {
	display: none;
}

.gs-mapview__row.is-unplaced .gs-mapview__pin {
	border-style: dashed;
	color: var(--gs-muted);
}

/* ---------- Empty / error ---------- */

.gs-empty {
	border-top: var(--gs-frame) solid var(--gs-ink);
	padding: 32px 0;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 12px;
	color: var(--gs-body);
	line-height: 1.5;
}

.gs-empty__title {
	font-size: 36px;
	font-weight: 800;
	line-height: 1;
	font-stretch: 65%;
	text-transform: uppercase;
	color: var(--gs-ink);
}

/* ---------- Pagination ---------- */

.gs-pager {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: center;
	gap: 16px;
	padding-top: 24px;
}

.gs-pager__info {
	font-size: 14px;
	color: var(--gs-muted);
}

.gs-pager__nav {
	display: flex;
}

.gs-pager__btn {
	width: 40px;
	height: 40px;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 2px solid var(--gs-ink);
	background: var(--gs-surface);
	color: var(--gs-ink);
	font-size: 14px;
	font-weight: 700;
	text-decoration: none;
}

.gs-pager__btn + .gs-pager__btn {
	border-left: 0;
}

.gs-pager__btn:first-child,
.gs-pager__btn:last-child {
	background: transparent;
}

.gs-pager__btn.is-current {
	background: var(--gs-btn-bg);
	color: var(--gs-btn-fg);
}

.gs-pager__btn.is-disabled {
	color: var(--gs-disabled);
}

a.gs-pager__btn:not(.is-current):hover {
	background: var(--gs-yellow-soft);
}

/* ---------- Native ad ---------- */

.gs-native-ad {
	display: flex;
	flex-direction: column;
	border: var(--gs-frame) solid var(--gs-ink);
	background: var(--gs-yellow);
	color: var(--gs-on-yellow);
}

.gs-native-ad__img {
	aspect-ratio: 300 / 140;
	display: flex;
	align-items: center;
	justify-content: center;
	border-bottom: var(--gs-frame) solid var(--gs-ink);
	background: repeating-linear-gradient(135deg, var(--gs-surface-2) 0 10px, var(--gs-stripe) 10px 20px);
	font-size: 12px;
	font-weight: 500;
	color: var(--gs-muted);
}

.gs-native-ad__body {
	padding: 16px;
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.gs-native-ad__label {
	font-size: 10px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .1em;
}

.gs-native-ad__title {
	font-size: 30px;
	font-weight: 900;
	line-height: .95;
	font-stretch: 62%;
	text-transform: uppercase;
}

.gs-native-ad__text {
	font-size: 13px;
}

.gs-native-ad__phone {
	align-self: flex-start;
	margin-top: 4px;
	padding: 3px 10px;
	background: var(--gs-on-yellow);
	color: var(--gs-yellow);
	font-size: 20px;
	font-weight: 600;
}

/* ---------- Narrower desktops: ads column moves below ---------- */

@media (max-width: 1099px) {
	.gs-search-side {
		flex: 1 1 100%;
		flex-direction: row;
		flex-wrap: wrap;
		justify-content: center;
		align-items: flex-start;
	}

	.gs-search-side > * {
		width: 300px;
	}
}

/* ---------- Mobile (Farsími M2) ---------- */

@media (max-width: 767px) {
	.gs-search-top {
		padding-top: 12px;
	}

	.gs-search-head {
		padding-top: 12px;
		gap: 0;
	}

	.gs-crumbs,
	.gs-search-head__row {
		display: none;
	}

	.gs-search-mobilebar {
		display: flex;
		align-items: center;
		gap: 6px;
		padding-bottom: 10px;
		border-bottom: var(--gs-frame) solid var(--gs-ink);
	}

	.gs-mbtn {
		height: 36px;
		padding: 0 10px;
		display: flex;
		align-items: center;
		gap: 6px;
		border: 2px solid var(--gs-ink);
		background: var(--gs-surface);
		color: var(--gs-ink);
		font-size: 13px;
		font-weight: 800;
		font-stretch: 75%;
		text-transform: uppercase;
	}

	.gs-mbtn .gs-icon {
		width: 16px;
		height: 16px;
		fill: none;
		stroke: currentColor;
		stroke-width: 2.4;
	}

	.gs-mbtn--accent {
		background: var(--gs-yellow);
		color: var(--gs-on-yellow);
	}

	.gs-sortbox--mobile {
		display: flex;
		font-size: 13px;
		font-weight: 800;
		font-stretch: 75%;
		text-transform: uppercase;
	}

	.gs-sortbox--mobile label {
		padding-left: 10px;
	}

	.gs-sortbox--mobile .gs-sortbox__label {
		display: none;
	}

	.gs-sortbox--mobile select {
		padding-right: 26px;
		text-transform: uppercase;
	}

	.gs-sortbox--mobile::after {
		right: 9px;
		font-size: 9px;
	}

	.gs-mviews {
		margin-left: auto;
		display: flex;
		border: 2px solid var(--gs-ink);
	}

	.gs-mviews__btn {
		width: 36px;
		height: 32px;
		display: flex;
		align-items: center;
		justify-content: center;
		color: var(--gs-ink);
		background: var(--gs-surface);
	}

	.gs-mviews__btn + .gs-mviews__btn {
		border-left: 2px solid var(--gs-ink);
	}

	.gs-mviews__btn.is-active {
		background: var(--gs-btn-bg);
		color: var(--gs-btn-fg);
	}

	.gs-mviews__btn .gs-icon {
		width: 18px;
		height: 18px;
		fill: none;
		stroke: currentColor;
		stroke-width: 2.2;
	}

	.gs-search-body {
		padding-top: 0;
		gap: 0;
	}

	/* Map and table are desktop views; phones fall back to the list. */
	.gs-search-body[data-view="map"] .gs-view--list,
	.gs-search-body[data-view="table"] .gs-view--list {
		display: block;
	}

	.gs-search-body[data-view="map"] .gs-view--map,
	.gs-search-body[data-view="table"] .gs-view--table {
		display: none;
	}

	/* Filters become a full-screen sheet. */
	.gs-filters {
		position: fixed;
		inset: 0;
		z-index: 60;
		overflow-y: auto;
		padding: 0 16px 24px;
		border-top: 0;
		background: var(--gs-bg);
		transform: translateY(100%);
		visibility: hidden;
		transition:
			transform var(--gs-medium) var(--gs-ease-out),
			visibility 0s linear var(--gs-medium);
	}

	.gs-filters.is-open {
		transform: none;
		visibility: visible;
		transition:
			transform var(--gs-medium) var(--gs-ease),
			visibility 0s;
	}

	.gs-filters__sheethead {
		position: sticky;
		top: 0;
		z-index: 1;
		display: flex;
		justify-content: space-between;
		align-items: center;
		padding: 14px 0;
		border-bottom: var(--gs-frame) solid var(--gs-ink);
		background: var(--gs-bg);
		font-size: 30px;
		font-weight: 800;
		font-stretch: 62%;
		text-transform: uppercase;
	}

	.gs-filters__close {
		width: 44px;
		height: 44px;
		display: flex;
		align-items: center;
		justify-content: center;
		border: 2px solid var(--gs-ink);
		background: var(--gs-surface);
		color: var(--gs-ink);
	}

	.gs-filters__close .gs-icon {
		width: 20px;
		height: 20px;
		fill: none;
		stroke: currentColor;
		stroke-width: 2.6;
	}

	.gs-filters__show {
		display: flex;
		width: 100%;
		margin-top: 20px;
	}

	.gs-results__mcount {
		display: block;
		padding: 12px 0 8px;
		font-size: 12px;
		font-weight: 700;
		text-transform: uppercase;
		letter-spacing: .1em;
		color: var(--gs-muted);
	}

	.gs-chips {
		padding: 12px 0 0;
	}

	.gs-hits {
		border-top-width: 1px;
	}

	.gs-hit {
		grid-template-columns: minmax(0, 1fr) auto;
		gap: 10px;
		padding: 12px 0;
	}

	.gs-hit--former {
		padding: 12px 10px;
	}

	.gs-hit__letter,
	.gs-hit__kt {
		display: none;
	}

	.gs-hit__name {
		font-size: 15px;
	}

	.gs-hit__more {
		font-size: 0;
	}

	.gs-hit__more::after {
		content: '→';
		font-size: 18px;
		font-weight: 700;
	}

	.gs-hits__ad {
		padding: 12px 0;
	}

	.gs-cards {
		grid-template-columns: minmax(0, 1fr);
	}

	.gs-pager__nav,
	.gs-pager__info {
		display: none;
	}

	.gs-pager__more {
		display: flex;
		width: 100%;
	}

	body.gs-filters-open {
		overflow: hidden;
	}
}
