/**
 * Namecheap-inspired signup / order form polish.
 * Targets ResellersPanel #orderForm without changing its logic.
 */

body.host360-pro.page-template-default:has(#orderForm),
body.host360-pro:has(#orderForm) {
	background: #f7f7f7 !important;
}

body.host360-pro #default_content:has(#orderForm),
body.host360-pro .nc-content:has(#orderForm) #default_content {
	background: transparent !important;
	border: 0 !important;
	box-shadow: none !important;
	padding: 0 !important;
	max-width: none;
	width: 100%;
	margin: 0 auto 2rem;
}

/* Page intro */
body.host360-pro #default_content:has(#orderForm)::before {
	content: "Create your account";
	display: block;
	font-family: "Nunito Sans", "Open Sans", sans-serif;
	font-size: clamp(1.6rem, 3vw, 2.1rem);
	font-weight: 800;
	color: #313131;
	margin: 0 0 0.35rem;
	letter-spacing: -0.02em;
}

body.host360-pro #default_content:has(#orderForm)::after {
	content: "Choose your plan, add a domain if you need one, and finish checkout securely.";
	display: block;
	color: #6b6b6b;
	font-size: 0.98rem;
	margin: 0 0 1.15rem;
}

body.host360-pro .nc-content:has(#orderForm)::before,
body.host360-pro .nc-content:has(#orderForm)::after {
	content: none;
	display: none;
}

#orderForm {
	background: #fff;
	border: 1px solid #e6e6e6;
	border-radius: 10px;
	box-shadow: 0 10px 28px rgba(0, 0, 0, 0.05);
	padding: 1.35rem 1.35rem 1.5rem;
	font-family: "Open Sans", "Nunito Sans", sans-serif !important;
	color: #313131;
}

#orderForm .ui-widget,
#orderForm .ui-widget input,
#orderForm .ui-widget select,
#orderForm .ui-widget textarea,
#orderForm .ui-widget button {
	font-family: inherit !important;
}

/* Username */
#username-block {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.65rem;
	background: #fafafa !important;
	border: 1px solid #e6e6e6 !important;
	border-radius: 8px !important;
	padding: 0.9rem 1rem !important;
	margin-bottom: 1.1rem !important;
	font-weight: 700;
	color: #313131;
}

#username-block #username,
#orderForm input.input,
#orderForm select.input,
#orderForm textarea,
#orderForm input[type="text"],
#orderForm input[type="email"],
#orderForm input[type="password"],
#orderForm select {
	min-height: 34px;
	height: 34px;
	border: 1px solid #cfcfcf !important;
	border-radius: 4px !important;
	padding: 0.3rem 0.55rem !important;
	background: #fff !important;
	box-shadow: none !important;
	font-size: 0.875rem !important;
	line-height: 1.3 !important;
	color: #313131 !important;
}

#username-block #username:focus,
#orderForm input.input:focus,
#orderForm select.input:focus,
#orderForm input[type="text"]:focus,
#orderForm select:focus {
	border-color: #ff6c2c !important;
	outline: 2px solid rgba(255, 108, 44, 0.18);
}

#username-block #username.wide,
#orderForm input.wide {
	flex: 1 1 220px;
	max-width: 100%;
}

/* Product tabs */
#products-block {
	border: 0 !important;
	background: transparent !important;
}

#products-block .ui-widget-header.tabs-new,
#products-block .tabs-new {
	display: flex !important;
	flex-wrap: wrap;
	gap: 0.4rem;
	background: #f3f3f3 !important;
	border: 1px solid #e6e6e6 !important;
	border-radius: 8px !important;
	padding: 0.45rem !important;
	margin-bottom: 1rem !important;
}

#products-block .tabs-new span {
	display: block;
	float: none !important;
	margin: 0 !important;
}

#products-block .tabs-new a,
#products-block .tabs-new span a {
	display: block !important;
	padding: 0.55rem 0.85rem !important;
	border-radius: 4px !important;
	background: transparent !important;
	color: #313131 !important;
	font-weight: 700 !important;
	font-size: 0.86rem !important;
	text-decoration: none !important;
	border: 0 !important;
	line-height: 1.3 !important;
	white-space: nowrap;
}

#products-block .tabs-new a:hover,
#products-block .tabs-new .clickedTab a,
#products-block .tabs-new a.clickedTab,
#products-block .tabs-new span.clickedTab a {
	background: #ff6c2c !important;
	color: #fff !important;
}

#products-block .ui-widget-content {
	background: #fff !important;
	border: 1px solid #e6e6e6 !important;
	border-radius: 8px !important;
	padding: 1rem !important;
	box-shadow: none !important;
}

#orderForm .features,
#orderForm .ui-state-default.normal {
	background: #fafafa !important;
	border: 1px solid #e6e6e6 !important;
	border-radius: 8px !important;
	color: #313131 !important;
	padding: 0.85rem 1rem !important;
}

#orderForm .plan_promo_domain {
	margin-top: 0.55rem;
	padding: 0.55rem 0.7rem;
	background: #fff1ea;
	border-left: 3px solid #ff6c2c;
	border-radius: 0 4px 4px 0;
	color: #513126;
	font-size: 0.88rem;
}

#orderForm .split {
	overflow: visible;
}

/* ---- Account owner details: modern 2-col field grid ---- */
#details-block {
	margin-top: 1.15rem;
	border: 1px solid #e6e6e6 !important;
	border-radius: 10px !important;
	background: #fff !important;
	overflow: hidden;
}

#details-block > .ui-widget-header.header,
#details-block .header {
	background: #fafafa !important;
	border: 0 !important;
	border-bottom: 1px solid #e6e6e6 !important;
	border-radius: 0 !important;
	color: #313131 !important;
	font-family: "Nunito Sans", "Open Sans", sans-serif !important;
	font-size: 1.05rem !important;
	font-weight: 800 !important;
	padding: 0.85rem 1.1rem !important;
	margin: 0 !important;
}

#details-block > .ui-widget-content {
	background: #fff !important;
	border: 0 !important;
	padding: 1.15rem 1.1rem 1.25rem !important;
}

#the_details {
	display: grid !important;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0.55rem 0.85rem;
	width: 100% !important;
	margin: 0 !important;
	float: none !important;
}

#the_details > .input-details.sub-div-right:first-child,
#the_details > #business_options {
	grid-column: 1 / -1;
	width: 100% !important;
	float: none !important;
	margin: 0 !important;
	padding: 0 !important;
}

#the_details > .split.input-details,
#the_details > .split {
	display: contents !important;
	width: auto !important;
	float: none !important;
	margin: 0 !important;
	padding: 0 !important;
}

#the_details .input-details > div,
#the_details .split > div,
#the_details #company_name,
#the_details #vat_number,
#the_details #client_state_div,
#the_details #client_state_us_div {
	float: none !important;
	width: 100% !important;
	max-width: 100% !important;
	margin: 0 !important;
	padding: 0 !important;
	box-sizing: border-box;
}

#the_details label {
	display: flex !important;
	flex-direction: column !important;
	align-items: stretch !important;
	gap: 0.2rem;
	margin: 0 !important;
	padding: 0 !important;
	width: 100% !important;
	text-align: left !important;
	font-size: 0.75rem !important;
	font-weight: 700 !important;
	color: #4a4a4a !important;
	line-height: 1.25 !important;
	position: relative;
}

#the_details .sub-div-right label span ~ input,
#the_details .sub-div-right label span ~ select,
#the_details .sub-div-right label input[name="address2"],
#the_details input.input,
#the_details select.input,
#the_details input.wide,
#the_details select.wide,
#the_details input[type="text"],
#the_details select {
	display: block !important;
	width: 100% !important;
	max-width: 100% !important;
	min-height: 32px !important;
	height: 32px !important;
	margin: 0 !important;
	box-sizing: border-box !important;
	border: 1px solid #d9d9d9 !important;
	border-radius: 4px !important;
	padding: 0.25rem 0.5rem !important;
	background: #fff !important;
	font-size: 0.84rem !important;
	line-height: 1.25 !important;
	color: #313131 !important;
	float: none !important;
}

#the_details .sub-div-right label span ~ input:focus,
#the_details .sub-div-right label span ~ select:focus,
#the_details input.input:focus,
#the_details select.input:focus,
#the_details input[type="text"]:focus,
#the_details select:focus {
	border-color: #ff6c2c !important;
	outline: 2px solid rgba(255, 108, 44, 0.16);
	outline-offset: 0;
}

/* Tip icons sit after the field without breaking the grid */
#the_details .info.tip,
#the_details .info,
#the_details .w16 {
	position: absolute !important;
	right: 0.4rem;
	bottom: 0.45rem;
	margin: 0 !important;
	z-index: 2;
	transform: scale(0.85);
	transform-origin: right bottom;
}

#the_details > .split > div:has(input[name="address1"]),
#the_details > .split > div:has(#client_address1),
#the_details > .split > div:has(input[name="address2"]),
#the_details > .split > div:has(#client_address2) {
	grid-column: 1 / -1;
}

#the_details #business_options {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.65rem 1.25rem;
	padding: 0.65rem 0.85rem !important;
	background: #fafafa;
	border: 1px solid #eee;
	border-radius: 8px;
}

#the_details #business_options label {
	display: inline-flex !important;
	flex-direction: row !important;
	align-items: center !important;
	gap: 0.4rem !important;
	width: auto !important;
	font-weight: 600 !important;
}

#the_details #business_options input[type="radio"] {
	width: auto !important;
	min-height: 0 !important;
	margin: 0 !important;
}

@media (max-width: 640px) {
	#the_details {
		grid-template-columns: 1fr !important;
	}

	#the_details > .split > div:has(input[name="address1"]),
	#the_details > .split > div:has(input[name="address2"]),
	#the_details > .split > div:has(#client_address1),
	#the_details > .split > div:has(#client_address2) {
		grid-column: 1;
	}
}

#orderForm .all-features a,
#orderForm a.show_all_features,
#orderForm a.terms {
	color: #e85a1c !important;
	font-weight: 700;
	text-decoration: none !important;
}

#orderForm .all-features a:hover,
#orderForm a.terms:hover {
	color: #ff6c2c !important;
	text-decoration: underline !important;
}

/* Domain search inside order form */
#domain_search,
#domains-block,
#domain_search_form,
#selected_domains {
	background: #fff;
	border: 1px solid #e6e6e6;
	border-radius: 8px;
	padding: 0.85rem;
	margin: 0.75rem 0;
}

#domain_check,
#orderForm .ui-button,
#orderForm button.ui-button,
#orderForm input.ui-button,
#submit_order input[type="submit"],
#submit_order .ui-button {
	background: #ff6c2c !important;
	border: 0 !important;
	border-radius: 4px !important;
	color: #fff !important;
	font-weight: 700 !important;
	min-height: 44px;
	padding: 0.65rem 1.25rem !important;
	box-shadow: none !important;
	text-shadow: none !important;
	cursor: pointer;
}

#domain_check:hover,
#orderForm .ui-button:hover,
#submit_order input[type="submit"]:hover {
	background: #e85a1c !important;
}

#orderForm table {
	width: 100%;
	border-collapse: collapse;
}

#orderForm table th,
#orderForm table td {
	padding: 0.55rem 0.45rem;
	border-bottom: 1px solid #eee;
	font-size: 0.9rem;
}

#orderForm .prices label,
#orderForm .periods label {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	margin: 0.25rem 0.55rem 0.25rem 0;
	padding: 0.35rem 0.55rem;
	border: 1px solid #e6e6e6;
	border-radius: 4px;
	background: #fff;
}

/* Payment / terms */
#payment-block {
	margin-top: 1.15rem;
	padding-top: 0.25rem;
}

#payment-block .terms_services {
	background: #fafafa;
	border: 1px solid #e6e6e6;
	border-radius: 8px;
	padding: 1rem !important;
}

#payment-block hr {
	border: 0;
	border-top: 1px solid #e6e6e6;
	margin: 1rem 0;
}

#promo_code input {
	min-width: 180px;
}

#submit_order {
	display: flex;
	justify-content: flex-end;
	margin-top: 1.25rem;
	padding-top: 1rem;
	border-top: 1px solid #e6e6e6;
}

#submit_order input[type="submit"] {
	min-width: 180px;
	font-size: 1rem !important;
}

#orderForm .subtotal,
#orderForm .due-on {
	color: #313131;
}

#orderForm .red {
	color: #cf2e2e;
}

/* jQuery UI overrides inside form */
#orderForm .ui-state-default,
#orderForm .ui-widget-content .ui-state-default {
	background: #fafafa !important;
	border-color: #e6e6e6 !important;
	color: #313131 !important;
}

#orderForm .ui-state-hover,
#orderForm .ui-state-focus {
	border-color: #ffc2a6 !important;
}

#orderForm .ui-state-active,
#orderForm .ui-state-highlight {
	background: #fff1ea !important;
	border-color: #ff6c2c !important;
	color: #313131 !important;
}

/* Dialogs */
.ui-dialog {
	border-radius: 10px !important;
	border: 1px solid #e6e6e6 !important;
	box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15) !important;
	font-family: "Open Sans", sans-serif !important;
}

.ui-dialog .ui-dialog-titlebar {
	background: #1a1a1a !important;
	color: #fff !important;
	border: 0 !important;
	border-radius: 9px 9px 0 0 !important;
	font-weight: 700 !important;
}

.ui-dialog .ui-dialog-buttonpane button,
.ui-dialog .ui-button {
	background: #ff6c2c !important;
	border: 0 !important;
	color: #fff !important;
	border-radius: 4px !important;
}

@media (max-width: 720px) {
	#orderForm {
		padding: 1rem;
	}

	#products-block .tabs-new a {
		white-space: normal;
		font-size: 0.8rem !important;
	}

	#submit_order {
		justify-content: stretch;
	}

	#submit_order input[type="submit"] {
		width: 100%;
	}

	#details-block > .ui-widget-content {
		padding: 1rem 0.85rem 1.1rem !important;
	}
}
