/*
 * shopping-assistant-page.css: layout fixes for the live Ask JD page (shopping-assistant.html) ONLY.
 * Loaded after css/shopping-assistant-purple.css; the offline sample page does not load it.
 *
 * The site header is fixed and changes height (about 112px at the top of the page, 80px once scrolled; 80-86px on
 * phones), but .jd-stack was pinned at a fixed 80px / 70px, so its sub-nav slid under the header.
 * js/shopping-assistant-live.js keeps two variables in sync with the real header:
 *   --jd-hdr      current header height   -> where the sticky stack pins
 *   --jd-hdr-gap  space needed above the stack at the top of the page so it starts below the tall header
 */
body.ask-jd-page .content-block { padding-top: var(--jd-hdr-gap, 44px); }

.jd-stack {
    top: var(--jd-hdr, 80px);
    transition: top .2s ease;
}
/* The empty spacer under the stack added 30px on top of .assistant-wrap's 18px once the block got its padding. */
body.ask-jd-page .gap { margin-top: 0; }
/* The global search block is not used on this page (it is commented out in the HTML). */
body.ask-jd-page searchbar { display: none; }

/* ---- tablets ---- */
@media (max-width: 900px) {
    .sn-inner { min-height: 50px; }
    .sn-links a, .sn-links > .sn-wrap > button { padding: 7px 10px; font-size: 13.5px; }
}

/* ---- phones ---- */
@media (max-width: 640px) {
    .sn-inner { min-height: 46px; gap: 6px; padding: 0 8px; }
    /* links scroll sideways; fade the right edge so it is clear there is more */
    .sn-links {
        flex: 1 1 auto;
        -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent);
        mask-image: linear-gradient(90deg, #000 85%, transparent);
        padding-right: 18px;
    }
    .sn-links a, .sn-links > .sn-wrap > button { padding: 6px 8px; font-size: 13px; }
    .sn-right { gap: 6px; }
    .ask-pill { padding: 6px 12px; }
    .up-av { width: 30px; height: 30px; }
    /* the trending menu must stay on screen */
    .trend-menu { position: fixed; left: 8px; right: 8px; top: calc(var(--jd-hdr, 80px) + 50px); min-width: 0; max-height: 60vh; overflow-y: auto; }

    .jd-dock { padding: 6px 8px 8px; }
    .jd-dock .dock-inner { flex-wrap: nowrap; padding: 7px 8px 7px 10px; gap: 8px; }
    .dock-right { flex: none; flex-wrap: nowrap; }
    .dock-left { gap: 8px; flex: 1 1 auto; }
    .dock-ic { width: 24px; height: 24px; }
    .dock-lbl { font-size: 13px; }
    .dock-txt { font-size: 12.5px; -webkit-line-clamp: 1; }
}
@media (max-width: 420px) {
    .ask-pill span { display: none; }            /* icon only; the pill keeps its title / aria label */
    .ask-pill { padding: 7px 10px; }
    .dock-lbl { display: none; }
}
