/*
 * Grafline - My Account (customer-facing).
 * Scoped to body.woocommerce-account; palette + fonts follow the theme (primary #ff2a13, Inter).
 * Icons: assets/gf-icons.css (.gf-ico, one stroke set). Grids use repeat(N, minmax(0, 1fr)) on purpose (Safari).
 */

body.woocommerce-account {
	--gfa-primary: #ff2a13;
	--gfa-primary-dark: #d80f0f;
	--gfa-primary-soft: #fef2f2;
	--gfa-ink: #1d1d1f;
	--gfa-muted: #5b6270;
	--gfa-line: #e5e7eb;
	--gfa-field: #8c939f;
	--gfa-surface: #f9fafb;
	--gfa-radius: 16px;
	--gfa-radius-sm: 10px;
	--gfa-shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 8px 24px -12px rgba(16, 24, 40, 0.1);
	--gfa-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ---------- page frame (theme gives account pages no container) ---------- */
body.woocommerce-account .site-main .entry-header,
body.woocommerce-account .site-main .entry-content {
	max-width: 1180px !important; /* theme sets 1440px */
	margin-left: auto !important;
	margin-right: auto !important;
	padding-left: clamp(16px, 4vw, 32px);
	padding-right: clamp(16px, 4vw, 32px);
	box-sizing: border-box;
}

body.woocommerce-account .site-main .entry-title {
	font-size: clamp(1.75rem, 1.2rem + 2vw, 2.5rem);
	letter-spacing: -0.02em;
	margin: 0 0 1.5rem;
}

body.woocommerce-account .woocommerce {
	font-family: var(--gfa-font);
	color: var(--gfa-ink);
	padding-bottom: 3rem;
}

body.woocommerce-account .woocommerce a:focus-visible,
body.woocommerce-account .woocommerce button:focus-visible,
body.woocommerce-account .woocommerce summary:focus-visible {
	outline: 2px solid var(--gfa-primary);
	outline-offset: 2px;
	border-radius: 6px;
}

body.woocommerce-account .woocommerce-MyAccount-content a:not(.button) {
	color: var(--gfa-primary-dark);
	text-underline-offset: 2px;
}

/* ---------- logged-in shell: sidebar menu + content ---------- */
body.woocommerce-account.logged-in .woocommerce {
	display: grid;
	grid-template-columns: repeat(1, minmax(0, 1fr));
	gap: 1.25rem;
	align-items: start;
}

/* Woo layout CSS floats nav/content and adds clearfix pseudo-elements that would become grid items */
body.woocommerce-account .woocommerce::before,
body.woocommerce-account .woocommerce::after,
body.woocommerce-account #customer_login::before,
body.woocommerce-account #customer_login::after,
body.woocommerce-account .woocommerce-Addresses::before,
body.woocommerce-account .woocommerce-Addresses::after,
body.woocommerce-account .woocommerce-columns--addresses::before,
body.woocommerce-account .woocommerce-columns--addresses::after {
	content: none;
	display: none;
}

body.woocommerce-account .woocommerce-MyAccount-navigation,
body.woocommerce-account .woocommerce-MyAccount-content {
	float: none;
	width: auto;
	max-width: none;
}

@media (min-width: 900px) {
	body.woocommerce-account.logged-in .woocommerce {
		grid-template-columns: 252px minmax(0, 1fr);
		gap: 2rem;
	}
	body.woocommerce-account .woocommerce-MyAccount-navigation {
		position: sticky;
		top: 112px;
	}
}

body.woocommerce-account .woocommerce-MyAccount-navigation {
	background: #fff;
	border: 1px solid var(--gfa-line);
	border-radius: var(--gfa-radius);
	padding: 0.5rem;
	box-shadow: var(--gfa-shadow);
}

body.woocommerce-account .woocommerce-MyAccount-navigation ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 2px;
}

body.woocommerce-account .woocommerce-MyAccount-navigation li {
	margin: 0;
	padding: 0;
	list-style: none;
}

body.woocommerce-account .woocommerce-MyAccount-navigation a {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	min-height: 44px;
	padding: 0.5rem 0.875rem;
	border-radius: 10px;
	color: var(--gfa-ink);
	font-size: 0.9375rem;
	font-weight: 500;
	text-decoration: none;
	transition: background-color 0.15s ease, color 0.15s ease;
}

body.woocommerce-account .woocommerce-MyAccount-navigation a::before {
	content: '';
	flex: none;
	width: 1.25rem;
	height: 1.25rem;
	background-color: currentColor;
	color: var(--gfa-muted);
	-webkit-mask: var(--gf-i-dot) center / contain no-repeat;
	mask: var(--gf-i-dot) center / contain no-repeat;
}

body.woocommerce-account .woocommerce-MyAccount-navigation li a:hover {
	background: var(--gfa-surface);
}

body.woocommerce-account .woocommerce-MyAccount-navigation li.is-active a {
	background: var(--gfa-primary-soft);
	color: var(--gfa-primary-dark);
	font-weight: 600;
}

body.woocommerce-account .woocommerce-MyAccount-navigation li.is-active a::before,
body.woocommerce-account .woocommerce-MyAccount-navigation li a:hover::before {
	color: var(--gfa-primary);
}

body.woocommerce-account .woocommerce-MyAccount-navigation li:last-child {
	margin-top: 0.25rem;
	padding-top: 0.25rem;
	border-top: 1px solid var(--gfa-line);
}

/* one icon per endpoint (extra endpoints fall back to a dot) */
body.woocommerce-account .woocommerce-MyAccount-navigation-link--dashboard a::before { -webkit-mask-image: var(--gf-i-dashboard); mask-image: var(--gf-i-dashboard); }
body.woocommerce-account .woocommerce-MyAccount-navigation-link--orders a::before { -webkit-mask-image: var(--gf-i-orders); mask-image: var(--gf-i-orders); }
body.woocommerce-account .woocommerce-MyAccount-navigation-link--downloads a::before { -webkit-mask-image: var(--gf-i-downloads); mask-image: var(--gf-i-downloads); }
body.woocommerce-account .woocommerce-MyAccount-navigation-link--edit-address a::before { -webkit-mask-image: var(--gf-i-edit-address); mask-image: var(--gf-i-edit-address); }
body.woocommerce-account .woocommerce-MyAccount-navigation-link--payment-methods a::before { -webkit-mask-image: var(--gf-i-payment-methods); mask-image: var(--gf-i-payment-methods); }
body.woocommerce-account .woocommerce-MyAccount-navigation-link--edit-account a::before { -webkit-mask-image: var(--gf-i-edit-account); mask-image: var(--gf-i-edit-account); }
body.woocommerce-account .woocommerce-MyAccount-navigation-link--customer-logout a::before { -webkit-mask-image: var(--gf-i-customer-logout); mask-image: var(--gf-i-customer-logout); }

/* phone / tablet: menu becomes wrapped pills */
@media (max-width: 899px) {
	body.woocommerce-account .woocommerce-MyAccount-navigation {
		padding: 0.5rem;
	}
	body.woocommerce-account .woocommerce-MyAccount-navigation ul {
		flex-direction: row;
		flex-wrap: wrap;
		gap: 0.375rem;
	}
	body.woocommerce-account .woocommerce-MyAccount-navigation li:last-child {
		margin: 0;
		padding: 0;
		border: 0;
	}
	body.woocommerce-account .woocommerce-MyAccount-navigation a {
		min-height: 44px;
		padding: 0.5rem 0.75rem;
		gap: 0.5rem;
		font-size: 0.875rem;
		background: var(--gfa-surface);
		border: 1px solid var(--gfa-line);
	}
	body.woocommerce-account .woocommerce-MyAccount-navigation li.is-active a {
		border-color: var(--gfa-primary);
	}
}

body.woocommerce-account .woocommerce-MyAccount-content {
	min-width: 0;
}

body.woocommerce-account .woocommerce-MyAccount-content > p:first-of-type {
	font-size: 1.0625rem;
}

body.woocommerce-account .woocommerce-MyAccount-content > p {
	color: var(--gfa-muted);
	line-height: 1.6;
	max-width: 62ch;
	margin: 0 0 1rem;
}

body.woocommerce-account .woocommerce-MyAccount-content > p strong {
	color: var(--gfa-ink);
}

body.woocommerce-account .woocommerce-MyAccount-content h2,
body.woocommerce-account .woocommerce-MyAccount-content h3 {
	font-size: 1.125rem;
	letter-spacing: -0.01em;
	margin: 1.75rem 0 0.875rem;
	color: var(--gfa-ink);
}

/* ---------- buttons ---------- */
body.woocommerce-account .woocommerce .button,
body.woocommerce-account .woocommerce button.button,
body.woocommerce-account .woocommerce button[type='submit'] {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	min-height: 44px;
	padding: 0.625rem 1.25rem;
	border: 1px solid var(--gfa-primary);
	border-radius: 999px;
	background: var(--gfa-primary);
	color: #fff;
	font: 600 0.9375rem/1.2 var(--gfa-font);
	text-decoration: none;
	cursor: pointer;
	box-shadow: none;
	transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

body.woocommerce-account .woocommerce .button:hover,
body.woocommerce-account .woocommerce button[type='submit']:hover {
	background: var(--gfa-primary-dark);
	border-color: var(--gfa-primary-dark);
	color: #fff;
}

body.woocommerce-account .woocommerce .button--ghost,
body.woocommerce-account .woocommerce .woocommerce-orders-table .button:not(.pay),
body.woocommerce-account .woocommerce table .button:not(.pay):not([data-quote-id]) {
	background: #fff;
	color: var(--gfa-ink);
	border-color: var(--gfa-field);
	min-height: 38px;
	padding: 0.4rem 0.875rem;
	font-size: 0.8125rem;
}

body.woocommerce-account .woocommerce .button--ghost:hover,
body.woocommerce-account .woocommerce .woocommerce-orders-table .button:not(.pay):hover,
body.woocommerce-account .woocommerce table .button:not(.pay):not([data-quote-id]):hover {
	background: var(--gfa-primary-soft);
	border-color: var(--gfa-primary);
	color: var(--gfa-primary-dark);
}

body.woocommerce-account .woocommerce .button .gf-ico {
	width: 1rem;
	height: 1rem;
}

/* ---------- notices ---------- */
body.woocommerce-account .woocommerce-info,
body.woocommerce-account .woocommerce-message,
body.woocommerce-account .woocommerce-error {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.75rem 1rem;
	list-style: none;
	margin: 0 0 1.25rem;
	padding: 1rem 1.25rem;
	background: var(--gfa-surface);
	border: 1px solid var(--gfa-line);
	border-top: 1px solid var(--gfa-line) !important;
	border-radius: var(--gfa-radius-sm);
	color: var(--gfa-ink);
	font-size: 0.9375rem;
	line-height: 1.5;
}

body.woocommerce-account .woocommerce-info::before,
body.woocommerce-account .woocommerce-message::before,
body.woocommerce-account .woocommerce-error::before {
	content: '';
	position: static;
	flex: none;
	width: 1.25rem;
	height: 1.25rem;
	margin: 0;
	background-color: var(--gfa-muted);
	-webkit-mask: var(--gf-i-info) center / contain no-repeat;
	mask: var(--gf-i-info) center / contain no-repeat;
	font: 0/0 a;
}

body.woocommerce-account .woocommerce-message {
	background: #f0fdf4;
	border-color: #bbe7c9;
}

body.woocommerce-account .woocommerce-message::before {
	background-color: #15803d;
	-webkit-mask-image: var(--gf-i-check);
	mask-image: var(--gf-i-check);
}

body.woocommerce-account .woocommerce-error {
	background: var(--gfa-primary-soft);
	border-color: #f6b8b0;
}

body.woocommerce-account .woocommerce-error::before {
	background-color: var(--gfa-primary-dark);
	-webkit-mask-image: var(--gf-i-alert);
	mask-image: var(--gf-i-alert);
}

body.woocommerce-account .woocommerce-info .button,
body.woocommerce-account .woocommerce-message .button {
	float: none;
	margin-left: auto;
}

body.woocommerce-account .woocommerce-error li {
	list-style: none;
	margin: 0;
}

/* pending / rejected B2B notice */
.gf-account-notice {
	display: flex;
	gap: 1rem;
	align-items: flex-start;
	background: #fffbeb;
	border: 1px solid #f3dc9c;
	border-radius: var(--gfa-radius-sm, 10px);
	color: #1d1d1f;
	padding: 1rem 1.25rem;
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	margin: 0 0 1.5rem;
	line-height: 1.5;
}

.gf-account-notice p {
	margin: 0.25rem 0 0;
	color: #5b6270;
	font-size: 0.9375rem;
}

.gf-account-notice__icon {
	flex: none;
	display: grid;
	place-items: center;
	width: 2.25rem;
	height: 2.25rem;
	border-radius: 999px;
	background: #fdefc2;
	color: #8a5a00;
}

/* ---------- dashboard tiles ---------- */
.gf-account-tiles {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0.75rem;
	grid-auto-flow: row dense; /* later small tiles (Kontakt, Odprto stanje) fill holes left by the wide ones */
	margin: 1.5rem 0 2rem;
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

@media (min-width: 1100px) {
	.gf-account-tiles {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 1rem;
	}
}

.gf-tile {
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 14px;
	padding: 1rem 1.125rem;
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	min-width: 0;
	box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

.gf-tile--warn {
	border-color: #f6b8b0;
	background: #fef2f2;
}

.gf-tile--warn .gf-tile__label .gf-ico,
.gf-tile--warn .gf-tile__value {
	color: #d80f0f;
}

.gf-tile__label {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	font-size: 0.8125rem;
	font-weight: 500;
	color: #5b6270;
}

.gf-tile__label .gf-ico {
	width: 1.125rem;
	height: 1.125rem;
	color: #ff2a13;
}

.gf-tile__value {
	font-size: clamp(1.2rem, 1rem + 0.8vw, 1.5rem);
	letter-spacing: -0.01em;
	color: #1d1d1f;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
	overflow-wrap: anywhere;
}

.gf-tile__note {
	font-size: 0.8125rem;
	color: #5b6270;
	overflow-wrap: anywhere;
}

a.gf-tile__note {
	color: #d80f0f;
}

.gf-tile--level {
	grid-column: span 2;
}

.gf-tile--discounts {
	grid-column: 1 / -1;
}

/* 2-column phones/tablets: the last tile would sit alone at half width */
@media (max-width: 1099px) {
	.gf-tile--contact {
		grid-column: 1 / -1;
	}
}

.gf-tile__list {
	list-style: none;
	margin: 0;
	padding: 0;
	font-size: 0.875rem;
	color: #1d1d1f;
	display: grid;
	grid-template-columns: repeat(1, minmax(0, 1fr));
}

.gf-tile__list li {
	display: flex;
	justify-content: space-between;
	gap: 1rem;
	padding: 0.4rem 0;
	border-bottom: 1px solid #f0f1f3;
	margin: 0;
}

.gf-tile__list li:last-child {
	border-bottom: 0;
}

.gf-tile__list strong {
	font-variant-numeric: tabular-nums;
}

@media (min-width: 640px) {
	.gf-tile__list {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		column-gap: 2rem;
	}
	.gf-tile__list li:nth-last-child(2):nth-child(odd) {
		border-bottom: 0;
	}
}

.gf-progress {
	background: #e5e7eb;
	border-radius: 999px;
	height: 6px;
	overflow: hidden;
	margin-top: 0.125rem;
}

.gf-progress__bar {
	background: #ff2a13;
	height: 100%;
	border-radius: 999px;
	min-width: 0;
}

/* ---------- B2C loyalty panel ---------- */
.gf-b2c-loyalty {
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 14px;
	padding: 1.125rem 1.25rem;
	margin: 0 0 1.5rem;
	box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.gf-b2c-loyalty__head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.625rem 0.875rem;
	margin-bottom: 0.875rem;
}

.gf-b2c-loyalty__head strong {
	font-size: 1.0625rem;
	color: #1d1d1f;
}

.gf-b2c-loyalty__icon {
	display: grid;
	place-items: center;
	width: 2.25rem;
	height: 2.25rem;
	border-radius: 10px;
	background: #fef2f2;
	color: #ff2a13;
}

.gf-b2c-loyalty__pill {
	margin-left: auto;
	padding: 0.25rem 0.75rem;
	border-radius: 999px;
	background: #1d1d1f;
	color: #fff;
	font-size: 0.8125rem;
	font-weight: 600;
}

.gf-b2c-loyalty p {
	margin: 0.625rem 0 0;
	font-size: 0.875rem;
	color: #5b6270;
}

/* ---------- tables (orders, order details, quotes) ---------- */
.gf-account-orders {
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	margin-bottom: 2rem;
}

.gf-account-orders h3,
.b2b-quote-history h3 {
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.gf-account-orders h3 .gf-ico {
	color: #ff2a13;
}

.gf-table-wrap,
body.woocommerce-account .woocommerce-orders-table,
body.woocommerce-account table.shop_table,
body.woocommerce-account .quote-table {
	background: #fff;
}

body.woocommerce-account table.woocommerce-orders-table,
body.woocommerce-account table.shop_table,
body.woocommerce-account table.quote-table,
body.woocommerce-account table.woocommerce-table--order-downloads {
	width: 100%;
	border-collapse: separate;
	border-spacing: 0;
	border: 1px solid var(--gfa-line, #e5e7eb);
	border-radius: 14px;
	overflow: hidden;
	margin: 0 0 1.5rem;
	font-size: 0.9rem;
}

body.woocommerce-account table th,
body.woocommerce-account table td {
	padding: 0.8rem 1rem;
	text-align: left;
	border: 0;
	border-bottom: 1px solid #eef0f2;
	vertical-align: middle;
	background: transparent;
}

body.woocommerce-account table thead th {
	background: #f9fafb;
	color: #5b6270;
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

body.woocommerce-account table tbody tr:last-child td,
body.woocommerce-account table tbody tr:last-child th,
body.woocommerce-account table tfoot tr:last-child td,
body.woocommerce-account table tfoot tr:last-child th {
	border-bottom: 0;
}

body.woocommerce-account table tfoot th {
	font-weight: 500;
	color: #5b6270;
}

body.woocommerce-account table tfoot tr:last-child td,
body.woocommerce-account table tfoot tr:last-child th {
	font-weight: 700;
	color: #1d1d1f;
}

body.woocommerce-account table a:not(.button) {
	font-weight: 600;
}

body.woocommerce-account .gf-actions,
body.woocommerce-account .woocommerce-orders-table__cell-order-actions {
	text-align: right;
}

body.woocommerce-account .woocommerce-orders-table__cell-order-actions .button {
	margin-left: 0.375rem;
}

.gf-empty {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 0.75rem;
	padding: 1.5rem;
	background: #f9fafb;
	border: 1px dashed #cdd2da;
	border-radius: 14px;
	color: #5b6270;
}

.gf-empty .gf-ico {
	width: 1.75rem;
	height: 1.75rem;
	color: #ff2a13;
}

.gf-empty p {
	margin: 0;
}

/* orders as cards on small screens (cells carry data-title) */
@media (max-width: 768px) {
	body.woocommerce-account table.woocommerce-orders-table,
	body.woocommerce-account table.woocommerce-orders-table tbody,
	body.woocommerce-account table.woocommerce-orders-table tr,
	body.woocommerce-account table.woocommerce-orders-table td {
		display: block;
	}
	body.woocommerce-account table.woocommerce-orders-table {
		border: 0;
		border-radius: 0;
		background: transparent;
		overflow: visible;
	}
	body.woocommerce-account table.woocommerce-orders-table thead {
		display: none;
	}
	body.woocommerce-account table.woocommerce-orders-table tr {
		background: #fff;
		border: 1px solid #e5e7eb;
		border-radius: 14px;
		margin-bottom: 0.75rem;
		padding: 0.375rem 0;
	}
	body.woocommerce-account table.woocommerce-orders-table td {
		display: flex;
		justify-content: space-between;
		gap: 1rem;
		padding: 0.5rem 1rem;
		border: 0;
		text-align: right;
	}
	body.woocommerce-account table.woocommerce-orders-table td::before {
		content: attr(data-title);
		color: #5b6270;
		font-weight: 500;
		text-align: left;
	}
	body.woocommerce-account table.woocommerce-orders-table td.gf-actions,
	body.woocommerce-account table.woocommerce-orders-table td.woocommerce-orders-table__cell-order-actions {
		justify-content: flex-end;
		flex-wrap: wrap;
		border-top: 1px solid #eef0f2;
		margin-top: 0.25rem;
		padding-top: 0.75rem;
	}
	body.woocommerce-account table.woocommerce-orders-table td.gf-actions::before,
	body.woocommerce-account table.woocommerce-orders-table td.woocommerce-orders-table__cell-order-actions::before {
		content: none;
	}
	body.woocommerce-account table.woocommerce-orders-table td:empty {
		display: none;
	}
	.gf-account-tiles + .gf-account-orders .gf-table-wrap {
		background: transparent;
	}
}

/* order details + addresses on the single order page */
body.woocommerce-account .woocommerce-order-details,
body.woocommerce-account .woocommerce-customer-details {
	margin-top: 1.5rem;
}

body.woocommerce-account .woocommerce-customer-details .woocommerce-columns--addresses {
	display: grid;
	grid-template-columns: repeat(1, minmax(0, 1fr));
	gap: 1rem;
}

@media (min-width: 640px) {
	body.woocommerce-account .woocommerce-customer-details .woocommerce-columns--addresses {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

body.woocommerce-account mark {
	background: #fef2f2;
	color: #d80f0f;
	padding: 0.1rem 0.5rem;
	border-radius: 999px;
	font-weight: 600;
}

/* ---------- addresses ---------- */
body.woocommerce-account .woocommerce-Addresses,
body.woocommerce-account .woocommerce-columns--addresses {
	display: grid;
	grid-template-columns: repeat(1, minmax(0, 1fr));
	gap: 1rem;
	margin-top: 1rem;
}

@media (min-width: 640px) {
	body.woocommerce-account .woocommerce-Addresses {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

body.woocommerce-account .woocommerce-Addresses .col-1,
body.woocommerce-account .woocommerce-Addresses .col-2,
body.woocommerce-account .woocommerce-columns--addresses .col-1,
body.woocommerce-account .woocommerce-columns--addresses .col-2,
body.woocommerce-account .woocommerce-columns--addresses .woocommerce-column {
	float: none;
	width: auto;
	max-width: none;
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 14px;
	padding: 1.25rem;
	box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
	box-sizing: border-box;
	min-width: 0;
}

body.woocommerce-account .woocommerce-Address-title {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.5rem 1rem;
	margin-bottom: 0.75rem;
}

body.woocommerce-account .woocommerce-Address-title h2,
body.woocommerce-account .woocommerce-column__title {
	float: none;
	text-align: left;
	margin: 0;
	font-size: 1rem;
}

body.woocommerce-account .woocommerce-Address-title a.edit {
	float: none;
	display: inline-flex;
	align-items: center;
	gap: 0.375rem;
	font-size: 0.8125rem;
	font-weight: 600;
	text-decoration: none;
	padding: 0.375rem 0.75rem;
	border: 1px solid #8c939f;
	border-radius: 999px;
	color: #1d1d1f !important;
}

body.woocommerce-account .woocommerce-Address-title a.edit::before {
	content: '';
	width: 0.9rem;
	height: 0.9rem;
	background-color: currentColor;
	-webkit-mask: var(--gf-i-pencil) center / contain no-repeat;
	mask: var(--gf-i-pencil) center / contain no-repeat;
}

body.woocommerce-account .woocommerce-Address-title a.edit:hover {
	border-color: #ff2a13;
	color: #d80f0f !important;
	background: #fef2f2;
}

body.woocommerce-account address {
	font-style: normal;
	line-height: 1.6;
	color: #1d1d1f;
	overflow-wrap: anywhere;
}

/* ---------- forms (account details, addresses, login, lost password) ---------- */
body.woocommerce-account .woocommerce form .form-row,
body.woocommerce-account .woocommerce form p.form-row {
	margin: 0 0 1.125rem;
	padding: 0;
	float: none;
	width: auto;
}

body.woocommerce-account .woocommerce label {
	display: block;
	margin: 0 0 0.375rem;
	font-size: 0.875rem;
	font-weight: 600;
	color: var(--gfa-ink, #1d1d1f);
}

body.woocommerce-account .woocommerce label .required,
body.woocommerce-account .woocommerce label abbr {
	color: #d80f0f;
	text-decoration: none;
	border: 0;
}

body.woocommerce-account .woocommerce input.input-text,
body.woocommerce-account .woocommerce input[type='text'],
body.woocommerce-account .woocommerce input[type='email'],
body.woocommerce-account .woocommerce input[type='password'],
body.woocommerce-account .woocommerce input[type='tel'],
body.woocommerce-account .woocommerce select,
body.woocommerce-account .woocommerce textarea,
body.woocommerce-account .woocommerce .select2-container .select2-selection--single {
	width: 100%;
	box-sizing: border-box;
	min-height: 48px;
	padding: 0.75rem 0.875rem;
	background: #fff;
	border: 1px solid var(--gfa-field, #8c939f);
	border-radius: 10px;
	color: var(--gfa-ink, #1d1d1f);
	font: 400 1rem/1.4 var(--gfa-font, inherit);
	box-shadow: none;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
	-webkit-appearance: none;
	appearance: none;
}

body.woocommerce-account .woocommerce select {
	padding-right: 2.5rem;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235b6270' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 0.75rem center;
	background-size: 1.25rem;
}

body.woocommerce-account .woocommerce input:hover,
body.woocommerce-account .woocommerce select:hover,
body.woocommerce-account .woocommerce textarea:hover {
	border-color: #5b6270;
}

body.woocommerce-account .woocommerce input:focus,
body.woocommerce-account .woocommerce select:focus,
body.woocommerce-account .woocommerce textarea:focus {
	outline: none;
	border-color: #ff2a13;
	box-shadow: 0 0 0 4px rgba(255, 42, 19, 0.14);
	transform: none;
}

body.woocommerce-account .woocommerce input[type='checkbox'] {
	width: 1.125rem;
	height: 1.125rem;
	min-height: 0;
	margin: 0;
	accent-color: #ff2a13;
	-webkit-appearance: auto;
	appearance: auto;
	flex: none;
}

body.woocommerce-account .woocommerce .woocommerce-form__label-for-checkbox,
body.woocommerce-account .woocommerce label.woocommerce-form-login__rememberme {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	font-weight: 500;
	margin: 0 0 1rem;
	min-height: 28px;
}

body.woocommerce-account .woocommerce .password-input {
	position: relative;
	display: block;
}

body.woocommerce-account .woocommerce .password-input input {
	padding-right: 3rem;
}

body.woocommerce-account .woocommerce .show-password-input {
	position: absolute;
	top: 0;
	right: 0;
	width: 3rem;
	height: 100%;
	min-height: 48px;
	transform: none;
	display: grid;
	place-items: center;
	border: 0;
	background: transparent;
	color: #5b6270;
	cursor: pointer;
	border-radius: 0 10px 10px 0;
	padding: 0;
}

body.woocommerce-account .woocommerce form .description,
body.woocommerce-account .woocommerce span em {
	display: block;
	margin-top: 0.375rem;
	font-size: 0.8125rem;
	font-style: normal;
	color: #5b6270;
}

body.woocommerce-account .woocommerce fieldset {
	margin: 0.5rem 0 1.5rem;
	padding: 1.25rem 1.25rem 0.25rem;
	border: 1px solid #e5e7eb;
	border-radius: 14px;
	background: #fff;
	min-width: 0;
}

body.woocommerce-account .woocommerce fieldset legend {
	padding: 0 0.5rem;
	font-weight: 700;
	font-size: 0.9375rem;
}

/* two-column field grid for details + address forms */
body.woocommerce-account .woocommerce-EditAccountForm,
body.woocommerce-account .woocommerce-address-fields__field-wrapper {
	display: grid;
	grid-template-columns: repeat(1, minmax(0, 1fr));
	column-gap: 1rem;
}

@media (min-width: 640px) {
	body.woocommerce-account .woocommerce-EditAccountForm,
	body.woocommerce-account .woocommerce-address-fields__field-wrapper {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

body.woocommerce-account .woocommerce-EditAccountForm .form-row-wide,
body.woocommerce-account .woocommerce-EditAccountForm fieldset,
body.woocommerce-account .woocommerce-EditAccountForm > p:not(.form-row),
body.woocommerce-account .woocommerce-EditAccountForm > button,
body.woocommerce-account .woocommerce-address-fields__field-wrapper .form-row-wide {
	grid-column: 1 / -1;
}

body.woocommerce-account .woocommerce-EditAccountForm .clear,
body.woocommerce-account .woocommerce-address-fields__field-wrapper .clear {
	display: none;
}

body.woocommerce-account .woocommerce-address-fields > p {
	margin-top: 0.5rem;
}

body.woocommerce-account .woocommerce-address-fields h2,
body.woocommerce-account .woocommerce-MyAccount-content > h2 {
	margin-top: 0;
}

/* ============================================================
 * Logged out: sign in | register, then the B2B card
 * ============================================================ */
body.woocommerce-account #customer_login {
	display: grid;
	grid-template-columns: repeat(1, minmax(0, 1fr));
	gap: 1.25rem;
	align-items: stretch;
}

@media (min-width: 820px) {
	body.woocommerce-account #customer_login {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 1.5rem;
	}
}

body.woocommerce-account #customer_login .u-column1,
body.woocommerce-account #customer_login .u-column2 {
	float: none;
	width: auto;
	max-width: none;
	box-sizing: border-box;
	min-width: 0;
	padding: clamp(1.25rem, 3vw, 2rem);
	border-radius: var(--gfa-radius);
	border: 1px solid var(--gfa-line);
	background: #fff;
	box-shadow: var(--gfa-shadow);
}

body.woocommerce-account #customer_login .u-column2 {
	background: var(--gfa-surface);
	box-shadow: none;
}

body.woocommerce-account #customer_login h2 {
	margin: 0 0 1.25rem;
	font-size: 1.375rem;
	letter-spacing: -0.015em;
}

body.woocommerce-account #customer_login form.login,
body.woocommerce-account #customer_login form.register {
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: transparent;
}

body.woocommerce-account #customer_login form > p:not(.form-row) {
	color: var(--gfa-muted);
	font-size: 0.875rem;
	line-height: 1.55;
	margin: 0 0 1rem;
}

body.woocommerce-account #customer_login form .woocommerce-privacy-policy-text a {
	color: var(--gfa-primary-dark);
}

body.woocommerce-account #customer_login p.form-row:has(.woocommerce-form-login__submit) {
	display: flex;
	flex-direction: column;
	margin-top: 0.25rem;
}

body.woocommerce-account #customer_login .woocommerce-form-login__submit,
body.woocommerce-account #customer_login .woocommerce-form-register__submit {
	width: 100%;
	min-height: 50px;
	font-size: 1rem;
}

body.woocommerce-account #customer_login .woocommerce-form-login__rememberme {
	margin-bottom: 1.125rem;
}

body.woocommerce-account #customer_login .lost_password {
	margin: 0.25rem 0 0;
	text-align: center;
	font-size: 0.875rem;
}

body.woocommerce-account #customer_login .lost_password a {
	color: var(--gfa-muted);
	text-underline-offset: 3px;
}

body.woocommerce-account #customer_login .lost_password a:hover {
	color: var(--gfa-primary-dark);
}

/* lost password / reset password: single centred card */
body.woocommerce-account:not(.logged-in) .woocommerce > form.lost_reset_password {
	max-width: 480px;
	margin: 0 auto;
	padding: clamp(1.25rem, 3vw, 2rem);
	background: #fff;
	border: 1px solid var(--gfa-line);
	border-radius: var(--gfa-radius);
	box-shadow: var(--gfa-shadow);
}

/* B2B call-to-action card (company_link()) */
.gf-b2b-cta {
	margin-top: 1.5rem;
	display: grid;
	grid-template-columns: auto minmax(0, 1fr);
	gap: 1rem 1.25rem;
	align-items: center;
	padding: clamp(1.125rem, 3vw, 1.5rem) clamp(1.125rem, 3vw, 2rem);
	background: #1d1d1f;
	color: #fff;
	border-radius: 16px;
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	position: relative;
	overflow: hidden;
}

.gf-b2b-cta::after {
	content: '';
	position: absolute;
	left: 0;
	right: 0;
	top: 0;
	height: 3px;
	background: #ff2a13;
}

.gf-b2b-cta__icon {
	display: grid;
	place-items: center;
	width: 3rem;
	height: 3rem;
	border-radius: 12px;
	background: rgba(255, 255, 255, 0.08);
	color: #ff6a58;
}

.gf-b2b-cta__icon .gf-ico {
	width: 1.5rem;
	height: 1.5rem;
}

.gf-b2b-cta h2 {
	margin: 0 0 0.25rem;
	font-size: 1.125rem;
	color: #fff;
}

.gf-b2b-cta p {
	margin: 0;
	font-size: 0.9375rem;
	line-height: 1.5;
	color: #c9ccd2;
}

.gf-b2b-cta__btn {
	grid-column: 1 / -1;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	min-height: 46px;
	padding: 0.625rem 1.5rem;
	border-radius: 999px;
	background: #ff2a13;
	color: #fff;
	font-weight: 600;
	font-size: 0.9375rem;
	text-decoration: none;
	transition: background-color 0.15s ease;
}

.gf-b2b-cta__btn:hover {
	background: #d80f0f;
	color: #fff;
}

.gf-b2b-cta__btn:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 3px;
}

.gf-b2b-cta__btn .gf-ico {
	width: 1.125rem;
	height: 1.125rem;
	transition: transform 0.15s ease;
}

.gf-b2b-cta__btn:hover .gf-ico {
	transform: translateX(3px);
}

@media (min-width: 720px) {
	.gf-b2b-cta {
		grid-template-columns: auto minmax(0, 1fr) auto;
	}
	.gf-b2b-cta__btn {
		grid-column: auto;
	}
}

@media (prefers-reduced-motion: reduce) {
	* {
		transition-duration: 0.01ms !important;
	}
}

/* ---------- legacy shortcodes inside the account (quotes, portal) ---------- */
.b2b-quote-history {
	margin-top: 1.5rem;
}

.b2b-quote-history .quote-table {
	display: table;
}

@media (max-width: 640px) {
	.b2b-quote-history {
		overflow-x: auto;
	}
	.b2b-quote-history .quote-table {
		min-width: 520px;
	}
}
