/* ============================
   Personal Page — Shared Nav
   ============================ */

/* Page layout */
body,
.content {
	background: #fff;
}

.personal-page {
	position: relative;
	z-index: 1;
	width: min(100%, 920px);
	margin: 0 auto;
	padding: 28px 16px 96px;
	background: #fff;
	color: #111;
}
.personal-page__title {
	font-size: 26px; font-weight: 700; line-height: 1.25;
	margin: 0 0 18px;
}

/* Navigation pills */
.personal-nav {
	position: relative;
	z-index: 2;
	display: flex; gap: 8px; margin-bottom: 24px;
	overflow-x: auto; -webkit-overflow-scrolling: touch;
	scrollbar-width: none; -ms-overflow-style: none;
}
.personal-nav::-webkit-scrollbar { display: none; }
.personal-nav__item {
	display: flex; align-items: center; gap: 6px;
	min-height: 40px; min-width: 96px; justify-content: center;
	padding: 0 16px; border-radius: 999px;
	font-size: 14px; font-weight: 500; white-space: nowrap;
	color: #827f87; background: #f6f6f7;
	text-decoration: none; transition: all 0.2s;
	pointer-events: auto; cursor: pointer; touch-action: manipulation;
	-webkit-tap-highlight-color: transparent;
}
.personal-nav__item:hover { background: #eeeeef; color: #222; }
.personal-nav__item--active { background: #f26666; color: #fff; }
.personal-nav__item--active:hover { background: #e85d5d; color: #fff; }
.personal-nav__badge {
	display: inline-flex; align-items: center; justify-content: center;
	min-width: 20px; height: 20px; padding: 0 6px;
	border-radius: 10px; font-size: 11px; font-weight: 600;
	background: rgba(255,255,255,0.3); color: inherit;
}

/* Mobile */
@media (max-width: 772px) {
	.personal-page { padding: 18px 16px calc(88px + env(safe-area-inset-bottom)); }
	.personal-page__title { font-size: 24px; margin-bottom: 16px; }
	.personal-nav { gap: 8px; margin-bottom: 18px; padding-bottom: 2px; }
	.personal-nav__item { min-height: 42px; padding: 0 14px; font-size: 16px; font-weight: 600; }
}

/* ============================
   Orders — compact cards
   Keep these critical styles here because this shared file is loaded by
   all personal pages before the component output is rendered.
   ============================ */
.personal-page .orders-list {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.personal-page .orders-card {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 14px;
	border: 1px solid #ececef;
	border-radius: 8px;
	background: #fff;
	color: #141414;
	text-decoration: none;
	box-shadow: 0 1px 2px rgba(17, 17, 17, 0.03);
	transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}
.personal-page .orders-card:hover {
	border-color: #dedee2;
	color: #141414;
	box-shadow: 0 4px 12px rgba(17, 17, 17, 0.06);
	transform: translateY(-1px);
}

.personal-page .orders-card__image {
	flex: 0 0 72px;
	width: 72px;
	height: 72px;
	overflow: hidden;
	border-radius: 8px;
	background: #f7f7f8;
}
.personal-page .orders-card__image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}
.personal-page .orders-card__no-image {
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #f7f7f8;
}
.personal-page .orders-card__body {
	flex: 1 1 auto;
	min-width: 0;
}
.personal-page .orders-card__header {
	display: flex;
	align-items: baseline;
	flex-wrap: wrap;
	column-gap: 8px;
	row-gap: 2px;
	margin-bottom: 4px;
}
.personal-page .orders-card__number {
	font-size: 15px;
	font-weight: 700;
	line-height: 1.3;
	color: #171717;
}
.personal-page .orders-card__date {
	font-size: 13px;
	line-height: 1.3;
	color: #85858c;
}
.personal-page .orders-card__products {
	margin-bottom: 8px;
}
.personal-page .orders-card__product-name {
	max-width: 100%;
	overflow: hidden;
	font-size: 13px;
	line-height: 1.4;
	color: #55555d;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.personal-page .orders-card__product-more {
	font-size: 12px;
	line-height: 1.4;
	color: #85858c;
}
.personal-page .orders-card__footer {
	display: flex;
	align-items: center;
	gap: 8px;
}
.personal-page .orders-card__status {
	display: inline-flex;
	align-items: center;
	max-width: 100%;
	padding: 3px 8px;
	border-radius: 6px;
	font-size: 12px;
	font-weight: 600;
	line-height: 1.3;
}
.personal-page .orders-card__status--paid { background: #e9f7ee; color: #217a39; }
.personal-page .orders-card__status--assembled { background: #e8f2ff; color: #1e67b5; }
.personal-page .orders-card__status--delivery { background: #fff2df; color: #b96000; }
.personal-page .orders-card__status--done { background: #f1f1f2; color: #62626a; }
.personal-page .orders-card__status--canceled { background: #fdebf1; color: #b92c4b; }
.personal-page .orders-card__status--default { background: #f1f1f2; color: #62626a; }
.personal-page .orders-card__price {
	margin-left: auto;
	font-size: 14px;
	font-weight: 700;
	line-height: 1.3;
	color: #171717;
	white-space: nowrap;
}
.personal-page .orders-card__arrow {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #8c8c8c;
}

@media (max-width: 772px) {
	.personal-page .orders-list { gap: 10px; }
	.personal-page .orders-card { gap: 10px; padding: 12px; }
	.personal-page .orders-card__image { flex-basis: 64px; width: 64px; height: 64px; }
	.personal-page .orders-card__number { font-size: 14px; }
	.personal-page .orders-card__date,
	.personal-page .orders-card__product-name { font-size: 12px; }
	.personal-page .orders-card__footer { flex-wrap: wrap; }
	.personal-page .orders-card__arrow { display: none; }
}

/* ============================
   Fix #1: Profile — hide duplicate H1
   The main.profile component renders its own <h1 class="profile__title">,
   but our nav include already has the page H1.
   ============================ */
.personal-page .profile__title { display: none; }
.personal-page .profile { margin: 0; }
.personal-page .profile .container {
	max-width: none;
	min-width: 0;
	padding: 0;
}
.personal-page .profile__bonus-card {
	max-width: none;
	margin: 0 0 22px;
	border-radius: 8px;
	background: #fffafa;
}
.personal-page .profile__certificate-card {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	max-width: none;
	margin: -8px 0 22px;
	padding: 16px;
	border: 1px solid #dceee6;
	border-radius: 8px;
	background: #f7fffb;
}
.personal-page .profile__certificate-title {
	font-size: 15px;
	font-weight: 700;
	line-height: 1.3;
	color: #202020;
}
.personal-page .profile__certificate-hint {
	margin-top: 4px;
	font-size: 13px;
	line-height: 1.35;
	color: #747474;
}
.personal-page .profile__certificate-amount {
	flex: 0 0 auto;
	font-size: 20px;
	font-weight: 700;
	color: #16824a;
	white-space: nowrap;
}
.personal-page .profile__group {
	max-width: none;
}
.personal-page .profile__footer .btn {
	border-radius: 8px;
}

/* ============================
   Fix #2: Balls — order-table layout
   Ported from app.css (profile.scss) for V2 context.
   ============================ */
.personal-page .profile-layout-main {
	width: 100%;
}
.personal-page .title--h2 {
	font-size: 20px;
	margin: 0 0 14px;
	font-weight: 600;
}
.personal-page .order-table {
	width: 100%;
	overflow: hidden;
	border: 1px solid #f0f0f0;
	border-radius: 8px;
	background: #fff;
}
.personal-page .order-table__row {
	display: flex;
	justify-content: space-between;
	border-top: 1px solid #f0f0f0;
	padding: 12px 14px;
}
.personal-page .order-table__row_highlighted {
	background: #fafafa;
	font-weight: 700;
	border-top: none;
}
.personal-page .order-table__row_highlighted + .order-table__row {
	border-top: none;
}
.personal-page .order-table__row .order-table__td:first-child {
	flex: 3;
	padding-right: 10px;
}
.personal-page .order-table__row .order-table__td:last-child {
	flex: 1;
	text-align: right;
	padding-right: 0;
}
.personal-page .order-table__td { flex: 4; font-size: 14px; line-height: 1.45; }
.personal-page .bonus-plus { color: #198337; }
.personal-page .bonus-minus { color: #da3a3a; }

/* ============================
   Fix #3: Wishlist — layout + hidden modal
   V2 doesn't define .hidden, so the sharing modal was visible.
   ============================ */
.personal-page .hidden { display: none; }
.personal-page .wishlist-item {
	padding: 16px 0;
	border-bottom: 1px solid #f0f0f0;
}
.personal-page .wishlist-item__actions {
	display: flex;
	gap: 8px;
	margin-top: 12px;
}

/* ============================
   Fix #4a: Profile — reduce group spacing
   ============================ */
.personal-page .profile__group { margin-top: 20px; }

/* ============================
   Fix #4: Profile — hide birthday, email, gender
   Birthday+Email = 2nd .profile__row in personal data group
   Gender = 2nd .profile__group (after personal data)
   ============================ */
.personal-page .profile__group-container .profile__row:nth-child(2) { display: none; }
.personal-page #profile-form > .profile__group:nth-of-type(2) { display: none; }

/* Balls/Wishlist: mobile */
@media (max-width: 772px) {
	.personal-page .title--h2 { font-size: 1.2rem; }
	.personal-page .order-table__td { font-size: 13px; }
}
