/**
 * Особистий кабінет.
 *
 * Геометрія з макета: сайдбар 300 px і липкий, картки з радіусом 22,
 * поля 52 px із радіусом 13, кнопки-пігулки. Кольори — наші токени.
 */

.am-acc {
	/* Кольори та ширина — з макета кабінету: акцент зелений, колонка 1280. */
	--am-acc-green: #0d7c37;
	--am-accent: #0d7c37;
	--am-accent-soft: #e7f4ec;
	--am-success: #0d7c37;

	max-width: 1280px;
	margin: 0 auto;
	padding: 0 var(--am-pad, 28px) 80px;
}

.am-acc .am-acc__more:hover,
.am-acc .am-acc__edit:hover {
	color: #0a5f2a;
}

.am-acc .am-acc__pill--work {
	background: #e7f4ec;
	color: #0a5f2a;
}

/* ---------- шапка сторінки ---------- */

.am-acc__crumbs {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 18px 0 10px;
	font-size: 13.5px;
	color: var(--am-muted, #8a8f8b);
}

.am-acc__crumbs a {
	color: var(--am-muted, #8a8f8b);
	text-decoration: none;
}

.am-acc__crumbs a:hover {
	color: var(--am-text, #0e1011);
}

.am-acc__here {
	color: var(--am-text, #0e1011);
}

.am-acc__title {
	margin: 0 0 26px;
	font-size: 44px;
	line-height: 1.05;
	letter-spacing: -0.035em;
	font-weight: 800;
}

/* ---------- сітка ---------- */

.am-acc__grid {
	display: flex;
	align-items: flex-start;
	gap: 24px;
	flex-wrap: wrap;
}

.am-acc__side {
	flex: 1 1 240px;
	max-width: 300px;
	position: sticky;
	top: 96px;
	background: var(--am-surface, #fff);
	border: 1px solid var(--am-border, #e4e6e4);
	border-radius: 22px;
	padding: 18px;
}

.am-acc__content {
	flex: 999 1 420px;
	min-width: 0;
}

/* ---------- картка користувача ---------- */

.am-acc__who {
	display: flex;
	align-items: center;
	gap: 13px;
	padding: 4px 6px 18px;
	border-bottom: 1px solid var(--am-divider, #edeeed);
}

.am-acc__avatar {
	flex: none;
	width: 46px;
	height: 46px;
	border-radius: 50%;
	background: var(--am-dark, #1c1d1f);
	color: #fff;
	display: grid;
	place-items: center;
	font-size: 15px;
	font-weight: 700;
	letter-spacing: 0.02em;
}

.am-acc__who-text {
	min-width: 0;
}

.am-acc__name {
	display: block;
	font-size: 15.5px;
	font-weight: 700;
	letter-spacing: -0.01em;
}

.am-acc__mail {
	display: block;
	font-size: 12.5px;
	color: var(--am-muted, #8a8f8b);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

/* ---------- меню ---------- */

.am-acc__menu {
	display: grid;
	gap: 2px;
	padding-top: 12px;
}

.am-acc .am-acc__link {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	padding: 13px 15px;
	border-radius: 13px;
	font-size: 15px;
	font-weight: 500;
	color: var(--am-text-2, #43474d);
	text-decoration: none;
	transition: background-color 0.18s ease, color 0.18s ease;
}

.am-acc .am-acc__link:hover {
	background: var(--am-surface-3, #f1f2f1);
	color: var(--am-text, #0e1011);
}

.am-acc .am-acc__link.is-active {
	background: var(--am-dark, #1c1d1f);
	color: #fff;
	font-weight: 700;
}

.am-acc .am-acc__link.is-active:hover {
	background: var(--am-dark, #1c1d1f);
	color: #fff;
}

.am-acc__badge {
	font-size: 12px;
	font-weight: 700;
	color: var(--am-muted, #8a8f8b);
}

.am-acc__link.is-active .am-acc__badge {
	color: rgba(255, 255, 255, 0.75);
}

/* ---------- картки вмісту ---------- */

.am-acc__card {
	background: var(--am-surface, #fff);
	border: 1px solid var(--am-border, #e4e6e4);
	border-radius: 22px;
	padding: 28px;
	margin-bottom: 18px;
}

.am-acc__card:last-child {
	margin-bottom: 0;
}

.am-acc__h2 {
	margin: 0 0 8px;
	font-size: 26px;
	letter-spacing: -0.03em;
	font-weight: 800;
	line-height: 1.15;
}

.am-acc__h3 {
	margin: 0 0 6px;
	font-size: 19px;
	font-weight: 800;
	letter-spacing: -0.02em;
}

.am-acc__lead {
	margin: 0 0 4px;
	font-size: 15.5px;
	line-height: 1.55;
	color: var(--am-text-3, #6e736f);
	max-width: 58ch;
}

.am-acc__pane-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	flex-wrap: wrap;
	margin-bottom: 16px;
}

.am-acc__pane-head .am-acc__h2 {
	margin: 0;
}

.am-acc__sub {
	font-size: 14.5px;
	color: var(--am-muted, #8a8f8b);
}

.am-acc__card-head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 16px;
	flex-wrap: wrap;
	margin-bottom: 18px;
}

.am-acc__more {
	font-size: 14.5px;
	font-weight: 700;
	color: var(--am-accent, #0071e3);
	text-decoration: none;
}

/* ---------- лічильники ---------- */

.am-acc__stats {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
	gap: 14px;
	margin-top: 24px;
}

.am-acc__stat {
	background: var(--am-surface-2, #f7f8f7);
	border-radius: 16px;
	padding: 18px;
}

.am-acc__num {
	display: block;
	font-size: 34px;
	font-weight: 800;
	letter-spacing: -0.04em;
	line-height: 1;
}

.am-acc__cap {
	display: block;
	margin-top: 6px;
	font-size: 13.5px;
	color: var(--am-text-3, #6e736f);
}

/* ---------- замовлення ---------- */

.am-acc__order-top {
	display: flex;
	align-items: center;
	gap: 18px;
	flex-wrap: wrap;
}

.am-acc__order-img {
	width: 84px;
	height: 84px;
	flex: 0 0 auto;
	border-radius: 14px;
	background: var(--am-surface-2, #f7f8f7);
	object-fit: contain;
	padding: 6px;
	mix-blend-mode: multiply;
}

.am-acc__order-img--empty {
	display: block;
	background: repeating-linear-gradient(135deg, #eff1ef 0 9px, #f7f8f7 9px 18px);
}

.am-acc__order-main {
	flex: 1 1 200px;
	min-width: 0;
}

.am-acc__order-id {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
	font-size: 16.5px;
	font-weight: 700;
}

.am-acc__order-num {
	letter-spacing: -0.02em;
}

.am-acc__order-sub {
	margin-top: 6px;
	font-size: 14.5px;
	color: var(--am-text-3, #6e736f);
}

.am-acc__order-sum {
	text-align: right;
	margin-left: auto;
}

.am-acc__order-total {
	display: block;
	font-size: 20px;
	font-weight: 800;
	letter-spacing: -0.02em;
}

.am-acc__order-date {
	display: block;
	font-size: 13px;
	font-weight: 400;
	color: var(--am-muted, #8a8f8b);
}

/* мітки статусів */

.am-acc__pill {
	font-size: 12px;
	font-weight: 700;
	padding: 5px 11px;
	border-radius: 999px;
	white-space: nowrap;
}

.am-acc__pill--wait {
	background: #fdf3e3;
	color: #8a5a12;
}

.am-acc__pill--work {
	background: var(--am-accent-soft, #e7eefc);
	color: var(--am-accent, #0071e3);
}

.am-acc__pill--done {
	background: #e7f4ec;
	color: #0a5f2a;
}

.am-acc__pill--off {
	background: var(--am-surface-3, #f1f2f1);
	color: var(--am-muted, #8a8f8b);
}

.am-acc__pill--dark {
	background: var(--am-dark, #1c1d1f);
	color: #fff;
}

/* прогрес */

.am-acc__steps {
	display: flex;
	align-items: center;
	gap: 6px;
	margin-top: 22px;
}

.am-acc__step {
	flex: 1;
	height: 5px;
	border-radius: 999px;
	background: var(--am-border, #e4e6e4);
}

.am-acc__step.is-done {
	background: var(--am-success, #0d7c37);
}

.am-acc__step-labels {
	display: flex;
	justify-content: space-between;
	gap: 8px;
	margin-top: 9px;
	font-size: 12.5px;
	color: var(--am-muted, #8a8f8b);
}

/* список замовлень */

.am-acc__orders {
	display: grid;
	gap: 14px;
}

.am-acc__order {
	padding: 22px 24px;
	margin-bottom: 0;
}

.am-acc__order-line {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	flex-wrap: wrap;
}

.am-acc__order-items {
	display: flex;
	gap: 14px;
	flex-wrap: wrap;
	margin-top: 18px;
}

.am-acc__chip {
	display: flex;
	align-items: center;
	gap: 12px;
	background: var(--am-surface-2, #f7f8f7);
	border-radius: 14px;
	padding: 10px 16px 10px 10px;
}

.am-acc__chip img,
.am-acc__chip-img {
	width: 46px;
	height: 46px;
	border-radius: 10px;
	object-fit: contain;
	background: #fff;
	mix-blend-mode: multiply;
}

.am-acc__chip-name {
	display: block;
	font-size: 14.5px;
	font-weight: 600;
}

.am-acc__chip-meta {
	display: block;
	font-size: 12.5px;
	color: var(--am-muted, #8a8f8b);
}

.am-acc__order-foot {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
	margin-top: 18px;
	padding-top: 16px;
	border-top: 1px solid var(--am-divider, #edeeed);
}

.am-acc__order-ship {
	flex: 1 1 auto;
	font-size: 13.5px;
	color: var(--am-text-3, #6e736f);
}

/* фільтри */

.am-acc__filters {
	display: flex;
	gap: 8px;
	background: var(--am-surface-3, #edeeed);
	padding: 4px;
	border-radius: 999px;
}

.am-acc .am-acc__filter {
	font-size: 13.5px;
	font-weight: 700;
	padding: 9px 16px;
	border-radius: 999px;
	color: var(--am-text-3, #6e736f);
	text-decoration: none;
	transition: background-color 0.18s ease, color 0.18s ease;
}

.am-acc .am-acc__filter.is-active {
	background: var(--am-dark, #1c1d1f);
	color: #fff;
}

/* ---------- швидкі плитки ---------- */

.am-acc__tiles {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 16px;
	margin-top: 18px;
}

.am-acc .am-acc__tile {
	display: block;
	background: var(--am-surface, #fff);
	border: 1px solid var(--am-border, #e4e6e4);
	border-radius: 20px;
	padding: 22px;
	text-decoration: none;
	color: var(--am-text, #0e1011);
	transition: border-color 0.18s ease, transform 0.18s ease;
}

.am-acc .am-acc__tile:hover {
	border-color: var(--am-dark, #1c1d1f);
	transform: translateY(-2px);
}

.am-acc__tile-t {
	display: block;
	font-size: 17px;
	font-weight: 800;
	letter-spacing: -0.02em;
}

.am-acc__tile-s {
	display: block;
	margin-top: 6px;
	font-size: 14px;
	color: var(--am-text-3, #6e736f);
}

/* ---------- адреси ---------- */

.am-acc__addr-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
	gap: 16px;
}

.am-acc__addr {
	margin-bottom: 0;
	padding: 22px;
}

.am-acc__addr-head {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
	margin-bottom: 12px;
}

.am-acc__addr-t {
	font-size: 16.5px;
	font-weight: 800;
	letter-spacing: -0.02em;
}

.am-acc__addr-body {
	font-size: 14.5px;
	line-height: 1.6;
	color: var(--am-text-2, #4a4f4b);
	font-style: normal;
}

.am-acc__addr-phone {
	font-size: 14.5px;
	line-height: 1.6;
	color: var(--am-muted, #8a8f8b);
}

.am-acc__addr-none {
	margin: 0;
	font-size: 14.5px;
	line-height: 1.55;
	color: var(--am-text-3, #6e736f);
}

.am-acc__addr-foot {
	display: flex;
	gap: 16px;
	margin-top: 16px;
	padding-top: 14px;
	border-top: 1px solid var(--am-divider, #edeeed);
}

.am-acc .am-acc__edit {
	font-size: 14px;
	font-weight: 700;
	color: var(--am-accent, #0071e3);
	text-decoration: none;
}

/* ---------- форми ---------- */

.am-acc__fields {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
	gap: 16px;
}

.am-acc__field {
	margin: 0;
}

.am-acc__field label {
	display: block;
	font-size: 11px;
	letter-spacing: 0.09em;
	text-transform: uppercase;
	font-weight: 700;
	color: var(--am-muted, #8a8f8b);
	margin-bottom: 8px;
}

.am-acc input.am-acc__input {
	width: 100%;
	height: 52px;
	padding: 0 16px;
	font: inherit;
	font-size: 15px;
	color: var(--am-text, #0e1011);
	background: #fff;
	border: 1px solid var(--am-border-ctl, #dde0dd);
	border-radius: 13px;
	outline: none;
	transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.am-acc input.am-acc__input:focus {
	border-color: var(--am-dark, #1c1d1f);
	box-shadow: 0 0 0 4px rgba(28, 29, 31, 0.07);
}

.am-acc__save {
	margin-top: 20px;
}

/* ---------- сповіщення ---------- */

.am-acc__notes {
	display: grid;
	gap: 14px;
	margin-top: 16px;
}

.am-acc__note {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	cursor: pointer;
}

.am-acc__note input {
	position: absolute;
	opacity: 0;
	width: 0;
	height: 0;
}

.am-acc__note-t {
	display: block;
	font-size: 15px;
	font-weight: 600;
}

.am-acc__note-s {
	display: block;
	margin-top: 2px;
	font-size: 13px;
	color: var(--am-muted, #8a8f8b);
}

.am-acc__switch {
	flex: 0 0 auto;
	width: 48px;
	height: 28px;
	border-radius: 999px;
	background: var(--am-border, #e4e6e4);
	padding: 3px;
	transition: background-color 0.2s ease;
}

.am-acc__switch::after {
	content: "";
	display: block;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	background: #fff;
	transition: transform 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

.am-acc__note input:checked ~ .am-acc__switch {
	background: var(--am-success, #0d7c37);
}

.am-acc__note input:checked ~ .am-acc__switch::after {
	transform: translateX(20px);
}

/* ---------- кнопки ---------- */

.am-acc .am-acc__btn {
	display: inline-grid;
	place-items: center;
	border: 0;
	background: var(--am-dark, #1c1d1f);
	color: #fff;
	font: inherit;
	font-size: 15px;
	font-weight: 700;
	padding: 15px 26px;
	border-radius: 999px;
	text-decoration: none;
	text-transform: none;
	cursor: pointer;
	transition: opacity 0.2s ease;
}

.am-acc .am-acc__btn:hover {
	opacity: 0.88;
	color: #fff;
}

.am-acc .am-acc__btn--ghost {
	background: #fff;
	border: 1px solid var(--am-border-ctl, #dde0dd);
	color: var(--am-text, #0e1011);
	padding: 11px 18px;
	font-size: 14px;
}

.am-acc .am-acc__btn--ghost:hover {
	background: var(--am-surface-2, #f7f8f7);
	color: var(--am-text, #0e1011);
	opacity: 1;
}

/* ---------- порожній стан і вихід ---------- */

.am-acc__empty {
	text-align: center;
	padding: 44px 28px;
}

.am-acc__empty h3 {
	margin: 0 0 8px;
	font-size: 20px;
	font-weight: 800;
	letter-spacing: -0.02em;
}

.am-acc__empty p {
	margin: 0 auto 22px;
	max-width: 46ch;
	font-size: 14.5px;
	line-height: 1.55;
	color: var(--am-text-3, #6e736f);
}

.am-acc__logout {
	text-align: center;
	padding: 40px;
}

.am-acc__logout .am-acc__lead {
	margin: 0 auto 26px;
	max-width: 42ch;
}

.am-acc__logout-row {
	display: flex;
	gap: 12px;
	justify-content: center;
	flex-wrap: wrap;
}

/* повідомлення WooCommerce */

.am-acc .woocommerce-message,
.am-acc .woocommerce-error,
.am-acc .woocommerce-info {
	border-radius: 16px;
	border: 1px solid var(--am-border, #e4e6e4);
	background: var(--am-surface, #fff);
	padding: 15px 20px;
	margin: 0 0 16px;
	font-size: 14.5px;
	list-style: none;
}

.am-acc .woocommerce-error {
	border-color: #f0c8c0;
	background: #fdf0ee;
	color: #a5321f;
}

/* ---------- мобільні ---------- */

@media (max-width: 900px) {
	.am-acc__title {
		font-size: 32px;
		margin-bottom: 20px;
	}

	.am-acc__side {
		position: static;
		max-width: none;
		flex-basis: 100%;
	}

	.am-acc__card {
		padding: 22px 18px;
		border-radius: 18px;
	}

	.am-acc__h2 {
		font-size: 23px;
	}

	.am-acc__order-sum {
		margin-left: 0;
		text-align: left;
	}

	.am-acc__pane-head {
		align-items: flex-start;
	}
}

/* поля, які малює сама WooCommerce (форма адреси) */

.am-acc__field--wc .form-row {
	margin: 0;
	padding: 0;
	width: 100%;
}

.am-acc__field--wc label {
	display: block;
	font-size: 11px;
	letter-spacing: 0.09em;
	text-transform: uppercase;
	font-weight: 700;
	color: var(--am-muted, #8a8f8b);
	margin-bottom: 8px;
}

.am-acc__field--wc .required {
	color: var(--am-muted, #8a8f8b);
	text-decoration: none;
}

.am-acc__field--wc input.input-text,
.am-acc__field--wc .select2-container .select2-selection--single,
.am-acc__field--wc select {
	width: 100%;
	height: 52px;
	padding: 0 16px;
	font: inherit;
	font-size: 15px;
	color: var(--am-text, #0e1011);
	background: #fff;
	border: 1px solid var(--am-border-ctl, #dde0dd);
	border-radius: 13px;
	outline: none;
	transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.am-acc__field--wc input.input-text:focus,
.am-acc__field--wc select:focus {
	border-color: var(--am-dark, #1c1d1f);
	box-shadow: 0 0 0 4px rgba(28, 29, 31, 0.07);
}

.am-acc__field--wc .select2-container .select2-selection--single {
	display: flex;
	align-items: center;
}

.am-acc__field--wc .select2-selection__arrow {
	top: 50%;
	transform: translateY(-50%);
}

.am-acc__addr-form .am-acc__fields {
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

/* ---------- деталі замовлення ---------- */

.am-vo__items {
	border-top: 1px solid var(--am-divider, #f2f2ef);
}

.am-vo__item {
	display: grid;
	grid-template-columns: 56px minmax(0, 1fr) auto;
	align-items: center;
	gap: 14px;
	padding: 13px 0;
	border-bottom: 1px solid var(--am-divider, #f2f2ef);
}

.am-vo__thumb {
	width: 56px;
	height: 56px;
	display: grid;
	place-items: center;
	border-radius: 12px;
	background: var(--am-surface-3, #f4f4f1);
	overflow: hidden;
}

.am-vo__thumb img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	mix-blend-mode: multiply;
}

.am-vo__name {
	font-size: 14px;
	font-weight: 600;
	line-height: 1.35;
	color: var(--am-text, #111214);
}

.am-vo__name a {
	color: inherit;
	text-decoration: none;
}

.am-vo__name a:hover {
	text-decoration: underline;
	text-underline-offset: 3px;
}

.am-vo__name em {
	display: block;
	margin-top: 3px;
	font-size: 12.5px;
	font-style: normal;
	font-weight: 500;
	color: var(--am-muted, #8b9098);
}

.am-vo__sum {
	font-size: 14.5px;
	font-weight: 800;
	color: var(--am-text, #111214);
	white-space: nowrap;
}

.am-vo__totals {
	margin-top: 14px;
}

.am-vo__row {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 14px;
	padding: 5px 0;
	font-size: 13.5px;
	color: var(--am-text-3, #6b6f76);
}

.am-vo__row b {
	font-weight: 700;
	color: var(--am-text, #111214);
}

.am-vo__row--total {
	margin-top: 8px;
	padding-top: 12px;
	border-top: 1px solid var(--am-border, #ececea);
	font-size: 15px;
	color: var(--am-text, #111214);
}

.am-vo__row--total b {
	font-size: 20px;
	font-weight: 800;
	letter-spacing: -0.02em;
}

.am-vo__cols {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
}

.am-vo__cols .am-acc__card {
	margin: 0;
}

.am-vo__lines {
	display: grid;
	gap: 2px;
}

.am-vo__line {
	display: flex;
	justify-content: space-between;
	gap: 16px;
	padding: 6px 0;
	font-size: 13.5px;
	color: var(--am-text-3, #6b6f76);
}

.am-vo__line b {
	max-width: 62%;
	font-weight: 700;
	color: var(--am-text, #111214);
	text-align: right;
	word-break: break-word;
}

.am-vo__pay {
	margin-top: 16px;
}

.am-vo__help {
	margin: 18px 0 0;
	font-size: 13px;
	color: var(--am-muted, #8b9098);
}

.am-vo__help a {
	font-weight: 700;
	color: var(--am-text, #111214);
	text-decoration: none;
}

@media (max-width: 720px) {
	.am-vo__cols {
		grid-template-columns: 1fr;
	}

	.am-vo__item {
		grid-template-columns: 48px minmax(0, 1fr) auto;
		gap: 10px;
	}

	.am-vo__thumb {
		width: 48px;
		height: 48px;
	}
}
