/*
 * iHandyman Account role-aware WooCommerce My Account shell.
 */

body.woocommerce-account .woocommerce {
	--iha-ink: #172033;
	--iha-muted: #667085;
	--iha-line: #d9e0ea;
	--iha-soft: #f5f7fa;
	--iha-brand: #166534;
	--iha-brand-soft: #ecfdf3;
	--iha-attention: #9a3412;
	--iha-attention-soft: #fff7ed;
	display: grid;
	grid-template-columns: minmax(210px, 250px) minmax(0, 1fr);
	gap: clamp(24px, 4vw, 56px);
	align-items: start;
	max-width: 1180px;
	margin-inline: auto;
	color: var(--iha-ink);
}

body.woocommerce-account .ihs-search-shell {
	display: none !important;
}

/* Keep the Handyman shell wide enough for its navigation and module editors. */
body.woocommerce-account:has(.woocommerce-MyAccount-navigation-link--availability) .ih-main--page > .wp-block-post-content {
	width: min(100%, 1280px);
	padding-inline: 0;
}

body.woocommerce-account:has(.woocommerce-MyAccount-navigation-link--availability) .ih-main--page > .wp-block-post-content > .woocommerce {
	width: 100%;
	max-width: 1280px;
}

/* The theme's generic functional-button skin must not recolor Availability pickers. */
body.woocommerce-account .ih-av-dashboard .ih-av-status-trigger {
	border-color: var(--ih-av-border);
	background: var(--ih-av-soft);
	color: var(--ih-av-text);
	box-shadow: none;
	transform: none;
}

body.woocommerce-account .ih-av-dashboard .ih-av-status-trigger:hover,
body.woocommerce-account .ih-av-dashboard .ih-av-status-trigger:focus-visible {
	border-color: #cbd5e1;
	background: var(--ih-av-surface);
	color: var(--ih-av-text);
	box-shadow: none;
	transform: none;
}

body.woocommerce-account .ih-av-dashboard .ih-av-picker-backdrop {
	border: 0;
	background: rgb(15 23 42 / 52%);
	box-shadow: none;
	transform: none;
}

body.woocommerce-account .ih-av-dashboard .ih-av-picker-option {
	border-color: var(--ih-av-border);
	background: var(--ih-av-surface);
	color: var(--ih-av-text);
	box-shadow: none;
	transform: none;
}

body.woocommerce-account .ih-av-dashboard .ih-av-picker-option.is-selected,
body.woocommerce-account .ih-av-dashboard .ih-av-picker-cancel {
	border-color: var(--ih-av-border);
	background: var(--ih-av-soft);
	color: var(--ih-av-text);
	box-shadow: none;
	transform: none;
}

body.woocommerce-account:not(.logged-in) .woocommerce {
	display: block;
	width: min(100%, 620px);
	max-width: 620px;
	margin-inline: auto;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: transparent;
	box-shadow: none;
}

body.woocommerce-account:not(.logged-in) .entry-content {
	padding-inline: 0;
}

.iha-auth {
	--iha-auth-orange: #ff6a16;
	--iha-auth-yellow: #ffaa17;
	--iha-auth-red: #f5224b;
	overflow: hidden;
	border: 1px solid #e2e6ec;
	border-radius: 22px;
	background: #fff;
	box-shadow: 0 18px 48px rgb(23 32 51 / 10%);
}

.iha-auth__panel {
	padding: clamp(26px, 6vw, 48px);
}

.iha-auth__panel[hidden] {
	display: none !important;
}

.iha-auth__header {
	margin-bottom: 27px;
	text-align: center;
}

.iha-auth__eyebrow {
	margin: 0 0 9px;
	color: var(--iha-auth-orange);
	font-size: 0.74rem;
	font-weight: 800;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

.iha-auth__header h2 {
	margin: 0;
	color: #172033;
	font-size: clamp(1.75rem, 5vw, 2.35rem);
	line-height: 1.12;
}

.iha-auth__header h2:focus {
	outline: 0;
}

.iha-auth__header p:last-child {
	margin: 11px auto 0;
	color: #667085;
	font-size: 0.98rem;
	line-height: 1.55;
}

body.woocommerce-account .iha-auth .iha-auth__form {
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent;
}

.iha-auth__form .form-row {
	margin: 0 0 18px;
	padding: 0;
}

.iha-auth__form label:not(.woocommerce-form-login__rememberme) {
	display: block;
	margin-bottom: 7px;
	color: #344054;
	font-size: 0.86rem;
	font-weight: 700;
}

body.woocommerce-account .iha-auth__form input.input-text {
	width: 100%;
	min-height: 50px;
	padding: 11px 14px;
	border: 1px solid #cfd6df;
	border-radius: 11px;
	background: #fff;
	color: #172033;
	box-shadow: 0 1px 2px rgb(23 32 51 / 4%);
	transition: border-color 150ms ease, box-shadow 150ms ease;
}

body.woocommerce-account .iha-auth__form input.input-text:focus {
	border-color: var(--iha-auth-orange);
	outline: 0;
	box-shadow: 0 0 0 3px rgb(255 106 22 / 14%);
}

.iha-auth__options {
	display: flex;
	gap: 16px;
	align-items: center;
	justify-content: space-between;
	margin: 1px 0 20px;
	font-size: 0.86rem;
}

.iha-auth__options .woocommerce-form-login__rememberme {
	display: inline-flex;
	gap: 8px;
	align-items: center;
	margin: 0;
	color: #475467;
	font-weight: 600;
}

.iha-auth__options input[type="checkbox"] {
	width: 18px;
	height: 18px;
	margin: 0;
	accent-color: var(--iha-auth-orange);
}

.iha-auth a {
	color: #8f390d;
	font-weight: 700;
	text-underline-offset: 3px;
}

.iha-auth a:hover,
.iha-auth a:focus-visible {
	color: var(--iha-auth-orange);
}

body.woocommerce-account .iha-auth .iha-auth__submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 50px;
	margin: 0;
	padding: 11px 18px;
	border: 0;
	border-radius: 11px;
	background: linear-gradient(120deg, var(--iha-auth-yellow), var(--iha-auth-orange) 62%, var(--iha-auth-red));
	color: #fff;
	font-size: 1rem;
	font-weight: 800;
	line-height: 1.2;
	text-shadow: 0 1px 1px rgb(111 35 5 / 22%);
	box-shadow: 0 8px 20px rgb(255 106 22 / 22%);
	cursor: pointer;
	transition: box-shadow 150ms ease, transform 150ms ease;
}

body.woocommerce-account .iha-auth .iha-auth__submit:hover,
body.woocommerce-account .iha-auth .iha-auth__submit:focus-visible {
	color: #fff;
	box-shadow: 0 11px 25px rgb(255 106 22 / 29%);
	transform: translateY(-1px);
}

.iha-auth__switch {
	margin: 26px 0 0;
	padding-top: 23px;
	border-top: 1px solid #eaecf0;
	color: #667085;
	text-align: center;
}

.iha-auth__verification-note {
	margin: 16px 0 0;
	padding: 12px 14px;
	border-radius: 10px;
	background: #fff7ed;
	color: #7c2d12;
	font-size: 0.86rem;
	line-height: 1.5;
	text-align: center;
}

.iha-auth .woocommerce-privacy-policy-text {
	margin: 2px 0 18px;
	color: #667085;
	font-size: 0.8rem;
	line-height: 1.5;
}

.iha-auth .woocommerce-password-strength,
.iha-auth .woocommerce-password-hint {
	font-size: 0.8rem;
}

body.woocommerce-account .woocommerce::before,
body.woocommerce-account .woocommerce::after {
	display: none;
	content: none;
}

body.woocommerce-account .woocommerce-MyAccount-navigation,
body.woocommerce-account .woocommerce-MyAccount-content {
	float: none;
	width: auto;
	min-width: 0;
}

body.woocommerce-account .woocommerce-MyAccount-navigation ul {
	position: sticky;
	top: 24px;
	display: grid;
	gap: 5px;
	margin: 0;
	padding: 8px;
	border: 1px solid var(--iha-line);
	border-radius: 16px;
	background: #fff;
	list-style: none;
	box-shadow: 0 8px 24px rgb(23 32 51 / 6%);
}

body.woocommerce-account .woocommerce-MyAccount-navigation li {
	margin: 0;
	padding: 0;
	border: 0;
	list-style: none;
}

body.woocommerce-account .woocommerce-MyAccount-navigation li::before {
	display: none;
	content: none;
}

body.woocommerce-account .woocommerce-MyAccount-navigation a {
	display: flex;
	align-items: center;
	min-height: 46px;
	padding: 10px 13px;
	border-radius: 10px;
	color: var(--iha-ink);
	font-size: 0.94rem;
	font-weight: 650;
	line-height: 1.25;
	text-decoration: none;
	transition: background-color 160ms ease, color 160ms ease;
}

body.woocommerce-account .woocommerce-MyAccount-navigation a:hover,
body.woocommerce-account .woocommerce-MyAccount-navigation a:focus-visible {
	background: var(--iha-soft);
	color: var(--iha-brand);
	outline: 0;
}

body.woocommerce-account .woocommerce-MyAccount-navigation .is-active a {
	background: var(--iha-brand);
	color: #fff;
}

body.woocommerce-account .woocommerce-MyAccount-navigation-link--customer-logout {
	margin-top: 8px;
	padding-top: 8px !important;
	border-top: 1px solid var(--iha-line) !important;
}

body.woocommerce-account .woocommerce-MyAccount-content {
	container-type: inline-size;
}

.iha-dashboard,
.iha-endpoint-intro {
	width: 100%;
}

.iha-dashboard__header {
	display: flex;
	gap: 24px;
	align-items: flex-start;
	justify-content: space-between;
	margin: 0 0 24px;
	padding: clamp(22px, 4vw, 38px);
	border: 1px solid var(--iha-line);
	border-radius: 20px;
	background: linear-gradient(135deg, rgb(236 253 243 / 90%), rgb(255 255 255 / 96%)), #fff;
	box-shadow: 0 12px 34px rgb(23 32 51 / 7%);
}

.iha-customer-dashboard__identity {
	display: flex;
	gap: 18px;
	align-items: center;
}

.iha-customer-dashboard__avatar {
	flex: 0 0 auto;
	width: 112px;
	height: 112px;
	border: 3px solid #fff;
	border-radius: 50%;
	object-fit: cover;
	box-shadow: 0 0 0 1px var(--iha-line), 0 8px 22px rgb(23 32 51 / 12%);
}

.iha-customer-dashboard__grid {
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

.iha-dashboard__header h2,
.iha-endpoint-intro h2 {
	margin: 3px 0 10px;
	color: var(--iha-ink);
	font-size: clamp(1.55rem, 3.5vw, 2.35rem);
	line-height: 1.12;
}

.iha-dashboard__header p:last-child,
.iha-endpoint-intro p:last-child {
	max-width: 700px;
	margin: 0;
	color: var(--iha-muted);
	line-height: 1.65;
}

.iha-eyebrow {
	margin: 0;
	color: var(--iha-brand);
	font-size: 0.75rem;
	font-weight: 800;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

.iha-button,
.iha-card__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	border-radius: 10px;
	font-weight: 700;
	text-decoration: none;
}

.iha-button {
	flex: 0 0 auto;
	padding: 9px 15px;
}

.iha-button--secondary {
	border: 1px solid var(--iha-brand);
	background: #fff;
	color: var(--iha-brand);
}

.iha-button--secondary:hover,
.iha-button--secondary:focus-visible {
	background: var(--iha-brand);
	color: #fff;
}

.iha-attention {
	margin: 0 0 24px;
	padding: 18px 20px;
	border: 1px solid #fed7aa;
	border-radius: 14px;
	background: var(--iha-attention-soft);
}

.iha-attention h3 {
	margin: 0 0 8px;
	color: var(--iha-attention);
	font-size: 1rem;
}

.iha-attention ul {
	display: grid;
	gap: 5px;
	margin: 0;
	padding-left: 21px;
}

.iha-attention li {
	margin: 0;
	color: #7c2d12;
}

.iha-dashboard__grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 16px;
}

.iha-card {
	display: flex;
	flex-direction: column;
	min-height: 210px;
	padding: 21px;
	border: 1px solid var(--iha-line);
	border-radius: 16px;
	background: #fff;
	box-shadow: 0 7px 22px rgb(23 32 51 / 5%);
}

.iha-card--attention {
	border-color: #fed7aa;
}

.iha-card__top {
	display: flex;
	gap: 12px;
	align-items: flex-start;
	justify-content: space-between;
}

.iha-card h3 {
	margin: 0;
	color: var(--iha-ink);
	font-size: 1.05rem;
	line-height: 1.3;
}

.iha-card p {
	margin: 15px 0 22px;
	color: var(--iha-muted);
	line-height: 1.55;
}

.iha-pill {
	flex: 0 0 auto;
	max-width: 52%;
	padding: 5px 8px;
	border-radius: 999px;
	background: var(--iha-soft);
	color: #475467;
	font-size: 0.72rem;
	font-weight: 750;
	line-height: 1.2;
	text-align: center;
}

.iha-card--ready .iha-pill {
	background: var(--iha-brand-soft);
	color: var(--iha-brand);
}

.iha-card--attention .iha-pill {
	background: var(--iha-attention-soft);
	color: var(--iha-attention);
}

.iha-card__link {
	align-self: flex-start;
	margin-top: auto;
	color: var(--iha-brand);
}

.iha-card__link:hover,
.iha-card__link:focus-visible {
	text-decoration: underline;
	text-underline-offset: 3px;
}

.iha-endpoint-intro {
	margin: 0 0 22px;
	padding: 22px;
	border: 1px solid var(--iha-line);
	border-radius: 16px;
	background: #fff;
}

.iha-module-notice {
	padding: 20px;
	border: 1px solid var(--iha-line);
	border-radius: 14px;
	background: var(--iha-soft);
}

.iha-module-notice p {
	margin: 7px 0 0;
	color: var(--iha-muted);
}

body.woocommerce-account .woocommerce-EditAccountForm {
	padding: clamp(18px, 4vw, 30px);
	border: 1px solid var(--iha-line);
	border-radius: 16px;
	background: #fff;
}

body.woocommerce-account .woocommerce-EditAccountForm input {
	min-height: 44px;
}

body.woocommerce-account .woocommerce-EditAccountForm fieldset {
	margin-top: 24px;
}

body.woocommerce-account .woocommerce-EditAccountForm .button {
	min-height: 44px;
	border-radius: 9px;
}

@container (max-width: 660px) {
	.iha-dashboard__grid {
		grid-template-columns: 1fr;
	}

	.iha-dashboard__header {
		flex-direction: column;
	}

	.iha-button--secondary {
		width: 100%;
	}
}

@media (max-width: 760px) {
	body.woocommerce-account.logged-in .ih-main--page > .wp-block-post-content {
		width: 100%;
		padding-inline: 0;
	}

	body.woocommerce-account.logged-in .ih-main--page > .wp-block-post-content > .woocommerce {
		width: 100%;
		max-width: none;
		padding-inline: 0;
	}

	body.woocommerce-account .woocommerce {
		display: block;
	}

	body.woocommerce-account .woocommerce-MyAccount-navigation {
		margin: 0 0 22px;
	}

	body.woocommerce-account .woocommerce-MyAccount-navigation ul {
		position: static;
		display: flex;
		gap: 6px;
		overflow-x: auto;
		padding: 7px;
		border-radius: 13px;
		scroll-padding-inline: 7px;
		scroll-snap-type: x proximity;
		-webkit-overflow-scrolling: touch;
	}

	body.woocommerce-account .woocommerce-MyAccount-navigation li {
		flex: 0 0 auto;
		scroll-snap-align: start;
	}

	body.woocommerce-account .woocommerce-MyAccount-navigation a {
		min-height: 44px;
		white-space: nowrap;
	}

	body.woocommerce-account .woocommerce-MyAccount-navigation-link--customer-logout {
		margin-top: 0;
		padding-top: 0 !important;
		border-top: 0 !important;
		border-left: 1px solid var(--iha-line) !important;
		padding-left: 6px !important;
	}

	.iha-dashboard__header,
	.iha-card,
	.iha-endpoint-intro {
		border-radius: 14px;
	}

	.iha-customer-dashboard__identity {
		align-items: flex-start;
	}

	.iha-customer-dashboard__avatar {
		width: 84px;
		height: 84px;
	}
}

@media (max-width: 480px) {
	.iha-auth {
		border-radius: 16px;
	}

	.iha-auth__panel {
		padding: 25px 20px;
	}

	.iha-auth__options {
		align-items: flex-start;
		flex-direction: column;
		gap: 11px;
	}

	.iha-customer-dashboard__identity {
		flex-direction: column;
	}
}

@media (prefers-reduced-motion: reduce) {
	body.woocommerce-account .woocommerce-MyAccount-navigation a,
	body.woocommerce-account .iha-auth__form input.input-text,
	body.woocommerce-account .iha-auth .iha-auth__submit {
		transition: none;
	}
}

body.woocommerce-account .woocommerce-MyAccount-content .ihro-link-button {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
}

.ihro-membership-manager__header,
.ihro-membership-card {
	margin: 0 0 20px;
	padding: clamp(20px, 4vw, 30px);
	border: 1px solid var(--iha-line);
	border-radius: 16px;
	background: #fff;
}

.ihro-membership-manager__header h2,
.ihro-membership-card h3 {
	margin: 4px 0 10px;
}

.ihro-membership-manager__header p:last-child,
.ihro-membership-card p {
	color: var(--iha-muted);
	line-height: 1.6;
}

.ihro-membership-card__top {
	display: flex;
	gap: 12px;
	align-items: flex-start;
	justify-content: space-between;
}

.ihro-membership-cancel-form {
	display: grid;
	gap: 16px;
	margin-top: 22px;
	padding-top: 20px;
	border-top: 1px solid var(--iha-line);
}

.ihro-membership-cancel-form label {
	display: flex;
	gap: 10px;
	align-items: flex-start;
}

.ihro-membership-cancel-form input[type="checkbox"] {
	width: 20px;
	height: 20px;
	margin-top: 2px;
}

.ihro-membership-cancel-button {
	justify-self: start;
	min-height: 44px;
	padding: 10px 16px;
	border: 1px solid #b42318;
	border-radius: 10px;
	background: #fff;
	color: #b42318;
	font-weight: 700;
	cursor: pointer;
}

.ihro-membership-cancel-button:hover,
.ihro-membership-cancel-button:focus-visible {
	background: #b42318;
	color: #fff;
}

.ihro-membership-notice {
	margin: 0 0 20px;
	padding: 14px 16px;
	border: 1px solid var(--iha-line);
	border-radius: 12px;
}

.ihro-membership-notice--success {
	border-color: #86efac;
	background: var(--iha-brand-soft);
	color: var(--iha-brand);
}

.ihro-membership-notice--error {
	border-color: #fecaca;
	background: #fef2f2;
	color: #991b1b;
}
