/* The one user menu (components/forms/profile-button, user 16.11.) on every page of layouts/main: the customer-area menu 1:1
   (rules copied from account-v2/css/acc2.css, header user menu block = LP-shop menu cab4a257). Below: the shop's delivery colour,
   the preferences row (.mg-prefs) and the dark version (html.theme-dark, checkout ?theme=dark). */
.sh-user { --sh-soft: #f5f6f8; --sh-mint: #e8f6ee; --sh-line: #e3e7ed; --sh-ink: #0f1b2d; --sh-muted: #5a6577; --sh-green: #13a06e; --sh-green-dark: #0b7a53; --sh-cta: #ff7417; --sh-shadow-lift: 0 2px 4px rgb(15 27 45 / .05), 0 24px 48px -20px rgb(15 27 45 / .25); color: var(--sh-ink); font-size: 16px; line-height: 1.55; text-align: start; }
.sh-user *, .sh-user *::before, .sh-user *::after { box-sizing: border-box; }
.sh-user__menu, .sh-user__menu a { color: var(--sh-ink); }
.sh-user__close { cursor: pointer; }
.sh-live { display: inline-block; width: 8px; height: 8px; flex: none; border-radius: 50%; background: var(--sh-green); animation: sh-pulse 1.6s ease-out infinite; }
@keyframes sh-pulse {
0% { box-shadow: 0 0 0 0 rgb(19 160 110 / .55); opacity: 1; }
50% { opacity: .5; }
100% { box-shadow: 0 0 0 7px rgb(19 160 110 / 0); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
    .sh-live { animation: none; }
}
.sh-user { position: relative; }
.sh-user > summary { list-style: none; }
.sh-user > summary::-webkit-details-marker { display: none; }
.sh-user__menu { position: absolute; top: calc(100% + 8px); inset-inline-end: -48px; z-index: 5; width: 230px; max-height: 70vh; overflow: auto; padding: 8px; border: 1px solid var(--sh-line); border-radius: 16px; background: #fff; box-shadow: var(--sh-shadow-lift); }
.sh-user__btn { display: grid; place-items: center; width: 36px; height: 36px; margin-inline-start: 4px; border-radius: 50%; background: var(--sh-ink); color: #fff; font-size: 12.5px; font-weight: 800; cursor: pointer; box-shadow: 0 0 0 2px #fff, 0 0 0 3px var(--sh-line); }
.sh-user__menu { inset-inline-end: 0; width: min(310px, calc(100vw - 24px)); max-height: 80vh; padding: 10px; }
.sh-user__head { display: flex; align-items: center; gap: 12px; padding: 6px 6px 12px; }
.sh-user__avatar { display: grid; flex: none; place-items: center; width: 46px; height: 46px; border-radius: 50%; background: var(--sh-ink); color: #fff; font-weight: 800; }
.sh-user__who { display: flex; min-width: 0; flex-direction: column; }
.sh-user__who strong, .sh-user__who small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sh-user__who small { color: var(--sh-muted); font-size: 13px; }
.sh-user__who, .sh-user__who * { color: inherit; text-decoration: none; }
.sh-user__who small, .sh-user__who small * { color: var(--sh-muted); }
.sh-vip { display: block; margin-bottom: 8px; padding: 12px; border-radius: 14px; background: var(--sh-mint); text-decoration: none; }
.sh-user__nav { display: flex; flex-direction: column; width: auto; text-align: start; }
.sh-user__nav a { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 12px; font-size: 14.5px; font-weight: 600; text-decoration: none; }
.sh-user__nav a > span { flex: 1; }
.sh-user__nav a:hover { background: var(--sh-soft); }
.sh-user__nav a > svg:first-child { color: var(--sh-muted); }
.sh-user__nav a.is-hl { background: var(--sh-cta); color: #fff; }
.sh-user__nav a.is-hl > svg:first-child { color: #fff; }
.sh-user__nav a.is-hl .sh-live { background: #fff; }
.sh-user__logout, .sh-user__logout > svg:first-child { color: var(--sh-green-dark) !important; }
.sh-chev { color: var(--sh-muted); flex: none; }
[dir="rtl"] .sh-chev { transform: scaleX(-1); }
.sh-vip { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 6px; }
.sh-vip__half { display: flex; align-items: center; gap: 8px; padding: 8px; border-radius: 10px; background: rgb(255 255 255 / .75); text-decoration: none; }
.sh-vip__half img { flex: none; width: 26px; height: 26px; }
.sh-vip__half > span { display: flex; min-width: 0; flex-direction: column; line-height: 1.25; }
.sh-vip__half strong { font-size: 13.5px; white-space: nowrap; }
.sh-user__menu { width: min(330px, calc(100vw - 24px)); padding: 14px; }
.sh-user__head { position: relative; padding: 6px 36px 14px 6px; }
.sh-user__close { position: absolute; top: 2px; inset-inline-end: 0; display: grid; place-items: center; width: 32px; height: 32px; border: 0; border-radius: 50%; background: var(--sh-soft); color: var(--sh-ink); }
.sh-vip { gap: 8px; margin-bottom: 12px; padding: 8px; }
.sh-vip__half { gap: 10px; padding: 10px; }
.sh-user__nav { gap: 2px; }
.sh-user__nav a { padding: 11px 12px; }
.sh-user__nav a.is-hl .sh-live { animation: sh-pulse 1.6s ease-out infinite; }
.sh-user__me { display: flex; flex: 1; min-width: 0; align-items: center; gap: 12px; color: inherit; text-decoration: none; }
.sh-vip__half > .sh-vip__cb { display: grid; flex: none; flex-direction: row; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--sh-green); color: #fff; }
.sh-vip__cb svg { display: block; width: 15px; height: 15px; }
.sh-vip { margin-bottom: 6px; }
.sh-lvl { display: block; margin-bottom: 10px; padding: 8px 10px; border: 1px solid #ecd48a; border-radius: 12px; background: linear-gradient(100deg, #fffaf0 0, #fff 100%); color: inherit; text-decoration: none; }
.sh-lvl__row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.sh-lvl__now, .sh-lvl__next { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.sh-lvl__now strong { color: #a6832a; font-size: 12.5px; font-weight: 800; }
.sh-lvl__next strong { font-size: 11px; font-weight: 800; }
.sh-lvl small { color: var(--sh-muted); font-size: 10.5px; }
.sh-lvl__next small { margin-inline-end: 2px; }
.sh-lvl__track { display: block; height: 4px; margin: 7px 0 4px; overflow: hidden; border-radius: 999px; background: #efe9da; }
.sh-lvl__track span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #e3b94c, #c9952f); }
.sh-lvl__labels small { font-weight: 600; }
.sh-vip__half small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* the account pages' CSS sizes .vip-badge-svg globally: keep the menu badges at the LP-shop size */
.sh-user .sh-lvl__now .vip-badge-svg { width: 18px !important; height: auto !important; max-width: none; }
.sh-user .sh-lvl__next .vip-badge-svg { width: 14px !important; height: auto !important; max-width: none; }
.sh-user .sh-vip__half img { width: 26px !important; height: 26px !important; max-width: none; }

/* header button: the summary sits in the header row like the old icon */
.account-menu-div .sh-user { display: flex; align-items: center; }
.sh-user__btn { font-family: inherit; line-height: 1; }
.sh-user__menu { z-index: 1000; }

/* delivery: one yellow-orange everywhere with dark text and the green blinking dot (user 15.11./16.11.) */
.sh-user__nav a.is-hl { background: linear-gradient(90deg, #ffc61a 0%, #ff9f1a 100%); color: #14110a !important; }
.sh-user__nav a.is-hl > svg:first-child { color: #14110a; }
.sh-user__nav a.is-hl .sh-live { background: #15803d; }

/* ---------- preferences row: language/currency box + light/dark switch, same box look (user 16.11.) ---------- */
.mg-prefs { display: flex; align-items: center; gap: 8px; }
.mg-prefs--menu { flex: none; }
.mg-prefs--menu .mg-prefs__lang { height: 34px; padding: 0 10px; font-size: 13px; }
.mg-prefs--drawer { padding: 0; }
.sd__prefs { padding: 0 20px 14px; }
.mg-prefs__lang { display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 12px; border: 1px solid #e3e7ed; border-radius: 12px; background: #fff; color: #0f1b2d; font-family: inherit; font-size: 14px; font-weight: 600; line-height: 1; cursor: pointer; }
.mg-prefs__lang:hover { background: #f5f6f8; }
.mg-prefs__lang .flag { flex: none; border-radius: 50%; }
.mg-prefs__lang i { width: 1px; height: 14px; background: #d3d4da; }
.mg-prefs .mg-theme { margin: 0; }
.mg-prefs .mg-theme__seg { height: 38px; align-items: center; }
.mg-prefs--drawer .mg-prefs__lang { flex: 1; justify-content: center; }

/* ---------- dark version (checkout ?theme=dark; the landing page B/C is always dark: .lp) ---------- */
.theme-dark .sh-user, .lp .sh-user { --sh-soft: #1a2946; --sh-mint: #0f2e26; --sh-line: #25385c; --sh-ink: #fff; --sh-muted: #8e9bb0; }
.theme-dark .sh-user__btn, .lp .sh-user__btn { background: #fff; color: #080e1b; box-shadow: 0 0 0 2px #000, 0 0 0 3px #25385c; }
.theme-dark .sh-user__menu, .lp .sh-user__menu { background: #0f1a2e; border-color: #25385c; box-shadow: 0 20px 40px rgba(0, 0, 0, .55); }
.theme-dark .sh-user__menu, .theme-dark .sh-user__menu a, .lp .sh-user__menu, .lp .sh-user__menu a { color: #fff; }
.theme-dark .sh-user__avatar, .lp .sh-user__avatar { background: #fff; color: #080e1b; }
.theme-dark .sh-user__close, .lp .sh-user__close { background: #1a2946; color: #fff; }
.theme-dark .sh-vip, .lp .sh-vip { background: #0f2e26; }
.theme-dark .sh-vip__half, .lp .sh-vip__half { background: rgb(255 255 255 / .06); }
.theme-dark .sh-lvl, .lp .sh-lvl { border-color: #5b4a1f; background: linear-gradient(100deg, #2a2412 0, #0f1a2e 100%); }
.theme-dark .sh-lvl__now strong, .lp .sh-lvl__now strong { color: #e3b94c; }
.theme-dark .sh-lvl__track, .lp .sh-lvl__track { background: #3b4c6b; }
.theme-dark .sh-user__nav a:hover, .lp .sh-user__nav a:hover { background: #1a2946; }
.theme-dark .sh-user__nav a.is-hl, .theme-dark .sh-user__nav a.is-hl *, .lp .sh-user__nav a.is-hl, .lp .sh-user__nav a.is-hl * { color: #14110a !important; }
.theme-dark .sh-user__logout, .theme-dark .sh-user__logout > svg:first-child, .lp .sh-user__logout, .lp .sh-user__logout > svg:first-child { color: #03fca3 !important; }
.theme-dark .mg-prefs__lang, .lp .mg-prefs__lang { border-color: #25385c; background: #0f192c; color: #fff; }
.theme-dark .mg-prefs__lang:hover, .lp .mg-prefs__lang:hover { background: #1a2946; }
.theme-dark .mg-prefs__lang i, .lp .mg-prefs__lang i { background: #25385c; }

/* head row: avatar + name left, language box opposite, close button at the end (user 16.11.) */
.sh-user__head { gap: 10px; }
.sh-user__avatar { width: 40px; height: 40px; font-size: 14px; }
/* phones + tablets (same width as the burger menu): the user menu opens like the phone menu (user 16.11.): a full-height panel from the right over a blurred page;
   a click on the blurred part closes it (the backdrop is the <details> ::before, see the close script) */
@media (max-width: 991.98px) {
    .sh-user[open]::before { content: ""; position: fixed; inset: 0; z-index: 1040; background: rgb(15 27 45 / .45); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
    .account-menu-div .sh-user__menu { position: fixed; top: 0; bottom: 0; inset-inline-end: 0; z-index: 1041; width: min(352px, 88vw); max-height: none; height: 100dvh; padding: 18px 16px 24px; border: 0; border-radius: 0; box-shadow: none; animation: sh-user-in .2s ease-out; }
    [dir="rtl"] .account-menu-div .sh-user__menu { animation-name: sh-user-in-rtl; }
    .theme-dark .sh-user[open]::before, .lp .sh-user[open]::before { background: rgb(0 0 0 / .6); }
}
@keyframes sh-user-in { from { transform: translateX(24px); opacity: 0; } }
@keyframes sh-user-in-rtl { from { transform: translateX(-24px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .account-menu-div .sh-user__menu { animation: none; } }
