/**
 * Popup styles – inherits font and colors from site theme.
 *
 * @package Popup
 */

/* Stäng av skroll när popupen är öppen */
body.popup-is-open {
	overflow: hidden;
}

.popup-overlay {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(0, 0, 0, 0.5);
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.2s ease, visibility 0.2s ease;
}

.popup-overlay.is-visible {
	opacity: 1;
	visibility: visible;
}

.popup-overlay[hidden] {
	display: none !important;
}

.popup-overlay:not([hidden]).is-visible {
	display: flex !important;
}

.popup-box {
	position: relative;
	max-width: 90vw;
	width: 420px;
	padding: 1.5rem 2rem 2rem;
	font-family: inherit;
	font-size: inherit;
	line-height: inherit;
	color: inherit;
	background: #fff;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
	border-radius: 0;
	transform: scale(0.95);
	transition: transform 0.2s ease;
}

.popup-overlay.is-visible .popup-box {
	transform: scale(1);
}

.popup-close {
	position: absolute;
	top: 0.75rem;
	right: 0.75rem;
	width: 2rem;
	height: 2rem;
	padding: 0;
	font-size: 1.5rem;
	line-height: 1;
	color: currentColor;
	background: transparent;
	border: none;
	cursor: pointer;
	opacity: 0.7;
	transition: opacity 0.15s ease;
}

.popup-close:hover {
	opacity: 1;
}

.popup-title {
	margin: 0 0 0;
	font-family: "Calluna", -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	font-size: 1.125rem;
	line-height: 1.5;
	color: inherit;
}

@media (min-width: 640px) {
	.popup-title {
		font-size: 1.5rem;
	}
}

@media (min-width: 1280px) {
	.popup-title {
		font-size: 1.875rem;
	}
}

.popup-buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	margin-top: 1.5rem;
}

.popup-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 1;
	min-width: 120px;
	width: 100%;
	padding: 1.033rem 4rem;
	font-family: inherit;
	font-size: 0.9375rem;
	font-weight: 700;
	letter-spacing: 1px;
	color: #fff;
	background-color: #c9b79c;
	border: none;
	border-radius: 1.9705rem;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
	user-select: none;
	-webkit-user-select: none;
	transition: background-color 0.25s, color 0.25s;
}

.popup-btn:hover {
	background-color: #b8a68b;
	color: #fff;
}

.popup-btn:focus {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}
