/* Geo Popup – frontend
   Alle farger og radier ligger som variabler, så temaet kan overstyre dem. */

.gp-overlay {
	--gp-bg: #ffffff;
	--gp-text: #16181d;
	--gp-muted: #5b6270;
	--gp-accent: #16181d;
	--gp-accent-text: #ffffff;
	--gp-line: rgba(22, 24, 29, 0.12);
	--gp-radius: 10px;
	--gp-max-width: 460px;

	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	background: rgba(12, 14, 18, 0.55);
	opacity: 0;
	transition: opacity 0.2s ease;
}

.gp-overlay.is-open {
	opacity: 1;
}

.gp-box {
	position: relative;
	box-sizing: border-box;
	width: 100%;
	max-width: var(--gp-max-width);
	max-height: calc(100vh - 48px);
	overflow-y: auto;
	padding: 32px 32px 28px;
	background: var(--gp-bg);
	color: var(--gp-text);
	border-radius: var(--gp-radius);
	box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
	transform: translateY(12px);
	transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
	font-size: 16px;
	line-height: 1.55;
	text-align: left;
}

.gp-overlay.is-open .gp-box {
	transform: translateY(0);
}

.gp-close {
	position: absolute;
	top: 12px;
	right: 12px;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	padding: 0;
	background: none;
	border: 0;
	border-radius: 50%;
	color: var(--gp-muted);
	cursor: pointer;
	transition: background-color 0.15s ease, color 0.15s ease;
}

.gp-close:hover,
.gp-close:focus-visible {
	background: rgba(22, 24, 29, 0.07);
	color: var(--gp-text);
}

.gp-close svg {
	width: 14px;
	height: 14px;
	stroke: currentColor;
	stroke-width: 1.6;
	stroke-linecap: round;
	fill: none;
}

.gp-flag {
	display: inline-block;
	margin-bottom: 12px;
	padding: 3px 8px;
	border: 1px solid var(--gp-line);
	border-radius: 3px;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.09em;
	text-transform: uppercase;
	color: var(--gp-muted);
}

.gp-title {
	margin: 0 0 10px;
	font-size: 22px;
	line-height: 1.25;
	font-weight: 600;
	color: var(--gp-text);
}

.gp-message {
	margin: 0;
	color: var(--gp-muted);
}

.gp-message p {
	margin: 0 0 12px;
}

.gp-message p:last-child {
	margin-bottom: 0;
}

.gp-message a {
	color: inherit;
	text-decoration: underline;
}

.gp-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	align-items: center;
	margin-top: 22px;
}

.gp-button {
	display: inline-block;
	padding: 11px 20px;
	background: var(--gp-accent);
	color: var(--gp-accent-text);
	border: 0;
	border-radius: 6px;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
	cursor: pointer;
}

.gp-button:hover,
.gp-button:focus-visible {
	opacity: 0.88;
	color: var(--gp-accent-text);
	text-decoration: none;
}

.gp-dismiss {
	padding: 11px 8px;
	background: none;
	border: 0;
	color: var(--gp-muted);
	font-size: 15px;
	font-family: inherit;
	cursor: pointer;
	text-decoration: underline;
}

.gp-dismiss:hover,
.gp-dismiss:focus-visible {
	color: var(--gp-text);
}

.gp-overlay :focus-visible {
	outline: 2px solid var(--gp-accent);
	outline-offset: 2px;
}

/* Mobil: legg boksen nederst som et ark. */
@media (max-width: 600px) {
	.gp-overlay {
		align-items: flex-end;
		padding: 0;
	}

	.gp-box {
		max-width: none;
		max-height: 85vh;
		padding: 28px 22px 24px;
		border-radius: 14px 14px 0 0;
		transform: translateY(100%);
	}
}

@media (prefers-reduced-motion: reduce) {
	.gp-overlay,
	.gp-box {
		transition: none;
	}

	.gp-box {
		transform: none;
	}
}
