/* Darinas Einladungen – Editor + Karten-Grid (Design analog Deckblätter-Plugin) */

@font-face {
	font-family: "Patrick Hand";
	src: url("fonts/PatrickHand-Regular.ttf") format("truetype");
	font-weight: 400;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: "Handlee";
	src: url("fonts/Handlee-Regular.ttf") format("truetype");
	font-weight: 400;
	font-style: normal;
	font-display: swap;
}

/* ---------------------------------------------------------------------------
 * Editor
 * ------------------------------------------------------------------------ */

.dek-editor-wrap {
	max-width: 780px;
	margin: 0 auto;
	font-family: "Poppins", sans-serif;
	color: #000;
}

.dek-intro {
	font-size: 17px;
	line-height: 1.5;
}

/* Motiv-Vorschau über dem Editor */

.dek-hero {
	margin: 0 0 18px;
	line-height: 0;
}

.dek-hero-img,
.dek-hero img {
	width: 100%;
	height: auto;
	display: block;
	border-radius: 10px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Editor + Options-Panel nebeneinander (mobil untereinander) */

.dek-editor-row {
	display: flex;
	gap: 26px;
	align-items: flex-start;
	justify-content: center;
	margin: 22px 0;
	flex-wrap: wrap;
}

.dek-editor {
	position: relative;
	flex: 0 1 480px;
	max-width: 480px;
	border-radius: 10px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
	overflow: hidden;
	line-height: 0;
	background: #fff; /* Kartenfarbe setzt editor.js (bgColor) */
}

.dek-options {
	flex: 0 0 190px;
	font-family: "Poppins", sans-serif;
}

.dek-opt-title {
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: #444;
	margin: 16px 0 8px;
}

.dek-opt-title:first-child {
	margin-top: 0;
}

.dek-opt-row {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.dek-options button.dek-opt {
	border: 1px solid #ccc !important;
	background: #fff !important;
	color: #1a1a1a !important;
	border-radius: 8px !important;
	cursor: pointer;
	padding: 6px 12px;
	line-height: 1.2;
}

.dek-options button.dek-opt:hover {
	border-color: #047d7d !important;
}

.dek-options button.dek-opt.is-active {
	border: 2px solid #047d7d !important;
	box-shadow: 0 0 0 2px rgba(4, 125, 125, 0.15);
}

.dek-options button.dek-opt-font {
	font-size: 19px;
	width: 100%;
	text-align: left;
}

.dek-options button.dek-opt-size {
	font-size: 14px;
	width: 42px;
	height: 42px;
	border-radius: 50% !important;
	padding: 0;
	text-align: center;
}

.dek-options button.dek-opt-color {
	width: 34px;
	height: 34px;
	border-radius: 50% !important;
	padding: 0;
}

.dek-options button.dek-opt-color.is-active {
	box-shadow: 0 0 0 3px rgba(4, 125, 125, 0.35);
}

/* Farbrad für freie Farbwahl */

.dek-options button.dek-opt-wheel {
	background: conic-gradient(#e74c3c, #f39c12, #2ecc71, #1abc9c, #3498db, #9b59b6, #e74c3c) !important;
}

.dek-opt-picker {
	position: absolute;
	width: 1px;
	height: 1px;
	opacity: 0;
	pointer-events: none;
}

@media (max-width: 760px) {
	.dek-editor-row {
		flex-direction: column;
		align-items: center;
	}

	.dek-options {
		flex: 1 1 auto;
		width: 100%;
		max-width: 480px;
	}
}

.dek-editor-bg {
	width: 100%;
	height: auto;
	display: block;
	user-select: none;
	-webkit-user-drag: none;
}

.dek-editor .dek-field {
	position: absolute;
	box-sizing: border-box;
	padding: 0 2px;
	border: 1px dashed rgba(4, 125, 125, 0.55);
	border-radius: 3px;
	background: rgba(255, 255, 255, 0.001); /* klickbar, aber durchsichtig */
	font-family: "Patrick Hand", "Comic Sans MS", cursive;
	color: #1a1a1a;
	line-height: 1;
	min-height: 0;
	outline: none;
	transition: border-color 0.15s, background 0.15s;
}

.dek-editor .dek-field::placeholder {
	color: rgba(4, 125, 125, 0.5);
	font-size: 0.55em;
	font-family: "Poppins", sans-serif;
}

.dek-editor .dek-field:hover {
	border-color: rgba(4, 125, 125, 0.9);
}

.dek-editor .dek-field:focus {
	border-color: #047d7d;
	background: rgba(255, 255, 255, 0.6);
	box-shadow: 0 0 0 2px rgba(4, 125, 125, 0.2);
}

/* Preset-Leiste */

.dek-presets {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	justify-content: center;
	margin: 18px 0 4px;
}

.dek-presets:empty {
	display: none;
}

/* hohe Spezifität + !important: das Theme (Hello Elementor) stylt button global */
.dek-presets button.dek-preset {
	font-family: "Poppins", sans-serif;
	font-size: 14px;
	line-height: 1.2;
	padding: 8px 14px;
	border: 1px solid #047d7d !important;
	border-radius: 999px !important;
	background: #fff !important;
	color: #047d7d !important;
	cursor: pointer;
}

.dek-presets button.dek-preset:hover,
.dek-presets button.dek-preset:focus {
	background: #e6f4f4 !important;
	color: #047d7d !important;
}

.dek-presets button.dek-preset.is-active {
	background: #047d7d !important;
	color: #fff !important;
}

/* Freitext-Fläche über dem Vorlagentext */

.dek-cover {
	position: absolute;
	box-sizing: border-box;
	border-radius: 2px;
}

.dek-freitext {
	width: 100%;
	height: 100%;
	box-sizing: border-box;
	resize: none;
	border: 1px dashed rgba(4, 125, 125, 0.55);
	border-radius: 3px;
	background: transparent;
	font-family: "Patrick Hand", "Comic Sans MS", cursive;
	color: #1a1a1a;
	outline: none;
}

.dek-freitext:focus {
	border-color: #047d7d;
	box-shadow: 0 0 0 2px rgba(4, 125, 125, 0.2);
}

.dek-downloads {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	justify-content: center;
	margin: 22px 0 10px;
}

.dek-btn,
button.dek-btn {
	display: inline-block;
	background: #047d7d;
	color: #fff !important;
	font-family: "Poppins", sans-serif;
	font-weight: 300;
	font-size: 16px;
	line-height: 1.2;
	padding: 12px 22px;
	border: 0;
	border-radius: 6px;
	cursor: pointer;
	text-align: center;
	text-decoration: none;
}

.dek-btn:hover,
.dek-btn:focus,
button.dek-btn:hover:not(:disabled) {
	background: #036b6b;
	color: #fff !important;
}

button.dek-btn:disabled {
	opacity: 0.7;
	cursor: wait;
}

.dek-privacy {
	text-align: center;
	font-size: 14px;
	color: #444;
	margin: 8px 0 26px;
}

.dek-help h2 {
	font-family: "RocknRoll One", sans-serif;
	color: #06bab8;
	font-size: 26px;
	margin: 26px 0 10px;
}

.dek-help p {
	font-size: 17px;
	line-height: 1.5;
	margin: 0 0 12px;
}

/* ---------------------------------------------------------------------------
 * Sammlungs-Beitrag: Aufbau wie ein klassischer Darinas-DIY-Beitrag
 * ------------------------------------------------------------------------ */

.dek-sammlung-page {
	max-width: var(--wp--style--global--content-size, 800px);
	margin: 0 auto;
	font-family: "Poppins", sans-serif;
	color: #1a1a1a;
	width: 100%;
}

.dek-sammlung-page .dek-sammlung-content {
	margin: 0 0 22px;
}

.dek-sammlung-page p {
	font-size: 17px;
	line-height: 1.65;
	margin: 0 0 16px;
}

.dek-sammlung-page h2 {
	font-family: "RocknRoll One", sans-serif;
	color: #06bab8;
	font-size: 28px;
	line-height: 1.25;
	margin: 52px 0 22px;
	font-weight: 400;
}

.dek-grid + h2 {
	margin-top: 56px;
	margin-bottom: 22px;
}

.dek-sammlung-page .dek-sammlung {
	margin: 12px 0 34px;
}

.dek-template-figure {
	margin: 22px 0;
	line-height: 0;
}

.dek-template-image {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 6px;
}

.dek-sammlung-page > .dek-privacy {
	background: #f5fbfb;
	border-left: 4px solid #06bab8;
	border-radius: 6px;
	color: #3d3d3d;
	font-size: 15px;
	line-height: 1.55;
	margin: 26px 0 0;
	padding: 12px 16px;
	text-align: left;
}

@media (max-width: 640px) {
	.dek-sammlung-page h2 {
		font-size: 24px;
	}

	.dek-sammlung-page p {
		font-size: 16px;
	}
}

/* ---------------------------------------------------------------------------
 * Karten-Grid (Shortcode [einladungen])
 * ------------------------------------------------------------------------ */

.dek-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 34px 36px;
	justify-content: center;
	max-width: var(--wp--style--global--content-size, 800px);
	margin: 34px auto;
	width: 100%;
}

.dek-card {
	background: #fff;
	border-radius: 12px;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
	padding: 18px 18px 28px;
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	overflow: hidden;
	min-width: 0;
}

.dek-card-img {
	display: block;
	width: 100%;
	line-height: 0;
	border: 1px solid #ececec;
	border-radius: 4px;
	overflow: hidden;
}

.dek-card-img img {
	width: 100%;
	height: auto;
	display: block;
	border-radius: 3px;
}

.dek-card-label {
	font-family: "RocknRoll One", sans-serif;
	color: #009898;
	font-size: 23px;
	line-height: 1.2;
	margin: 20px 0 20px;
	font-weight: 400;
	max-width: 100%;
	overflow-wrap: anywhere;
	word-break: normal;
	text-align: center;
	width: 100%;
}

.dek-card-label::after {
	border-top: 1px dashed #d8d8d8;
	content: "";
	display: block;
	margin: 14px auto 0;
	width: 82px;
}

.dek-card .dek-btn {
	margin-top: 6px;
}

.dek-card-links {
	font-family: "Poppins", sans-serif;
	font-size: 15px;
	line-height: 1.45;
	color: #444;
	margin-top: 18px;
	width: 100%;
}

.dek-card-links a {
	color: #047d7d;
}

.dek-card-links-title {
	font-weight: 500;
	margin-bottom: 8px;
	color: #454545;
}

.dek-card-link-buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	justify-content: center;
}

.dek-card-links a.dek-pdf-link {
	border: 1px solid #047d7d;
	border-radius: 6px;
	color: #047d7d !important;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 14px;
	line-height: 1.2;
	min-height: 38px;
	padding: 8px 12px;
	text-decoration: none;
	background: #fff;
}

.dek-card-links a.dek-pdf-link:hover,
.dek-card-links a.dek-pdf-link:focus {
	background: #e6f4f4;
	color: #036b6b !important;
}

@media (max-width: 720px) {
	.dek-grid {
		grid-template-columns: minmax(0, 1fr);
		gap: 24px;
		max-width: 430px;
	}

	.dek-card-label {
		font-size: 21px;
	}
}

/* „Weitere Einladungskarten“ auf der Detailseite */

.dek-related {
	margin-top: 34px;
}

.dek-related h2 {
	font-family: "RocknRoll One", sans-serif;
	color: #06bab8;
	font-size: 26px;
	margin: 0 0 6px;
}

.dek-related .dek-grid-related {
	grid-template-columns: repeat(2, minmax(0, 375px));
	margin-top: 14px;
}

.dek-related-all {
	text-align: center;
	font-size: 16px;
	margin: 4px 0 0;
}

.dek-related-all a {
	color: #047d7d;
	font-family: "Poppins", sans-serif;
}

@media (max-width: 640px) {
	.dek-related .dek-grid-related {
		grid-template-columns: minmax(0, 375px);
	}
}

/* -------------------------------------------------------------------------
 * Sammlung: Karten-Kachel als Button + Overlay-Editor
 * ---------------------------------------------------------------------- */
.dek-card-open {
	appearance: none;
	-webkit-appearance: none;
	border: 0;
	border-radius: 0 !important;
	box-shadow: none !important;
	background: transparent !important;
	color: inherit !important;
	font: inherit;
	cursor: pointer;
	width: 100%;
	padding: 0;
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	align-items: center;
	text-align: center;
	transition: transform 0.15s ease;
	min-width: 0;
}

.dek-card-open:hover,
.dek-card-open:focus,
.dek-card-open:focus-visible {
	background: transparent !important;
	box-shadow: none !important;
	outline: none;
}
.dek-card-collection:hover,
.dek-card-collection:focus-within {
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
	transform: translateY(-2px);
}

.dek-card-collection .dek-btn {
	min-width: 220px;
	font-size: 18px;
	padding: 14px 24px;
}

body.dek-modal-open {
	overflow: hidden;
}
.dek-modal[hidden] {
	display: none !important;
}
.dek-modal {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: flex-start;
	justify-content: center;
}
.dek-modal-overlay {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.55);
}
.dek-modal-box {
	position: relative;
	z-index: 1;
	background: #fff;
	border-radius: 12px;
	width: 94%;
	max-width: 920px;
	margin: 4vh auto;
	padding: 26px 28px 22px;
	max-height: 92vh;
	overflow-y: auto;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}
.dek-modal-close {
	position: absolute;
	top: 8px;
	right: 14px;
	background: none;
	border: 0;
	font-size: 30px;
	line-height: 1;
	color: #666;
	cursor: pointer;
}
.dek-modal-close:hover {
	color: #111;
}
.dek-modal-title {
	font-family: "RocknRoll One", sans-serif;
	color: #009898;
	font-size: 22px;
	margin: 0 34px 12px 0;
}
.dek-modal-switch {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 16px;
}
.dek-switch-thumb {
	border: 2px solid transparent;
	border-radius: 8px;
	padding: 0;
	background: none;
	cursor: pointer;
	line-height: 0;
	overflow: hidden;
	width: 54px;
	height: 54px;
}
.dek-switch-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}
.dek-switch-thumb.is-active {
	border-color: #009898;
}
