/* UI audit 7 (nooria_ui_audit_7.pptx, 02.12.2026). Loaded last on every page (inc/ui-audit-7.php). */

/* user audit 7 #2: Scientific Advisory Board — the list's CSS grid gap (24px) was added to Swiper's own spacing,
   4 cards took 1464px in a 1392px slider and the last one was cut by 72px. Swiper spaces the slides by itself. */
/* The same on the community slider below it (22px gap at 1200px+, its 4th card was cut by 66px). */
.js-mobile-slider.swiper-initialized > .sabv2__grid.swiper-wrapper,
.js-mobile-slider.swiper-initialized > .community__list.swiper-wrapper { gap: 0; }

/* user audit 7 #3: German desktop menu is ~150px longer than English; at 1301–1440px the Global / DE / account / cart
   block wrapped under the logo. Smaller font and spacing for DE only, growing with the window; one row. */
@media (min-width: 1301px) {
    html:lang(de) .header__inner-aside { flex-wrap: nowrap; }
    html:lang(de) .header__inner-aside .navigation { flex: 0 1 auto; min-width: 0; }
    html:lang(de) .header__inner-aside .navigation__list {
        flex-wrap: nowrap;
        column-gap: clamp(12px, calc(12px + (100vw - 1301px) * .0576), 20px);
    }
    html:lang(de) .header__inner-aside .navigation__list > li > .navigation__link {
        font-size: clamp(14px, calc(14px + (100vw - 1301px) * .0144), 16px);
        white-space: nowrap;
    }
}

/* user audit 7 #6: 8 week program hero (/personalised/) on tablets — the title ran over the NOORIA box and the button
   over the jars. 768–1024px: text on the dark top, the products picture under it (cropped to the products). */
@media (min-width: 768px) and (max-width: 1024px) {
    body .qp-hero {
        display: block;
        height: auto;
        /* picture = 165% of the width (2560×1066 → 0.6875 × width tall), its products start 18% from its top */
        background-color: #000313;
        background-image: linear-gradient(180deg, #000313 0%, rgba(0, 3, 19, 0) 22%, rgba(0, 3, 19, 0) 100%), var(--qp-hero-bg);
        background-size: 100% 68.75vw, 165% auto;
        background-position: center bottom, 91% bottom;
        background-repeat: no-repeat;
        padding: 64px 0 61vw;
    }
    body .qp-hero .container { margin-top: 0; }
    body .qp-hero__content { max-width: 640px; }
    body .qp-hero__description { margin-bottom: 32px; }
}

/* user audit 7 #6 (AR): right-to-left the text column stood on the right, over the box and jars. Desktop: the column
   goes to the left (dark) side, as narrow as the dark part (the products start at ~33–40% of the width); the text stays
   right-aligned. */
@media (min-width: 1025px) {
    [dir="rtl"] .qp-hero__content { margin-left: 0; margin-right: auto; max-width: min(30vw, 560px); }
}

/* user audit 7 #7: Ingredients page on phones. */
@media (max-width: 640px) {
    /* a 39px white strip between the header and the hero: main already leaves room for the fixed header */
    .ingredient-library { margin-top: 0; }

    /* the 3 stats in one row (the 3rd wrapped alone); on a dark plate, so the gold labels read over the light photo */
    .ingredient-library .il-hero-stats {
        flex-wrap: nowrap;
        gap: 0;
        padding: 12px 4px;
        border-radius: 12px;
        background: rgba(4, 12, 32, .62);
        -webkit-backdrop-filter: blur(6px);
        backdrop-filter: blur(6px);
    }
    .ingredient-library .il-stat {
        flex: 1 1 auto; /* widths follow the labels: one-word German "WELLNESSBEREICHE" keeps one line */
        min-width: 0;
        padding: 0 8px;
        text-align: center;
    }
    .ingredient-library .il-stat:first-child,
    [dir="rtl"] .ingredient-library .il-stat:first-child { padding-left: 8px; padding-right: 8px; }
    .ingredient-library .il-stat__number { font-size: 26px; }
    .ingredient-library .il-stat__label {
        font-size: 10px;
        letter-spacing: .08em;
        overflow-wrap: break-word;
        line-height: 1.35;
        background: none;
        color: #e3d3ad;
        -webkit-text-fill-color: currentColor;
    }
}

/* user audit 7 #4: translated sort / reset labels are longer than English — on phones the row may wrap, words don't */
@media (max-width: 640px) {
    .ingredient-library .il-rbar__actions { flex-wrap: wrap; row-gap: 8px; }
    .ingredient-library .il-sort label,
    .ingredient-library .il-reset { white-space: nowrap; }
}

/* user audit 7 #7: the closed detail panel (off-screen on the right) cast its shadow over the page's right edge */
.ingredient-library .il-panel:not(.is-open) { box-shadow: none; }

/* user audit 7 #7 (AR): right-to-left the hero text stood on the photo's light side (the dark wash is on the left), the
   gold labels were unreadable. RTL: the photo and its dark wash are mirrored, the text itself is not. */
[dir="rtl"] .ingredient-library .il-hero-slide__media { transform: scaleX(-1); }
[dir="rtl"] .ingredient-library .il-hero-slide__content { transform: scaleX(-1); }

/* RTL stat separators: the line was on each stat's outer (left) side, none between the 1st and 2nd */
[dir="rtl"] .ingredient-library .il-stat { border-left: 0; border-right: 1px solid rgba(255, 255, 255, .22); }
[dir="rtl"] .ingredient-library .il-stat:first-child { border-right: none; }
@media (min-width: 641px) {
    [dir="rtl"] .ingredient-library .il-stat:first-child { padding-right: 0; padding-left: 28px; }
}
