/* ==========================================================================
   Request form page (page-templates/submit-form.php, design "3 Page contact DMS"):
   intro line → 3 service tabs (994px) → form (790px) → partner logos.
   Banner = .sv-hero (service2.css), logos = .rf-aff (referral2.css).
   ========================================================================== */
.dsms-ui2--submit .sv-hero { height: clamp(320px, 28.48vw, max(410px, 70svh)); } /* 1440×410 */
.dsms-ui2--submit .rf-aff.hm-section { margin-top: 0; }
.dsms-ui2--submit .rf-aff__viewport { margin-top: 0; } /* logos only, no title */

.sr { padding: 48px 0 65px; font-family: var(--hm-font); }
.sr__wrap { display: flex; flex-direction: column; align-items: center; gap: 24px; }
.sr__intro { max-width: var(--hm-container); margin: 0; color: var(--hm-text); font-size: 18px; line-height: 1.5; text-align: center; }
.sr__box { display: flex; flex-direction: column; gap: 40px; width: 100%; max-width: 994px; }

/* ---------- Tabs ---------- */
.sr-tabs { display: flex; gap: 20px; }
.sr-tab {
	display: flex;
	flex: 1 1 0;
	align-items: center;
	justify-content: center;
	min-width: 0;
	min-height: 40px;
	padding: 8px 16px;
	border-bottom: 1px solid #f4f3f6;
	color: var(--hm-text);
	font-size: 14px;
	font-weight: 400;
	line-height: 24px;
	text-align: center;
	text-decoration: none;
	text-transform: uppercase;
	transition: color .2s ease, border-color .2s ease;
}
.sr-tab:hover { color: var(--hm-primary); }
.sr-tab.is-active { border-bottom-color: var(--hm-primary); color: var(--hm-primary); font-weight: 600; }
.sr-tab:focus-visible { outline: 2px solid var(--hm-primary); outline-offset: 2px; }

/* ---------- Panel ---------- */
.sr-panel { display: flex; flex-direction: column; align-items: center; gap: 32px; }
.sr-panel[hidden] { display: none; }
.sr-panel__title {
	margin: 0;
	color: #242527;
	font-family: var(--hm-font);
	font-size: 36px;
	font-weight: 700;
	line-height: 1.4;
	text-align: center;
	text-transform: uppercase;
}
.sr-form { display: flex; flex-direction: column; align-items: center; gap: 32px; width: 100%; max-width: 790px; }
.sr-fields { display: flex; flex-direction: column; gap: 24px; width: 100%; }
.sr-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 24px 32px; }
.sr-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Fields ---------- */
.sr-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.sr-label { color: #333f51; font-size: 16px; font-weight: 500; line-height: 24px; }
.sr-req { color: #f36a0f; }
.sr-input {
	display: block;
	width: 100%;
	min-height: 50px;
	padding: 14px;
	border: 1px solid #e5e7eb;
	border-radius: 0;
	background: #fff;
	box-shadow: 0 1px 2px rgba(0, 0, 0, .05);
	color: var(--hm-black);
	font-family: var(--hm-font);
	font-size: 14px;
	line-height: 20px;
	transition: border-color .2s ease, box-shadow .2s ease;
}
.sr-input::placeholder { color: #9ca3af; opacity: 1; }
.sr-input:focus { border-color: var(--hm-primary); box-shadow: 0 0 0 3px rgba(250, 146, 90, .2); outline: none; }
.sr-input.is-invalid { border-color: #e02424; }
.sr-input--area { min-height: 78px; padding-block: 12px; resize: vertical; }
/* Select with the chevron of the design. */
.sr-select { position: relative; display: block; }
.sr-select .sr-input { padding-right: 44px; appearance: none; -webkit-appearance: none; cursor: pointer; }
.sr-select::after {
	content: "";
	position: absolute;
	top: 50%;
	right: 14px;
	width: 19px;
	height: 19px;
	margin-top: -9.5px;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='19' height='19' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M12.67 6 8 10.67 3.33 6' stroke='%231c0f13' stroke-width='1.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
	pointer-events: none;
}
/* Date: orange calendar icon. */
.sr-input--date { min-height: 50px; }
.sr-input--date::-webkit-calendar-picker-indicator {
	width: 24px;
	height: 24px;
	padding: 0;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none'%3E%3Crect x='3.5' y='5' width='17' height='15.5' rx='2' stroke='%23fa925a' stroke-width='1.3'/%3E%3Cpath d='M3.5 9.5h17M8 3v4M16 3v4' stroke='%23fa925a' stroke-width='1.3' stroke-linecap='round'/%3E%3C/svg%3E") center / 24px no-repeat;
	cursor: pointer;
}

/* ---------- Radio groups ---------- */
.sr-choice { min-width: 0; margin: 0; padding: 0; border: 0; }
.sr-choice__label { float: none; width: auto; margin: 0; padding: 0; color: #000; font-size: 16px; font-weight: 400; line-height: 24px; }
.sr-choice--big .sr-choice__label { font-size: 18px; line-height: 1.5; }
.sr-choice__opts { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 32px; }
.sr-choice--inline { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; }
.sr-choice--inline.sr-choice--big { gap: 12px 32px; }
.sr-choice--inline .sr-choice__label { float: left; }
.sr-choice--inline:not(.sr-choice--big) .sr-choice__opts { gap: 12px 46px; }
.sr-choice--stack .sr-choice__label { display: block; margin-bottom: 24px; }
.sr-choice--stack .sr-choice__opts { gap: 12px 46px; }
.sr-radio { position: relative; display: inline-flex; align-items: center; gap: 10px; margin: 0; cursor: pointer; }
.sr-radio input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.sr-radio__dot {
	position: relative;
	flex: 0 0 20px;
	width: 20px;
	height: 20px;
	border: 1px solid #dfe4ea;
	border-radius: 50%;
	background: #fff;
	transition: border-color .2s ease;
}
.sr-radio__dot::after {
	content: "";
	position: absolute;
	inset: 4px;
	border-radius: 50%;
	background: var(--hm-primary);
	transform: scale(0);
	transition: transform .15s ease;
}
.sr-radio input:checked + .sr-radio__dot { border-color: var(--hm-primary); }
.sr-radio input:checked + .sr-radio__dot::after { transform: scale(1); }
.sr-radio input:focus-visible + .sr-radio__dot { outline: 2px solid var(--hm-primary); outline-offset: 2px; }
.sr-radio:hover .sr-radio__dot { border-color: var(--hm-primary); }
.sr-radio__text { color: #111928; font-size: 16px; line-height: 24px; white-space: nowrap; }

/* ---------- Photo drop zone ---------- */
.sr-field--photos { gap: 12px; }
.sr-drop {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
	padding: 24px 35px;
	border: 1px dashed #757e8c;
	border-radius: 6px;
	background: #fff;
	color: #757e8c;
	text-align: center;
	cursor: pointer;
	transition: border-color .2s ease, background-color .2s ease;
}
.sr-drop:hover,
.sr-drop.is-over { border-color: var(--hm-primary); background: #fff8f4; }
.sr-drop:focus-within { outline: 2px solid var(--hm-primary); outline-offset: 2px; }
.sr-drop__input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.sr-drop__icon { width: 48px; height: 48px; }
.sr-drop__text { font-size: 16px; line-height: 24px; }
.sr-drop__hint { font-size: 12px; line-height: 18px; color: #9ca3af; }
.sr-drop__list { display: flex; flex-wrap: wrap; gap: 12px; margin: 0; padding: 0; list-style: none; }
.sr-drop__list[hidden] { display: none; }
.sr-drop__item { position: relative; width: 88px; }
.sr-drop__item img { display: block; width: 88px; height: 66px; border-radius: 4px; object-fit: cover; }
.sr-drop__name { display: block; overflow: hidden; margin-top: 4px; color: var(--hm-text); font-size: 11px; line-height: 14px; text-overflow: ellipsis; white-space: nowrap; }
.sr-drop__del {
	position: absolute;
	top: -8px;
	right: -8px;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 22px;
	height: 22px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--hm-black);
	color: #fff;
	font-size: 14px;
	line-height: 1;
	cursor: pointer;
}

/* ---------- Messages + submit ---------- */
.sr-error { margin: 0; color: #e02424; font-size: 14px; line-height: 20px; }
.sr-error[hidden] { display: none; }
.sr-error--form { align-self: stretch; text-align: center; }
.sr-alert { width: 100%; max-width: 790px; padding: 14px 18px; border-left: 4px solid; font-size: 15px; line-height: 1.5; }
.sr-alert--success { border-color: #31c48d; background: #f3faf7; color: #03543f; }
.sr-alert--error { border-color: #e02424; background: #fdf2f2; color: #9b1c1c; }
.sr-submit { display: flex; justify-content: center; width: 100%; }
.sr-submit__btn { max-width: 100%; white-space: normal; }
.sr-form.is-sending .sr-submit__btn { opacity: .7; pointer-events: none; }

/* ---------- Popup on the service pages (template-parts/submit/popup.php) ---------- */
.sr-modal {
	width: min(920px, calc(100vw - 32px));
	max-width: none;
	max-height: calc(100dvh - 48px);
	margin: auto;
	padding: 0;
	border: 0;
	background: #fff;
	color: var(--hm-black);
	box-shadow: 0 24px 60px rgba(28, 15, 19, .3);
	overflow: hidden;
	font-family: var(--hm-font);
}
.sr-modal::backdrop { background: rgba(28, 15, 19, .62); }
.sr-modal[open] { display: flex; animation: sr-modal-in .3s ease; }
.sr-modal__box { position: relative; width: 100%; max-height: calc(100dvh - 48px); overflow-y: auto; overscroll-behavior: contain; padding: 56px 64px 48px; border-top: 4px solid var(--hm-primary); }
.sr-modal__close {
	position: absolute;
	top: 14px;
	right: 14px;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: #f5f6f7;
	color: var(--hm-black);
	cursor: pointer;
	transition: background-color .2s ease, color .2s ease;
}
.sr-modal__close:hover { background: var(--hm-primary); color: #fff; }
.sr-modal__close:focus-visible { outline: 2px solid var(--hm-primary); outline-offset: 2px; }
.sr-modal .sr-panel__title { font-size: 30px; }
html.sr-modal-lock { overflow: hidden; }
@keyframes sr-modal-in { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

/* ---------- Responsive ---------- */
@media (max-width: 991.98px) {
	.sr-panel__title { font-size: 30px; }
}
@media (max-width: 767.98px) {
	.sr { padding: 32px 0 48px; }
	.sr__intro { font-size: 16px; }
	.sr__box { gap: 28px; }
	.sr-tabs { gap: 8px; }
	.sr-tab { padding: 8px 4px; font-size: 12px; line-height: 18px; }
	.sr-panel { gap: 24px; }
	.sr-panel__title { font-size: 24px; }
	.sr-fields { gap: 20px; }
	.sr-row { grid-template-columns: minmax(0, 1fr); gap: 20px; }
	.sr-choice--inline { display: block; }
	.sr-choice--inline .sr-choice__label { float: none; display: block; margin-bottom: 12px; }
	.sr-choice__opts,
	.sr-choice--inline:not(.sr-choice--big) .sr-choice__opts,
	.sr-choice--stack .sr-choice__opts { gap: 12px 24px; }
	.sr-choice--stack .sr-choice__label { margin-bottom: 12px; }
	.sr-drop { padding: 20px 16px; }
	.sr-modal { width: 100vw; max-height: 100dvh; height: 100dvh; }
	.sr-modal__box { max-height: 100dvh; padding: 56px 20px 32px; }
	.sr-modal .sr-panel__title { padding-right: 24px; font-size: 22px; }
}
@media (prefers-reduced-motion: reduce) {
	.sr-modal[open] { animation: none; }
}
