/*
 * EDGE Contact Us Popup.
 *
 * Mirrors the theme's brochure popup (themes/rittal-india/assets/css/
 * brochure-modal.css) so the two read as one component, but every rule
 * is scoped under the plugin's own classes: nothing here can restyle the
 * brochure popup, and the theme's file is not needed on the homepage.
 */

/* ==========================================
   Header button
========================================== */

.ecup-header-button {
	display: inline-flex;
	flex: 0 0 auto;
	align-items: center;
	justify-content: center;
	min-width: 160px;
	/* Same size, type and colours as the site's other buttons
	   (.product-card__button, .product-hero__button). */
	height: 40px;
	/* Lines up with .site-branding's top margin. */
	margin: 24px 0 0 auto;
	padding: 0 24px;
	background-color: #e50043;
	color: #fff;
	border: 0;
	border-radius: 4px;
	font-family: Arial, Helvetica, sans-serif;
	font-size: 16px;
	font-weight: 700;
	line-height: 1;
	text-decoration: none;
	white-space: nowrap;
	cursor: pointer;
	box-sizing: border-box;
	transition: background-color .3s;
}

.ecup-header-button[hidden] {
	display: none;
}

.ecup-header-button:hover,
.ecup-header-button:focus {
	background-color: #c8003a;
	color: #fff;
}

.ecup-header-button:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 2px;
}

/* Fallback when the header selector matches nothing. */
.ecup-header-button--floating {
	position: fixed;
	top: 16px;
	right: 16px;
	z-index: 9990;
	margin: 0;
}

@media (max-width: 782px) {
	.ecup-header-button {
		min-width: 0;
		height: 36px;
		padding: 0 16px;
		font-size: 14px;
	}
}

/* ==========================================
   Popup shell
========================================== */

html.ecup-scroll-lock,
html.ecup-scroll-lock body {
	overflow: hidden;
}

html.ecup-scroll-lock body {
	/* Keeps the page from shifting sideways when its scrollbar goes. */
	padding-right: var(--ecup-scrollbar, 0px);
}

.ecup-modal {
	position: fixed;
	inset: 0;
	/* Above the header and any sticky section nav. */
	z-index: 100000;
	display: none;
	align-items: center;
	justify-content: center;
	padding: 24px;
	background-color: rgba(0, 0, 0, .75);
	box-sizing: border-box;
}

.ecup-modal.is-open {
	display: flex;
}

.ecup-modal__panel {
	position: relative;
	width: 100%;
	max-width: 480px;
	max-height: calc(100svh - 48px);
	overflow-y: auto;
	overscroll-behavior: contain;
	padding: 40px;
	background: rgba(9, 9, 9, .8);
	border: 1.27px solid rgba(255, 255, 255, .5);
	border-radius: 0;
	-webkit-backdrop-filter: blur(22px);
	backdrop-filter: blur(22px);
	box-sizing: border-box;
}

.ecup-modal__close {
	position: absolute;
	top: 16px;
	right: 16px;
	width: 32px;
	height: 32px;
	padding: 0;
	background: none;
	border: 0;
	color: #fff;
	font-size: 24px;
	line-height: 1;
	cursor: pointer;
	opacity: .7;
	transition: opacity .2s;
}

.ecup-modal__close:hover,
.ecup-modal__close:focus-visible {
	opacity: 1;
}

.ecup-modal__close:focus-visible,
.ecup-modal__done:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 2px;
}

.ecup-modal__title {
	margin: 0 0 8px;
	padding-right: 24px;
	color: #fff;
	font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
	font-size: 24px;
	font-weight: 700;
	line-height: 1.3;
}

.ecup-modal__intro {
	margin: 0 0 24px;
	color: rgba(255, 255, 255, .7);
	font-family: Helvetica, Arial, sans-serif;
	font-size: 14px;
	line-height: 1.6;
}

.ecup-modal__body[hidden],
.ecup-modal__success[hidden] {
	display: none;
}

.ecup-modal__success {
	color: #fff;
	font-family: Helvetica, Arial, sans-serif;
	font-size: 16px;
	line-height: 1.6;
	outline: none;
}

.ecup-modal__success p {
	margin: 8px 0 24px;
}

.ecup-modal__done {
	width: 100%;
	height: 40px;
	padding: 0;
	background: #e50043;
	color: #fff;
	border: 0;
	border-radius: 4px;
	font-family: Helvetica, Arial, sans-serif;
	font-size: 16px;
	font-weight: 700;
	cursor: pointer;
}

.ecup-modal__done:hover {
	background: #c8003a;
}

@media (max-width: 480px) {
	.ecup-modal {
		padding: 12px;
	}

	.ecup-modal__panel {
		max-height: calc(100svh - 24px);
		padding: 28px 20px;
	}

	.ecup-modal__title {
		font-size: 20px;
	}
}

/* ==========================================
   Contact Form 7 fields (same look as the brochure popup)
========================================== */

.ecup-modal .wpcf7 {
	max-width: 100%;
	margin: 0;
	font-family: Helvetica, Arial, sans-serif;
}

/*
 * Neutralise the panel styles Customizer > Additional CSS puts on the
 * form's wrapper; the popup panel already supplies the frame.
 */
.ecup-modal .wpcf7 .rittal-brochure-form {
	width: auto;
	max-width: none;
	margin: 0;
	padding: 0;
	background: none;
	border: 0;
	font-family: Helvetica, Arial, sans-serif;
}

/* The form's own "Enquire Now" heading duplicates the popup title. */
.ecup-modal .wpcf7 .rittal-brochure-form > h2 {
	display: none;
}

.ecup-modal .wpcf7 p {
	margin: 0;
}

.ecup-modal .wpcf7 br {
	display: none;
}

.ecup-modal .wpcf7 .rittal-form-field {
	margin-bottom: 14px;
}

.ecup-modal .wpcf7 .wpcf7-form-control-wrap {
	display: block;
}

.ecup-modal .wpcf7 input[type="text"],
.ecup-modal .wpcf7 input[type="email"],
.ecup-modal .wpcf7 input[type="tel"],
.ecup-modal .wpcf7 input[type="number"],
.ecup-modal .wpcf7 textarea,
.ecup-modal .wpcf7 select {
	display: block;
	width: 100%;
	height: 32px;
	margin: 0;
	padding: 2px 0 0;
	background: transparent;
	border: none;
	border-bottom: 1.27px solid rgba(255, 255, 255, .35);
	border-radius: 0;
	box-shadow: none;
	font-family: Helvetica, Arial, sans-serif;
	font-size: 18px;
	font-weight: 400;
	line-height: 24px;
	color: #fff;
	transition: .3s;
	box-sizing: border-box;
	-webkit-appearance: none;
	appearance: none;
}

.ecup-modal .wpcf7 input::placeholder,
.ecup-modal .wpcf7 textarea::placeholder {
	color: #777;
	font-family: Helvetica, Arial, sans-serif;
	font-size: 18px;
	opacity: 1;
}

.ecup-modal .wpcf7 input:focus,
.ecup-modal .wpcf7 textarea:focus,
.ecup-modal .wpcf7 select:focus {
	outline: none;
	border-bottom: 2px solid #e50043;
}

.ecup-modal .wpcf7 textarea {
	min-height: 0;
	height: 54px;
	resize: vertical;
}

.ecup-modal .wpcf7 .rittal-message-field {
	margin-bottom: 14px;
}

.ecup-modal .wpcf7 .rittal-form-submit {
	position: relative;
}

.ecup-modal .wpcf7 input.wpcf7-submit {
	display: block;
	width: 100%;
	height: 40px;
	margin-top: 10px;
	padding: 0;
	background: #e50043;
	color: #fff;
	border: none;
	border-radius: 4px;
	box-shadow: none;
	font-family: Helvetica, Arial, sans-serif;
	font-size: 16px;
	font-weight: 700;
	line-height: 22.857px;
	cursor: pointer;
	transition: background-color .3s;
}

.ecup-modal .wpcf7 input.wpcf7-submit:hover {
	background: #c8003a;
}

.ecup-modal .wpcf7 input.wpcf7-submit:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 2px;
}

.ecup-modal .wpcf7 input.wpcf7-submit:disabled {
	opacity: .6;
	cursor: default;
}

.ecup-modal .wpcf7 .wpcf7-spinner {
	position: absolute;
	top: 50%;
	right: 12px;
	margin: 5px 0 0;
	transform: translateY(-50%);
}

.ecup-modal .wpcf7 .wpcf7-not-valid {
	border-bottom: 2px solid #ff5b5b;
}

.ecup-modal .wpcf7 .wpcf7-not-valid-tip {
	display: block;
	margin-top: 5px;
	color: #ff5b5b;
	font-size: 13px;
	line-height: 1.4;
}

.ecup-modal .wpcf7 form .wpcf7-response-output {
	margin: 14px 0 0;
	padding: 8px 12px;
	font-size: 14px;
	line-height: 1.5;
	color: #fff;
}

/* Off-screen honeypot added by ecup-popup.js. */
.ecup-modal .ecup-hp {
	position: absolute;
	left: -10000px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
	.ecup-header-button,
	.ecup-modal__close,
	.ecup-modal .wpcf7 input,
	.ecup-modal .wpcf7 textarea,
	.ecup-modal .wpcf7 select {
		transition: none;
	}
}
