/**
 * HD Gravity Forms styling - Estatik request-form color scheme
 * (#263238 slate background, #ff5a5f coral button).
 */

.hd-gf-card {
	background: #263238;
	border-radius: 14px;
	box-shadow: 0 6px 26px rgba(16, 42, 67, 0.22);
	padding: 38px 36px 34px;
	max-width: 720px;
	margin: 0 auto;
}
.hd-gf-card__title {
	text-align: center;
	font-size: 26px;
	color: #fff;
	margin: 0 0 26px;
}

.hd-gf-card .gform_wrapper input[type="text"],
.hd-gf-card .gform_wrapper input[type="email"],
.hd-gf-card .gform_wrapper input[type="tel"],
.hd-gf-card .gform_wrapper select {
	height: 40px;
	border: 1px solid rgba(255, 255, 255, 0.14);
	border-radius: 8px;
	padding: 0 14px;
	font-size: 14px;
	width: 100%;
	background: #fff;
}
.hd-gf-card .gform_wrapper textarea {
	border: 1px solid rgba(255, 255, 255, 0.14);
	border-radius: 8px;
	padding: 12px 14px;
	font-size: 14px;
	width: 100%;
	min-height: 130px;
	background: #fff;
}
.hd-gf-card .gform_wrapper input:focus,
.hd-gf-card .gform_wrapper select:focus,
.hd-gf-card .gform_wrapper textarea:focus {
	border-color: #ff5a5f;
	outline: none;
	box-shadow: 0 0 0 3px rgba(255, 90, 95, 0.25);
}
.hd-gf-card .gform_wrapper .gfield_label {
	font-size: 14px;
	font-weight: 600;
	color: #fff;
}
.hd-gf-card .gform_wrapper .gfield_description {
	font-size: 12px;
	color: #90a4ae;
}
.hd-gf-card .gform_wrapper .gform_button {
	background: #ff5a5f;
	color: #fff;
	border: 1px solid #ff5a5f;
	border-radius: 6px;
	padding: 10px 34px;
	font-size: 16px;
	cursor: pointer;
	transition: all .2s ease;
}
.hd-gf-card .gform_wrapper .gform_button:hover {
	background: transparent;
	color: #ff5a5f;
}
.hd-gf-card .gform_confirmation_message {
	text-align: center;
	font-size: 16px;
	color: #a5d6a7;
	padding: 18px 0;
}

/* select2 capsule chips for the Property multiselect */
.hd-gf-card .select2-container--default .select2-selection--multiple {
	border: 1px solid rgba(255, 255, 255, 0.14);
	border-radius: 8px;
	min-height: 40px;
	padding: 3px 6px;
}
.hd-gf-card .select2-selection__choice {
	background: #16add0 !important;
	border: none !important;
	border-radius: 14px !important;
	color: #fff !important;
	font-size: 12.5px;
	padding: 4px 12px 4px 8px !important;
	margin: 3px 4px 3px 0 !important;
	display: inline-flex;
	align-items: center;
	gap: 6px;
}
.hd-gf-card .select2-selection__choice__remove {
	color: rgba(255, 255, 255, 0.85) !important;
	font-size: 14px;
	cursor: pointer;
	order: 2;
}
.hd-gf-card .select2-selection__choice__remove:hover {
	color: #fff !important;
}

/* the raw multiselect before select2 boots */
.hd-gf-card .hd-gf-property select[multiple] {
	height: auto;
	min-height: 40px;
}

/* the form card inside the Avada modal: fill the body */
.fusion-modal .hd-gf-card {
	max-width: none;
	box-shadow: none;
	margin: 0;
}

/* GF Orbital theme ships its own button variables - override both layers */
.hd-gf-card .gform-theme {
	--gf-ctrl-btn-bg-color: #ff5a5f;
	--gf-ctrl-btn-bg-color-hover: #e04a4f;
	--gf-ctrl-btn-border-color: #ff5a5f;
	--gf-ctrl-btn-border-color-hover: #e04a4f;
	--gf-ctrl-btn-color: #fff;
	--gf-color-primary: #ff5a5f;
}
.hd-gf-card .gform_wrapper .gform_button,
.hd-gf-card .gform_wrapper button.gform_button {
	background: #ff5a5f !important;
	border-color: #ff5a5f !important;
	color: #fff !important;
}
.hd-gf-card .gform_wrapper .gform_button:hover {
	background: #e04a4f !important;
	border-color: #e04a4f !important;
}

/* modal polish: rounded corners + slate border matching the form */
.fusion-modal.hd-agent-contact-modal .modal-content {
	border-radius: 16px;
	border: 2px solid #263238;
	overflow: hidden;
}
.fusion-modal.hd-agent-contact-modal .modal-header {
	border-top-left-radius: 14px;
	border-top-right-radius: 14px;
}

/* select2 inline search field: our generic 40px input rules were styling
   this internal input, creating the phantom inset border / oval artifact */
.hd-gf-card .gform_wrapper .select2-search--inline .select2-search__field {
	border: none !important;
	height: auto !important;
	min-height: 0 !important;
	box-shadow: none !important;
	background: transparent !important;
	padding: 5px 6px !important;
	margin: 2px 0 !important;
	line-height: 1.4;
}

/* persistent chevron indicator with hover + open states */
.hd-gf-card .select2-selection--multiple {
	position: relative;
	padding-right: 38px !important;
	cursor: pointer;
}
.hd-gf-card .select2-selection--multiple:after {
	content: "";
	position: absolute;
	right: 16px;
	top: 50%;
	width: 9px;
	height: 9px;
	border-right: 2px solid #90a4ae;
	border-bottom: 2px solid #90a4ae;
	transform: translateY(-70%) rotate(45deg);
	transition: border-color .2s ease, transform .25s ease;
	pointer-events: none;
}
.hd-gf-card .select2-selection--multiple:hover:after {
	border-color: #ff5a5f;
}
.hd-gf-card .select2-container--open .select2-selection--multiple:after {
	transform: translateY(-30%) rotate(225deg);
	border-color: #ff5a5f;
}

/* dropdown: thin rounded coral scrollbar signals more listings */
.hd-gf-dropdown .select2-results__options {
	max-height: 220px !important;
	overflow-y: auto;
	scrollbar-width: thin !important;         /* also governs Chromium 121+ */
	scrollbar-color: #ff5a5f transparent !important;
}
.hd-gf-dropdown .select2-results__options::-webkit-scrollbar {
	width: 4px;
}
.hd-gf-dropdown .select2-results__options::-webkit-scrollbar-thumb {
	background: #ff5a5f;
	border-radius: 4px;
}
.hd-gf-dropdown .select2-results__options::-webkit-scrollbar-track {
	background: transparent;
}
.hd-gf-dropdown .select2-results__option--highlighted[aria-selected] {
	background: #ff5a5f;
}

/* modal: always fit the viewport with rounded corners; body scrolls inside */
.fusion-modal.hd-agent-contact-modal .modal-dialog {
	display: flex;
	align-items: center;
	min-height: calc(100vh - 60px);
	margin-top: 30px;
	margin-bottom: 30px;
}
.fusion-modal.hd-agent-contact-modal .modal-content {
	max-height: 90vh;
	display: flex;
	flex-direction: column;
	width: 100%;
}
.fusion-modal.hd-agent-contact-modal .modal-body {
	overflow-y: auto;
	scrollbar-width: thin;
	scrollbar-color: #ff5a5f transparent;
}
.fusion-modal.hd-agent-contact-modal .modal-body::-webkit-scrollbar {
	width: 4px;
}
.fusion-modal.hd-agent-contact-modal .modal-body::-webkit-scrollbar-thumb {
	background: #ff5a5f;
	border-radius: 4px;
}

/* dropdown anchored inside the field container */
.hd-gf-card .gfield {
	position: relative;
}

/* placeholder: muted gray */
.hd-gf-card .select2-search__field::placeholder {
	color: #90a4ae !important;
	opacity: 1;
}

/* pin the dropdown to the input wrapper's bottom edge, immune to
   select2's stale inline positioning and its drop-up mode */
.hd-gf-card .ginput_container {
	position: relative;
}
/* only the appended DROPDOWN wrapper - when open, select2 also marks the
   selection box's own container with --open, which must stay in flow */
html body .hd-gf-card .ginput_container > .select2-container--open:has(> .select2-dropdown),
html body .hd-gf-card .gfield > .select2-container--open:has(> .select2-dropdown) {
	position: absolute !important;
	top: 100% !important;
	bottom: auto !important;
	left: 0 !important;
	right: 0 !important;
	width: auto !important;
	height: auto !important;
	margin-top: 4px;
	z-index: 20;
}
/* inner dropdown: static inside the pinned wrapper - its own inline
   top/left (incl. drop-up offsets) must never displace it */
html body .hd-gf-card .ginput_container > .select2-container--open > .select2-dropdown,
html body .hd-gf-card .gfield > .select2-container--open > .select2-dropdown {
	position: static !important;
	display: block !important; /* it's a <span>: static reverts it to inline,
	   and inline backgrounds only paint behind text fragments - no box */
	width: 100% !important;
}
.hd-gf-card .gfield .hd-gf-dropdown {
	/* Avada's content-area dropdown theming reaches the field-anchored
	   dropdown (yellow borders, white text, zero padding) - reset it */
	background: #fff !important;
	border: 1px solid #dfe6ea !important;
	border-radius: 8px;
	overflow: hidden;
	box-shadow: 0 10px 26px rgba(0, 0, 0, 0.18);
}
body .fusion-body .hd-gf-card .gfield .hd-gf-dropdown .select2-results__option,
body .hd-gf-card .gfield .hd-gf-dropdown .select2-results__option {
	padding: 9px 14px !important;
	color: #37474f !important;
	font-size: 14px;
	line-height: 1.4;
	background: transparent;
}
.hd-gf-card .gfield .hd-gf-dropdown .select2-results__option[aria-selected="true"] {
	background: #f0f4f7;
}
.hd-gf-card .gfield .hd-gf-dropdown .select2-results__option--highlighted {
	background: #ff5a5f !important;
	color: #fff !important;
}

/* kill the dead band above the first option */
.hd-gf-card .hd-gf-dropdown .select2-results {
	padding: 0 !important;
	margin: 0 !important;
}
.hd-gf-card .hd-gf-dropdown .select2-results__options {
	padding: 0 !important;
	margin: 0 !important;
}

/* newsletter opt-out checkbox */
.hd-gf-card .gfield_checkbox label {
	color: #cfd8dc;
	font-size: 13.5px;
	font-weight: 400;
}
.hd-gf-card .gfield_checkbox input[type="checkbox"] {
	accent-color: #ff5a5f;
	width: 16px;
	height: 16px;
	margin-right: 8px;
	vertical-align: -2px;
}
