/* hd-download-gate.css
 *
 * Overlay mit dem Download-Formular. Das Formularstyling spiegelt die
 * Formidable-Regeln aus brand-overrides.css (Landingpage 52239), hier aber
 * ueber .hd-dlgate gescoped statt ueber eine Seiten-ID — das Overlay bringt
 * sein Aussehen selbst mit, egal auf welchem Beitrag es haengt.
 *
 * Farben: Teal #0796a6, dunkles Teal #0d5460, Ink #1a1a1a.
 */

.hd-dlgate[hidden] { display: none; }

.hd-dlgate {
	position: fixed;
	inset: 0;
	z-index: 100000;          /* ueber dem Sticky-Header des Themes */
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px 16px;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
}

.hd-dlgate__backdrop {
	position: fixed;
	inset: 0;
	background: rgba(14, 26, 30, 0.72);
	cursor: pointer;
}

/* Die Seite darunter nicht mitscrollen lassen, solange das Overlay offen ist. */
html.hd-dlgate-open,
html.hd-dlgate-open body { overflow: hidden; }

.hd-dlgate__dialog {
	position: relative;
	width: 100%;
	max-width: 520px;
	margin: auto;
	background: #ffffff;
	border-radius: 14px;
	padding: 40px 38px 34px;
	box-shadow: 0 30px 70px -20px rgba(0, 0, 0, 0.45);
}

.hd-dlgate__dialog:focus { outline: none; }

/* Schliessen-Kreuz, als reines CSS-Kreuz ohne Icon-Font */
.hd-dlgate__close {
	position: absolute;
	top: 14px;
	right: 14px;
	width: 38px;
	height: 38px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	cursor: pointer;
	transition: background-color 0.2s ease;
}
.hd-dlgate__close:hover { background: rgba(13, 84, 96, 0.08); }
.hd-dlgate__close::before,
.hd-dlgate__close::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 17px;
	height: 2px;
	background: #0d5460;
}
.hd-dlgate__close::before { transform: translate(-50%, -50%) rotate(45deg); }
.hd-dlgate__close::after  { transform: translate(-50%, -50%) rotate(-45deg); }

.hd-dlgate__title {
	margin: 0 0 8px;
	font-family: 'Rajdhani', Helvetica, Arial, sans-serif;
	font-weight: 700;
	font-size: 28px;
	line-height: 1.15;
	text-transform: uppercase;
	letter-spacing: 0.01em;
	color: #1a1a1a;
}

.hd-dlgate__intro {
	margin: 0 0 24px;
	font-family: 'Open Sans', Helvetica, Arial, sans-serif;
	font-size: 15px;
	line-height: 1.5;
	color: #4b5257;
}

/* ------------------------------------------------------------- Formidable */

.hd-dlgate .frm_forms,
.hd-dlgate .frm_forms input,
.hd-dlgate .frm_forms textarea,
.hd-dlgate .frm_forms select,
.hd-dlgate .frm_forms button {
	font-family: 'Rajdhani', Helvetica, Arial, sans-serif !important;
}

.hd-dlgate .frm_forms .frm_form_field { margin-bottom: 18px; }

.hd-dlgate .frm_forms .frm_primary_label {
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	font-size: 13px;
	line-height: 1.2;
	color: #0d5460;
	padding-bottom: 7px;
}
.hd-dlgate .frm_forms .frm_required { color: #0796a6; }

.hd-dlgate .frm_forms input[type="text"],
.hd-dlgate .frm_forms input[type="email"] {
	width: 100%;
	min-height: 50px;
	padding: 12px 16px;
	font-size: 16px;          /* kleiner zoomt iOS beim Fokus hinein */
	line-height: 1.4;
	color: #1a1a1a;
	background-color: #ffffff;
	border: 1px solid rgba(13, 84, 96, 0.20);
	border-radius: 10px;
	box-shadow: none;
	-webkit-appearance: none;
	appearance: none;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.hd-dlgate .frm_forms input[type="text"]:focus,
.hd-dlgate .frm_forms input[type="email"]:focus {
	border-color: #0796a6;
	box-shadow: 0 0 0 3px rgba(7, 150, 166, 0.15);
	outline: none;
}

/* Datenschutz-Checkbox
 *
 * Zwei Dinge sind hier gegen Formidable gebuerstet:
 *
 * 1. Formidable zeichnet das Kaestchen selbst — appearance:none plus ein
 *    ::before, dessen Farbe aus CSS-Variablen des Formular-Styles kommt. Die
 *    sind in diesem Overlay nicht gesetzt, der Haken bleibt also unsichtbar:
 *    angehakt sieht aus wie nicht angehakt. Deshalb zurueck auf das native
 *    Control, eingefaerbt per accent-color.
 *
 * 2. Haengender Einzug statt Flexbox. Das Label enthaelt drei Textstuecke
 *    ("Accept our", den Link, den Punkt) — als Flex-Items faellt der Leerraum
 *    dazwischen weg und gap setzt ueberall denselben Abstand, der Punkt steht
 *    dann abgesetzt hinter dem Link. Als normaler Fliesstext stimmen die
 *    Abstaende, und text-indent/padding-left ruecken Folgezeilen unter den
 *    Text statt unter das Kaestchen. Formidables eigenes text-indent:-20px
 *    muss dabei ueberschrieben werden, sonst rutscht die erste Zeile unter
 *    das Kaestchen.
 */
.hd-dlgate .frm_forms .frm_checkbox label {
	display: block;
	padding-left: 28px;
	text-indent: -28px;
	font-family: 'Open Sans', Helvetica, Arial, sans-serif !important;
	font-size: 13px;
	line-height: 1.5;
	color: #4b5257;
	cursor: pointer;
}
.hd-dlgate .frm_forms .frm_checkbox input[type="checkbox"] {
	width: 18px;
	min-width: 18px;
	height: 18px;
	margin: 0 10px 0 0;
	padding: 0;
	vertical-align: -4px;
	text-indent: 0;
	border: 0;
	background: none;
	box-shadow: none;
	-webkit-appearance: checkbox;
	-moz-appearance: checkbox;
	appearance: auto;
	accent-color: #0796a6;
}
.hd-dlgate .frm_forms .frm_checkbox input[type="checkbox"]::before,
.hd-dlgate .frm_forms .frm_checkbox input[type="checkbox"]::after {
	content: none;
}
.hd-dlgate .frm_forms .frm_checkbox a {
	color: #0796a6;
	text-decoration: underline;
}

.hd-dlgate .frm_forms .frm_submit { margin-top: 10px; }
.hd-dlgate .frm_forms .frm_button_submit,
.hd-dlgate .frm_forms input[type="submit"],
.hd-dlgate .frm_forms button[type="submit"] {
	display: inline-block;
	width: 100%;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	font-size: 16px;
	line-height: 1;
	color: #ffffff;
	background-color: #0796a6;
	border: 0;
	border-radius: 8px;
	padding: 17px 38px;
	cursor: pointer;
	box-shadow: 0 10px 22px -10px rgba(7, 150, 166, 0.6);
	transition: background-color 0.2s ease, transform 0.2s ease;
}
.hd-dlgate .frm_forms .frm_button_submit:hover,
.hd-dlgate .frm_forms input[type="submit"]:hover,
.hd-dlgate .frm_forms button[type="submit"]:hover {
	background-color: #0d5460;
	transform: translateY(-1px);
}

/* Fehlermeldungen lesbar (Formidable-Default ist blass und winzig) */
.hd-dlgate .frm_forms .frm_error_style {
	font-family: 'Rajdhani', Helvetica, Arial, sans-serif;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.4;
	color: #9e1b1b;
	background-color: #fdecea;
	border: 1px solid #e7a9a3;
	border-left: 5px solid #cf2e2e;
	border-radius: 10px;
	padding: 14px 16px;
	margin-bottom: 20px;
}
.hd-dlgate .frm_forms .frm_error {
	font-family: 'Rajdhani', Helvetica, Arial, sans-serif;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.35;
	color: #9e1b1b;
	margin-top: 6px;
}
.hd-dlgate .frm_forms .frm_blank_field input[type="text"],
.hd-dlgate .frm_forms .frm_blank_field input[type="email"] {
	border-color: #cf2e2e;
	box-shadow: 0 0 0 3px rgba(207, 46, 46, 0.12);
}

/* ------------------------------------------------- Zustand nach dem Senden */

.hd-dlgate__done[hidden] { display: none; }

.hd-dlgate__done { margin-top: 12px; }

.hd-dlgate__done-link {
	font-family: 'Open Sans', Helvetica, Arial, sans-serif;
	font-size: 14px;
	color: #0796a6;
	text-decoration: underline;
}

/* --------------------------------------------------------------- Schmaler */

@media (max-width: 600px) {
	.hd-dlgate { padding: 16px 12px; }
	.hd-dlgate__dialog { padding: 32px 22px 26px; border-radius: 12px; }
	.hd-dlgate__title { font-size: 24px; }
}
