/*
 * Weinkristall Pop-up
 * Farben und Schriften folgen dem Theme von weinkristall.ch (Cormorant Garamond, Quattrocento Sans, Gold #b89051).
 * Alles hängt an #wkp, damit die Regeln des Themes (button, h2, a …) sicher überstimmt werden.
 */

#wkp {
	--wkp-accent: #b89051;
	--wkp-accent-dark: #9f7a40;
	--wkp-bg: #fbf9f4;
	--wkp-heading: #333333;
	--wkp-text: #6e6c68;
	--wkp-line: #ded6d4;
	--wkp-font-heading: "Cormorant Garamond", Georgia, "Times New Roman", serif;
	--wkp-font-body: "Quattrocento Sans", "Helvetica Neue", Arial, sans-serif;

	position: fixed;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	z-index: 999990;
	display: flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	margin: 0;
	padding: 20px 16px;
}

#wkp[hidden] {
	display: none;
}

#wkp *,
#wkp *::before,
#wkp *::after {
	box-sizing: border-box;
}

/* Seite dahinter nicht mitscrollen; der reservierte Scrollbalken-Platz verhindert ein Springen des Layouts. */
html.wkp-lock {
	overflow: hidden !important;
	scrollbar-gutter: stable;
}

#wkp .wkp__backdrop {
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	background: rgba(20, 20, 20, 0.72);
	opacity: 0;
	transition: opacity 0.35s ease;
	touch-action: none;
}

#wkp .wkp__dialog {
	position: relative;
	display: flex;
	flex-direction: column;
	width: 100%;
	max-width: 620px;
	max-height: 100%;
	margin: 0;
	padding: 10px;
	background: var(--wkp-bg);
	box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4);
	opacity: 0;
	transform: translateY(18px);
	transition: opacity 0.35s ease, transform 0.35s ease;
}

#wkp.is-open .wkp__backdrop,
#wkp.is-open .wkp__dialog {
	opacity: 1;
}

#wkp.is-open .wkp__dialog {
	transform: none;
}

/* Feiner Goldrahmen; der Inhalt scrollt innerhalb des Rahmens. */
#wkp .wkp__body {
	flex: 1 1 auto;
	min-height: 0;
	padding: 52px 48px 44px;
	overflow-x: hidden;
	overflow-y: auto;
	overscroll-behavior: contain;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: thin;
	scrollbar-color: rgba(184, 144, 81, 0.55) transparent;
	border: 1px solid rgba(184, 144, 81, 0.5);
	outline: 0;
}

#wkp .wkp__close {
	position: absolute;
	top: -14px;
	right: -14px;
	z-index: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	min-width: 0;
	height: 44px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--wkp-accent);
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28);
	color: #ffffff;
	line-height: 1;
	cursor: pointer;
	transition: background-color 0.25s ease, transform 0.25s ease;
}

#wkp .wkp__close:hover,
#wkp .wkp__close:focus {
	background: var(--wkp-heading);
	color: #ffffff;
}

#wkp .wkp__close:hover {
	transform: rotate(90deg);
}

#wkp .wkp__close svg {
	display: block;
}

#wkp .wkp__close:focus-visible,
#wkp .wkp__button:focus-visible,
#wkp .wkp__content a:focus-visible {
	outline: 2px solid var(--wkp-accent);
	outline-offset: 3px;
}

/* Mehrere Pop-ups stehen untereinander, getrennt durch eine Linie mit kleinem Kristall. */
#wkp .wkp__item {
	position: relative;
	margin: 0;
	padding: 0;
}

#wkp .wkp__item + .wkp__item {
	margin-top: 40px;
	padding-top: 44px;
	border-top: 1px solid var(--wkp-line);
}

#wkp .wkp__item + .wkp__item::before {
	content: "";
	position: absolute;
	top: -5px;
	left: 50%;
	width: 9px;
	height: 9px;
	margin-left: -5px;
	border: 1px solid var(--wkp-accent);
	background: var(--wkp-bg);
	transform: rotate(45deg);
}

#wkp .wkp__title {
	margin: 0;
	padding: 0;
	color: var(--wkp-heading);
	font-family: var(--wkp-font-heading);
	font-size: 42px;
	font-style: normal;
	font-weight: 500;
	line-height: 1.06;
	letter-spacing: 0;
	text-align: center;
	text-transform: none;
	overflow-wrap: break-word;
}

#wkp .wkp__title::after {
	content: "";
	display: block;
	width: 56px;
	height: 1px;
	margin: 20px auto 24px;
	background: var(--wkp-accent);
}

#wkp .wkp__content {
	color: var(--wkp-text);
	font-family: var(--wkp-font-body);
	font-size: 17px;
	font-weight: 400;
	line-height: 1.64;
	letter-spacing: 0;
	text-align: center;
	overflow-wrap: break-word;
}

#wkp .wkp__content::after {
	content: "";
	display: table;
	clear: both;
}

#wkp .wkp__content > :first-child {
	margin-top: 0;
}

#wkp .wkp__content > :last-child {
	margin-bottom: 0;
}

#wkp .wkp__content p {
	margin: 0 0 1em;
	padding: 0;
	color: inherit;
}

#wkp .wkp__content h1,
#wkp .wkp__content h2,
#wkp .wkp__content h3,
#wkp .wkp__content h4,
#wkp .wkp__content h5,
#wkp .wkp__content h6 {
	margin: 1.1em 0 0.45em;
	padding: 0;
	color: var(--wkp-heading);
	font-family: var(--wkp-font-heading);
	font-style: normal;
	font-weight: 600;
	line-height: 1.2;
	letter-spacing: 0;
	text-transform: none;
}

#wkp .wkp__content h1,
#wkp .wkp__content h2 {
	font-size: 30px;
	font-weight: 500;
}

#wkp .wkp__content h3 {
	font-size: 26px;
}

#wkp .wkp__content h4 {
	font-size: 22px;
}

#wkp .wkp__content h5,
#wkp .wkp__content h6 {
	font-size: 19px;
}

#wkp .wkp__content a {
	color: var(--wkp-accent-dark);
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
	transition: color 0.25s ease;
}

#wkp .wkp__content a:hover,
#wkp .wkp__content a:focus {
	color: var(--wkp-heading);
}

#wkp .wkp__content strong,
#wkp .wkp__content b {
	color: var(--wkp-heading);
	font-weight: 700;
}

#wkp .wkp__content ul,
#wkp .wkp__content ol {
	display: inline-block;
	max-width: 100%;
	margin: 0 0 1em;
	padding: 0 0 0 1.3em;
	text-align: left;
}

#wkp .wkp__content li {
	margin: 0 0 0.3em;
	padding: 0;
}

#wkp .wkp__content hr {
	width: 100%;
	height: 1px;
	margin: 1.6em 0;
	border: 0;
	background: var(--wkp-line);
}

#wkp .wkp__content blockquote {
	margin: 0 0 1em;
	padding: 0;
	border: 0;
	background: none;
	color: var(--wkp-heading);
	font-family: var(--wkp-font-heading);
	font-size: 22px;
	font-style: italic;
	line-height: 1.4;
}

#wkp .wkp__content table {
	width: 100%;
	margin: 0 0 1em;
	border-collapse: collapse;
	text-align: left;
}

#wkp .wkp__content th,
#wkp .wkp__content td {
	padding: 8px 10px;
	border: 0;
	border-bottom: 1px solid var(--wkp-line);
	background: none;
	color: inherit;
}

/* Bilder und Medien aus dem Editor */
#wkp .wkp__content img,
#wkp .wkp__content video,
#wkp .wkp__content iframe,
#wkp .wkp__content embed {
	max-width: 100%;
}

#wkp .wkp__content img {
	height: auto;
	vertical-align: middle;
}

#wkp .wkp__content .wp-caption {
	max-width: 100%;
	margin-bottom: 1em;
	padding: 0;
	border: 0;
	background: none;
}

#wkp .wkp__content .wp-caption-text {
	margin: 0.6em 0 0;
	padding: 0;
	font-size: 14px;
	font-style: italic;
	line-height: 1.5;
	text-align: center;
}

#wkp .wkp__content .aligncenter {
	display: block;
	margin-right: auto;
	margin-left: auto;
}

#wkp .wkp__content img.aligncenter,
#wkp .wkp__content img.alignnone {
	margin-bottom: 0.4em;
}

#wkp .wkp__content .alignleft {
	float: left;
	max-width: 50%;
	margin: 0.35em 1.4em 0.8em 0;
}

#wkp .wkp__content .alignright {
	float: right;
	max-width: 50%;
	margin: 0.35em 0 0.8em 1.4em;
}

#wkp .wkp__actions {
	margin: 28px 0 0;
	padding: 0;
	text-align: center;
}

#wkp .wkp__button {
	display: inline-block;
	max-width: 100%;
	padding: 15px 38px;
	border: 0;
	border-radius: 30px;
	background: var(--wkp-accent);
	color: #ffffff;
	font-family: var(--wkp-font-body);
	font-size: 16px;
	font-weight: 400;
	line-height: 21px;
	letter-spacing: 0;
	text-decoration: none;
	text-transform: none;
	transition: background-color 0.25s ease;
}

#wkp .wkp__button:hover,
#wkp .wkp__button:focus {
	background: var(--wkp-heading);
	color: #ffffff;
}

@media (max-width: 600px) {
	#wkp {
		padding: 22px 14px 14px;
	}

	#wkp .wkp__dialog {
		padding: 7px;
	}

	#wkp .wkp__body {
		padding: 44px 22px 30px;
	}

	#wkp .wkp__close {
		top: -12px;
		right: -8px;
	}

	#wkp .wkp__title {
		font-size: 32px;
	}

	#wkp .wkp__title::after {
		margin: 16px auto 20px;
	}

	#wkp .wkp__content {
		font-size: 16px;
	}

	#wkp .wkp__content h1,
	#wkp .wkp__content h2 {
		font-size: 26px;
	}

	#wkp .wkp__content h3 {
		font-size: 23px;
	}

	#wkp .wkp__item + .wkp__item {
		margin-top: 32px;
		padding-top: 36px;
	}

	#wkp .wkp__button {
		padding: 14px 30px;
	}
}

/* Auf schmalen Bildschirmen umfliesst Text keine Bilder mehr. */
@media (max-width: 480px) {
	#wkp .wkp__content .alignleft,
	#wkp .wkp__content .alignright {
		display: block;
		float: none;
		max-width: 100%;
		margin: 0 auto 1em;
	}
}

@media (prefers-reduced-motion: reduce) {
	#wkp .wkp__backdrop,
	#wkp .wkp__dialog,
	#wkp .wkp__close {
		transition: none;
	}

	#wkp .wkp__dialog,
	#wkp .wkp__close:hover {
		transform: none;
	}
}

@media print {
	#wkp {
		display: none !important;
	}
}
