/* Rodwick product question: button + modal (look taken from rodwick.com) */
:root {
	--rw-blue: #003e7e;
	--rw-blue-light: #169cd9;
	--rw-text: #161a1d;
}

/* Button, same as the live ".btn.outline" */
.rw-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	height: 50px;
	padding: 0 20px 0 18px;
	font-family: Oswald, sans-serif;
	font-size: 14px;
	font-weight: 600;
	letter-spacing: 0.8px;
	line-height: 1;
	text-decoration: none;
	border-radius: 0;
	cursor: pointer;
	transition: background-color 0.2s ease, color 0.2s ease;
}
.rw-btn-outline {
	background: transparent;
	border: 1px solid var(--rw-blue);
	color: var(--rw-blue);
}
.rw-btn-outline span { color: inherit; }
.rw-btn-outline:hover,
.rw-btn-outline:focus-visible {
	background: var(--rw-blue);
	color: #fff;
}

/* Modal (values from rodwick.com: header/footer #007cc2, body #e5f0f7, 80px fields, 180px message) */
.rw-modal[hidden] { display: none; }
.rw-modal {
	position: fixed;
	inset: 0;
	z-index: 2147483000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px 16px;
	--rw-modal-blue: #007cc2;
	--rw-modal-body: #e5f0f7;
	--rw-field-h: 80px;
}
.rw-modal__backdrop {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.5);
}
.rw-modal__dialog {
	position: relative;
	display: flex;
	flex-direction: column;
	width: 100%;
	max-width: 1140px;
	max-height: calc(100vh - 48px);
	max-height: calc(100dvh - 48px);
	background: #fff;
	border-radius: 8px;
	overflow: hidden;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
	animation: rw-modal-in 0.2s ease-out;
}
@keyframes rw-modal-in {
	from { opacity: 0; transform: translateY(-16px); }
	to   { opacity: 1; transform: none; }
}
.rw-modal__header {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 16px;
	background: var(--rw-modal-blue);
	color: #fff;
}
.rw-modal__title {
	margin: 0;
	padding: 0;
	font-family: Oswald, sans-serif;
	font-size: 24px;
	font-weight: 500;
	line-height: 36px;
	color: #fff;
}
.rw-modal__close {
	background: none;
	border: 0;
	color: #fff;
	font-size: 30px;
	line-height: 1;
	cursor: pointer;
	padding: 0 4px;
	opacity: 0.9;
}
.rw-modal__close:hover { opacity: 1; }
.rw-modal__body {
	flex: 1 1 auto;
	min-height: 0;
	overflow-y: auto;
	padding: 16px;
	background: var(--rw-modal-body);
}
body.rw-modal-open { overflow: hidden; }
.rw-modal .gform_validation_container,
.rw-modal .gform_wrapper .gform_validation_container { display: none !important; }

/* Gravity Forms inside the modal */
.rw-modal .gform_wrapper .gform_fields { grid-row-gap: 20px; }
.rw-modal .gform_wrapper .gfield_label.hidden_label,
.rw-modal .gform_wrapper .gform_required_legend { display: none; }
.rw-modal .gform_wrapper input[type="text"],
.rw-modal .gform_wrapper input[type="email"],
.rw-modal .gform_wrapper input[type="tel"],
.rw-modal .gform_wrapper select,
.rw-modal .gform_wrapper textarea {
	width: 100%;
	height: var(--rw-field-h);
	padding: 6px 12px;
	border: 0;
	border-radius: 0;
	background: #fff;
	box-shadow: none;
	font-family: inherit;
	font-size: 16px;
	line-height: 24px;
	color: var(--rw-text);
	box-sizing: border-box;
}
.rw-modal .gform_wrapper textarea {
	height: 180px !important;
	min-height: 180px !important;
	padding: 29px 12px;
	resize: vertical;
}
.rw-modal .gform_wrapper select {
	padding: 6px 36px 6px 12px;
	line-height: 68px; /* Chrome top-aligns text in an appearance:none select unless line-height fills it */
	color: #6c757d;
	appearance: none;
	-webkit-appearance: none;
	background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path d='M1 1l5 5 5-5' fill='none' stroke='%23161a1d' stroke-width='1.5'/></svg>");
	background-repeat: no-repeat;
	background-position: right 16px center;
}
.rw-modal .gform_wrapper select.rw-has-value { color: var(--rw-text); }
.rw-modal .gform_wrapper input::placeholder,
.rw-modal .gform_wrapper textarea::placeholder { color: #6c757d; opacity: 1; }
.rw-modal .gform_wrapper input:focus,
.rw-modal .gform_wrapper select:focus,
.rw-modal .gform_wrapper textarea:focus { outline: 2px solid var(--rw-modal-blue); outline-offset: -2px; }
.rw-modal .gform_wrapper .rw-readonly input[readonly] {
	background: #f2f2f2;
	color: #666;
	cursor: default;
}
.rw-modal .gform_wrapper .gfield_validation_message,
.rw-modal .gform_wrapper .validation_message { background: transparent; border: 0; padding: 4px 0 0; color: #c02b0a; font-size: 13px; }
.rw-modal .gform_wrapper .gform_validation_errors { margin: 0 0 12px; }

/* Footer: blue bar with the white "Envoyer" button, flush with the modal edges */
.rw-modal .gform_wrapper .gform_footer {
	display: flex;
	justify-content: flex-end;
	margin: 16px -16px -16px;
	padding: 16px 12px;
	background: var(--rw-modal-blue);
}
/* Gravity Forms' Orbital theme paints the button from CSS variables; override the variables and the properties. */
.rw-modal .gform_wrapper {
	--gf-ctrl-btn-bg-color-primary: #fff;
	--gf-ctrl-btn-bg-color-hover-primary: #003e7e;
	--gf-ctrl-btn-color-primary: #003e7e;
	--gf-ctrl-btn-color-hover-primary: #fff;
	--gf-ctrl-btn-border-color-primary: #fff;
	--gf-ctrl-btn-border-color-hover-primary: #003e7e;
	--gf-ctrl-btn-radius: 0;
	--gf-ctrl-btn-shadow: none;
	--gf-ctrl-btn-shadow-hover: none;
	--gf-ctrl-btn-font-size: 14px;
	--gf-ctrl-btn-font-weight: 600;
	--gf-ctrl-btn-size-md: 50px;
	--gf-ctrl-btn-padding-x: 20px;
	--gf-ctrl-btn-padding-y: 0;
}
.rw-modal .gform_wrapper .gform_footer input[type="submit"],
.rw-modal .gform_wrapper .gform_footer button,
.rw-modal .gform_wrapper .gform_footer .gform_button {
	height: 50px !important;
	min-height: 50px !important;
	margin: 0 0 0 10px !important;
	padding: 0 20px 0 30px !important;
	/* white button with the 3px blue bar inside it, 5px from the left edge, full height (like rodwick.com) */
	background: linear-gradient(var(--rw-modal-blue), var(--rw-modal-blue)) 5px 0 / 3px 100% no-repeat, #fff !important;
	border: 0 !important;
	border-radius: 0 !important;
	color: var(--rw-blue) !important;
	font-family: inherit !important;
	font-size: 14px !important;
	font-weight: 600 !important;
	line-height: 50px !important;
	letter-spacing: 0;
	cursor: pointer;
	box-shadow: none !important;
	transition: background-color 0.2s ease, color 0.2s ease;
}
.rw-modal .gform_wrapper .gform_footer input[type="submit"]:hover,
.rw-modal .gform_wrapper .gform_footer button:hover,
.rw-modal .gform_wrapper .gform_footer .gform_button:hover { background: linear-gradient(#fff, #fff) 5px 0 / 3px 100% no-repeat, var(--rw-blue) !important; color: #fff !important; }
.rw-modal .gform_confirmation_message {
	padding: 24px 8px;
	font-size: 16px;
	color: var(--rw-blue);
	font-weight: 600;
}
@media (max-width: 767px) {
	.rw-modal { padding: 16px 8px; --rw-field-h: 56px; }
	.rw-modal__header { padding: 12px 16px; }
	.rw-modal__title { font-size: 18px; line-height: 1.3; }
	.rw-modal .gform_wrapper .gform_fields { grid-row-gap: 12px; }
	.rw-modal .gform_wrapper select { line-height: 44px; }
	.rw-modal .gform_wrapper textarea { height: 140px !important; min-height: 140px !important; padding: 16px 12px; }
}
