/* ================================================================
 * IGM 2026 – MY ACCOUNT, LOGGED OUT /mio-account/ (design option A, 2026-11-16)
 * Loaded only on the account page for visitors who are not logged in
 * (functions.php, $igm_pages 'account'), after igm-2026.css. Logged-in pages are not touched.
 * Markup: the WooCommerce templates (login, lost password, reset password) wrapped by
 * igm-2026-account.php in .igm-acc > .igm-acc__card (+ .igm-acc__side on the login page).
 * Some rules use !important on purpose: they beat the old login-button rules in
 * Customizer > Additional CSS and the WooCommerce / Divi form styles.
 *
 * [22.1] page area   [22.2] layout and card   [22.3] form fields   [22.4] login form order
 * [22.5] button   [22.6] notices   [22.7] side panel   [22.8] lost password   [22.9] tablets and phones
 * ================================================================ */

/* [22.1] Page area: the Divi section that holds [woocommerce_my_account] */
body.woocommerce-account #main-content .et-l .et_pb_section.et_pb_section_0 {
	margin: 0;
	padding: 72px 24px 96px;
	background: var(--igm-lavanda);
}
body.woocommerce-account #main-content .et-l .et_pb_section_0 .et_pb_row,
body.woocommerce-account #main-content .et-l .et_pb_section_0 .et_pb_text {
	width: 100%;
	max-width: none;
	min-height: 0;
	margin: 0;
	padding: 0;
}
/* empty paragraph and line breaks the text module puts around the shortcode */
body.woocommerce-account #main-content .et_pb_section_0 .et_pb_text_inner > p,
body.woocommerce-account #main-content .et_pb_section_0 .et_pb_text_inner > br {
	display: none;
}

/* [22.2] Layout and card */
.igm-acc {
	display: grid;
	grid-template-columns: minmax(0, 5fr) minmax(0, 4fr);
	gap: 24px;
	align-items: stretch;
	max-width: 1040px;
	margin: 0 auto;
	font-family: var(--igm-font);
	color: var(--igm-inchiostro);
}
.igm-acc--single {
	grid-template-columns: minmax(0, 1fr);
	max-width: 560px;
}
.igm-acc__card {
	padding: 48px;
	border: 1px solid var(--igm-bordo);
	border-radius: 20px;
	background: var(--igm-bianco);
	box-shadow: 0 20px 44px rgba(74, 34, 89, 0.10);
}
.igm-acc .igm-eyebrow {
	margin-bottom: 12px;
	padding: 0;
}
.igm-acc__h1 {
	margin: 0 0 8px;
	padding: 0;
	font-family: var(--igm-font);
	font-size: clamp(28px, 3vw, 36px);
	line-height: 1.1;
	letter-spacing: -0.02em;
	font-weight: 800;
	color: var(--igm-inchiostro);
}
.igm-acc__lead,
.igm-acc--single .igm-acc__card > p:not([class]),
.woocommerce .igm-acc form.lost_reset_password > p:first-child {
	margin: 0 0 32px;
	padding: 0;
	font-size: 16px;
	line-height: 1.6;
	color: var(--igm-testo);
}
/* the "Accedi" title of the WooCommerce template: the card has its own */
.igm-acc__card > h2 {
	display: none;
}
.igm-acc__new {
	margin: 28px 0 0;
	padding: 24px 0 0;
	border-top: 1px solid var(--igm-bordo);
	font-size: 15px;
	line-height: 1.6;
	color: var(--igm-testo);
}
.igm-acc__new a,
.igm-acc__help a {
	font-weight: 700;
	color: var(--igm-viola);
	text-decoration: none;
}
.igm-acc__new a:hover,
.igm-acc__help a:hover {
	color: var(--igm-viola-hover);
}

/* [22.3] Form fields (the "#main-content" prefix beats the #username / #password rules in Additional CSS) */
.woocommerce .igm-acc form.login,
.woocommerce .igm-acc form.lost_reset_password {
	display: flex;
	flex-direction: column;
	gap: 20px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	text-align: left;
}
.woocommerce .igm-acc form .form-row {
	float: none;
	width: 100%;
	margin: 0;
	padding: 0;
}
.woocommerce .igm-acc form .clear,
.woocommerce .igm-acc form input[type="hidden"] {
	display: none !important;
}
/* WooCommerce clearfix pseudo-elements would become empty flex items (extra gaps) */
.woocommerce .igm-acc form::before,
.woocommerce .igm-acc form::after,
.woocommerce .igm-acc form .form-row::before,
.woocommerce .igm-acc form .form-row::after {
	display: none;
}
.woocommerce .igm-acc form .form-row label {
	display: block;
	margin: 0 0 8px;
	padding: 0;
	font-size: 14px;
	line-height: 22px;
	font-weight: 700;
	color: var(--igm-inchiostro);
}
.woocommerce .igm-acc form .form-row label .required {
	display: none;
}
#main-content .woocommerce .igm-acc form .form-row input.input-text {
	display: block;
	width: 100%;
	height: 52px !important;
	margin: 0;
	padding: 0 16px !important;
	border: 1px solid var(--igm-input-bordo) !important;
	border-radius: 8px !important;
	background: var(--igm-bianco) !important;
	box-shadow: none !important;
	font-family: var(--igm-font);
	font-size: 16px !important;
	line-height: normal;
	color: var(--igm-inchiostro) !important;
	box-sizing: border-box;
}
#main-content .woocommerce .igm-acc form .form-row input.input-text:focus {
	outline: none;
	border-color: var(--igm-viola) !important;
	box-shadow: 0 0 0 3px rgba(177, 161, 204, 0.45) !important;
}
.woocommerce .igm-acc form .password-input {
	display: block;
	position: relative;
}
#main-content .woocommerce .igm-acc form .password-input input.input-text {
	padding-right: 52px !important;
}
.woocommerce .igm-acc form .show-password-input {
	top: 50%;
	right: 14px;
	transform: translateY(-50%);
}

/* [22.4] Login form order: "Password dimenticata?" sits on the line of the Password label */
.woocommerce .igm-acc form.login > * {
	order: 5;
}
.woocommerce .igm-acc form.login > p:nth-of-type(1) {
	order: 1;
}
.woocommerce .igm-acc form.login > .woocommerce-LostPassword {
	position: relative;
	z-index: 1;
	order: 2;
	align-self: flex-end;
	/* 22px line + 20px flex gap: the password row starts on the same line */
	margin: 0 0 -42px;
	padding: 0;
	font-size: 14px;
	line-height: 22px;
	text-align: right;
}
.woocommerce .igm-acc form.login > .woocommerce-LostPassword a {
	font-weight: 700;
	color: var(--igm-viola);
	text-decoration: none;
}
.woocommerce .igm-acc form.login > .woocommerce-LostPassword a:hover {
	color: var(--igm-viola-hover);
}
.woocommerce .igm-acc form.login > p:nth-of-type(2) {
	order: 3;
}
.woocommerce .igm-acc form.login > p:nth-of-type(3) {
	order: 4;
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 24px;
}
.woocommerce .igm-acc form.login .woocommerce-form-login__rememberme {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	align-self: flex-start;
	margin: 0;
	font-size: 15px;
	font-weight: 400;
	color: var(--igm-testo);
	cursor: pointer;
}
.woocommerce .igm-acc form.login .woocommerce-form-login__rememberme input {
	width: 18px;
	height: 18px;
	margin: 0;
	accent-color: var(--igm-viola);
}

/* [22.5] Button (login, lost password, reset password) */
.woocommerce .igm-acc form button.button {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	float: none !important;
	width: 100% !important;
	height: 52px !important;
	margin: 0 !important;
	padding: 0 26px !important;
	border: 1.5px solid var(--igm-viola) !important;
	border-radius: var(--igm-btn-raggio) !important;
	background: var(--igm-viola) !important;
	color: var(--igm-bianco) !important;
	font-family: var(--igm-font) !important;
	font-size: 15px !important;
	font-weight: 700 !important;
	letter-spacing: 0.04em !important;
	line-height: 1 !important;
	text-transform: uppercase !important;
	cursor: pointer;
	transition: background-color .15s, border-color .15s;
}
.woocommerce .igm-acc form button.button:hover {
	border-color: var(--igm-viola-hover) !important;
	background: var(--igm-viola-hover) !important;
}
.woocommerce .igm-acc form button.button::after {
	display: none !important;
}

/* [22.6] Notices inside the card (wrong password, link sent…) */
.igm-acc .woocommerce-notices-wrapper:empty {
	display: none;
}
.woocommerce .igm-acc .woocommerce-error,
.woocommerce .igm-acc .woocommerce-message,
.woocommerce .igm-acc .woocommerce-info {
	margin: 0 0 24px;
	border-radius: 10px;
	font-size: 15px;
	line-height: 1.5;
}
/* "link sent" page: the card title already says it */
.woocommerce > .woocommerce-message:has(+ .igm-acc) {
	display: none;
}

/* [22.7] Side panel */
.igm-acc__side {
	display: flex;
	flex-direction: column;
	gap: 24px;
	padding: 40px;
	border-radius: 20px;
	background: var(--igm-lavanda-2);
}
.igm-acc__side-t {
	margin: 0 0 20px;
	padding: 0;
	font-family: var(--igm-font);
	font-size: 22px;
	line-height: 1.25;
	font-weight: 800;
	color: var(--igm-inchiostro);
}
.igm-acc ul.igm-acc__list {
	display: flex;
	flex-direction: column;
	gap: 14px;
	margin: 0;
	padding: 0;
	list-style: none;
}
.igm-acc__list li {
	display: flex;
	gap: 12px;
	margin: 0;
	padding: 0;
	font-size: 15px;
	line-height: 1.45;
	color: var(--igm-inchiostro);
}
.igm-acc__list svg {
	flex: none;
	margin-top: 1px;
	color: var(--igm-viola);
}
.igm-acc__app {
	margin-top: auto;
	padding: 24px;
	border-radius: 14px;
	background: var(--igm-bianco);
}
.igm-acc__app-t {
	margin: 0 0 6px;
	padding: 0;
	font-family: var(--igm-font);
	font-size: 17px;
	line-height: 1.3;
	font-weight: 800;
	color: var(--igm-inchiostro);
}
.igm-acc__app-d {
	margin: 0 0 16px;
	padding: 0;
	font-size: 14px;
	line-height: 1.55;
	color: var(--igm-testo);
}
.igm-acc__app .igm-btn {
	width: 100%;
	height: 48px;
	padding: 0 16px;
	font-size: 14px;
	white-space: nowrap;
}

/* [22.8] Lost password: back link and help box */
.igm-acc__back {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin: 0 0 24px;
	font-size: 14px;
	font-weight: 700;
	color: var(--igm-viola);
	text-decoration: none;
}
.igm-acc__back:hover {
	color: var(--igm-viola-hover);
}
.igm-acc__help {
	display: flex;
	gap: 12px;
	margin: 28px 0 0;
	padding: 16px 18px;
	border-radius: 12px;
	background: var(--igm-lavanda);
	font-size: 14px;
	line-height: 1.55;
	color: var(--igm-testo);
}
.igm-acc__help svg {
	flex: none;
	margin-top: 1px;
	color: var(--igm-viola);
}

/* [22.9] Tablets and phones */
@media (max-width: 1000px) {
	.igm-acc {
		grid-template-columns: minmax(0, 1fr);
		max-width: 620px;
	}
}
@media (max-width: 600px) {
	body.woocommerce-account #main-content .et-l .et_pb_section.et_pb_section_0 {
		padding: 40px 16px 56px;
	}
	.igm-acc__card,
	.igm-acc__side {
		padding: 28px 20px;
	}
	.igm-acc__app {
		padding: 20px;
	}
}

/* [22.10] Login reached from "Ho già IGMTouch · Accedi" (/mio-account/?igm_wa=…, igm-2026-whatsapp.php) */
.woocommerce .igm-acc form.login > .igm-acc-wa {
	order: 0; /* before the fields, see [22.4] */
}
.igm-acc-wa {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	margin: 0 0 20px;
	padding: 14px 16px;
	border-radius: 12px;
	background: #E5F7EC;
	font-size: 15px;
	line-height: 1.5;
	color: var(--igm-inchiostro);
}
.igm-acc-wa__ico {
	display: inline-flex;
	flex: none;
	margin-top: 1px;
	color: #1A8F4B;
}
