/*
 * Hesabım: giriş, kayıt ve şifre ekranları (.maxend-auth) ile hesap paneli (.maxend-account).
 * Yalnız hesap sayfasında yüklenir. Seçiciler WooCommerce'inkilerle aynı ya da bir adım özgül; !important yok.
 * Düzen şablonlarda (woocommerce/myaccount/*) Tailwind sınıflarıyla, burada WooCommerce çıktısı.
 */

/* ---------- Giriş, kayıt, şifre ---------- */

.maxend-auth-card {
	padding: 1.75rem;
	border: 1px solid rgb(231 229 228 / 0.8);
	border-radius: 2rem;
	background: #fff;
	box-shadow: 0 24px 48px -32px rgb(46 28 14 / 0.25);
}

.woocommerce-account .maxend-auth-title {
	margin: 0.75rem 0 1.5rem;
	color: var(--color-ink);
	font-family: var(--font-display);
	font-size: 1.9rem;
	font-weight: 500;
	line-height: 1.15;
	letter-spacing: -0.01em;
}

.maxend-auth-lead {
	margin: -0.5rem 0 1.5rem;
	color: var(--color-stone-500);
	font-size: 15px;
	line-height: 1.6;
}

.maxend-auth-note {
	margin: 0 0 1.25rem;
	color: var(--color-stone-500);
	font-size: 14px;
}

.woocommerce .maxend-auth form.login,
.woocommerce .maxend-auth form.register,
.woocommerce .maxend-auth form.lost_reset_password {
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: none;
	box-shadow: none;
}

.woocommerce .maxend-auth form .form-row {
	margin: 0 0 1.1rem;
	padding: 0;
}

.maxend-auth-row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	margin: 0.25rem 0 1.5rem;
}

/* Same selector as WooCommerce's display: inline-block for the remember-me label. */
.woocommerce .woocommerce-form-login .woocommerce-form-login__rememberme,
.maxend-auth-row label {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	color: var(--color-ink);
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
}

.maxend-auth-row input[type="checkbox"],
.woocommerce-account input[type="checkbox"] {
	width: 1.1rem;
	height: 1.1rem;
	margin: 0;
	accent-color: var(--color-brand-600);
}

.woocommerce .maxend-auth-row .lost_password {
	margin: 0;
	font-size: 14px;
}

.woocommerce .maxend-auth .maxend-auth-submit {
	width: 100%;
	padding: 1.05rem 1.5rem;
}

.maxend-auth .woocommerce-privacy-policy-text p {
	margin: 0 0 1.25rem;
	color: var(--color-stone-500);
	font-size: 13px;
	line-height: 1.6;
}

.maxend-auth .woocommerce-privacy-policy-text a {
	color: var(--color-brand-700);
	font-weight: 700;
}

.maxend-auth-back {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	margin-top: 1.5rem;
	color: var(--color-brand-700);
	font-size: 14px;
	font-weight: 700;
	transition: color 0.2s;
}

.maxend-auth-back::before {
	content: "←";
}

.maxend-auth-back:hover {
	color: var(--color-ink);
}

.maxend-auth-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 3rem;
	height: 3rem;
	border-radius: 9999px;
	background: var(--color-brand-50);
	color: var(--color-brand-600);
}

/* Notices sit in the form column; the column's gap spaces them. */
.maxend-auth .woocommerce-notices-wrapper:empty {
	display: none;
}

.maxend-auth .woocommerce-error,
.maxend-auth .woocommerce-message,
.maxend-auth .woocommerce-info {
	margin: 0;
}

.maxend-auth .woocommerce-notices-wrapper > * + * {
	margin-top: 0.75rem;
}

@media (min-width: 768px) {
	.maxend-auth-card {
		padding: 2.5rem;
	}

	.woocommerce-account .maxend-auth-title {
		font-size: 2.25rem;
	}
}

/* ---------- Ortak: butonlar, başlıklar ---------- */

.woocommerce-account .woocommerce a.button,
.woocommerce-account .woocommerce button.button {
	border-radius: 9999px;
}

.woocommerce-account h2 {
	margin-bottom: 1rem;
	color: var(--color-ink);
	font-family: var(--font-display);
	font-size: 1.5rem;
	font-weight: 500;
	line-height: 1.25;
}

/* ---------- Hesap paneli: düzen ve menü ---------- */

/* WooCommerce floats the menu (30%) and content (68%); the template lays them out with grid. */
.woocommerce-account .woocommerce-MyAccount-navigation,
.woocommerce-account .woocommerce-MyAccount-content {
	float: none;
	width: auto;
}

/* Mobile: a row of pills that scrolls sideways to the screen edges. */
.woocommerce-account .woocommerce-MyAccount-navigation ul {
	display: flex;
	gap: 0.5rem;
	margin: 0 -1rem;
	padding: 0 1rem 0.25rem;
	overflow-x: auto;
	list-style: none;
}

.woocommerce-account .woocommerce-MyAccount-navigation ul li {
	flex: none;
	margin: 0;
}

.woocommerce-account .woocommerce-MyAccount-navigation ul li a {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	padding: 0.7rem 1.1rem;
	border: 1px solid var(--color-stone-200);
	border-radius: 9999px;
	background: #fff;
	color: var(--color-stone-600);
	font-size: 14px;
	font-weight: 700;
	white-space: nowrap;
	transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}

.woocommerce-account .woocommerce-MyAccount-navigation .maxend-account-icon {
	color: var(--color-stone-500);
	transition: color 0.2s;
}

.woocommerce-account .woocommerce-MyAccount-navigation ul li a:hover {
	border-color: var(--color-brand-300);
	color: var(--color-brand-700);
}

.woocommerce-account .woocommerce-MyAccount-navigation ul li a:hover .maxend-account-icon {
	color: var(--color-brand-500);
}

.woocommerce-account .woocommerce-MyAccount-navigation ul li.is-active a {
	border-color: var(--color-ink);
	background: var(--color-ink);
	color: #fff;
}

.woocommerce-account .woocommerce-MyAccount-navigation ul li.is-active .maxend-account-icon {
	color: var(--color-brand-300);
}

/* The page header already has a log out button on small screens. */
.woocommerce-account .woocommerce-MyAccount-navigation ul li.woocommerce-MyAccount-navigation-link--customer-logout {
	display: none;
}

@media (min-width: 1024px) {
	.woocommerce-account .woocommerce-MyAccount-navigation ul {
		flex-direction: column;
		gap: 0.25rem;
		margin: 0;
		padding: 0.75rem;
		overflow: visible;
		border: 1px solid rgb(231 229 228 / 0.8);
		border-radius: 1.5rem;
		background: #fff;
	}

	.woocommerce-account .woocommerce-MyAccount-navigation ul li a {
		padding: 0.85rem 1rem;
		border: 0;
		border-radius: 0.9rem;
		background: none;
	}

	.woocommerce-account .woocommerce-MyAccount-navigation ul li a:hover {
		background: var(--color-brand-50);
	}

	.woocommerce-account .woocommerce-MyAccount-navigation ul li.is-active a {
		background: var(--color-ink);
	}

	.woocommerce-account .woocommerce-MyAccount-navigation ul li.woocommerce-MyAccount-navigation-link--customer-logout {
		display: block;
		margin-top: 0.5rem;
		padding-top: 0.5rem;
		border-top: 1px solid var(--color-stone-100);
	}
}

/* ---------- İçerik ---------- */

.woocommerce-account .woocommerce-MyAccount-content {
	color: var(--color-stone-700);
	line-height: 1.7;
}

.woocommerce-account .woocommerce-MyAccount-content > p {
	margin-bottom: 1.25rem;
}

.woocommerce-account .woocommerce-MyAccount-content :where(p, td, th, address, li) > a:not(.button) {
	color: var(--color-brand-700);
	font-weight: 700;
}

.woocommerce-account .woocommerce-MyAccount-content mark {
	padding: 0.1rem 0.5rem;
	border-radius: 0.4rem;
	background: var(--color-brand-50);
	color: var(--color-brand-800);
	font-weight: 700;
}

/* Edit account / edit address forms sit on a card. */
.woocommerce-account .woocommerce-MyAccount-content > form {
	padding: 1.5rem;
	border: 1px solid rgb(231 229 228 / 0.8);
	border-radius: 1.5rem;
	background: #fff;
}

.woocommerce-account .woocommerce-EditAccountForm fieldset {
	margin: 1.75rem 0 1rem;
	padding: 0;
	border: 0;
}

.woocommerce-account .woocommerce-EditAccountForm legend {
	width: 100%;
	margin-bottom: 1rem;
	padding: 1.5rem 0 0;
	border-top: 1px solid var(--color-stone-100);
	color: var(--color-ink);
	font-family: var(--font-display);
	font-size: 1.25rem;
	font-weight: 500;
}

.woocommerce-account #account_display_name_description {
	display: block;
	margin-top: 0.4rem;
	color: var(--color-stone-500);
	font-size: 13px;
	line-height: 1.5;
}

/* Country and province pickers (select2) match the text inputs. */
.woocommerce-account .select2-container--default .select2-selection--single {
	height: auto;
	padding: 0.85rem 2.5rem 0.85rem 1rem;
	border: var(--wc-form-border-width) solid var(--wc-form-border-color);
	border-radius: var(--wc-form-border-radius);
	background-color: var(--color-stone-50);
}

.woocommerce-account .select2-container--default .select2-selection--single .select2-selection__rendered {
	padding: 0;
	color: var(--color-ink);
	font-weight: 600;
	line-height: 1.5;
}

.woocommerce-account .select2-container--default .select2-selection--single .select2-selection__arrow {
	top: 50%;
	right: 0.75rem;
	height: 1.5rem;
	transform: translateY(-50%);
}

.woocommerce-account .select2-container--default.select2-container--focus .select2-selection--single,
.woocommerce-account .select2-container--default.select2-container--open .select2-selection--single {
	border-color: var(--color-brand-500);
	background-color: #fff;
}

@media (min-width: 768px) {
	.woocommerce-account .woocommerce-MyAccount-content > form {
		padding: 2.25rem;
	}
}

/* ---------- Siparişler ve sipariş detayı ---------- */

.woocommerce-account table.shop_table {
	margin: 0 0 1.5rem;
	overflow: hidden;
	border: 1px solid rgb(231 229 228 / 0.8);
	border-collapse: separate;
	border-spacing: 0;
	border-radius: 1.5rem;
	background: #fff;
}

.woocommerce-account table.shop_table thead th {
	border-top: 0;
	background: var(--color-stone-50);
	color: var(--color-stone-500);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.05em;
	text-transform: uppercase;
}

.woocommerce-account table.shop_table td,
.woocommerce-account table.shop_table th,
.woocommerce-account table.shop_table tbody th {
	padding: 1rem 1.25rem;
	border-top: 1px solid var(--color-stone-100);
	border-color: var(--color-stone-100);
	vertical-align: middle;
}

.woocommerce-account .woocommerce-orders-table__cell-order-number a {
	color: var(--color-ink);
	font-weight: 700;
}

.woocommerce-account .woocommerce-orders-table__cell-order-status {
	color: var(--color-stone-600);
	font-weight: 700;
	white-space: nowrap;
}

.woocommerce-account .woocommerce-orders-table__cell-order-status::after {
	content: "";
	display: inline-block;
	width: 0.5rem;
	height: 0.5rem;
	margin-left: 0.5rem;
	border-radius: 9999px;
	background: var(--color-stone-400);
}

.woocommerce-account .woocommerce-orders-table__row--status-completed .woocommerce-orders-table__cell-order-status { color: #047857; }
.woocommerce-account .woocommerce-orders-table__row--status-completed .woocommerce-orders-table__cell-order-status::after { background: #10b981; }
.woocommerce-account .woocommerce-orders-table__row--status-processing .woocommerce-orders-table__cell-order-status { color: var(--color-brand-700); }
.woocommerce-account .woocommerce-orders-table__row--status-processing .woocommerce-orders-table__cell-order-status::after { background: var(--color-brand-500); }
.woocommerce-account .woocommerce-orders-table__row--status-on-hold .woocommerce-orders-table__cell-order-status,
.woocommerce-account .woocommerce-orders-table__row--status-pending .woocommerce-orders-table__cell-order-status { color: #b45309; }
.woocommerce-account .woocommerce-orders-table__row--status-on-hold .woocommerce-orders-table__cell-order-status::after,
.woocommerce-account .woocommerce-orders-table__row--status-pending .woocommerce-orders-table__cell-order-status::after { background: #f59e0b; }
.woocommerce-account .woocommerce-orders-table__row--status-cancelled .woocommerce-orders-table__cell-order-status,
.woocommerce-account .woocommerce-orders-table__row--status-failed .woocommerce-orders-table__cell-order-status { color: #b91c1c; }
.woocommerce-account .woocommerce-orders-table__row--status-cancelled .woocommerce-orders-table__cell-order-status::after,
.woocommerce-account .woocommerce-orders-table__row--status-failed .woocommerce-orders-table__cell-order-status::after { background: #ef4444; }

.woocommerce-account .woocommerce-orders-table__cell-order-actions .button {
	margin: 0.15rem;
	padding: 0.6rem 1.1rem;
	font-size: 12px;
}

.woocommerce-account .woocommerce-Pagination {
	display: flex;
	justify-content: space-between;
	gap: 1rem;
}

/* WooCommerce small screen: each order is a stacked card instead of a striped row. */
@media (max-width: 768px) {
	.woocommerce-account table.shop_table_responsive tbody tr {
		display: block;
		padding: 0.5rem 0;
		border-bottom: 1px solid var(--color-stone-100);
	}

	.woocommerce-account table.shop_table_responsive tbody tr:last-child {
		border-bottom: 0;
	}

	.woocommerce-account table.shop_table_responsive tbody tr:nth-child(2n) td,
	.woocommerce-account table.shop_table_responsive tbody tr:nth-child(2n) th {
		background: none;
	}

	.woocommerce-account table.shop_table_responsive tbody td,
	.woocommerce-account table.shop_table_responsive tbody th {
		padding: 0.45rem 1.25rem;
		border: 0;
	}

	.woocommerce-account .woocommerce-orders-table__cell-order-actions .button {
		margin: 0.25rem 0 0;
	}

	/* WooCommerce hides the order number cell on small screens; it is the card title here. */
	.woocommerce-account table.shop_table_responsive tbody th.woocommerce-orders-table__cell-order-number {
		display: block;
		padding-top: 0.75rem;
		font-size: 16px;
	}

	.woocommerce-account table.shop_table_responsive tbody td::before {
		color: var(--color-stone-500);
		font-weight: 700;
	}
}

/* ---------- Adresler ---------- */

.woocommerce-account .woocommerce-Addresses {
	display: grid;
	gap: 1.25rem;
}

.woocommerce-account .woocommerce-Addresses::before,
.woocommerce-account .woocommerce-Addresses::after {
	display: none;
}

.woocommerce-account .woocommerce-Addresses .woocommerce-Address,
.woocommerce-account .woocommerce-MyAccount-content > .woocommerce-Address {
	float: none;
	width: auto;
	max-width: none;
	padding: 1.5rem;
	border: 1px solid rgb(231 229 228 / 0.8);
	border-radius: 1.5rem;
	background: #fff;
}

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

/* WooCommerce clears floats with .addresses .title::before/::after; in flex they become items and push the heading off the left edge. */
.woocommerce-account .woocommerce-Addresses .woocommerce-Address-title::before,
.woocommerce-account .woocommerce-Addresses .woocommerce-Address-title::after {
	display: none;
}

.woocommerce-account .woocommerce-Address-title h2 {
	float: none;
	margin: 0;
	font-size: 1.25rem;
}

.woocommerce-account .woocommerce-Address-title .edit {
	float: none;
	padding: 0.4rem 0.9rem;
	border-radius: 9999px;
	background: var(--color-brand-50);
	color: var(--color-brand-700);
	font-size: 12px;
	font-weight: 700;
	transition: background-color 0.2s, color 0.2s;
}

.woocommerce-account .woocommerce-Address-title .edit:hover {
	background: var(--color-ink);
	color: #fff;
}

/* Order detail: billing / shipping address on a card. */
.woocommerce-account .woocommerce-customer-details address {
	padding: 1.5rem;
	border: 1px solid rgb(231 229 228 / 0.8);
	border-radius: 1.5rem;
	background: #fff;
	color: var(--color-stone-600);
	font-style: normal;
}

.woocommerce-account .woocommerce-Address address {
	color: var(--color-stone-600);
	font-style: normal;
	line-height: 1.7;
}

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