/*
 * zIdea theme for the external idea submission page.
 *
 * Replaces the product's externalSubmission.css through the design theme's login.zip. The page loads
 * externalSubmission-base.css before this file and externalSubmission-responsive.css after it; both stay in place.
 *
 * Desktop (at least 1024 x 560 CSS pixels): a fixed brand panel on the inline-start side holds the language picker,
 * the form title and the explanation; the form scrolls in the column beside it.
 * Smaller screens and high zoom levels: one column under a brand-coloured strip.
 */

@font-face {
	font-family: 'Open Sans';
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url(../images/opensans-regular-webfont.woff2) format('woff2');
}

@font-face {
	font-family: 'Open Sans';
	font-style: normal;
	font-weight: 600;
	font-display: swap;
	src: url(../images/opensans-semibold-webfont.woff2) format('woff2');
}

@font-face {
	font-family: 'Open Sans';
	font-style: normal;
	font-weight: 700;
	font-display: swap;
	src: url(../images/opensans-bold-webfont.woff2) format('woff2');
}

:root {
	--es-brand: #32216c;
	--es-accent: #ffcd11;
	--es-accent-hover: #f2bf00;
	--es-text: #263238;
	--es-text-on-brand: #fff;
	--es-muted: #607d8b;
	--es-form-background: #fcfdfd;
	--es-form-border: #cfd8dc;
	--es-divider: #eceff1;
	--es-error: #c62828;

	--es-panel-width: clamp(360px, 37.5vw, 480px);
	--es-panel-padding: 70px;
	--es-column-width: 481px;
}

/* --- Reset ---------------------------------------------------------------------------------------------------- */

*,
*::before,
*::after {
	box-sizing: border-box;
	padding: 0;
	margin: 0;
	font-family: 'Open Sans', Arial, sans-serif;
	font-size: 14px;
	line-height: 1.6;
	color: var(--es-text);
}

*:lang(ar),
*:lang(ur) {
	font-family: 'lucida grande', tahoma, verdana, arial, sans-serif;
}

html.hype--bigger-font-1 * {
	font-size: 15px;
}

a {
	text-decoration: underline;
}

a:hover {
	text-decoration: none;
}

.clear {
	clear: both;
}

ul {
	list-style: none;
}

body {
	margin: 0;
	background: #fff;
}

/* The page separates its sections with spacing, not rules. */
#submission_form hr {
	display: none;
}

/* --- Language picker ------------------------------------------------------------------------------------------ */

.lang-dropdown-container select {
	appearance: none;
	width: 132px;
	height: 32px;
	padding-block: 0;
	padding-inline: 10px 30px;
	border: 0;
	border-radius: 4px;
	background: var(--es-form-background) url(../images/chevron-down.svg) no-repeat right 10px center;
	cursor: pointer;
}

/* background-position has no logical values yet, so RTL needs its own rule. */
html[dir='rtl'] .lang-dropdown-container select {
	background-position: left 10px center;
}

/* --- Logo, title and explanation ------------------------------------------------------------------------------ */

#logo img {
	display: block;
	max-height: 31px;
	width: auto;
	border: 0;
}

/* The logo comes from the design theme; without one the empty <img> must not take space. */
#logo img:not([src]),
#logo img[src=''] {
	display: none;
}

#content .willkommen {
	font-size: 22px;
	font-weight: 700;
	line-height: 1.36;
}

.formElement.explanation,
.formElement.explanation * {
	line-height: 1.36;
}

/* No explanation configured: no empty block and no gap. */
.formElement.explanation:empty {
	display: none;
}

/* --- Form layout ---------------------------------------------------------------------------------------------- */

div.section_heading {
	margin: 0 0 30px;
	font-size: 20px;
	font-weight: 700;
	line-height: 30px;
}

/* The explanation is a .formElement too, but sits above the first section. */
.formElement:not(.explanation) ~ div.section_heading {
	margin-top: 48px;
}

.formElement {
	margin: 0 0 40px;
}

.formElement label,
html[dir='rtl'] .formElement label {
	display: block;
	float: none;
	width: auto;
	margin: 0 0 7px;
	font-weight: 600;
	line-height: 1.5;
}

.formElement label *,
div.captcha_label_wrapper label {
	font-weight: 600;
	line-height: 1.5;
}

.formElement label.pushDown {
	position: static;
}

.formElement.typeText .typeTextInput,
html[dir='rtl'] .formElement.typeText .typeTextInput {
	float: none;
	width: auto;
}

/* The help button sits in the gutter beside its control, so every control keeps the full column width. */
.formElement.typeText > div {
	position: relative;
}

/* --- Controls ------------------------------------------------------------------------------------------------- */

/* The #content prefix outweighs the widths externalSubmission-responsive.css sets on narrow screens. */
#content .formElement.typeText .typeTextInput input,
#content .formElement.typeText .typeTextInput textarea,
#content .formElement select,
#content #captcha {
	display: block;
	width: 100%;
	height: 40px;
	padding: 0 15px;
	border: 1px solid var(--es-form-border);
	border-radius: 8px;
	background-color: var(--es-form-background);
	box-shadow: none;
	line-height: 1.6;
}

#content .formElement.typeText .typeTextInput textarea {
	height: 194px;
	padding-block: 12px;
	overflow: auto;
}

#content .formElement select {
	appearance: none;
	padding-inline-end: 36px;
	background-image: url(../images/chevron-down.svg);
	background-repeat: no-repeat;
	background-position: right 15px center;
	cursor: pointer;
}

html[dir='rtl'] #content .formElement select {
	background-position: left 15px center;
}

/* Same selectors as the base control rule above, so the state rules win by source order. */
#content .formElement.typeText .typeTextInput input:hover,
#content .formElement.typeText .typeTextInput textarea:hover,
#content .formElement.typeText select:hover,
#content #captcha:hover,
#content .formElement.typeText .typeTextInput input:focus,
#content .formElement.typeText .typeTextInput textarea:focus,
#content .formElement.typeText select:focus,
#content #captcha:focus {
	border-color: var(--es-brand);
}

#content .formElement.typeText .typeTextInput input[aria-invalid='true'],
#content .formElement.typeText .typeTextInput textarea[aria-invalid='true'],
#content .formElement.typeText select[aria-invalid='true'],
#content #captcha[aria-invalid='true'] {
	border-color: var(--es-error);
}

.errormessage {
	margin-top: 6px;
	color: var(--es-error);
	font-size: 13px;
	font-weight: 600;
}

/* --- Help button ---------------------------------------------------------------------------------------------- */

div.help_button_wrapper {
	position: absolute;
	inset-block-start: 12px;
	inset-inline-end: -26px;
	width: 16px;
	height: 16px;
	margin: 0;
}

span.help_button {
	display: block;
	width: 16px;
	height: 16px;
	border-radius: 50%;
	background-color: #fff;
	cursor: pointer;
}

/* Icon and technique copied from .hype--icon-help-button in css/basics/frontend-icons.scss - keep in sync. */
span.help_button::after {
	content: '';
	display: inline-block;
	width: 100%;
	height: 100%;
	border-radius: 50%;
	mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><circle cx="16" cy="16" r="14" fill="white"/><path d="M16 23 v0.1" stroke="black" stroke-width="2.5" stroke-linecap="round" fill="none"/><path d="M16 19 c0-2.5 4-2.5 4-6 a4 4 0 1 0-8 0" fill="none" stroke="black" stroke-width="2.5" stroke-linecap="round"/></svg>');
	mask-mode: luminance;
	mask-position: center;
	mask-repeat: no-repeat;
	background-color: var(--es-brand);
	pointer-events: none;
}

html[dir='rtl'] span.help_button::after {
	transform: scaleX(-1);
}

/* --- Captcha -------------------------------------------------------------------------------------------------- */

.escaptcha {
	margin: 0 0 40px;
}

div.captcha_label_wrapper {
	display: block;
	width: auto;
	margin: 0 0 7px;
}

div.captcha_field,
.escaptcha div.captcha_field {
	display: block;
	width: auto;
	padding: 16px;
	border: 1px solid var(--es-divider);
	border-radius: 8px;
}

.escaptcha div.captcha_field .title {
	margin: 0 0 12px;
}

div.captcha_explanation {
	max-width: none;
	margin-bottom: 10px;
	color: var(--es-muted);
}

.escaptcha div.captcha_field .value button {
	width: 24px;
	height: 24px;
	margin-inline-start: 8px;
	vertical-align: middle;
	border: 0;
	background: url(../images/reload.png);
	cursor: pointer;
}

.escaptcha div.captcha_field .value button:hover {
	background: url(../images/reload-hover.png);
}

/* --- Buttons -------------------------------------------------------------------------------------------------- */

.formElement.typeButton {
	display: block;
	margin: 0 0 12px;
}

/* Vertical margins collapse, so this is the whole gap to the field or captcha above. */
#submission_form hr + .formElement.typeButton,
.escaptcha + .formElement.typeButton {
	margin-top: 50px;
}

#content .formElement.typeButton button {
	display: block;
	width: 100%;
	height: 40px;
	padding: 4px 20px 6px !important;
	border: 0;
	border-radius: 8px;
	font-weight: 600;
	line-height: 1.5;
	cursor: pointer;
}

.modal-footer button.warm,
#content .formElement.typeButton button.warm {
	background-color: var(--es-accent);
	color: var(--es-brand);
	font-weight: 600;
}

.modal-footer button.warm:hover,
#content .formElement.typeButton button.warm:not([disabled]):hover {
	background-color: var(--es-accent-hover);
}

/* The submit button stays disabled until the visitor has typed something. */
#content .formElement.typeButton button.warm[disabled] {
	background-color: #ffcd11;
	color: rgba(50, 33, 108, 0.55);
	cursor: default;
}

/* Not part of the design: kept as a quiet text button so visitors can still clear the form. */
#content .formElement.typeButton button.reset {
	height: auto;
	padding: 4px 0 !important;
	background: none;
	color: var(--es-muted);
	font-weight: 400;
	text-decoration: underline;
}

#content .formElement.typeButton button.reset:not([disabled]):hover {
	color: var(--es-brand);
	text-decoration: none;
}

#content .formElement.typeButton button.reset[disabled] {
	cursor: default;
	opacity: 0.5;
}

/* --- Footer and dialogs --------------------------------------------------------------------------------------- */

.footer,
.footer * {
	color: var(--es-muted);
	font-size: 13px;
}

.footer {
	padding-block: 24px;
	border-top: 1px solid var(--es-divider);
}

.modal-content {
	border: 0;
	border-radius: 8px;
}

.modal-footer {
	justify-content: center;
	border-top: 0;
}

.modal-footer button.warm {
	min-width: 140px;
	height: 40px;
	padding: 4px 20px 6px;
	border: 0;
	border-radius: 8px;
	cursor: pointer;
}

/* --- Page layout: one column (narrow screens and high zoom) ------------------------------------------------- */

/*
 * The "html" prefix outweighs the narrow-screen rules in externalSubmission-responsive.css, which loads after this
 * file. The inline-end padding leaves a gutter for the help buttons.
 */
html #wrapper {
	width: auto;
	max-width: calc(var(--es-column-width) + 51px);
	margin: 0 auto;
	padding-block: 0;
	padding-inline: 15px 36px;
}

/* The strip runs edge to edge although #wrapper is narrower. */
html .lang-dropdown-container {
	width: auto;
	margin: 0;
	padding: 14px 0;
	background-color: var(--es-brand);
	box-shadow: 0 0 0 100vmax var(--es-brand);
	clip-path: inset(0 -100vmax);
}

html #wrapper .lang-dropdown-container select {
	width: 132px;
}

html #logo {
	width: auto;
	margin: 0;
	padding-top: 28px;
}

html #content {
	width: auto;
	margin: 28px 0 48px;
	padding: 0;
	border: 0;
	background: none;
}

#content .willkommen {
	margin: 0 0 16px;
	color: var(--es-brand);
}
#content .willkommen:before {
  content: "";
  height: 65px;
  width: 100%;
  background-image: url(../images/Z_IDEA_logo_white.png);
  background-size: contain;
  background-repeat: no-repeat;
  display: block;
  margin-bottom: 25px;
}

}	
.formElement.explanation {
	margin: 0 0 40px;
}

/* --- Page layout: fixed brand panel (desktop) ----------------------------------------------------------------- */

@media (min-width: 1024px) and (min-height: 560px) {
	body::before {
		content: '';
		position: fixed;
		inset-block: 0;
		inset-inline-start: 0;
		width: var(--es-panel-width);
		background-color: var(--es-brand);
	}

	html #wrapper {
		position: relative;
		max-width: none;
		margin-block: 0;
		margin-inline: var(--es-panel-width) 0;
		padding-inline: 53px 40px;
	}

	html .lang-dropdown-container {
		position: fixed;
		z-index: 1;
		inset-block-start: 26px;
		inset-inline-start: var(--es-panel-padding);
		padding: 0;
		background: none;
		box-shadow: none;
		clip-path: none;
	}

	#content .willkommen,
	.formElement.explanation {
		position: fixed;
		z-index: 1;
		inset-inline-start: var(--es-panel-padding);
		width: min(292px, calc(var(--es-panel-width) - 2 * var(--es-panel-padding)));
		margin: 0;
	}

	#content .willkommen,
	#content .willkommen *,
	.formElement.explanation,
	.formElement.explanation * {
		color: var(--es-text-on-brand);
	}

	#content .willkommen {
		inset-block-start: 119px;
	}

	/* A long explanation scrolls inside the panel instead of running off the screen. */
	.formElement.explanation {
		inset-block-start: 289px;
		max-height: calc(100vh - 329px);
		overflow-y: auto;
	}

	html #logo,
	html #content {
		width: var(--es-column-width);
		max-width: 100%;
		margin-inline: auto;
	}

	html #logo {
		padding-top: 50px;
	}

	html #content {
		margin-block: 50px 80px;
	}
}
