.iah-auth,
.iah-auth * {
	box-sizing: border-box;
}

.iah-auth {
	width: 100%;
	padding: clamp(16px, 3vw, 34px);
	background: transparent;
	color: var(--iah-text, #222);
	border-radius: var(--iah-radius, 12px);
}

.iah-auth .iah-card {
	width: min(100%, var(--iah-card-width, 520px));
	margin-inline: auto;
	padding: clamp(22px, 4vw, 36px);
	background: var(--iah-surface, #fff);
	border: 1px solid var(--iah-border, #e5e1da);
	border-radius: var(--iah-radius, 12px);
	box-shadow: 0 12px 34px rgba(28, 25, 20, .055);
}

.iah-tabs {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 5px;
	padding: 4px;
	margin-bottom: 28px;
	background: color-mix(in srgb, var(--iah-border, #e5e1da) 38%, transparent);
	border-radius: calc(var(--iah-input-radius, 7px) + 3px);
}

.iah-tabs:has(.iah-tab:only-child) {
	grid-template-columns: 1fr;
}

.iah-tab {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 42px;
	padding: 8px 12px;
	color: var(--iah-muted, #777) !important;
	font-size: 14px;
	font-weight: 600;
	text-decoration: none !important;
	border-radius: var(--iah-input-radius, 7px);
	transition: .18s ease;
}

.iah-tab:hover {
	color: var(--iah-text, #222) !important;
}

.iah-tab.is-active {
	color: var(--iah-text, #222) !important;
	background: var(--iah-surface, #fff);
	box-shadow: 0 2px 8px rgba(0,0,0,.045);
}

.iah-panel[hidden] {
	display: none !important;
}

.iah-heading {
	margin-bottom: 24px;
	text-align: start;
}

.iah-heading h2 {
	margin: 0 0 7px !important;
	padding: 0 !important;
	border: 0 !important;
	color: var(--iah-text, #222);
	font-size: clamp(19px, 2.4vw, 23px);
	font-weight: 700;
	line-height: 1.3;
}

.iah-heading p {
	margin: 0;
	color: var(--iah-muted, #777);
	font-size: 14px;
	line-height: 1.75;
}

.iah-form {
	margin: 0 !important;
}

.iah-field {
	margin-bottom: 16px;
}

.iah-field label,
.iah-label-row label {
	display: block;
	margin-bottom: 7px;
	color: var(--iah-text, #222);
	font-size: 13px;
	font-weight: 600;
	line-height: 1.4;
}

.iah-label-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 7px;
}

.iah-label-row label {
	margin: 0;
}

.iah-label-row a,
.iah-back-link {
	color: var(--iah-primary, #9a7c49) !important;
	font-size: 12px;
	font-weight: 600;
	text-decoration: none !important;
}

.iah-auth input[type="text"],
.iah-auth input[type="email"],
.iah-auth input[type="password"] {
	display: block;
	width: 100%;
	height: var(--iah-input-height, 48px);
	min-height: var(--iah-input-height, 48px);
	margin: 0 !important;
	padding: 0 14px !important;
	color: var(--iah-text, #222) !important;
	font: inherit;
	font-size: 14px;
	background: var(--iah-surface, #fff) !important;
	border: 1px solid var(--iah-border, #e5e1da) !important;
	border-radius: var(--iah-input-radius, 7px) !important;
	box-shadow: none !important;
	outline: 0;
	transition: border-color .18s ease, box-shadow .18s ease;
}

.iah-auth input[type="text"]:focus,
.iah-auth input[type="email"]:focus,
.iah-auth input[type="password"]:focus {
	border-color: var(--iah-primary, #9a7c49) !important;
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--iah-primary, #9a7c49) 13%, transparent) !important;
}

.iah-password-wrap {
	position: relative;
}

.iah-password-wrap input {
	padding-inline-end: 48px !important;
}

.iah-password-toggle {
	position: absolute;
	inset-inline-end: 5px;
	top: 50%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	padding: 0;
	color: var(--iah-muted, #777);
	background: transparent;
	border: 0;
	border-radius: 6px;
	transform: translateY(-50%);
	cursor: pointer;
}

.iah-password-toggle:hover {
	color: var(--iah-text, #222);
	background: color-mix(in srgb, var(--iah-border, #e5e1da) 28%, transparent);
}

.iah-password-toggle:focus,
.iah-password-toggle:focus-visible,
.iah-password-toggle:active {
	color: var(--iah-muted, #777) !important;
	background: transparent !important;
	border: 0 !important;
	box-shadow: none !important;
	outline: 0 !important;
}

.iah-eye {
	width: 19px;
	height: 19px;
}

.iah-eye--hide {
	display: none;
}

.iah-password-toggle[aria-pressed="true"] .iah-eye--show {
	display: none;
}

.iah-password-toggle[aria-pressed="true"] .iah-eye--hide {
	display: block;
}

.iah-form-meta {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin: 2px 0 18px;
}

.iah-check {
	display: inline-flex !important;
	align-items: center;
	gap: 8px;
	margin: 0 !important;
	color: var(--iah-muted, #777) !important;
	font-size: 12px !important;
	font-weight: 500 !important;
	cursor: pointer;
}

.iah-check input[type="checkbox"] {
	width: 16px !important;
	height: 16px !important;
	margin: 0 !important;
	accent-color: var(--iah-primary, #9a7c49);
}

.iah-button,
.iah-auth button.iah-button,
.iah-auth a.iah-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: var(--iah-input-height, 48px);
	padding: 10px 18px !important;
	font-size: 14px !important;
	font-weight: 700 !important;
	line-height: 1.2 !important;
	text-align: center;
	text-decoration: none !important;
	border: 0 !important;
	border-radius: var(--iah-input-radius, 7px) !important;
	box-shadow: none !important;
	cursor: pointer;
	transition: background-color .18s ease, transform .12s ease;
}

.iah-button--primary,
.iah-auth a.iah-button {
	color: #fff !important;
	background: var(--iah-primary, #9a7c49) !important;
}

.iah-button--primary:hover,
.iah-auth a.iah-button:hover {
	background: var(--iah-primary-hover, #80663c) !important;
}

.iah-button:active {
	transform: translateY(1px);
}

.iah-privacy,
.iah-auth .woocommerce-privacy-policy-text {
	margin: 2px 0 16px;
	color: var(--iah-muted, #777);
	font-size: 11px;
	line-height: 1.7;
}

.iah-privacy p,
.iah-auth .woocommerce-privacy-policy-text p {
	margin: 0;
}

.iah-privacy a,
.iah-auth .woocommerce-privacy-policy-text a {
	color: var(--iah-primary, #9a7c49) !important;
}

.iah-back-link {
	display: block;
	margin-top: 16px;
	text-align: center;
}

.iah-notices:empty {
	display: none;
}

.iah-notices {
	margin-bottom: 18px;
}

.iah-notices .woocommerce-error,
.iah-notices .woocommerce-message,
.iah-notices .woocommerce-info {
	position: relative;
	margin: 0 0 12px !important;
	padding: 12px 14px !important;
	font-size: 12px;
	line-height: 1.65;
	border: 1px solid var(--iah-border, #e5e1da) !important;
	border-radius: var(--iah-input-radius, 7px);
	background: color-mix(in srgb, var(--iah-border, #e5e1da) 16%, var(--iah-surface, #fff)) !important;
}

.iah-notices .woocommerce-error {
	border-color: color-mix(in srgb, var(--iah-error, #c83f49) 30%, var(--iah-border, #e5e1da)) !important;
}

.iah-notices .woocommerce-message {
	border-color: color-mix(in srgb, var(--iah-success, #08ab4e) 30%, var(--iah-border, #e5e1da)) !important;
}

.iah-notices .woocommerce-error::before,
.iah-notices .woocommerce-message::before,
.iah-notices .woocommerce-info::before {
	display: none !important;
}

.iah-divider {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 22px 0 16px;
	color: var(--iah-muted, #777);
	font-size: 11px;
}

.iah-divider::before,
.iah-divider::after {
	content: "";
	flex: 1;
	height: 1px;
	background: var(--iah-border, #e5e1da);
}

.iah-social-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 10px;
}

.iah-social-grid.is-single {
	grid-template-columns: 1fr;
}

.iah-auth--logged-in .iah-card {
	text-align: center;
}

.iah-auth--logged-in p {
	margin: 0 0 16px;
}

@media (max-width: 520px) {
	.iah-auth {
		padding: 10px;
		background: transparent;
	}

	.iah-auth .iah-card {
		padding: 20px 16px;
		box-shadow: none;
	}

	.iah-tabs {
		margin-bottom: 22px;
	}

	.iah-heading {
		margin-bottom: 20px;
	}
}


.iah-heading--center { text-align: center; }
.iah-status-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 52px;
	height: 52px;
	margin: 0 auto 18px;
	color: #fff;
	font-size: 24px;
	font-weight: 700;
	background: var(--iah-success, #08ab4e);
	border-radius: 50%;
}

/* Direction */
.iah-auth[dir="rtl"] {
	direction: rtl;
	text-align: right;
}

.iah-auth[dir="ltr"] {
	direction: ltr;
	text-align: left;
}

.iah-auth[dir="rtl"] .iah-field label,
.iah-auth[dir="rtl"] .iah-label-row label,
.iah-auth[dir="rtl"] .iah-heading,
.iah-auth[dir="rtl"] .iah-heading p,
.iah-auth[dir="rtl"] .iah-verification-status,
.iah-auth[dir="rtl"] .iah-field-hint,
.iah-auth[dir="rtl"] .iah-privacy,
.iah-auth[dir="rtl"] .iah-privacy p,
.iah-auth[dir="rtl"] .woocommerce-privacy-policy-text,
.iah-auth[dir="rtl"] .woocommerce-privacy-policy-text p,
.iah-auth[dir="rtl"] input {
	text-align: right;
}

.iah-auth[dir="ltr"] .iah-field label,
.iah-auth[dir="ltr"] .iah-label-row label,
.iah-auth[dir="ltr"] .iah-heading,
.iah-auth[dir="ltr"] .iah-heading p,
.iah-auth[dir="ltr"] .iah-verification-status,
.iah-auth[dir="ltr"] .iah-field-hint,
.iah-auth[dir="ltr"] .iah-privacy,
.iah-auth[dir="ltr"] .iah-privacy p,
.iah-auth[dir="ltr"] .woocommerce-privacy-policy-text,
.iah-auth[dir="ltr"] .woocommerce-privacy-policy-text p,
.iah-auth[dir="ltr"] input {
	text-align: left;
}

/* Email verification */
.iah-verification-send-row {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: 8px;
	align-items: stretch;
}

.iah-auth .iah-button--secondary {
	width: auto;
	font-size: 12px !important;
	min-width: 112px;
	color: var(--iah-primary, #9a7c49) !important;
	background: color-mix(in srgb, var(--iah-primary, #9a7c49) 7%, var(--iah-surface, #fff)) !important;
	border: 1px solid color-mix(in srgb, var(--iah-primary, #9a7c49) 35%, var(--iah-border, #e5e1da)) !important;
	white-space: nowrap;
}

.iah-auth .iah-button--secondary:hover:not(:disabled) {
	background: color-mix(in srgb, var(--iah-primary, #9a7c49) 12%, var(--iah-surface, #fff)) !important;
}

.iah-auth .iah-button:disabled {
	opacity: .62;
	cursor: not-allowed;
	transform: none;
}

.iah-verification-status,
.iah-field-hint {
	margin: 7px 0 0;
	color: var(--iah-muted, #777);
	font-size: 11px;
	line-height: 1.65;
}

.iah-verification-status:empty {
	display: none;
}

.iah-verification-status.is-success {
	color: var(--iah-success, #08ab4e);
}

.iah-verification-status.is-error {
	color: var(--iah-error, #c83f49);
}

.iah-verification-code-field input[type="text"] {
	letter-spacing: 5px;
	font-variant-numeric: tabular-nums;
	font-size: 16px;
	font-weight: 700;
}

@media (max-width: 430px) {
	.iah-verification-send-row {
		grid-template-columns: 1fr;
	}

	.iah-auth .iah-button--secondary {
		width: 100%;
	}
}

/* Social authentication */
.iah-social-wrap {
	margin-top: 2px;
}

.iah-social-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 9px;
	width: 100%;
	min-height: 46px;
	padding: 9px 14px !important;
	color: var(--iah-text, #222) !important;
	font-size: 13px;
	font-weight: 600;
	line-height: 1.2;
	text-align: center;
	text-decoration: none !important;
	background: var(--iah-surface, #fff);
	border: 1px solid var(--iah-border, #e5e1da);
	border-radius: var(--iah-input-radius, 7px);
	box-shadow: none;
	transition: border-color .18s ease, background-color .18s ease, transform .12s ease;
}

.iah-social-button:hover {
	color: var(--iah-text, #222) !important;
	background: color-mix(in srgb, var(--iah-border, #e5e1da) 14%, var(--iah-surface, #fff));
	border-color: color-mix(in srgb, var(--iah-text, #222) 24%, var(--iah-border, #e5e1da));
}

.iah-social-button:focus,
.iah-social-button:focus-visible {
	outline: 0;
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--iah-primary, #9a7c49) 12%, transparent);
}

.iah-social-button:active {
	transform: translateY(1px);
}

.iah-social-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 18px;
	height: 18px;
	flex: 0 0 18px;
}

.iah-social-icon svg {
	display: block;
	width: 18px;
	height: 18px;
}
