/**
 * Conta cliente — segunda iteração: layout amplo tipo Shopify Customer Account UX
 * (grid largo, sidebar nítido, hero + atalhos em cards).
 * Referência UX: https://shopify.dev/docs/apps/build/customer-accounts/ux
 */

/*
 * Tirar contenções típicas de tema quando o wrapper WooCommerce/HTML encolhe à metade da tela.
 * Seletores comuns: Astra/OceanWP/GeneratePress/neutro.
 */

body.goodds-shopify-account-page .entry-content > .woocommerce,
body.goodds-shopify-account-page .woocommerce-page .woocommerce,
body.goodds-shopify-account-page .site-content > .woocommerce,
body.goodds-shopify-account-page .content-area > .woocommerce,
body.goodds-shopify-account-page .elementor-widget-shortcode > .elementor-widget-container > .woocommerce,
body.goodds-shopify-account-page .elementor-shortcode > .woocommerce,
body.goodds-shopify-account-page .elementor-widget-woocommerce-my-account > .elementor-widget-container > .woocommerce,
body.goodds-shopify-account-page .elementor-widget-woocommerce-my-account .woocommerce {
	max-width: 100% !important;
	width: 100%;
	padding-inline: 0;
	margin-inline: auto;
}

/* ---------- Variáveis e fonte ---------- */

body.goodds-shopify-account-page .goodds-acc {
	--gd-text: #202223;
	--gd-text-muted: #5c5f62;
	--gd-border: rgb(229 229 229);
	--gd-surface: #ffffff;
	--gd-canvas: #f1f1f3;
	--gd-radius: 14px;
	--gd-radius-btn: 8px;
	--gd-accent: #2463dc;
	--gd-link: #2463dc;
	--gd-link-muted: rgba(93, 99, 102, 0.95);

	font-family:
		'Inter',
		system-ui,
		-apple-system,
		BlinkMacSystemFont,
		'Segoe UI',
		Roboto,
		Oxygen-Sans,
		Ubuntu,
		Cantarell,
		sans-serif;
	color: var(--gd-text);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

body.goodds-shopify-account-page .goodds-acc--shell {
	width: 100%;
	max-width: none;
	overflow-x: clip;
}

/* Área cinza ocupando virtualmente TODA a largura útil da viewport */

body.goodds-shopify-account-page .goodds-acc__viewport {
	background: var(--gd-canvas);
	box-sizing: border-box;
	position: relative;
	width: 100vw;
	max-width: 100vw;
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
	padding: clamp(1.75rem, 4vw, 3rem) max(20px, 4vw);
}

/* Grid principal: lateral fixa suficientemente larga + conteúdo que preenche o restante */

body.goodds-shopify-account-page .goodds-acc__layout {
	display: grid;
	grid-template-columns: minmax(17rem, 19rem) minmax(0, 1fr);
	gap: clamp(1.5rem, 3vw, 2.75rem);
	width: 100%;
	max-width: 1540px;
	margin-inline: auto;
	align-items: start;
}

@media (max-width: 991px) {
	body.goodds-shopify-account-page .goodds-acc__layout {
		grid-template-columns: 1fr;
		gap: 1.5rem;
	}

	body.goodds-shopify-account-page .goodds-acc__sidebar-shell {
		position: static;
	}
}

/* ---------- Links no estilo Polaris (substitui o vermelho do tema Woo) ---------- */

body.goodds-shopify-account-page .goodds-acc a:not(
		button,
		.button,
		.woocommerce-button,
		.goodds-acc-tile
	) {
	color: var(--gd-link);
	text-underline-offset: 0.2em;
	text-decoration-color: transparent;
	transition:
		text-decoration-color 140ms ease,
		color 140ms ease;
}

body.goodds-shopify-account-page .goodds-acc a:not(
		button,
		.button,
		.woocommerce-button,
		.goodds-acc-tile
	):hover {
	text-decoration-color: currentColor;
	text-decoration-thickness: 1px;
}

/* ---------- Sidebar ---------- */

body.goodds-shopify-account-page .goodds-acc__sidebar-shell {
	position: sticky;
	top: 1rem;
	align-self: start;
}

body.goodds-shopify-account-page .goodds-acc-nav__section {
	background: var(--gd-surface);
	border: 1px solid var(--gd-border);
	border-radius: var(--gd-radius);
	padding: 0.9rem 0.5rem;
	box-shadow:
		0 0 0 1px rgba(0, 0, 0, 0.025),
		0 14px 32px rgba(31, 33, 36, 0.06);
		width: 300px!important;
}

body.goodds-shopify-account-page .goodds-acc-nav__eyebrow {
	margin: 0.25rem 1rem 0.65rem;
	font-size: 0.75rem;
	line-height: 1.35;
	text-transform: uppercase;
	letter-spacing: 0.07em;
	color: var(--gd-text-muted);
	font-weight: 600;
}

body.goodds-shopify-account-page .goodds-acc-nav__list {
	list-style: none;
	margin: 0;
	padding: 0;
}

body.goodds-shopify-account-page .goodds-acc-nav__item {
	margin: 2px 0;
}

body.goodds-shopify-account-page .goodds-acc-nav__link {
	display: flex;
	align-items: center;
	justify-content: space-between;
	min-height: 2.75rem;
	padding: 0.5rem 1rem;
	text-decoration: none;
	color: var(--gd-text);
	font-size: 1rem;
	font-weight: 500;
	line-height: 1.4;
	border-radius: 10px;
	border-left: 3px solid transparent;
	transition:
		background-color 120ms ease,
		border-left-color 120ms ease;
}

body.goodds-shopify-account-page .goodds-acc-nav__link:hover {
	background: rgba(241, 241, 243, 0.9);
	text-decoration: none !important;
}

body.goodds-shopify-account-page .goodds-acc-nav__item.is-active .goodds-acc-nav__link,
body.goodds-shopify-account-page .goodds-acc-nav__item.goodds-acc-nav__item--active .goodds-acc-nav__link {
	font-weight: 700;
	border-left-color: var(--gd-accent);
	background: #fff;
	box-shadow:
		inset 0 0 0 1px var(--gd-border),
		0 4px 12px rgba(31, 33, 36, 0.07);
	text-decoration: none !important;
}

/* ---------- Área principal ---------- */

body.goodds-shopify-account-page .goodds-acc__content {
	background: transparent;
	min-width: 0;
	padding: 0 0 clamp(2rem, 6vw, 3.5rem);
}

body.goodds-shopify-account-page .woocommerce-MyAccount-content > *:first-child {
	margin-top: 0;
}

/* Painéis e dashboard */

body.goodds-shopify-account-page .goodds-acc-dash__extensions {
	min-height: 0;
}

body.goodds-shopify-account-page .goodds-acc-dash__extensions > * + * {
	margin-top: 1.25rem;
}

body.goodds-shopify-account-page .goodds-acc-panel {
	background: var(--gd-surface);
	border: 1px solid var(--gd-border);
	border-radius: var(--gd-radius);
	padding: clamp(1.5rem, 3vw, 2rem) clamp(1.375rem, 3.5vw, 2rem);
	box-shadow:
		0 0 0 1px rgba(0, 0, 0, 0.02),
		0 22px 40px rgba(31, 33, 36, 0.08);
}

body.goodds-shopify-account-page .goodds-acc-panel--hero {
	max-width: 100%;
}

body.goodds-shopify-account-page .goodds-acc-dash__meta {
	margin: 0 0 0.375rem;
	font-size: 0.75rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--gd-text-muted);
}

body.goodds-shopify-account-page .goodds-acc-dash__title {
	margin: 0 0 1.125rem;
	font-size: clamp(1.875rem, 4vw, 2.375rem);
	font-weight: 700;
	letter-spacing: -0.03em;
	line-height: 1.17;
	border: none;
	padding: 0;
}

body.goodds-shopify-account-page .goodds-acc-dash__greeting {
	font-size: 1.25rem;
	line-height: 1.48;
	font-weight: 500;
	margin: 0 0 0.875rem !important;
	color: var(--gd-text);
}

body.goodds-shopify-account-page .goodds-acc-dash__greeting strong {
	font-weight: 700;
}

body.goodds-shopify-account-page .goodds-acc-dash__lede {
	font-size: 1.0625rem;
	line-height: 1.72;
	font-weight: 400;
	margin: 0 !important;
	color: var(--gd-link-muted);
}

/* Atalhos em cards tipo “Account home” Shopify */

body.goodds-shopify-account-page .goodds-acc-tiles {
	margin-top: clamp(1.25rem, 3vw, 1.875rem);
}

body.goodds-shopify-account-page .goodds-acc-tiles__heading {
	font-size: 1.125rem;
	font-weight: 700;
	letter-spacing: -0.02em;
	margin: 0 0 1rem !important;
	color: var(--gd-text);
}

body.goodds-shopify-account-page .goodds-acc-tiles__grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr));
	gap: 1rem;
}

body.goodds-shopify-account-page .goodds-acc-tile {
	box-sizing: border-box;
	min-height: 7.125rem;
	padding: 1.25rem 1.375rem;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	gap: 0.5rem;
	text-decoration: none !important;
	color: var(--gd-text);
	background: var(--gd-surface);
	border-radius: var(--gd-radius);
	border: 1px solid var(--gd-border);
	box-shadow:
		0 0 0 1px rgba(0, 0, 0, 0.02),
		0 14px 32px rgba(31, 33, 36, 0.06);
	transition:
		transform 0.13s ease,
		box-shadow 0.13s ease,
		border-color 0.13s ease;
}

body.goodds-shopify-account-page .goodds-acc-tile:hover {
	transform: translateY(-2px);
	border-color: rgba(36, 99, 220, 0.35);
	box-shadow:
		0 18px 40px rgba(31, 33, 36, 0.09),
		0 0 0 1px rgba(36, 99, 220, 0.12);
	text-decoration: none !important;
}

body.goodds-shopify-account-page .goodds-acc-tile__title {
	display: block;
	font-size: 1.0625rem;
	line-height: 1.38;
	font-weight: 600;
	color: var(--gd-text);
}

body.goodds-shopify-account-page .goodds-acc-tile__meta {
	font-size: 0.9375rem;
	font-weight: 500;
	color: var(--gd-accent);
}

/* Form login / outros painéis fora dashboard */

body.goodds-shopify-account-page .woocommerce-form-login,
body.goodds-shopify-account-page .woocommerce-form-register {
	background: var(--gd-surface);
	border: 1px solid var(--gd-border);
	border-radius: var(--gd-radius);
	padding: clamp(1.375rem, 3vw, 2rem);
	box-shadow:
		0 0 0 1px rgba(0, 0, 0, 0.02),
		0 22px 40px rgba(31, 33, 36, 0.08);
	max-width: 36rem;
}

body.goodds-shopify-account-page .woocommerce-account .woocommerce-MyAccount-content p,
body.goodds-shopify-account-page .woocommerce-account .woocommerce-MyAccount-content .woocommerce-account-fields {
	color: var(--gd-link-muted);
	line-height: 1.7;
	font-size: 1.0625rem;
}

body.goodds-shopify-account-page .woocommerce-MyAccount-content h2:not(.goodds-acc-dash__title),
body.goodds-shopify-account-page .woocommerce-MyAccount-content h3:not(.goodds-acc-tiles__heading),
body.goodds-shopify-account-page .woocommerce-MyAccount-content .woocommerce-dashboard h2 {
	color: var(--gd-text);
	font-weight: 700;
	letter-spacing: -0.02em;
	line-height: 1.35;
	font-size: clamp(1.25rem, 2.8vw, 1.5625rem);
	margin: 1.5rem 0 0.75rem;
	border: none;
	padding-bottom: 0;
}

body.goodds-shopify-account-page .woocommerce-MyAccount-content > h2:first-child,
body.goodds-shopify-account-page .woocommerce-MyAccount-content > h3:first-child {
	margin-top: 0;
}

/* ---------- Tabela de pedidos / listas ---------- */

body.goodds-shopify-account-page .woocommerce-account .shop_table {
	width: 100%;
	border-collapse: separate;
	border-spacing: 0;
	background: var(--gd-surface);
	border: 1px solid var(--gd-border);
	border-radius: var(--gd-radius);
	overflow: hidden;
	font-size: 1rem;
	box-shadow:
		0 0 0 1px rgba(0, 0, 0, 0.02),
		0 18px 40px rgba(31, 33, 36, 0.075);
	margin-bottom: 1rem;
}

body.goodds-shopify-account-page .woocommerce-account .shop_table thead th {
	padding: 1rem 1.125rem;
	background: rgba(241, 241, 243, 0.9);
	border-bottom: 1px solid var(--gd-border);
	color: var(--gd-text-muted);
	font-weight: 700;
	text-align: left;
	font-size: 0.75rem;
	text-transform: uppercase;
	letter-spacing: 0.06em;
}

body.goodds-shopify-account-page .woocommerce-account .shop_table tbody td,
body.goodds-shopify-account-page .woocommerce-account .shop_table thead th:first-child {
	border-left: 0 none;
	border-right: 0 none;
}

body.goodds-shopify-account-page .woocommerce-account .shop_table tbody td {
	padding: 1rem 1.125rem;
	vertical-align: middle;
	border-top: 1px solid var(--gd-border);
}

body.goodds-shopify-account-page .woocommerce-account .shop_table tbody tr:first-child td {
	border-top: 0 none;
}

body.goodds-shopify-account-page .woocommerce-account .shop_table tbody tr:hover td {
	background: rgba(241, 241, 243, 0.45);
}

body.goodds-shopify-account-page .woocommerce-orders-table__cell-order-status,
body.goodds-shopify-account-page .mark {
	font-weight: 700;
}

body.goodds-shopify-account-page .woocommerce-account mark.order-status,
body.goodds-shopify-account-page .woocommerce-account .woocommerce-orders-table__cell-order-status .status {
	display: inline-flex;
	align-items: center;
	border-radius: 999px;
	padding: 0.275rem 0.725rem;
	font-size: 0.78125rem;
	line-height: 1.34;
	border: 1px solid transparent;
	text-transform: none;
	text-decoration: none;
	background: rgba(92, 95, 98, 0.12);
	color: var(--gd-text-muted);
	box-shadow: none;
}

body.goodds-shopify-account-page .woocommerce-account mark.order-status.status-completed,
body.goodds-shopify-account-page .woocommerce-account mark.order-status.status-processing {
	border-color: rgba(36, 99, 220, 0.28);
	background: rgba(36, 99, 220, 0.12);
	color: #0f3eae;
}

body.goodds-shopify-account-page .woocommerce-account mark.order-status.status-cancelled,
body.goodds-shopify-account-page .woocommerce-account mark.order-status.status-failed {
	border-color: rgba(215, 44, 13, 0.28);
	background: rgba(215, 44, 13, 0.1);
	color: #8f2515;
}

/* ---------- Botões e inputs ---------- */

body.goodds-shopify-account-page .woocommerce-account .button,
body.goodds-shopify-account-page .woocommerce-account button.button.alt,
body.goodds-shopify-account-page .woocommerce-account .woocommerce-form-login button,
body.goodds-shopify-account-page .woocommerce-account .woocommerce-form-register button {
	border-radius: var(--gd-radius-btn);
	font-size: 0.96875rem;
	font-weight: 600;
	box-shadow:
		inset 0 0 0 1px rgba(0, 0, 0, 0.04),
		0 4px 8px rgba(31, 33, 36, 0.08);
	transition:
		transform 120ms ease,
		box-shadow 120ms ease,
		background-color 120ms ease;
}

body.goodds-shopify-account-page .woocommerce-account .button.alt,
body.goodds-shopify-account-page .woocommerce-account button.button.alt {
	background: var(--gd-accent);
	color: #fff;
	border-color: transparent;
	text-decoration: none !important;
}

body.goodds-shopify-account-page .woocommerce-account .button:hover,
body.goodds-shopify-account-page .woocommerce-account button.button.alt:hover {
	transform: translateY(-1px);
	box-shadow:
		inset 0 0 0 1px rgba(255, 255, 255, 0.1),
		0 14px 24px rgba(31, 33, 36, 0.18);
	text-decoration: none !important;
}

body.goodds-shopify-account-page .woocommerce-account .input-text,
body.goodds-shopify-account-page .woocommerce-account textarea,
body.goodds-shopify-account-page .woocommerce-account select {
	border-radius: var(--gd-radius-btn);
	border: 1px solid var(--gd-border);
	background: var(--gd-surface);
	padding: 0.75rem 0.965rem;
	font-size: 1rem;
	transition:
		box-shadow 140ms ease,
		border-color 140ms ease;
}

body.goodds-shopify-account-page .woocommerce-account .input-text:focus,
body.goodds-shopify-account-page .woocommerce-account textarea:focus,
body.goodds-shopify-account-page .woocommerce-account select:focus {
	outline: none;
	border-color: rgba(36, 99, 220, 0.65);
	box-shadow: 0 0 0 4px rgba(36, 99, 220, 0.16);
}

body.goodds-shopify-account-page .woocommerce-account label {
	font-size: 0.84375rem;
	font-weight: 700;
	color: var(--gd-text-muted);
	margin-bottom: 0.4375rem;
	display: inline-block;
}

body.goodds-shopify-account-page .woocommerce-account .woocommerce-error,
body.goodds-shopify-account-page .woocommerce-account .woocommerce-message,
body.goodds-shopify-account-page .woocommerce-account .woocommerce-info {
	list-style: none;
	margin: 0 0 1rem !important;
	border-radius: var(--gd-radius-btn);
	border: 1px solid var(--gd-border);
	background: rgba(255, 255, 255, 0.9);
	box-shadow:
		inset 0 1px #fff,
		0 4px 12px rgba(31, 33, 36, 0.06);
	/* padding: 0.9rem 1.125rem !important; */
	font-size: 1rem;
	line-height: 1.6;
	font-weight: 600;
	color: var(--gd-text);
}

body.goodds-shopify-account-page .woocommerce-account ul.woocommerce-message,
body.goodds-shopify-account-page .woocommerce-account ul.woocommerce-error,
body.goodds-shopify-account-page .woocommerce-account ul.woocommerce-info {
	padding-left: 1.125rem !important;
}

body.goodds-shopify-account-page .woocommerce-account .woocommerce-message {
	border-left: 5px solid var(--gd-accent);
}

body.goodds-shopify-account-page .woocommerce-account .woocommerce-error {
	border-left: 5px solid #d72c0d;
	background: rgba(215, 44, 13, 0.06);
}

/* Visitantes: cartão centrado dentro do mesmo canvas */

body.goodds-shopify-account-page .goodds-acc--guest .goodds-acc__layout {
	grid-template-columns: 1fr;
	max-width: 36rem;
}

body.goodds-shopify-account-page .goodds-acc--guest .goodds-acc__content {
	grid-column: 1 / -1;
	justify-self: center;
	width: 100%;
	padding-bottom: 2rem;
}
