/* ==========================================================
   «Мои заказы»: вход по коду, список заказов, карточка заказа
   ========================================================== */

.woocommerce-account .woocommerce,
.woocommerce-account:not(.logged-in) .woocommerce { display: block; max-width: 880px; }
.woocommerce-account:not(.logged-in) .woocommerce { max-width: 520px; }

.acc-link {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 0;
	border: 0;
	background: none;
	color: var(--ink);
	font: 600 15px/1.4 var(--font);
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
	cursor: pointer;
}
.acc-link:hover { color: var(--accent); }
.acc-link .icon { width: 18px; height: 18px; }
.acc-muted { color: var(--muted); }
.acc-label {
	margin: 0 0 12px;
	color: var(--muted);
	font-size: 13px;
	line-height: 18px;
	letter-spacing: .1em;
	text-transform: uppercase;
}

/* Вход */
.acc-login,
.acc-empty {
	display: grid;
	gap: 0;
	padding: clamp(24px, 4vw, 40px);
	border-radius: var(--radius);
	background: var(--surface);
	box-shadow: var(--shadow);
}
.acc-empty { justify-items: start; }
.acc-login-ico {
	display: grid;
	place-items: center;
	width: 56px;
	height: 56px;
	margin-bottom: 20px;
	border-radius: 50%;
	background: var(--sand);
	color: var(--accent-hover);
}
.acc-login-ico .icon { width: 26px; height: 26px; }
.acc-login-title { margin: 0 0 10px; font-size: clamp(30px, 4vw, 38px); text-transform: uppercase; }
.acc-lead { margin: 0 0 24px; color: var(--muted); font-size: 16px; line-height: 24px; }
.acc-lead strong { color: var(--ink); word-break: break-all; }
.acc-form { display: grid; gap: 16px; }
.acc-field { display: grid; gap: 8px; font-size: 14px; font-weight: 600; }
.acc-form .btn { justify-content: center; width: 100%; }
.acc-code {
	font-size: 28px !important;
	font-weight: 700;
	letter-spacing: .3em;
	text-align: center;
	min-height: 64px !important;
}
.acc-code::placeholder { color: var(--line-strong); }
.acc-msg {
	margin: 0 0 16px;
	padding: 12px 16px;
	border-radius: var(--radius-sm);
	background: var(--sand);
	font-size: 15px;
	line-height: 22px;
}
.acc-msg--error { background: #fceeec; color: var(--error); }
.acc-help {
	display: grid;
	justify-items: start;
	gap: 12px;
	margin-top: 24px;
	padding-top: 20px;
	border-top: 1px solid var(--line);
}
.acc-help p { margin: 0; color: var(--muted); font-size: 14px; line-height: 20px; }
.acc-help form { margin: 0; }
.acc-note { margin: 20px 0 0; color: var(--muted); font-size: 14px; line-height: 20px; }

/* Полоса «Вы вошли как» */
.acc-bar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 8px 24px;
	margin-bottom: 24px;
	color: var(--muted);
	font-size: 15px;
}
.acc-bar p { margin: 0; }
.acc-bar strong { color: var(--ink); word-break: break-all; }

/* Статус */
.acc-status {
	display: inline-flex;
	align-items: center;
	min-height: 28px;
	padding: 0 12px;
	border-radius: 999px;
	background: var(--sand);
	color: var(--accent-hover);
	font-size: 13px;
	font-weight: 600;
	white-space: nowrap;
}
.acc-status--ok { background: #e6f1ea; color: #2e6b3f; }
.acc-status--done { background: var(--ink); color: #fff; }
.acc-status--off { background: #efedea; color: var(--muted); }

/* Список заказов */
.acc-orders { display: grid; gap: 16px; margin: 0; padding: 0; list-style: none; }
.acc-order {
	padding: 24px;
	border-radius: var(--radius);
	background: var(--surface);
	box-shadow: 0 1px 2px rgb(28 26 23 / .06);
}
.acc-order-head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 4px 12px;
	color: var(--ink);
	text-decoration: none;
}
.acc-order-head:hover .acc-order-num { color: var(--accent); }
.acc-order-num { color: var(--ink); font-size: 20px; font-weight: 700; line-height: 28px; transition: color .2s; }
.acc-order-date { margin: 0; color: var(--muted); font-size: 15px; }
.acc-order-head .acc-status { margin-left: auto; }
.acc-order-body {
	display: flex;
	align-items: center;
	gap: 16px;
	margin-top: 16px;
	padding-top: 16px;
	border-top: 1px solid var(--line);
}
.acc-thumbs { display: flex; flex: none; }
.acc-thumbs img {
	width: 56px;
	height: 56px;
	border: 2px solid var(--surface);
	border-radius: var(--radius-sm);
	object-fit: cover;
	background: var(--sand);
}
.acc-thumbs img + img { margin-left: -20px; }
.acc-order-items { flex: 1; min-width: 0; font-size: 15px; line-height: 22px; }
.acc-order-sum { flex: none; font-size: 18px; white-space: nowrap; }
.acc-order-track {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 12px 0 0;
	font-size: 15px;
}
.acc-order-track .icon { width: 20px; height: 20px; color: var(--accent-hover); }
.acc-order-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px 20px;
	margin-top: 20px;
}
.acc-order-actions .btn { min-height: 44px; padding: 0 22px; font-size: 15px; }
.acc-pages { display: flex; gap: 12px; margin-top: 24px; }

/* Карточка заказа */
.acc-back {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 16px;
	color: var(--muted);
	font-size: 15px;
	font-weight: 600;
	text-decoration: none;
}
.acc-back .icon { width: 18px; height: 18px; transform: rotate(180deg); }
.acc-view-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }

.acc-steps {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	margin: 24px 0 0;
	padding: 0;
	list-style: none;
}
.acc-steps li { position: relative; display: grid; justify-items: center; gap: 8px; color: var(--muted); font-size: 14px; font-weight: 600; text-align: center; }
.acc-steps li:not(:last-child)::after {
	content: "";
	position: absolute;
	top: 15px;
	left: calc(50% + 22px);
	right: calc(-50% + 22px);
	height: 2px;
	background: var(--line);
}
.acc-steps li.is-done:not(:last-child)::after { background: #2e6b3f; }
.acc-step-dot {
	display: grid;
	place-items: center;
	width: 32px;
	height: 32px;
	border: 2px solid var(--line-strong);
	border-radius: 50%;
	background: var(--surface);
	font-size: 14px;
	font-weight: 700;
}
.acc-step-dot .icon { width: 18px; height: 18px; stroke-width: 2.4; }
.acc-steps li.is-done { color: var(--ink); }
.acc-steps li.is-done .acc-step-dot { border-color: #2e6b3f; background: #2e6b3f; color: #fff; }
.acc-steps li.is-next { color: var(--ink); }
.acc-steps li.is-next .acc-step-dot { border-color: var(--accent); color: var(--accent); }


.acc-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.acc-side { display: grid; gap: 16px; }
.acc-card {
	padding: 24px;
	border-radius: var(--radius);
	background: var(--surface);
	box-shadow: 0 1px 2px rgb(28 26 23 / .06);
}
.acc-card p { margin: 0 0 6px; font-size: 15px; line-height: 22px; }
.acc-card p:last-child { margin-bottom: 0; }
.acc-card .btn { justify-content: center; margin-top: 16px; min-height: 46px; font-size: 15px; }
.acc-card .btn .icon { color: inherit; }
.acc-track strong { font-size: 20px; letter-spacing: .04em; }

.acc-items { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.acc-item { display: flex; align-items: center; gap: 16px; }
.acc-item-thumb img { width: 56px; height: 56px; border-radius: var(--radius-sm); object-fit: cover; background: var(--sand); }
.acc-item-info { flex: 1; display: grid; gap: 2px; min-width: 0; font-size: 15px; line-height: 22px; }
.acc-item-info a { font-weight: 600; text-decoration: none; }
.acc-item-info span { color: var(--muted); font-size: 14px; }
.acc-item-sum { white-space: nowrap; }

.acc-totals { display: grid; gap: 6px; margin: 20px 0 12px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 15px; }
.acc-totals div { display: flex; justify-content: space-between; gap: 16px; }
.acc-totals dt { color: var(--muted); }
.acc-totals dd { margin: 0; }
.acc-total { margin-top: 6px; font-size: 18px; font-weight: 700; }
.acc-total dt { color: var(--ink); }

.acc-notes { margin-top: 16px; }
.acc-notes ol { display: grid; gap: 16px; margin: 0; padding: 0; list-style: none; }
.acc-notes li > span { font-size: 13px; }
.acc-notes li p { margin: 4px 0 0; }

.acc-view-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; margin-top: 24px; }

/* Сводка над списком */
.acc-sum { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 24px; }
.acc-sum-tile {
	display: grid;
	gap: 2px;
	padding: 16px 20px;
	border-radius: var(--radius);
	background: var(--surface);
	box-shadow: 0 1px 2px rgb(28 26 23 / .06);
}
.acc-sum-tile strong { font-family: var(--font-display); font-size: 40px; line-height: 1; }
.acc-sum-tile span { color: var(--muted); font-size: 14px; line-height: 20px; }
.acc-sum-tile.is-ok strong { color: #2e6b3f; }
.acc-sum-tile.is-wait strong { color: var(--accent); }

/* Полоска статуса слева у карточки */
.acc-order { position: relative; overflow: hidden; }
.acc-order::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--line-strong); }
.acc-order--ok::before { background: #2e6b3f; }
.acc-order--wait::before { background: var(--accent); }
.acc-order--done::before { background: var(--ink); }

/* Подсказка «что дальше» */
.acc-hint {
	margin: 14px 0 0;
	padding: 10px 14px;
	border-radius: var(--radius-sm);
	background: var(--bg);
	color: var(--ink);
	font-size: 15px;
	line-height: 22px;
}
.acc-order--wait .acc-hint { background: #fbeee6; }
.acc-order--ok .acc-hint { background: #eef5f0; }

/* Короткая шкала в списке */
.acc-steps--mini { margin-top: 16px; }
.acc-steps--mini li { gap: 6px; font-size: 13px; font-weight: 500; }
.acc-steps--mini li:not(:last-child)::after { top: 9px; left: calc(50% + 14px); right: calc(-50% + 14px); }
.acc-steps--mini .acc-step-dot { width: 20px; height: 20px; border-width: 2px; font-size: 0; }
.acc-steps--mini .acc-step-dot .icon { width: 12px; height: 12px; stroke-width: 3; }

.acc-order-items .acc-muted { display: block; font-size: 14px; }
.acc-order-meta { display: grid; gap: 8px; margin: 16px 0 0; font-size: 15px; line-height: 22px; }
.acc-order-meta div { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 12px; }
.acc-order-meta dt { display: flex; align-items: center; gap: 8px; color: var(--muted); }
.acc-order-meta dt .icon { width: 18px; height: 18px; flex: none; color: var(--accent-hover); }
.acc-order-meta dd { margin: 0; }
.acc-order-actions .btn .icon { width: 18px; height: 18px; color: inherit; }

/* Статус заказа на его странице */
.acc-state {
	margin-bottom: 16px;
	padding: 24px;
	border-radius: var(--radius);
	background: var(--surface);
	box-shadow: 0 1px 2px rgb(28 26 23 / .06);
}
.acc-state .acc-status { min-height: 34px; padding: 0 16px; font-size: 15px; }
.acc-state-text { margin: 16px 0 0; font-size: 17px; line-height: 26px; }
.acc-state > .btn { margin-top: 24px; min-height: 48px; }
.acc-state > .btn .icon { width: 20px; height: 20px; color: inherit; }
.acc-view-actions .acc-muted { font-size: 14px; }

/* Есть вопрос? */
.acc-ask {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 16px 24px;
	margin-top: 32px;
	padding: 24px;
	border-radius: var(--radius);
	background: var(--dark);
	color: var(--dark-ink);
}
.acc-ask p { margin: 0; }
.acc-ask-title { font-size: 18px; font-weight: 700; line-height: 26px; }
.acc-ask .acc-muted { color: var(--dark-muted); font-size: 15px; line-height: 22px; }
.acc-ask-links { display: flex; flex-wrap: wrap; gap: 10px; }
.acc-ask .btn { min-height: 44px; padding: 0 18px; border-color: transparent; background: rgb(255 255 255 / .1); color: var(--dark-ink); font-size: 15px; }
.acc-ask .btn:hover { background: var(--accent); color: #fff; }
.acc-ask .btn .icon { width: 18px; height: 18px; color: inherit; }

@media (max-width: 760px) {
	.acc-sum { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
	.acc-sum-tile { padding: 14px 16px; }
	.acc-sum-tile strong { font-size: 34px; }
	.acc-order-meta div { grid-template-columns: 1fr; gap: 2px; }
	.acc-state { padding: 20px 16px; }
	.acc-state > .btn { width: 100%; justify-content: center; }
	.acc-ask { padding: 20px 16px; }
	.acc-ask-links { width: 100%; }
	.acc-ask .btn { flex: 1 1 auto; justify-content: center; }
	.acc-grid { grid-template-columns: 1fr; }
	.acc-order { padding: 20px 16px; }
	.acc-order-head .acc-status { margin-left: 0; }
	.acc-order-body { flex-wrap: wrap; }
	.acc-order-items { flex-basis: calc(100% - 140px); }
	.acc-order-sum { width: 100%; }
	.acc-steps li { font-size: 12px; }
	.acc-card { padding: 20px 16px; }
}

/* Списки кабинета без отступов текста страницы (.entry-content ul/ol) */
.entry-content :is(.acc-orders, .acc-items, .acc-notes ol) { margin: 0; padding: 0; }
.entry-content .acc-steps { margin: 24px 0 0; padding: 0; }
.entry-content .acc-steps--mini { margin-top: 16px; }
.entry-content :is(.acc-orders, .acc-items, .acc-steps, .acc-notes ol) > li { margin: 0; }
.entry-content :is(.acc-orders, .acc-items, .acc-steps, .acc-notes ol) > li::marker { content: none; }
