/* Block - Boat listings: WordPress additions to the design's boats.css and modal.css (loaded with the block, on the site
   and in the editor). The "Get best price" Gravity Form is styled like the design's modal form (.cs-form--icons): white
   fields with a leading icon (field CSS class mm-icon-{icon}), red focus ring, full width button. Same approach as
   Block - Forms (template-parts/blocks/forms/block.css), scoped to the modal's .mm-gf--price wrapper. */

/* ---------- Tiles ---------- */
/* Motor without a price: the call label in place of the price */
.cs-motor-tile__now.mm-boats-call {
	font-size: 16px;
	color: var(--primary);
}
/* Editor: nothing to list */
.mm-boats-notice {
	margin: 0;
	padding: 20px 24px;
	border: 1px dashed var(--border-strong);
	font-size: 14px;
	color: var(--muted);
	background: var(--bg-light);
}

/* ---------- Modal: boat summary ---------- */
.cs-modal__boat-body span[hidden] {
	display: none;
}

/* ---------- Modal form: layout, 16px rhythm, button below ---------- */
.mm-gf--price .gform_wrapper .gform_fields {
	row-gap: 16px;
	column-gap: 16px;
}
.mm-gf--price .gform_wrapper .gfield {
	margin: 0;
	padding: 0;
	border: 0;
	min-width: 0;
}
.mm-gf--price .gform_wrapper .gfield--type-hidden,
.mm-gf--price .gform_wrapper .gform_validation_container,
.mm-gf--price .gform_wrapper .gfield_visibility_hidden {
	display: none !important;
}
.mm-gf--price .gform_wrapper .gform_footer,
.mm-gf--price .gform_wrapper .gform_page_footer {
	display: block;
	margin: 20px 0 0;
	padding: 0;
}
.mm-gf--price .gform_required_legend,
.mm-gf--price .gform_heading {
	display: none;
}
.mm-gf--price .gform_ajax_spinner {
	width: 20px;
	height: 20px;
}
@media (max-width: 575px) {
	.mm-gf--price .gform_wrapper .gform_fields > .gfield {
		grid-column: 1 / -1;
	}
}

/* Labels: for screen readers only, like the design's modal form */
.mm-gf--price .gfield_label,
.mm-gf--price .gform-field-label--type-sub {
	display: block;
	margin: 0 0 8px;
	font-family: var(--font-heading);
	font-size: 12px;
	font-weight: 700;
	line-height: 1.4;
	letter-spacing: .8px;
	text-transform: uppercase;
	color: var(--heading);
}
.mm-gf--price .gfield_required {
	margin-left: 4px;
	color: var(--primary);
}
.mm-gf--price .hidden_label > .gfield_label,
.mm-gf--price .hidden_label > legend.gfield_label,
.mm-gf--price .screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}
.mm-gf--price .gfield_description {
	margin-top: 8px;
	font-size: 13px;
	color: var(--muted);
}

/* Fields: white, hairline border, red focus ring */
.mm-gf--price .gfield input:is([type="text"], [type="email"], [type="tel"], [type="number"], [type="url"], [type="date"]),
.mm-gf--price .gfield select,
.mm-gf--price .gfield textarea {
	display: block;
	box-sizing: border-box;
	width: 100%;
	height: 56px;
	margin: 0;
	padding: 0 18px;
	font-family: var(--font-primary);
	font-size: 15px;
	line-height: normal;
	color: var(--heading);
	background-color: var(--white);
	border: 1px solid var(--border);
	border-radius: 0;
	box-shadow: rgba(0, 0, 0, .04) 0 1px 2px 0;
	transition: border-color .2s ease, box-shadow .2s ease;
	appearance: none;
}
.mm-gf--price .gfield textarea {
	height: 150px;
	min-height: 150px;
	padding-top: 16px;
	padding-bottom: 16px;
	line-height: 1.6;
	resize: vertical;
}
/* Beats Gravity Forms' min-block-size: 12rem on textarea.medium (see forms/block.css). */
.mm-gf.mm-gf--price .gform-theme--foundation .gfield textarea.textarea {
	min-block-size: 150px;
}
.mm-gf--price .gfield input::placeholder,
.mm-gf--price .gfield textarea::placeholder {
	color: #94a3b8;
	opacity: 1;
}
.mm-gf--price .gfield input:hover,
.mm-gf--price .gfield select:hover,
.mm-gf--price .gfield textarea:hover {
	border-color: var(--border-strong);
}
.mm-gf--price .gfield input:focus,
.mm-gf--price .gfield select:focus,
.mm-gf--price .gfield textarea:focus {
	outline: none;
	border-color: var(--primary);
	background-color: var(--white);
	box-shadow: 0 0 0 4px rgba(var(--primary-rgb), .08);
}
.mm-gf--price .gfield select {
	padding-right: 44px;
	cursor: pointer;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%230f172b' stroke-width='1.75' stroke-linecap='square'%3E%3Cpath d='M3.5 6l4.5 4.5L12.5 6'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 16px center;
	background-size: 14px;
}

/* Leading icon (field CSS class mm-icon-{bootstrap icon}), hairline divider, red on focus */
.mm-gf--price .ginput_container:has(> .mm-gf-icon) {
	position: relative;
}
.mm-gf--price .ginput_container > .mm-gf-icon {
	position: absolute;
	top: 50%;
	left: 18px;
	z-index: 1;
	font-size: 16px;
	line-height: 1;
	color: var(--secondary);
	transform: translateY(-50%);
	pointer-events: none;
	transition: color .2s ease;
}
.mm-gf--price .ginput_container:has(> .mm-gf-icon)::before {
	content: "";
	position: absolute;
	top: 18px;
	left: 48px;
	z-index: 1;
	width: 1px;
	height: 20px;
	background: var(--border);
	pointer-events: none;
}
.mm-gf--price .ginput_container:has(> .mm-gf-icon) :is(input, textarea) {
	padding-left: 62px;
}
.mm-gf--price .ginput_container_textarea > .mm-gf-icon {
	top: 19px;
	transform: none;
}
.mm-gf--price .ginput_container:has(> .mm-gf-icon):focus-within > .mm-gf-icon {
	color: var(--primary);
}
.mm-gf--price .ginput_container:has(> .mm-gf-icon):focus-within::before {
	background: rgba(var(--primary-rgb), .35);
}

/* Full width button, like the design's cs-btn--block */
.mm-gf--price .gform_footer .cs-btn,
.mm-gf--price .gform_footer :is(button, input)[type="submit"] {
	display: flex;
	justify-content: center;
	width: 100%;
}

/* Sub-labels below the inputs (the forms' Sub-Label Placement) */
.mm-gf--price .field_sublabel_below .gform-field-label--type-sub {
	margin: 8px 0 0;
}

/* Validation and confirmation */
/* As specific as Gravity Forms' theme rules (the modal also shows where Block - Forms' CSS is not loaded) */
.mm-gf--price .gform_wrapper .gform_validation_errors {
	margin: 0 0 20px;
	padding: 14px 18px;
	border: 0;
	border-left: 3px solid var(--primary);
	border-radius: 0;
	box-shadow: none;
	background: var(--primary-tint-10);
}
.mm-gf--price .gform_wrapper.gform-theme .gform_validation_errors {
	border: 0;
	border-left: 3px solid var(--primary); /* Gravity Forms' theme otherwise paints its own orange-red border. */
}
.mm-gf--price .gform_wrapper .gform_validation_errors:focus {
	outline: none; /* Gravity Forms focuses the summary so screen readers announce it; no ring on a status box. */
}
.mm-gf--price .gform_wrapper .gform_validation_errors .gform_submission_error {
	display: block;
	margin: 0;
	font-family: var(--font-primary);
	font-size: 14px;
	font-weight: 600;
	color: var(--heading);
}
.mm-gf--price .gform_wrapper .gform_validation_errors .gform-icon,
.mm-gf--price .gform_wrapper .gform_validation_errors ol {
	display: none;
}
.mm-gf--price .gfield_validation_message,
.mm-gf--price .validation_message {
	margin-top: 6px;
	font-size: 13px;
	color: var(--primary);
}
.mm-gf--price .gform_wrapper .gfield_error :is(input, select, textarea) {
	border-color: var(--primary);
}
.mm-gf--price .gform_confirmation_message {
	padding: 20px 24px;
	border-left: 3px solid var(--primary);
	background: var(--bg-light);
	color: var(--heading);
}
