/**
 * VisionaryCue Commerce Pro - My Account.
 */

.vc-account {
	background: var(--vc-background);
	padding-bottom: var(--vc-space-8);
}

.vc-account__layout {
	display: grid;
	grid-template-columns: 260px minmax(0, 1fr);
	gap: var(--vc-space-5);
	align-items: start;
	padding-top: var(--vc-space-5);
}

.vc-account__layout--full { grid-template-columns: minmax(0, 1fr); }

.vc-account__sidebar {
	position: sticky;
	top: calc(var(--vc-sticky-offset) + var(--vc-space-4));
	background: var(--vc-surface);
	border: 1px solid var(--vc-border);
	border-radius: var(--vc-card-radius);
	padding: var(--vc-space-4) var(--vc-space-3);
}

.vc-account__identity {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 0 var(--vc-space-2) var(--vc-space-4);
	border-bottom: 1px solid var(--vc-border);
	margin-bottom: var(--vc-space-3);
}

.vc-account__avatar { flex: none; line-height: 0; }
.vc-account__avatar-img { border-radius: 50%; }
.vc-account__identity-text { display: flex; flex-direction: column; min-width: 0; }
.vc-account__identity-text strong { font-size: 0.95em; }

.vc-account__identity-text span {
	font-size: 0.78em;
	color: var(--vc-muted);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.vc-account__nav ul { list-style: none; margin: 0; padding: 0; }

.vc-account__nav-link {
	display: flex;
	align-items: center;
	gap: 11px;
	padding: 10px 12px;
	border-radius: var(--vc-radius-sm);
	color: var(--vc-text);
	font-size: 0.92em;
	font-weight: 500;
	text-decoration: none;
	transition: background var(--vc-transition) var(--vc-ease), color var(--vc-transition) var(--vc-ease);
}

.vc-account__nav-link:hover { background: var(--vc-background); color: var(--vc-text); }

.vc-account__nav-link.is-active {
	background: var(--vc-primary-soft);
	color: var(--vc-primary);
	font-weight: 600;
}

.vc-account__nav-link--logout { color: var(--vc-muted); }
.vc-account__nav-link--logout:hover { color: var(--vc-error); }

.vc-account__main { min-width: 0; }
.vc-account__view { display: flex; flex-direction: column; gap: var(--vc-space-4); }

.vc-account__title.vc-account__title {
	margin: 0;
	font-size: clamp(1.3rem, 1.1rem + 0.8vw, 1.7rem);
	font-weight: var(--vc-heading-weight);
	letter-spacing: -0.015em;
	line-height: 1.2;
}

.vc-account__subtitle { margin: 6px 0 0; color: var(--vc-muted); font-size: 0.92em; }
.vc-account__back { align-self: flex-start; }

/* ---------------------------------------------------------- Stat cards --- */

.vc-stat-cards {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
	gap: var(--vc-space-3);
}

.vc-stat-card {
	display: flex;
	flex-direction: column;
	gap: 4px;
	padding: var(--vc-space-4);
	background: var(--vc-surface);
	border: 1px solid var(--vc-border);
	border-radius: var(--vc-card-radius);
	text-decoration: none;
	color: var(--vc-text);
	transition: border-color var(--vc-transition) var(--vc-ease), transform var(--vc-transition) var(--vc-ease);
}

.vc-stat-card:hover { border-color: var(--vc-primary); transform: translateY(-2px); color: var(--vc-text); }

.vc-stat-card__icon {
	display: grid;
	place-items: center;
	width: 38px;
	height: 38px;
	margin-bottom: 6px;
	border-radius: var(--vc-radius-sm);
	background: var(--vc-primary-soft);
	color: var(--vc-primary);
}

.vc-stat-card__value { font-size: 1.5em; font-weight: 700; line-height: 1.1; }
.vc-stat-card__label { font-size: 0.8em; color: var(--vc-muted); }

/* --------------------------------------------------------- Order cards --- */

.vc-order-cards { display: flex; flex-direction: column; gap: var(--vc-space-3); }

.vc-order-card {
	display: flex;
	flex-direction: column;
	gap: var(--vc-space-3);
	padding: var(--vc-space-4);
	background: var(--vc-surface);
	border: 1px solid var(--vc-border);
	border-radius: var(--vc-card-radius);
	transition: border-color var(--vc-transition) var(--vc-ease);
}

.vc-order-card:hover { border-color: var(--vc-border-strong); }

.vc-order-card__head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: var(--vc-space-3);
}

.vc-order-card__number { display: block; font-weight: 700; font-size: 0.95em; }
.vc-order-card__date { display: block; margin-top: 2px; font-size: 0.8em; color: var(--vc-muted); }

.vc-order-card__body {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--vc-space-3);
	flex-wrap: wrap;
}

.vc-order-card__thumbs { display: flex; }

.vc-order-card__thumb {
	width: 44px;
	height: 44px;
	margin-right: -10px;
	border: 2px solid var(--vc-surface);
	border-radius: 50%;
	background: var(--vc-background);
	overflow: hidden;
	display: grid;
	place-items: center;
}

.vc-order-card__thumb img { width: 100%; height: 100%; object-fit: cover; }
.vc-order-card__meta { display: flex; align-items: baseline; gap: var(--vc-space-3); margin-left: auto; }
.vc-order-card__items { font-size: 0.84em; color: var(--vc-muted); }
.vc-order-card__total { font-weight: 700; font-size: 1.05em; }

.vc-order-card__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	padding-top: var(--vc-space-3);
	border-top: 1px solid var(--vc-border);
}

/* ------------------------------------------------------- Order details --- */

.vc-order-head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: var(--vc-space-3);
	flex-wrap: wrap;
}

.vc-order-invoice {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--vc-space-3);
	flex-wrap: wrap;
}

.vc-order-invoice .vc-muted { display: block; font-size: 0.85em; }

.vc-order-addresses {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
	gap: var(--vc-space-3);
}

.vc-order-addresses address { font-style: normal; font-size: 0.9em; line-height: 1.6; }
.vc-order-addresses p { margin: 6px 0 0; font-size: 0.86em; }
.vc-order-addresses__method { display: flex; align-items: center; gap: 6px; }

/* WooCommerce order table rendered inside our panel. */

.vc-order-items table,
.vc-account__wc table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.92em;
}

.vc-order-items th,
.vc-order-items td,
.vc-account__wc th,
.vc-account__wc td {
	padding: 11px 8px;
	text-align: left;
	border-bottom: 1px solid var(--vc-border);
	vertical-align: top;
}

.vc-order-items tfoot th { font-weight: 600; color: var(--vc-muted); }
.vc-order-items tfoot td { text-align: right; font-weight: 600; }
.vc-order-items td.product-total,
.vc-order-items th.product-total { text-align: right; }
.vc-order-items a { color: var(--vc-text); text-decoration: none; font-weight: 600; }
.vc-order-items a:hover { color: var(--vc-primary); }

.vc-account__wc h2,
.vc-account__wc h3 { font-size: 1.02em; font-weight: var(--vc-heading-weight); margin-top: 0; }

/* -------------------------------------------------------- Address book --- */

.vc-address-book {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
	gap: var(--vc-space-3);
}

.vc-address-book__card {
	display: flex;
	flex-direction: column;
	gap: var(--vc-space-2);
	padding: var(--vc-space-4);
	background: var(--vc-surface);
	border: 1px solid var(--vc-border);
	border-radius: var(--vc-card-radius);
}

.vc-address-book__card.is-empty { border-style: dashed; }
.vc-address-book__head { display: flex; align-items: center; gap: 10px; }

.vc-address-book__icon {
	display: grid;
	place-items: center;
	width: 34px;
	height: 34px;
	border-radius: var(--vc-radius-sm);
	background: var(--vc-primary-soft);
	color: var(--vc-primary);
}

.vc-address-book__label { margin: 0; font-size: 0.95em; font-weight: var(--vc-heading-weight); }
.vc-address-book__text { font-style: normal; font-size: 0.88em; line-height: 1.6; color: var(--vc-muted); }
.vc-address-book__meta { margin: 0; font-size: 0.84em; color: var(--vc-muted); }
.vc-address-book__empty { margin: 0; font-size: 0.88em; color: var(--vc-muted); }
.vc-address-book__card .vc-btn { align-self: flex-start; margin-top: auto; }

/* ------------------------------------------------------- Details form --- */

.vc-account-form__grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0 var(--vc-space-4);
}

.vc-field--wide { grid-column: 1 / -1; }

.vc-account-form__section {
	grid-column: 1 / -1;
	margin: var(--vc-space-3) 0 0;
	padding: var(--vc-space-4) 0 0;
	border: 0;
	border-top: 1px solid var(--vc-border);
}

.vc-account-form__legend.vc-account-form__legend {
	padding: 0;
	margin-bottom: 4px;
	font-size: 0.98em;
	font-weight: var(--vc-heading-weight);
}

.vc-account-form__actions { padding-top: var(--vc-space-3); }

/* --------------------------------------------------------- Responsive --- */

@media (max-width: 1023px) {
	.vc-account__layout { grid-template-columns: minmax(0, 1fr); }
	.vc-account__sidebar { position: static; }
	.vc-account__nav ul { display: flex; flex-wrap: wrap; gap: 4px; }
	.vc-account__nav-link { padding: 8px 12px; }
}

@media (max-width: 767px) {
	.vc-account__sidebar { padding: var(--vc-space-3); border-radius: var(--vc-radius); }
	.vc-account-form__grid { grid-template-columns: minmax(0, 1fr); }
	.vc-order-card__meta { margin-left: 0; width: 100%; justify-content: space-between; }
	.vc-order-card__actions .vc-btn { flex: 1 1 auto; }
	.vc-stat-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
