/**
 * Hesabım + Giriş/Kayıt (PAGE-SPECS §4–6, references 04 & 05).
 * Mobile-first; breakpoints 768 / 1024 / 1366 as in the rest of the theme.
 *
 * @package Megatech
 */

/* --------------------------------------------------------------------------
   Shared building blocks
   ----------------------------------------------------------------------- */

.mt-panel {
	margin: 0 0 var(--mt-space-6);
	padding: var(--mt-space-5) var(--mt-space-4);
	border: 1px solid var(--mt-border-subtle);
	border-radius: var(--mt-radius-xl);
	background: var(--mt-bg-surface);
	box-shadow: var(--mt-shadow-xs);
}

.mt-panel__title {
	margin: 0 0 var(--mt-space-4);
	color: var(--mt-text-heading);
	font-size: var(--mt-fs-xl);
	font-weight: var(--mt-fw-bold);
}

.mt-panel__title:not(:first-child) {
	margin-top: var(--mt-space-6);
	padding-top: var(--mt-space-6);
	border-top: 1px solid var(--mt-border-subtle);
}

.mt-panel .mt-section-head {
	margin-bottom: var(--mt-space-4);
}

.mt-section-head__link {
	flex-shrink: 0;
	color: var(--mt-color-primary-strong);
	font-weight: var(--mt-fw-bold);
}

@media (min-width: 768px) {
	.mt-panel {
		padding: var(--mt-space-6);
	}
}

/* --------------------------------------------------------------------------
   Layout: sidebar + content (≥1024), stacked below
   ----------------------------------------------------------------------- */

.woocommerce-account .mt-page-head--compact {
	margin-bottom: var(--mt-space-4);
}

.mt-account {
	display: grid;
	gap: var(--mt-space-4);
	margin-bottom: var(--mt-space-12);
}

.mt-account__content {
	min-width: 0;
}

/* Woo's own floats/widths off */
.woocommerce-account .woocommerce-MyAccount-navigation,
.woocommerce-account .woocommerce-MyAccount-content {
	float: none;
	width: auto;
}

@media (min-width: 1024px) {
	.mt-account {
		grid-template-columns: var(--mt-account-sidebar-w) minmax(0, 1fr);
		gap: var(--mt-space-6);
		align-items: start;
	}
}

.mt-account-head {
	margin-bottom: var(--mt-space-5);
}

.mt-account-head__title {
	margin: 0;
	font-size: var(--mt-fs-3xl);
	font-weight: var(--mt-fw-extrabold);
	line-height: var(--mt-lh-tight);
}

.mt-account-head__desc {
	margin: var(--mt-space-2) 0 0;
	color: var(--mt-text-secondary);
	font-size: var(--mt-fs-md);
}

.mt-account-head__back {
	margin-bottom: var(--mt-space-2);
	padding-left: 0;
}

.mt-account-head__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--mt-space-3);
	margin: var(--mt-space-3) 0 0;
	color: var(--mt-text-secondary);
}

/* --------------------------------------------------------------------------
   Sidebar: user card + menu (collapsible <details> below 1024)
   ----------------------------------------------------------------------- */

.mt-account-nav {
	border: 1px solid var(--mt-border-subtle);
	border-radius: var(--mt-radius-xl);
	background: var(--mt-bg-surface);
	box-shadow: var(--mt-shadow-xs);
	overflow: hidden;
}

.mt-account-nav__user {
	display: flex;
	align-items: center;
	gap: var(--mt-space-4);
	padding: var(--mt-space-4);
	background: var(--mt-bg-subtle);
}

.mt-account-nav__avatar {
	display: grid;
	flex: 0 0 56px;
	place-items: center;
	width: 56px;
	height: 56px;
	border-radius: var(--mt-radius-round);
	background: var(--mt-color-primary-tint);
	color: var(--mt-color-primary-strong);
}

.mt-account-nav__who {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.mt-account-nav__hello {
	color: var(--mt-text-body);
	font-size: var(--mt-fs-base);
}

.mt-account-nav__name {
	color: var(--mt-text-heading);
	font-size: var(--mt-fs-lg);
	font-weight: var(--mt-fw-extrabold);
	overflow-wrap: anywhere;
}

.mt-account-nav__email {
	color: var(--mt-text-secondary);
	font-size: var(--mt-fs-sm);
	overflow-wrap: anywhere;
}

.mt-account-nav__toggle {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--mt-space-3);
	min-height: var(--mt-touch-min);
	padding: var(--mt-space-3) var(--mt-space-4);
	border-top: 1px solid var(--mt-border-subtle);
	color: var(--mt-text-heading);
	font-size: var(--mt-fs-md);
	cursor: pointer;
	list-style: none;
}

.mt-account-nav__toggle::-webkit-details-marker {
	display: none;
}

.mt-account-nav__toggle .mt-icon {
	transition: transform var(--mt-dur-fast) var(--mt-ease-standard);
}

.mt-account-nav__menu[open] .mt-account-nav__toggle .mt-icon {
	transform: rotate(180deg);
}

.mt-account-nav__toggle:focus-visible {
	outline: none;
	box-shadow: inset var(--mt-focus-ring);
}

.mt-account-nav__list {
	display: grid;
	gap: 2px;
	margin: 0;
	padding: var(--mt-space-2) var(--mt-space-3) var(--mt-space-3);
	list-style: none;
}

.mt-account-nav__list a {
	display: flex;
	align-items: center;
	gap: var(--mt-space-3);
	min-height: 48px;
	padding: 0 var(--mt-space-4);
	border-radius: var(--mt-radius-md);
	color: var(--mt-text-heading);
	font-size: var(--mt-fs-md);
	font-weight: var(--mt-fw-medium);
	text-decoration: none;
	transition: background-color var(--mt-dur-fast) var(--mt-ease-standard), color var(--mt-dur-fast) var(--mt-ease-standard);
}

.mt-account-nav__list a .mt-icon {
	flex-shrink: 0;
	color: var(--mt-text-secondary);
}

.mt-account-nav__list a:hover {
	background: var(--mt-bg-subtle);
	color: var(--mt-color-primary-strong);
}

.mt-account-nav__list a:focus-visible {
	outline: none;
	box-shadow: var(--mt-focus-ring);
}

.mt-account-nav__list a[aria-current="page"] {
	background: var(--mt-color-primary);
	color: var(--mt-color-on-primary);
	font-weight: var(--mt-fw-bold);
}

.mt-account-nav__list a[aria-current="page"] .mt-icon {
	color: currentColor;
}

.mt-account-nav__logout {
	margin-top: var(--mt-space-2);
	padding-top: var(--mt-space-2);
	border-top: 1px solid var(--mt-border-subtle);
}

.mt-account-nav__logout a:hover {
	color: var(--mt-danger);
}

@media (min-width: 1024px) {
	.mt-account-nav {
		position: sticky;
		top: calc(var(--mt-header-h-compact, 72px) + var(--mt-space-4));
	}

	.mt-account-nav__user {
		flex-direction: row;
		padding: var(--mt-space-6) var(--mt-space-5);
	}

	.mt-account-nav__avatar {
		flex-basis: 76px;
		width: 76px;
		height: 76px;
	}

	/* Desktop: menu always visible, summary hidden (JS keeps [open]). */
	.mt-account-nav__toggle {
		display: none;
	}

	.mt-account-nav__list {
		padding: var(--mt-space-4) var(--mt-space-3);
	}
}

/* --------------------------------------------------------------------------
   Dashboard: welcome banner + stat cards
   ----------------------------------------------------------------------- */

.mt-welcome {
	position: relative;
	display: flex;
	align-items: center;
	min-height: 132px;
	margin-bottom: var(--mt-space-4);
	padding: var(--mt-space-5) var(--mt-space-4);
	border: 1px solid var(--mt-border-subtle);
	border-radius: var(--mt-radius-xl);
	background: linear-gradient(100deg, var(--mt-bg-subtle) 0%, var(--mt-bg-subtle) 45%, var(--mt-bg-soft-green) 100%);
	overflow: hidden;
}

.mt-welcome__text {
	position: relative;
	z-index: 1;
	max-width: 520px;
}

.mt-welcome__title {
	margin: 0 0 var(--mt-space-2);
	font-size: var(--mt-fs-3xl);
	font-weight: var(--mt-fw-extrabold);
	line-height: var(--mt-lh-tight);
}

.mt-welcome__desc {
	margin: 0;
	color: var(--mt-text-body);
	font-size: var(--mt-fs-md);
	line-height: var(--mt-lh-relaxed);
}

.mt-welcome__img {
	display: none;
}

@media (min-width: 768px) {
	.mt-welcome {
		min-height: 140px;
		padding: var(--mt-space-6) var(--mt-space-8);
	}

	.mt-welcome__text {
		max-width: 58%;
	}

	.mt-welcome__img {
		position: absolute;
		right: 0;
		bottom: 0;
		display: block;
		width: auto;
		height: 100%;
		max-width: 48%;
		object-fit: contain;
		object-position: right bottom;
	}
}

.mt-stats {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: var(--mt-space-3);
	margin: 0 0 var(--mt-space-4);
	padding: 0;
	list-style: none;
}

.mt-stat-card {
	display: flex;
	align-items: center;
	gap: var(--mt-space-3);
	height: 100%;
	padding: var(--mt-space-4);
	border: 1px solid var(--mt-border-subtle);
	border-radius: var(--mt-radius-lg);
	background: var(--mt-bg-surface);
	color: inherit;
	text-decoration: none;
	transition: border-color var(--mt-dur-fast) var(--mt-ease-standard), box-shadow var(--mt-dur-fast) var(--mt-ease-standard);
}

.mt-stat-card:hover {
	border-color: var(--mt-color-primary);
	box-shadow: var(--mt-shadow-sm);
}

.mt-stat-card:focus-visible {
	outline: none;
	box-shadow: var(--mt-focus-ring);
}

.mt-stat-card__icon {
	display: grid;
	flex: 0 0 48px;
	place-items: center;
	width: 48px;
	height: 48px;
	border-radius: var(--mt-radius-round);
	background: var(--mt-color-primary-soft);
	color: var(--mt-color-primary);
}

.mt-stat-card__body {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.mt-stat-card__num {
	color: var(--mt-text-heading);
	font-family: var(--mt-font-heading);
	font-size: var(--mt-fs-2xl);
	font-weight: var(--mt-fw-extrabold);
	line-height: 1.1;
}

.mt-stat-card__label {
	color: var(--mt-text-secondary);
	font-size: var(--mt-fs-base);
}

@media (min-width: 1366px) {
	.mt-stats {
		grid-template-columns: repeat(4, minmax(0, 1fr));
		gap: var(--mt-space-4);
	}

	.mt-stat-card {
		padding: var(--mt-space-5);
	}

	.mt-stat-card__icon {
		flex-basis: 56px;
		width: 56px;
		height: 56px;
	}
}

/* --------------------------------------------------------------------------
   Orders table — table ≥768, stacked cards below
   ----------------------------------------------------------------------- */

.mt-orders {
	width: 100%;
	margin: 0;
	border-collapse: collapse;
	font-size: var(--mt-fs-base);
}

.mt-orders thead {
	display: none;
}

.mt-orders tbody,
.mt-orders tr,
.mt-orders th,
.mt-orders td {
	display: block;
}

.mt-orders tr.mt-orders__row {
	display: grid;
	grid-template-columns: 1fr auto;
	gap: var(--mt-space-2) var(--mt-space-3);
	padding: var(--mt-space-4) 0;
	border-bottom: 1px solid var(--mt-border-subtle);
}

.mt-orders__row:first-child {
	padding-top: 0;
}

.mt-orders__row:last-child {
	padding-bottom: 0;
	border-bottom: 0;
}

.mt-orders__no {
	color: var(--mt-text-heading);
	font-size: var(--mt-fs-md);
	font-weight: var(--mt-fw-extrabold);
	text-align: left;
}

.mt-orders__date {
	grid-column: 1;
	color: var(--mt-text-secondary);
}

.mt-orders__status {
	grid-column: 2;
	grid-row: 1 / span 2;
	align-self: start;
	justify-self: end;
}

.mt-orders__items {
	grid-column: 1 / -1;
}

.mt-orders__total {
	grid-column: 1;
	align-self: center;
	color: var(--mt-text-heading);
	font-weight: var(--mt-fw-extrabold);
}

.mt-orders__action {
	grid-column: 2;
	justify-self: end;
}

@media (min-width: 768px) {
	.mt-orders thead {
		display: table-header-group;
	}

	.mt-orders tbody {
		display: table-row-group;
	}

	.mt-orders tr,
	.mt-orders tr.mt-orders__row {
		display: table-row;
	}

	.mt-orders th,
	.mt-orders td {
		display: table-cell;
		padding: var(--mt-space-3) var(--mt-space-3);
		border-bottom: 1px solid var(--mt-border-subtle);
		vertical-align: middle;
		text-align: left;
	}

	.mt-orders thead th {
		background: var(--mt-bg-subtle);
		color: var(--mt-text-heading);
		font-size: var(--mt-fs-sm);
		font-weight: var(--mt-fw-semibold);
		white-space: nowrap;
	}

	.mt-orders thead th:first-child {
		border-radius: var(--mt-radius-md) 0 0 var(--mt-radius-md);
	}

	.mt-orders thead th:last-child {
		border-radius: 0 var(--mt-radius-md) var(--mt-radius-md) 0;
	}

	.mt-orders tbody tr:last-child > * {
		border-bottom: 0;
	}

	.mt-orders__row {
		padding: 0;
	}

	.mt-orders__date,
	.mt-orders__total {
		white-space: nowrap;
	}

	.mt-orders__action {
		text-align: right;
	}

	.mt-orders__action .mt-btn {
		white-space: nowrap;
	}
}

/* 768–1365: the content column is narrow — drop the products column
   (item count stays visible on the detail page) and tighten cells. */
@media (min-width: 768px) and (max-width: 1365.98px) {
	.mt-orders thead th:nth-child(3),
	.mt-orders .mt-orders__items {
		display: none;
	}

	.mt-orders th,
	.mt-orders td {
		padding-inline: var(--mt-space-2);
	}
}

/* Safety net: never push the page sideways. */
.mt-recent-orders,
.mt-account__content > .mt-panel {
	overflow-x: auto;
}

.mt-order-thumbs {
	display: flex;
	align-items: center;
	gap: var(--mt-space-2);
}

.mt-order-thumbs__img {
	display: block;
	flex: 0 0 44px;
	width: 44px;
	height: 44px;
	border: 1px solid var(--mt-border-subtle);
	border-radius: var(--mt-radius-sm);
	background: var(--mt-bg-surface);
	overflow: hidden;
}

.mt-order-thumbs__img img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.mt-order-thumbs__count {
	color: var(--mt-text-secondary);
	white-space: nowrap;
}

.mt-account-pager {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: var(--mt-space-3);
}

.mt-account-pager__info {
	color: var(--mt-text-secondary);
}

/* --------------------------------------------------------------------------
   Dashboard bottom grid: addresses + quick actions
   ----------------------------------------------------------------------- */

.mt-account-grid {
	display: grid;
	gap: 0 var(--mt-space-4);
}

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

.mt-addr-list {
	display: grid;
	gap: var(--mt-space-3);
}

@media (min-width: 768px) {
	.mt-addr-list {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

.mt-addr-card {
	display: flex;
	flex-direction: column;
	gap: var(--mt-space-3);
	padding: var(--mt-space-4);
	border: 1px solid var(--mt-border-subtle);
	border-radius: var(--mt-radius-lg);
	background: var(--mt-bg-surface);
}

.mt-addr-list--page .mt-addr-card {
	margin: 0;
	padding: var(--mt-space-5);
}

.mt-addr-card__head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: var(--mt-space-2);
}

.mt-addr-card__title {
	display: flex;
	align-items: center;
	gap: var(--mt-space-2);
	margin: 0;
	font-size: var(--mt-fs-lg);
	font-weight: var(--mt-fw-bold);
}

.mt-addr-card__title .mt-icon {
	color: var(--mt-color-primary);
}

.mt-addr-card .mt-badge--soft {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	height: 28px;
	padding: 0 var(--mt-space-3);
	border-radius: var(--mt-radius-pill);
	font-weight: var(--mt-fw-semibold);
}

.mt-addr-card__edit {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-height: var(--mt-touch-min);
	color: var(--mt-text-heading);
	font-weight: var(--mt-fw-semibold);
	text-decoration: none;
}

.mt-addr-card__edit:hover {
	color: var(--mt-color-primary-strong);
}

.mt-addr-card__text {
	margin: 0;
	color: var(--mt-text-body);
	font-style: normal;
	line-height: var(--mt-lh-relaxed);
	overflow-wrap: anywhere;
}

.mt-addr-card__empty {
	margin: 0;
	color: var(--mt-text-muted);
}

.mt-quick {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: var(--mt-space-3);
	margin: 0;
	padding: 0;
	list-style: none;
}

@media (min-width: 768px) {
	.mt-quick {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
}

@media (min-width: 1366px) {
	.mt-quick {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (min-width: 1600px) {
	.mt-quick {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
}

.mt-quick-action {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: var(--mt-space-3);
	height: 100%;
	min-height: 112px;
	padding: var(--mt-space-4) var(--mt-space-2);
	border: 1px solid var(--mt-border-subtle);
	border-radius: var(--mt-radius-lg);
	color: var(--mt-text-heading);
	font-size: var(--mt-fs-base);
	font-weight: var(--mt-fw-semibold);
	line-height: var(--mt-lh-snug);
	text-align: center;
	text-decoration: none;
	transition: border-color var(--mt-dur-fast) var(--mt-ease-standard), box-shadow var(--mt-dur-fast) var(--mt-ease-standard);
}

.mt-quick-action .mt-icon {
	color: var(--mt-color-primary);
}

.mt-quick-action:hover {
	border-color: var(--mt-color-primary);
	box-shadow: var(--mt-shadow-sm);
}

.mt-quick-action:focus-visible {
	outline: none;
	box-shadow: var(--mt-focus-ring);
}

/* --------------------------------------------------------------------------
   Order detail
   ----------------------------------------------------------------------- */

.mt-order__items {
	width: 100%;
	margin: 0 0 var(--mt-space-4);
	border-collapse: collapse;
	font-size: var(--mt-fs-base);
}

.mt-order__items thead {
	display: none;
}

.mt-order__items tr,
.mt-order__items td {
	display: block;
}

.mt-order__item {
	display: grid !important;
	grid-template-columns: repeat(3, auto);
	justify-content: space-between;
	gap: var(--mt-space-2) var(--mt-space-3);
	padding: var(--mt-space-4) 0;
	border-bottom: 1px solid var(--mt-border-subtle);
}

.mt-order__product {
	display: flex !important;
	grid-column: 1 / -1;
	gap: var(--mt-space-3);
	align-items: flex-start;
}

.mt-order__items td.mt-order__num::before {
	content: attr(data-title) ": ";
	color: var(--mt-text-secondary);
	font-weight: var(--mt-fw-regular);
}

.mt-order__thumb {
	display: block;
	flex: 0 0 64px;
	width: 64px;
	height: 64px;
	border: 1px solid var(--mt-border-subtle);
	border-radius: var(--mt-radius-md);
	overflow: hidden;
}

.mt-order__thumb img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.mt-order__name {
	min-width: 0;
	color: var(--mt-text-heading);
	font-weight: var(--mt-fw-semibold);
	overflow-wrap: anywhere;
}

.mt-order__name a {
	color: inherit;
	text-decoration: none;
}

.mt-order__name a:hover {
	color: var(--mt-color-primary-strong);
	text-decoration: underline;
}

.mt-order__meta,
.mt-order__name .wc-item-meta {
	margin: var(--mt-space-1) 0 0;
	padding: 0;
	color: var(--mt-text-secondary);
	font-size: var(--mt-fs-sm);
	font-weight: var(--mt-fw-regular);
	list-style: none;
}

.mt-order__meta p,
.mt-order__meta strong {
	display: inline;
	margin: 0;
	font-weight: var(--mt-fw-medium);
}

.mt-order__line-total {
	font-weight: var(--mt-fw-bold);
}

@media (min-width: 768px) {
	.mt-order__items thead {
		display: table-header-group;
	}

	.mt-order__items tr {
		display: table-row !important;
	}

	.mt-order__items th,
	.mt-order__items td {
		display: table-cell !important;
		padding: var(--mt-space-3);
		border-bottom: 1px solid var(--mt-border-subtle);
		vertical-align: middle;
		text-align: left;
	}

	.mt-order__items thead th {
		background: var(--mt-bg-subtle);
		font-size: var(--mt-fs-sm);
		font-weight: var(--mt-fw-semibold);
	}

	.mt-order__items .mt-order__num {
		text-align: right;
		white-space: nowrap;
	}

	.mt-order__items td.mt-order__num::before {
		content: none;
	}

	.mt-order__product {
		display: table-cell !important;
	}

	.mt-order__product .mt-order__thumb {
		float: left;
		margin-right: var(--mt-space-3);
	}
}

.mt-order__totals {
	display: grid;
	gap: var(--mt-space-2);
	max-width: 420px;
	margin: 0 0 0 auto;
}

.mt-order__total {
	display: flex;
	justify-content: space-between;
	gap: var(--mt-space-4);
}

.mt-order__total dt {
	color: var(--mt-text-secondary);
}

.mt-order__total dd {
	margin: 0;
	color: var(--mt-text-heading);
	font-weight: var(--mt-fw-semibold);
	text-align: right;
}

.mt-order__total--order_total {
	margin-top: var(--mt-space-2);
	padding-top: var(--mt-space-3);
	border-top: 1px solid var(--mt-border-subtle);
	font-size: var(--mt-fs-lg);
}

.mt-order__total--order_total dt,
.mt-order__total--order_total dd {
	color: var(--mt-text-heading);
	font-weight: var(--mt-fw-extrabold);
}

.mt-order__total small,
.mt-order__total .includes_tax {
	display: block;
	color: var(--mt-text-muted);
	font-size: var(--mt-fs-xs);
	font-weight: var(--mt-fw-regular);
}

.mt-order__actions {
	display: flex;
	flex-wrap: wrap;
	gap: var(--mt-space-2);
	margin: var(--mt-space-5) 0 0;
}

.mt-order-addresses {
	display: grid;
	gap: 0 var(--mt-space-4);
}

@media (min-width: 768px) {
	.mt-order-addresses {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

.mt-order-addresses address {
	display: flex;
	flex-direction: column;
	gap: var(--mt-space-1);
	color: var(--mt-text-body);
	font-style: normal;
	line-height: var(--mt-lh-relaxed);
	overflow-wrap: anywhere;
}

.mt-order-addresses__line {
	display: inline-flex;
	align-items: center;
	gap: var(--mt-space-2);
	margin-top: var(--mt-space-2);
	color: var(--mt-text-secondary);
}

.mt-order-notes__list {
	display: grid;
	gap: var(--mt-space-3);
	margin: 0;
	padding: 0;
	list-style: none;
}

.mt-order-notes__list li {
	padding-left: var(--mt-space-4);
	border-left: 3px solid var(--mt-color-primary-tint);
}

.mt-order-notes__list time {
	color: var(--mt-text-secondary);
	font-size: var(--mt-fs-sm);
}

.mt-order-notes__list p {
	margin: var(--mt-space-1) 0 0;
}

/* --------------------------------------------------------------------------
   Account forms (details, password, addresses)
   ----------------------------------------------------------------------- */

.mt-account-form {
	max-width: 880px;
}

.mt-account-form--narrow {
	max-width: 560px;
}

.mt-form-grid {
	display: grid;
	gap: 0 var(--mt-space-4);
}

@media (min-width: 768px) {
	.mt-form-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

.mt-account-form__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--mt-space-3) var(--mt-space-5);
	margin-top: var(--mt-space-6);
}

@media (max-width: 767.98px) {
	.mt-account-form__actions .mt-btn--primary {
		width: 100%;
	}
}

.mt-account-form .mt-notice {
	margin-bottom: var(--mt-space-4);
}

/* WooCommerce address fields (woocommerce_form_field markup) */
.mt-form-grid--wc .form-row {
	grid-column: 1 / -1;
	margin: 0 0 var(--mt-space-5);
	padding: 0;
}

@media (min-width: 768px) {
	.mt-form-grid--wc .form-row-first {
		grid-column: 1;
	}

	.mt-form-grid--wc .form-row-last {
		grid-column: 2;
	}
}

.mt-form-grid--wc label {
	display: block;
	margin-bottom: var(--mt-space-2);
	color: var(--mt-text-heading);
	font-size: var(--mt-fs-base);
	font-weight: var(--mt-fw-bold);
	line-height: 1.4;
}

.mt-form-grid--wc .required {
	color: var(--mt-danger);
	text-decoration: none;
}

.mt-form-grid--wc .optional {
	color: var(--mt-text-muted);
	font-size: var(--mt-fs-sm);
	font-weight: var(--mt-fw-regular);
}

.mt-form-grid--wc .woocommerce-input-wrapper {
	display: block;
}

.mt-form-grid--wc input.input-text,
.mt-form-grid--wc select,
.mt-form-grid--wc textarea,
.mt-form-grid--wc .select2-container .select2-selection--single {
	width: 100%;
	min-height: var(--mt-input-h);
	padding: 0 var(--mt-space-4);
	border: 1px solid var(--mt-border-default);
	border-radius: var(--mt-radius-md);
	background: var(--mt-bg-surface);
	color: var(--mt-text-body);
	font-size: 1rem;
}

.mt-form-grid--wc input.input-text:focus,
.mt-form-grid--wc select:focus {
	outline: none;
	border-color: var(--mt-border-focus);
	box-shadow: var(--mt-focus-ring);
}

.mt-form-grid--wc .select2-container .select2-selection--single .select2-selection__rendered {
	padding-left: 0;
	line-height: calc(var(--mt-input-h) - 2px);
}

.mt-form-grid--wc .select2-container .select2-selection--single .select2-selection__arrow {
	top: 50%;
	right: var(--mt-space-3);
	transform: translateY(-50%);
}

.mt-form-grid--wc .woocommerce-invalid input.input-text,
.mt-form-grid--wc .woocommerce-invalid select {
	border-color: var(--mt-danger);
}

.mt-form-grid--wc .checkout-inline-error-message {
	margin: var(--mt-space-2) 0 0;
	color: var(--mt-danger);
	font-size: var(--mt-fs-sm);
}

/* --------------------------------------------------------------------------
   Password field: reveal toggle + strength meter
   ----------------------------------------------------------------------- */

.mt-field--password .mt-input {
	padding-right: calc(var(--mt-touch-min) + var(--mt-space-2));
}

.mt-field__reveal {
	position: absolute;
	top: 50%;
	right: 2px;
	display: grid;
	place-items: center;
	width: var(--mt-touch-min);
	height: var(--mt-touch-min);
	padding: 0;
	border: 0;
	border-radius: var(--mt-radius-md);
	background: transparent;
	color: var(--mt-text-secondary);
	transform: translateY(-50%);
	cursor: pointer;
}

.mt-field__control {
	position: relative;
	display: block;
}

.mt-field__control .mt-field__icon {
	top: 50%;
}

.mt-field__reveal:hover {
	color: var(--mt-text-heading);
}

.mt-field__reveal:focus-visible {
	outline: none;
	box-shadow: var(--mt-focus-ring);
}

.mt-field__reveal .mt-reveal-hide,
.mt-field__reveal[aria-pressed="true"] .mt-reveal-show {
	display: none;
}

.mt-field__reveal[aria-pressed="true"] .mt-reveal-hide {
	display: block;
}

.mt-strength {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 4px;
	margin-top: var(--mt-space-2);
}

.mt-strength span {
	height: 4px;
	border-radius: 2px;
	background: var(--mt-border-default);
	transition: background-color var(--mt-dur-fast) var(--mt-ease-standard);
}

.mt-strength[data-score="1"] span:nth-child(-n+1) { background: var(--mt-danger); }
.mt-strength[data-score="2"] span:nth-child(-n+2) { background: var(--mt-warning); }
.mt-strength[data-score="3"] span:nth-child(-n+3) { background: var(--mt-color-primary); }
.mt-strength[data-score="4"] span { background: var(--mt-color-primary-strong); }

.mt-strength[data-score] + .mt-field__hint {
	font-weight: var(--mt-fw-medium);
}

.mt-strength[data-score="1"] + .mt-field__hint { color: var(--mt-danger); }
.mt-strength[data-score="2"] + .mt-field__hint { color: var(--mt-warning); }
.mt-strength[data-score="3"] + .mt-field__hint,
.mt-strength[data-score="4"] + .mt-field__hint { color: var(--mt-color-primary-strong); }

.mt-email-confirm[hidden] {
	display: none;
}

/* --------------------------------------------------------------------------
   Login / register (reference 05)
   ----------------------------------------------------------------------- */

.mt-auth {
	max-width: var(--mt-container-auth);
	margin: var(--mt-space-4) auto var(--mt-space-12);
}

.mt-auth__card {
	display: grid;
	border: 1px solid var(--mt-border-subtle);
	border-radius: var(--mt-radius-2xl);
	background: var(--mt-bg-surface);
	box-shadow: var(--mt-shadow-md);
	overflow: hidden;
}

/* Brand panel */
.mt-auth__brand {
	position: relative;
	padding: var(--mt-space-6) var(--mt-space-5);
	background:
		radial-gradient(120% 80% at 80% 70%, rgba(53, 154, 7, 0.32) 0%, rgba(53, 154, 7, 0) 60%),
		linear-gradient(160deg, var(--mt-ink-850) 0%, var(--mt-ink-950) 100%);
	color: var(--mt-text-on-dark);
	overflow: hidden;
}

.mt-auth__bar {
	display: block;
	width: 44px;
	height: 6px;
	margin-bottom: var(--mt-space-4);
	border-radius: 3px;
	background: var(--mt-color-primary);
}

.mt-auth__headline {
	margin: 0 0 var(--mt-space-3);
	color: var(--mt-white);
	font-family: var(--mt-font-heading);
	font-size: var(--mt-fs-3xl);
	font-weight: var(--mt-fw-extrabold);
	line-height: var(--mt-lh-tight);
}

.mt-auth__headline span {
	display: block;
	color: var(--mt-color-accent-on-dark);
}

.mt-auth__lead {
	margin: 0 0 var(--mt-space-4);
	color: var(--mt-text-on-dark-muted);
	font-size: var(--mt-fs-md);
	line-height: var(--mt-lh-relaxed);
}

.mt-auth__benefits {
	display: grid;
	gap: var(--mt-space-2);
	margin: 0;
	padding: 0;
	list-style: none;
}

.mt-auth__benefits li {
	display: flex;
	align-items: center;
	gap: var(--mt-space-3);
	color: var(--mt-white);
	font-size: var(--mt-fs-md);
}

.mt-auth__benefits li::before {
	content: "";
	flex: 0 0 22px;
	height: 22px;
	border-radius: var(--mt-radius-round);
	background: var(--mt-color-primary) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 13px no-repeat;
}

.mt-auth__img {
	display: none;
}

/* Forms column */
.mt-auth__forms {
	padding: var(--mt-space-5) var(--mt-space-4) var(--mt-space-6);
}

.mt-auth__tabs {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 4px;
	margin-bottom: var(--mt-space-6);
	padding: 4px;
	border-radius: var(--mt-radius-lg);
	background: var(--mt-bg-muted);
}

.mt-auth__tabs button {
	min-height: var(--mt-touch-min);
	border: 0;
	border-radius: var(--mt-radius-md);
	background: transparent;
	color: var(--mt-text-secondary);
	font-size: var(--mt-fs-md);
	font-weight: var(--mt-fw-bold);
	cursor: pointer;
}

.mt-auth__tabs button[aria-selected="true"] {
	background: var(--mt-bg-surface);
	color: var(--mt-text-heading);
	box-shadow: var(--mt-shadow-sm);
}

.mt-auth__tabs button:focus-visible {
	outline: none;
	box-shadow: var(--mt-focus-ring);
}

.mt-auth__title {
	margin-bottom: var(--mt-space-2);
	font-size: var(--mt-fs-3xl);
}

.mt-auth__title::before {
	height: 28px;
	flex-basis: 5px;
}

.mt-auth__desc {
	margin: 0 0 var(--mt-space-6);
	color: var(--mt-text-body);
	font-size: var(--mt-fs-md);
	line-height: var(--mt-lh-relaxed);
}

.mt-auth__pair {
	display: grid;
	gap: 0 var(--mt-space-3);
}

@media (min-width: 390px) {
	.mt-auth__pair {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

.mt-auth__pair .mt-field--icon .mt-input:not(#mt_first_name) {
	padding-left: var(--mt-space-4);
}

.mt-auth__row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: var(--mt-space-3);
	margin: calc(var(--mt-space-1) * -1) 0 var(--mt-space-5);
}

.mt-auth__row .mt-consent {
	align-items: center;
	min-height: var(--mt-touch-min);
}

.mt-auth__forgot {
	display: inline-flex;
	align-items: center;
	min-height: var(--mt-touch-min);
	color: var(--mt-color-primary-strong);
	font-weight: var(--mt-fw-bold);
	text-decoration: none;
}

.mt-auth__forgot:hover {
	text-decoration: underline;
}

.mt-auth__consents {
	margin: var(--mt-space-2) 0 var(--mt-space-6);
}

.mt-auth__consents .mt-consent {
	flex-wrap: wrap;
	font-size: var(--mt-fs-base);
}

.mt-auth__consents .mt-consent label {
	flex: 1 1 0;
	min-width: 0;
}

.mt-auth__consents .mt-field__error {
	flex-basis: 100%;
	margin-top: 0;
}

.mt-auth__kvkk {
	margin: var(--mt-space-3) 0 var(--mt-space-3) calc(20px + var(--mt-space-3));
	color: var(--mt-text-secondary);
	font-size: var(--mt-fs-sm);
	line-height: 1.5;
}

.mt-auth__kvkk a {
	color: var(--mt-color-primary-strong);
	text-decoration: underline;
}

.mt-auth__switch {
	margin: var(--mt-space-5) 0 0;
	color: var(--mt-text-secondary);
	text-align: center;
}

.mt-auth__switch a {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	min-height: var(--mt-touch-min);
	color: var(--mt-color-primary-strong);
	font-weight: var(--mt-fw-bold);
}

/* Tabs (JS) below 1024: one panel at a time. Without JS both panels stack.
   Keyed on html.js (set synchronously in <head>) + the server-rendered data-active, not on
   .is-ready (added by deferred JS): otherwise the tabs appear late and push the form down
   (CLS 0.32 on mobile in Lighthouse). */
@media (max-width: 1023.98px) {
	.js .mt-auth[data-active="login"] [data-mt-auth-panel="register"],
	.js .mt-auth[data-active="register"] [data-mt-auth-panel="login"] {
		display: none;
	}

	.no-js .mt-auth [data-mt-auth-panel="register"] {
		margin-top: var(--mt-space-8);
		padding-top: var(--mt-space-8);
		border-top: 1px solid var(--mt-border-subtle);
	}

	.js .mt-auth .mt-auth__switch {
		display: none;
	}
}

.no-js .mt-auth__tabs {
	display: none;
}

@media (min-width: 768px) {
	.mt-auth__brand {
		padding: var(--mt-space-8);
	}

	.mt-auth__benefits {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.mt-auth__forms {
		padding: var(--mt-space-8) var(--mt-space-10);
	}
}

@media (min-width: 1024px) {
	.mt-auth__tabs,
	.mt-auth__switch {
		display: none;
	}

	.mt-auth__forms {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: var(--mt-space-10);
		padding: var(--mt-space-10);
	}

	.mt-auth__card--login-only .mt-auth__forms {
		grid-template-columns: minmax(0, 1fr);
		max-width: 560px;
	}

	.mt-auth__panel + .mt-auth__panel {
		padding-left: var(--mt-space-10);
		border-left: 1px solid var(--mt-border-subtle);
	}
}

@media (min-width: 1366px) {
	.mt-auth__card {
		grid-template-columns: minmax(0, 0.78fr) minmax(0, 2fr);
	}

	.mt-auth__brand {
		display: flex;
		flex-direction: column;
		padding: var(--mt-space-12) var(--mt-space-10) 0;
	}

	.mt-auth__benefits {
		grid-template-columns: 1fr;
	}

	.mt-auth__img {
		display: block;
		width: calc(100% + var(--mt-space-10) * 2);
		max-width: none;
		height: auto;
		margin: auto calc(var(--mt-space-10) * -1) 0;
		padding-top: var(--mt-space-6);
	}

	.mt-auth__forms {
		padding: var(--mt-space-12) var(--mt-space-10);
	}
}

/* Single-card auth screens: lost / reset password, confirmation */
.mt-auth-single {
	display: flex;
	justify-content: center;
	margin: var(--mt-space-6) 0 var(--mt-space-12);
}

.mt-auth-single__card {
	width: 100%;
	max-width: 520px;
	padding: var(--mt-space-6) var(--mt-space-5);
	border: 1px solid var(--mt-border-subtle);
	border-radius: var(--mt-radius-2xl);
	background: var(--mt-bg-surface);
	box-shadow: var(--mt-shadow-md);
}

@media (min-width: 768px) {
	.mt-auth-single__card {
		padding: var(--mt-space-10);
	}
}

.mt-auth-single__icon {
	display: grid;
	place-items: center;
	width: 60px;
	height: 60px;
	margin-bottom: var(--mt-space-4);
	border-radius: var(--mt-radius-round);
	background: var(--mt-color-primary-soft);
	color: var(--mt-color-primary-strong);
}

.mt-auth-single__title {
	margin: 0 0 var(--mt-space-2);
	font-size: var(--mt-fs-3xl);
	font-weight: var(--mt-fw-extrabold);
}

.mt-auth-single__desc {
	margin: 0 0 var(--mt-space-6);
	color: var(--mt-text-body);
	line-height: var(--mt-lh-relaxed);
}

.mt-auth-single .mt-auth__switch {
	display: block;
}

/* Notices on auth / account pages */
.woocommerce-account .woocommerce-notices-wrapper:not(:empty) {
	max-width: var(--mt-container-auth);
	margin: var(--mt-space-4) auto 0;
}

.mt-account__content .woocommerce-notices-wrapper:not(:empty) {
	margin-top: 0;
}

/* --------------------------------------------------------------------------
   Favourites inside the account
   ----------------------------------------------------------------------- */

.mt-fav-list ul.mt-products,
.mt-fav-list .woocommerce ul.mt-products {
	margin-bottom: 0;
}

@media (min-width: 768px) {
	.mt-fav-list ul.mt-products,
	.mt-fav-list .woocommerce ul.mt-products {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

@media (min-width: 1600px) {
	.mt-fav-list ul.mt-products,
	.mt-fav-list .woocommerce ul.mt-products {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
}

.mt-fav-list li.is-removing {
	opacity: 0;
	transform: scale(0.96);
	transition: opacity var(--mt-dur-base) var(--mt-ease-standard), transform var(--mt-dur-base) var(--mt-ease-standard);
}

@media (prefers-reduced-motion: reduce) {
	.mt-fav-list li.is-removing,
	.mt-account-nav__toggle .mt-icon {
		transition: none;
	}
}

/* --------------------------------------------------------------------------
   Overrides of WooCommerce / base defaults on account screens
   ----------------------------------------------------------------------- */

.mt-field--icon .mt-field__control .mt-input {
	padding-left: var(--mt-space-12);
}

.mt-field--password .mt-field__control .mt-input {
	padding-right: calc(var(--mt-touch-min) + var(--mt-space-2));
}

.woocommerce .mt-auth form.login,
.woocommerce .mt-auth form.register,
.woocommerce .mt-auth-single form.lost_reset_password,
.woocommerce form.mt-account-form {
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
}

.woocommerce form.mt-account-form.mt-panel {
	margin-bottom: var(--mt-space-6);
	padding: var(--mt-space-5) var(--mt-space-4);
	border: 1px solid var(--mt-border-subtle);
	border-radius: var(--mt-radius-xl);
}

@media (min-width: 768px) {
	.woocommerce form.mt-account-form.mt-panel {
		padding: var(--mt-space-6);
	}
}

.woocommerce .mt-auth .mt-auth__img {
	max-width: none;
}

.woocommerce .mt-order-thumbs__img img,
.woocommerce .mt-order__thumb img {
	max-width: 100%;
}

/* WooCommerce (woocommerce.js) injects its own .show-password-input into every
   password field; our fields already have an accessible reveal button. */
.mt-field__control .show-password-input {
	display: none !important;
}

.woocommerce-account .mt-order-addresses address,
.woocommerce-account .mt-addr-card address {
	padding: 0;
	border: 0;
}

/* Address form: beat `.woocommerce form .form-row …` */
.woocommerce form.mt-address-form .form-row {
	float: none;
	width: auto;
	margin: 0 0 var(--mt-space-5);
	padding: 0;
}

.woocommerce form.mt-address-form .form-row input.input-text,
.woocommerce form.mt-address-form .form-row select,
.woocommerce form.mt-address-form .form-row textarea {
	box-sizing: border-box;
	width: 100%;
	min-height: var(--mt-input-h);
	padding: 0 var(--mt-space-4);
	border: 1px solid var(--mt-border-default);
	border-radius: var(--mt-radius-md);
	background-color: var(--mt-bg-surface);
	color: var(--mt-text-body);
	font-size: 1rem;
	line-height: normal;
}

.woocommerce form.mt-address-form .form-row input.input-text:hover,
.woocommerce form.mt-address-form .form-row select:hover {
	border-color: var(--mt-border-strong);
}

.woocommerce form.mt-address-form .form-row input.input-text:focus,
.woocommerce form.mt-address-form .form-row select:focus {
	outline: none;
	border-color: var(--mt-border-focus);
	box-shadow: var(--mt-focus-ring);
}

.woocommerce form.mt-address-form .form-row.woocommerce-invalid input.input-text,
.woocommerce form.mt-address-form .form-row.woocommerce-invalid select {
	border-color: var(--mt-danger);
}

.woocommerce form.mt-address-form .form-row label {
	line-height: 1.4;
}

.woocommerce form.mt-address-form .select2-container .select2-selection--single {
	height: var(--mt-input-h);
	border-color: var(--mt-border-default);
	border-radius: var(--mt-radius-md);
}

/* <picture> wrapper must not change the brand panel flex layout. */
.mt-auth__picture,
.mt-welcome__picture {
	display: contents;
}
