/*
 * Commerce Client — Agentforce widget styles (Skechers custom overlay)
 *
 * Served in place of plugin_commerce_client/.../css/commerceClient.css:
 * plugin_commerce_client_custom sits higher on the cartridge path, and SFCC
 * static resolution returns a single file rather than merging. This file
 * therefore carries the plugin_commerce_client base rules verbatim, followed by
 * the Skechers custom overrides. Loaded from common/layout/page.isml when the
 * Commerce Client is enabled.
 *
 * The custom overrides use !important throughout because the Cimulate widget is
 * rendered by its own JavaScript and injects runtime styles that would
 * otherwise take precedence.
 */

/* ============================================================
 * Base rules (mirrored from plugin_commerce_client)
 * ============================================================ */

/* ── Header button ──
 * One declaration per selector: the base pill rules are folded together with
 * the brand-gradient / dark-launch overrides that previously lived in a second
 * !important block lower in this file, so the button's final look is defined in
 * exactly one place. */

/* Hidden until the agent activates (mirrors the FAB dark-launch gate); revealed
   under body.cc-agent-active by the breakpoint rules at the bottom of this file. */
.cc-header-entry {
    vertical-align: top;
    display: none !important;
    margin: 1.1em 0 0 0.75em;
}

/* Brand gradient pill — same gradient as the minimized FAB. */
.cc-header-button {
    display: inline-flex;
    align-items: center;
    gap: 8px !important;
    background: linear-gradient(135deg, #9731A0, #2478C1) !important;
    color: #ffffff !important;
    border: none;
    border-radius: 999px !important;
    padding: 9px 16px !important;
    cursor: pointer;
    font-size: 14px !important;
    font-weight: 600 !important;
    font-family: inherit;
    line-height: 1;
    white-space: nowrap;
    transition: background 0.15s ease, opacity 0.15s ease;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12) !important;
}

.cc-header-button:hover  { filter: brightness(0.94) !important; background: linear-gradient(135deg, #9731A0, #2478C1) !important; }
.cc-header-button:active { opacity: 0.85; filter: brightness(0.90) !important; }

.cc-header-button svg {
    display: block;
    flex-shrink: 0;
    width: 18px !important;
    height: 18px !important;
    fill: #ffffff !important;
}

.cc-header-button-label { letter-spacing: 0.01em; color: #ffffff !important; }

@media (max-width: 767.98px) {
    .cc-header-button-label { display: none; }
    .cc-header-button        { padding: 7px 10px; }
    .cc-header-entry         { margin: 1.1em 0 0 0.5em; }
}

/* ── Full-height side panel ──
 * Docked to the bottom with a reduced height (design feedback): messagingWidget.isml
 * sets --cc-panel-height:100dvh and --cc-panel-top:0, which would stretch the panel
 * to the top of the page. Release the top (top:auto) and cap the height instead,
 * keeping bottom:0 — so the panel sits at the bottom and leaves a small top gap.
 * Height is responsive (design feedback): tablet/mobile 93.3dvh, desktop 89.4dvh.
 * Tunable via --skx-dialog-height (overrides both breakpoints). */
.cim-widget-dialog.full-height.bottom-left,
.cim-widget-dialog.full-height.bottom-right {
    top: auto !important;
    bottom: 0 !important;
    height: var(--skx-dialog-height, 93.3dvh) !important;
    border-radius: 0 !important;
    width: min(var(--cc-panel-width, 480px), 100vw) !important;
    box-shadow:
        -10px 0 12px #00000014,
        10px 0 12px #00000014 !important;
}

/* Desktop gets a slightly shorter panel; tablet/mobile keep the base 93.3dvh
 * above. Breakpoint = Skechers' lg (1280px) — the same point the native header
 * broadens into its full desktop layout, not Bootstrap's default 992px. Same
 * --skx-dialog-height override knob applies here. */
@media (min-width: 1280px) {
    .cim-widget-dialog.full-height.bottom-left,
    .cim-widget-dialog.full-height.bottom-right {
        height: var(--skx-dialog-height, 89.4dvh) !important;
    }
}

/* ── Minimized FAB ── */
body.cc-hide-fab .cim-widget-minimized-container { display: none !important; }

/* PDP, mobile only: the sticky Add-to-Cart bar sits at the very bottom of the
 * viewport and the FAB overlaps it (design feedback). Lift the FAB clear of that
 * bar. Scoped to the PDP via body:has(.js-pdp-product-detail) — the product-detail
 * wrapper class on productDetails(.Redesign).isml — so every other page keeps the
 * widget's default position. transform (not bottom) is additive on top of the
 * widget's own offset and doesn't interfere with the hover-expand width anim.
 * Tunable via --skx-fab-pdp-lift (default 76px ≈ Add-to-Cart bar height + gap). */
@media (max-width: 767.98px) {
    body:has(.js-pdp-product-detail) .cim-widget-minimized-container {
        transform: translateY(calc(-1 * var(--skx-fab-pdp-lift, 76px))) !important;
    }
}

.cim-widget-minimized-button {
    box-sizing: border-box !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0 !important;
    width: 60px !important;
    height: 60px !important;
    padding: 0 10px !important;
    overflow: hidden !important;
    border: 0 !important;
    border-radius: 30px !important;
    background: linear-gradient(135deg, #9731A0, #2478C1) !important;
    box-shadow: 0 4px 12px #00000030 !important;
    cursor: pointer !important;
    transition: width 0.25s ease, border-radius 0.25s ease !important;
}

.cim-widget-minimized-button::after {
    content: 'What can I help you find today?';
    max-width: 0;
    overflow: hidden;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
    opacity: 0;
    transition: max-width 0.25s ease, opacity 0.15s ease 0.05s;
}

.cim-widget-minimized-button:hover,
.cim-widget-minimized-button:focus-visible {
    justify-content: flex-start !important;
    gap: 10px !important;
    width: min(322px, calc(100vw - 24px)) !important;
    padding: 0 16px !important;
    border-radius: 30px !important;
}

.cim-widget-minimized-button:hover::after,
.cim-widget-minimized-button:focus-visible::after {
    max-width: 290px;
    opacity: 1;
}

.cim-widget-minimized-button:focus-visible {
    outline: 2px solid #fff !important;
    outline-offset: 3px !important;
}

@media (prefers-reduced-motion: reduce) {
    .cim-widget-minimized-button,
    .cim-widget-minimized-button::after {
        transition: none !important;
    }
}

/* Hide the widget's own minimized icon — BOTH the <img> variant and the inline
 * <svg class="cim-widget-minimized-icon"> — so only our white sparkle badge
 * renders. Without this the native (dark) icon sits beside our ::before sparkle,
 * pushing it off-centre inside the pill. */
.cim-widget-minimized-icon-img,
.cim-widget-minimized-button > svg,
.cim-widget-minimized-button .cim-widget-minimized-icon { display: none !important; }

/* White AI sparkle badge (one large + two small) — the same asset as the dialog
 * title, recoloured white. flex:0 0 auto keeps it from shrinking as the pill
 * expands. */
.cim-widget-minimized-button::before {
    content: '';
    display: block;
    flex: 0 0 auto;
    width: 26px;
    height: 26px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M10.7194 8.3707L8.62502 9.41287C7.99579 9.72645 7.48686 10.2337 7.17224 10.8608L6.12661 12.9483C5.97856 13.2465 5.54982 13.2465 5.40176 12.9483L4.35613 10.8608C4.04152 10.2337 3.53258 9.72645 2.90335 9.41287L0.809004 8.3707C0.509812 8.22314 0.509812 7.79582 0.809004 7.64825L2.90335 6.60608C3.53258 6.29251 4.04152 5.78526 4.35613 5.15811L5.40176 3.07069C5.54982 2.77249 5.97856 2.77249 6.12661 3.07069L7.17224 5.15811C7.48686 5.78526 7.99579 6.29251 8.62502 6.60608L10.7194 7.64825C11.0186 7.79582 11.0186 8.22314 10.7194 8.3707ZM15.2874 13.0128L14.3899 12.564C14.1184 12.4318 13.9025 12.2104 13.7668 11.943L13.3165 11.0484C13.2548 10.9193 13.0697 10.9193 13.005 11.0484L12.5546 11.943C12.422 12.2135 12.1999 12.4287 11.9316 12.564L11.034 13.0128C10.9044 13.0743 10.9044 13.2588 11.034 13.3233L11.9316 13.7722C12.203 13.9044 12.4189 14.1257 12.5546 14.3932L13.005 15.2878C13.0666 15.4169 13.2517 15.4169 13.3165 15.2878L13.7668 14.3932C13.8994 14.1226 14.1215 13.9074 14.3899 13.7722L15.2874 13.3233C15.417 13.2618 15.417 13.0774 15.2874 13.0128ZM15.2874 2.68641L14.3899 2.23757C14.1184 2.10537 13.9025 1.88403 13.7668 1.61657L13.3165 0.721961C13.2548 0.592842 13.0697 0.592842 13.005 0.721961L12.5546 1.61657C12.422 1.8871 12.1999 2.1023 11.9316 2.23757L11.034 2.68641C10.9044 2.74789 10.9044 2.93235 11.034 2.99691L11.9316 3.44575C12.203 3.57794 12.4189 3.79929 12.5546 4.06675L13.005 4.96136C13.0666 5.09047 13.2517 5.09047 13.3165 4.96136L13.7668 4.06675C13.8994 3.79621 14.1215 3.58102 14.3899 3.44575L15.2874 2.99691C15.417 2.93542 15.417 2.75097 15.2874 2.68641Z' fill='%23ffffff'/%3E%3C/svg%3E") center/contain no-repeat;
}

/* ── Page-push layout (cc_pagePush only) ── */
@media (min-width: 768px) {
    body.cc-panel-left,
    body.cc-panel-right {
        transition: margin-left 0.25s ease-out, margin-right 0.25s ease-out;
    }
    body.cc-panel-open.cc-panel-left  { margin-left:  min(var(--cc-panel-width, 480px), 50vw); }
    body.cc-panel-open.cc-panel-right { margin-right: min(var(--cc-panel-width, 480px), 50vw); }
}

/* ============================================================
 * Skechers custom overrides
 * ============================================================ */

/* Hide the embedded message-icon variant of the widget. */
.cim-widget-message-icon.embedded {
    display: none;
}

/* ── Header "Login" label collision ──
 * The widget injects an unscoped global rule
 * (.user-message { display:flex; align-self:flex-end; padding:1rem }) for its
 * chat bubbles, which also matches the Skechers header's
 * <span class="user-message">Login</span>. Restore the header label to a plain
 * inline span, scoped to .c-header-global so the widget's own chat bubbles are
 * untouched. */
.c-header-global .user-message {
    display: inline;
    align-self: auto;
    padding: 0;
}

/* ── Search bar: bordered form + send button ── */

/* Match the search-bar footer background to the message container (#F7F9FA) so
 * the input area blends with the conversation area above it instead of sitting
 * on the widget's default white. */
.cim-widget-search-bar-wrapper {
    background: #F7F9FA !important;
}

/* Single outer border on the search form. Padding adds height (top/bottom) and
 * space between the send button and the right edge (left/right). */
.cim-widget-search-bar {
    border: 1px solid #D0D0D0 !important;
    border-radius: 24px !important;
    padding: 6px 8px !important;
}

/* Remove the widget's inner-input border so only the outer form border shows. */
.cim-widget-search-input {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    background: transparent !important;
}

/* Blue near-circular send button: 36x36, #0063BA fill, flex-centred content. */
.cim-widget-search-button-icon {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    width: 36px !important;
    height: 36px !important;
    padding: 8px !important;
    background: linear-gradient(135deg, #9731A0, #2478C1) !important;
    border: none !important;
    border-radius: 32px !important;
    box-shadow: 0 0 0 0 rgba(0, 0, 0, 0.10) !important;
    transition: filter 0.15s ease !important;
}

.cim-widget-search-button-icon:hover { filter: brightness(0.92) !important; }

/* Replace the built-in magnifier with a white paper-plane arrow: hide the
 * inline <svg> and paint the arrow as a ::before background. */
.cim-widget-search-button-icon svg { display: none !important; }

.cim-widget-search-button-icon::before {
    content: '';
    display: block;
    width: 18px;
    height: 18px;
    /* Outline paper-plane (Lucide "send"). The tight viewBox '1 1 22 22' frames
     * the glyph's 2..22 path (plus 1px for the round stroke) so background-size:
     * contain scales it to fill the element; the rotate + translate angles the
     * plane up-right and optically centres it within the circle. */
    transform: translate(-2px, 1px) rotate(40deg);
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='1 1 22 22' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m22 2-7 20-4-9-9-4Z'/%3E%3Cpath d='M22 2 11 13'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* User message text: neutral #181818, 15px, regular weight (overrides the
 * widget's runtime font-weight: 700). Covers both UserPrompt (typed prompt)
 * and UserQuery (search query) variants. */
.cim-widget-user-message-text,
.cim-widget-user-search-query {
    font-weight: 400 !important;
    font-size: 15px !important;
    color: #181818 !important;
}

/* ── Dialog header: Skechers purple→blue gradient with white text ──
 * The widget sets its header colours via inline CSS custom properties on
 * .cim-widget-dialog-header. The background variable only accepts a solid color,
 * so paint the gradient with the `background` shorthand (matching the minimized
 * FAB) and neutralise the variable to transparent. Title and control icons stay
 * white; the controls use fill/stroke="currentColor", so white cascades to them. */
.cim-widget-dialog-header {
    --cim-widget-header-background-color: transparent !important;
    --cim-widget-header-text-color: #ffffff !important;
    background: linear-gradient(135deg, #9731A0, #2478C1) !important;
    color: #ffffff !important;
}

.cim-widget-dialog-header .cim-widget-dialog-title,
.cim-widget-dialog-header .cim-widget-dialog-controls,
.cim-widget-dialog-header .cim-widget-icon-button,
.cim-widget-dialog-header .cim-widget-close-button {
    color: #ffffff !important;
}

.cim-widget-dialog-header .cim-widget-icon-button svg,
.cim-widget-dialog-header .cim-widget-close-button svg {
    fill: currentColor !important;
    stroke: currentColor !important;
}

/* ── AI sparkle badge before the title ──
 * The collapsed pill shows a white rounded-square badge with an AI sparkle next
 * to "Skechers AI"; the expanded header has only the text. Add a matching badge
 * as a ::before on the title (the widget markup is rendered by the Cimulate JS
 * and can't be edited). */
.cim-widget-dialog-header .cim-widget-dialog-title {
    display: inline-flex !important;
    align-items: center !important;
}

.cim-widget-dialog-header .cim-widget-dialog-title::before {
    content: '';
    flex: 0 0 auto;
    width: 24px;
    height: 24px;
    margin-right: 8px;
    border-radius: 50%;
    background-color: #ffffff;
    background-repeat: no-repeat;
    background-position: center;
    background-size: 16px 16px;
    /* Skechers AI sparkle asset (Utility Icons): one large sparkle + two small,
     * 16x16 viewBox, filled with the purple→blue brand gradient (via an inline
     * SVG linearGradient) so it reads on-brand rather than black on the white
     * badge. */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Cdefs%3E%3ClinearGradient id='sg' x1='0' y1='0' x2='16' y2='16' gradientUnits='userSpaceOnUse'%3E%3Cstop stop-color='%239731A0'/%3E%3Cstop offset='1' stop-color='%232478C1'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath d='M10.7194 8.3707L8.62502 9.41287C7.99579 9.72645 7.48686 10.2337 7.17224 10.8608L6.12661 12.9483C5.97856 13.2465 5.54982 13.2465 5.40176 12.9483L4.35613 10.8608C4.04152 10.2337 3.53258 9.72645 2.90335 9.41287L0.809004 8.3707C0.509812 8.22314 0.509812 7.79582 0.809004 7.64825L2.90335 6.60608C3.53258 6.29251 4.04152 5.78526 4.35613 5.15811L5.40176 3.07069C5.54982 2.77249 5.97856 2.77249 6.12661 3.07069L7.17224 5.15811C7.48686 5.78526 7.99579 6.29251 8.62502 6.60608L10.7194 7.64825C11.0186 7.79582 11.0186 8.22314 10.7194 8.3707ZM15.2874 13.0128L14.3899 12.564C14.1184 12.4318 13.9025 12.2104 13.7668 11.943L13.3165 11.0484C13.2548 10.9193 13.0697 10.9193 13.005 11.0484L12.5546 11.943C12.422 12.2135 12.1999 12.4287 11.9316 12.564L11.034 13.0128C10.9044 13.0743 10.9044 13.2588 11.034 13.3233L11.9316 13.7722C12.203 13.9044 12.4189 14.1257 12.5546 14.3932L13.005 15.2878C13.0666 15.4169 13.2517 15.4169 13.3165 15.2878L13.7668 14.3932C13.8994 14.1226 14.1215 13.9074 14.3899 13.7722L15.2874 13.3233C15.417 13.2618 15.417 13.0774 15.2874 13.0128ZM15.2874 2.68641L14.3899 2.23757C14.1184 2.10537 13.9025 1.88403 13.7668 1.61657L13.3165 0.721961C13.2548 0.592842 13.0697 0.592842 13.005 0.721961L12.5546 1.61657C12.422 1.8871 12.1999 2.1023 11.9316 2.23757L11.034 2.68641C10.9044 2.74789 10.9044 2.93235 11.034 2.99691L11.9316 3.44575C12.203 3.57794 12.4189 3.79929 12.5546 4.06675L13.005 4.96136C13.0666 5.09047 13.2517 5.09047 13.3165 4.96136L13.7668 4.06675C13.8994 3.79621 14.1215 3.58102 14.3899 3.44575L15.2874 2.99691C15.417 2.93542 15.417 2.75097 15.2874 2.68641Z' fill='url(%23sg)'/%3E%3C/svg%3E");
}

/* ── Suggestion pills: white fill, grey border ──
 * The widget renders these blue-on-white with a blue border; override to a
 * neutral #ffffff fill, #cccccc border, and dark-neutral text. */
.cim-widget-suggestion-button {
    background-color: #ffffff !important;
    border: 1px solid #cccccc !important;
    color: #181818 !important;
    font-size: 15px !important;
    /* Roomier hit area than the widget default (0.2rem 0.5rem). */
    padding: 0.5rem 0.9rem !important;
}

.cim-widget-suggestion-button span {
    color: #181818 !important;
    font-size: 15px !important;
}

.cim-widget-suggestion-button:hover {
    background-color: #ffffff !important;
    /* Design feedback #2: stroke darkens on hover (was #cccccc). */
    border-color: #888888 !important;
}

/* ── Message area backgrounds ──
 * Light-grey backdrop on the scrollable container; keep the embedded message
 * groups (chat cards) white so they read as cards on the grey. */
.cim-widget-message-container {
    background: #F7F9FA !important;
}

.cim-widget-dialog .cim-widget-message-group.embedded {
    background: #ffffff !important;
    /* 1px hairline stroke around the agent response card. */
    border: 1px solid #EFEFEF !important;
}

/* Agent response text: neutral #181818 at 15px (both mobile & desktop). The
 * Inquiry body is ReactMarkdown — plain <p>/<li> plus the widget's markdown
 * classes — so target the text nodes inside the embedded group. */
.cim-widget-dialog .cim-widget-message-group.embedded,
.cim-widget-dialog .cim-widget-message-group.embedded p,
.cim-widget-dialog .cim-widget-message-group.embedded li,
.cim-widget-dialog .cim-widget-message-group.embedded .cim-widget-li,
.cim-widget-dialog .cim-widget-message-group.embedded .cim-widget-ul,
.cim-widget-dialog .cim-widget-message-group.embedded .cim-widget-ol {
    color: #181818 !important;
}

.cim-widget-dialog .cim-widget-message-group.embedded p,
.cim-widget-dialog .cim-widget-message-group.embedded li,
.cim-widget-dialog .cim-widget-message-group.embedded .cim-widget-li {
    font-size: 15px !important;
}

/* PDP promo callout on the detail card. Now SHOWN and driven per-color: the
 * override resolves the selected color's callout from the field map's
 * c_promotionCallOutsByColor map and only renders the element when that color has
 * a PDP promo (a color with none renders nothing), so the prior blanket
 * `display:none` suppression is removed. The color rule is retained — at 0,4,1
 * specificity it re-asserts the override's red over the neutral #181818
 * embedded-paragraph text, honoring the --skx-promo-color theming var. */
.cim-widget-dialog .cim-widget-message-group.embedded p.skx-msg-pdp__promo {
    color: var(--skx-promo-color, #d31717) !important;
}

/* Carousel tile promo callout: same neutralization as the PDP promo above —
 * the embedded-group text rules force #181818 (0,3,0) and 15px onto every <p>,
 * flattening the override's red callout and blowing up its size. Re-assert the
 * override's red + smaller tile size at higher specificity (0,4,1) with
 * !important so the carousel callout matches the PDP one but reads smaller in
 * the denser tile. Still honors the override's --skx-promo-* theming vars. */
.cim-widget-dialog .cim-widget-message-group.embedded p.skx-msg-tile__promo {
    color: var(--skx-promo-color, #d31717) !important;
    font-size: var(--skx-promo-font-size, 0.75rem) !important;
}

/* "Excluded from promotions." notice — the detail card / comparison column render
 * this (with the --excluded modifier) for a markdown-only colorway that has no
 * active promotion, mirroring the storefront PDP. Re-color it orange over the
 * base promo red at higher specificity (0,5,1) so it beats both the base promo
 * rules above and the embedded-group #181818. The icon is a stroke-drawn
 * circle-slash (fill:none/stroke:currentColor set on the SVG), so it inherits
 * this orange automatically. Honors the --skx-promo-excluded-color theming var. */
.cim-widget-dialog .cim-widget-message-group.embedded p.skx-msg-pdp__promo.skx-msg-pdp__promo--excluded,
.cim-widget-dialog .cim-widget-message-group.embedded p.skx-msg-tile__promo.skx-msg-tile__promo--excluded {
    color: var(--skx-promo-excluded-color, #d97706) !important;
}

/* Product card: name in Medium weight, price in Bold. (The PDP title is styled
 * on its own below — kept out of this shared rule to avoid a duplicate selector.) */
.cim-widget-msg-product-card__title,
.cim-widget-msg-product-card__title-link {
    font-weight: 500 !important;
    color: #181818 !important;
    /* Carousel tile name: 14px/18px, truncated after 3 lines (overrides the
     * bundle's 1rem/1.3/2-line clamp). The override already sets the
     * -webkit-box display + box-orient needed for line-clamp; here we only
     * bump the line count and the type scale so longer names (e.g. "Arch Fit
     * Arcade HI - Moving Along") get a third line before the ellipsis. */
    font-size: 0.875rem !important;
    line-height: 18px !important;
    -webkit-line-clamp: 3 !important;
    line-clamp: 3 !important;
}

.cim-widget-msg-product-card__price {
    font-weight: 700 !important;
    color: #181818 !important;
}

/* Carousel tile: tighten the name -> price spacing to the spec's 8px. The bundle
 * spreads the name block and the price/promo block apart with
 * justify-content:space-between + gap:1rem (which also pins the price to the card
 * bottom); that produced a large, variable gap. flex-start + 8px stacks them
 * top-aligned at a fixed 8px instead. The promo is unaffected — it lives inside
 * .skx-msg-tile__price-block (its own 6px gap), so the whole price+promo block
 * just moves up together; overflow risk is lower since the gap shrinks 16px->8px. */
.cim-widget-msg-product-card__content {
    justify-content: flex-start !important;
    gap: 8px !important;
}

/* User's own message bubbles: light blue fill. */
.cim-widget-user-message.embedded {
    background: #CCE0F1 !important;
}

/* ── Welcome hero (empty state only) ──
 * The messaging widget has no built-in welcome screen: while there are no agent
 * messages it renders only a connecting indicator. This injects a hero (icon +
 * "Skechers AI" + intro) onto the message container, gated with :has() so it
 * shows only until the first agent message bubble (.cim-widget-message-group)
 * renders — at which point :not(:has(...)) stops matching and the hero is
 * removed, handing over to the conversation. The "…joined the conversation"
 * reset line and the connecting pulse are hidden while the hero is up. */
.cim-widget-message-container:not(:has(.cim-widget-message-group)) {
    /* Positioning context only — no flex centering on the scroll container. The
     * widget mounts/unmounts children here during load (connecting indicator,
     * reset line, first message); centering the container would reflow and shift
     * the hero on each of those. The hero is instead laid out as an absolute
     * overlay (::before/::after) that is independent of those siblings. */
    position: relative !important;
    /* The gradient star logo lives on the container background (not a pseudo-
     * element) so the ::before background layer is free for the WELCOME text
     * shimmer. It sits just above the centred WELCOME/subtitle group. */
    background:
        #F7F9FA
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='108' height='108' viewBox='0 0 108 108' fill='none' stroke='url(%23hg)' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cdefs%3E%3ClinearGradient id='hg' x1='0' y1='0' x2='108' y2='108' gradientUnits='userSpaceOnUse'%3E%3Cstop stop-color='%239731A0'/%3E%3Cstop offset='1' stop-color='%232478C1'/%3E%3C/linearGradient%3E%3C/defs%3E%3Ccircle cx='54' cy='54' r='28'/%3E%3Cpath d='M90 54 L98 54 M79.5 28.5 L85.1 22.9 M54 18 L54 10 M28.5 28.5 L22.9 22.9 M18 54 L10 54 M28.5 79.5 L22.9 85.1 M54 90 L54 98 M79.5 79.5 L85.1 85.1'/%3E%3Cpath stroke-width='3' d='M54 39 L57.8 48.7 L68.3 49.4 L60.2 56 L62.8 66.1 L54 60.5 L45.2 66.1 L47.8 56 L39.7 49.4 L50.2 48.7 Z'/%3E%3C/svg%3E")
        no-repeat !important;
    background-position: center calc(50% - 64px) !important;
    background-size: 80px 80px !important;
}

.cim-widget-message-container:not(:has(.cim-widget-message-group)) .cim-widget-connecting-indicator {
    display: none !important;
}

/* Hide the "Skechers Shopper Agent joined the conversation" reset line
 * EVERYWHERE (design feedback). The hero-only rule above stopped matching once
 * the first message group rendered, so the line reappeared mid-conversation;
 * this suppresses it unconditionally. */
.cim-widget-reset-message {
    display: none !important;
}

/* Non-full-height mode (if cc_dialogFullHeight is ever set false): cap via
 * max-height so the auto-height dialog can't grow past the same bound as the
 * full-height panel above (--skx-dialog-height). */
.cim-widget-dialog:not(.full-height) {
    max-height: var(--skx-dialog-height, 93.6dvh) !important;
}

/* Icon (108x108) + "Skechers AI" heading. The icon is a top-anchored background
 * image with the heading below it via top padding. It is a lightweight outline
 * SVG (circle + rays + star) rather than a heavy single-path vector, and
 * translateZ(0) promotes the pseudo-element to its own compositor layer — the
 * widget repaints this container frequently (auto-scroll, connecting-indicator
 * updates, :has() re-evaluation), and both choices keep the icon off that
 * repaint path to avoid flicker. */
/* "WELCOME" heading, centred just below the star. It scales up as it enters and
 * a pink highlight sweeps across the glyphs (background-clip: text). The base
 * transform has NO !important so the cc-welcome-in animation can drive it — an
 * !important transform would block the keyframe scale. */
.cim-widget-message-container:not(:has(.cim-widget-message-group))::before {
    content: "WELCOME";
    position: absolute !important;
    left: 50% !important;
    top: 50% !important;
    transform: translate(-50%, -50%) translateZ(0);
    text-align: center !important;
    /* Keep "WELCOME" on one line: an absolutely-positioned box with left:50%
     * and no width shrink-to-fits to only the right half of the panel, which is
     * narrower than the word on mobile and forces a wrap. nowrap overrides that. */
    white-space: nowrap !important;
    font-size: 34px !important;
    font-weight: 700 !important;
    letter-spacing: 3px !important;
    line-height: 1.1 !important;
    /* Two background layers, both clipped to the glyphs:
     *   1) a moving highlight band (the shimmer) — swept via background-position
     *   2) the static purple→blue brand gradient (the resting colour)
     * Layer 2 stays at 0 0 while layer 1 sweeps, so the letters are always
     * gradient-coloured and the shine passes over them. */
    background:
        linear-gradient(100deg, transparent 34%, rgba(255, 220, 248, 0.9) 50%, transparent 66%),
        linear-gradient(120deg, #9731A0 0%, #6E3BB0 45%, #2478C1 100%) !important;
    background-size: 250% 100%, 100% 100% !important;
    background-position: 150% 0, 0 0 !important;
    background-repeat: no-repeat !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    color: transparent !important;
    animation:
        cc-welcome-in 1.2s cubic-bezier(0.2, 0.7, 0.2, 1) 0.2s both,
        cc-welcome-shimmer 3.4s ease-in-out 1.5s infinite !important;
}

/* Subtitle, tucked close under WELCOME (tight spacing to match Figma). Fades in
 * last. Its transform keeps !important since only opacity is animated. */
.cim-widget-message-container:not(:has(.cim-widget-message-group))::after {
    content: "Skechers AI shopping assistant";
    position: absolute !important;
    left: 50% !important;
    top: 50% !important;
    transform: translate(-50%, calc(-50% + 32px)) translateZ(0) !important;
    width: 320px !important;
    max-width: 80% !important;
    text-align: center !important;
    font-size: 15px !important;
    line-height: 1.4 !important;
    color: #555555 !important;
    animation: cc-hero-fade-in 0.8s ease 1.4s both !important;
}

/* Subtitle fade-in. */
@keyframes cc-hero-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* WELCOME entrance: fade + scale up (the "gets bigger" reveal). */
@keyframes cc-welcome-in {
    from { opacity: 0; transform: translate(-50%, -50%) scale(0.5) translateZ(0); }
    to   { opacity: 1; transform: translate(-50%, -50%) scale(1) translateZ(0); }
}

/* Pink shimmer: sweep the highlight band (layer 1) across while the brand
 * gradient (layer 2) stays put, then hold before repeating. */
@keyframes cc-welcome-shimmer {
    0%   { background-position: 150% 0, 0 0; }
    55%  { background-position: -60% 0, 0 0; }
    100% { background-position: -60% 0, 0 0; }
}

@media (prefers-reduced-motion: reduce) {
    .cim-widget-message-container:not(:has(.cim-widget-message-group))::before,
    .cim-widget-message-container:not(:has(.cim-widget-message-group))::after {
        animation: none !important;
    }
}

/* ── PDP option chips (size/variant selectors in a product card) ──
 * Default: light-grey 6px-radius outline. Selected: reset the widget's blue
 * fill and white text back to default, and mark selection with a 2px dark-grey
 * border. */
label.cim-widget-msg-pdp__chip {
    border-radius: var(--Corner-radius-small, 6px) !important;
    border: 1px solid var(--neutral-medium-cc, #CCC) !important;
}

label.cim-widget-msg-pdp__chip.selected {
    border-radius: var(--Corner-radius-small, 6px) !important;
    border: 2px solid var(--font-default-medium-43, #434343) !important;
    background-color: transparent !important;
    color: inherit !important;
}

/* ── Color swatches: square off to match the size/variant chips ──
 * The widget renders each swatch (and its image) as a full circle
 * (border-radius: 50%). Override to the same small corner radius as the chips
 * so the color selector reads as the same shape as Size/Width. The image sits
 * inside 2px of padding, so its radius is inset by 2px to stay concentric. */
label.cim-widget-msg-pdp__swatch {
    border-radius: var(--Corner-radius-small, 6px) !important;
}

.cim-widget-msg-pdp__swatch-image {
    border-radius: calc(var(--Corner-radius-small, 6px) - 2px) !important;
}

/* ============================================================
 * PDP detail-card redesign (design feedback)
 * ------------------------------------------------------------
 * Larger touch targets, brand type, solid CTA. CSS-only and
 * scoped to .cim-widget-msg-pdp so the carousel tile and the
 * comparison grid — which share .cim-widget-price* — are left
 * alone. "20pt" from the mockup is rendered as 20px (web
 * convention); Mulish is the storefront brand face and falls
 * back to the widget font if the page hasn't loaded it.
 * ============================================================ */

/* Headline (product name): Mulish Black, 20px. The PDP title is styled solely
 * here (removed from the shared product-card rule above to avoid a duplicate
 * selector); color is the #181818 used across the widget.
 *
 * Scoped under .cim-widget-message-group.embedded so this out-specifics the
 * generic embedded-paragraph rule above (0,3,1 → font-size:15px). The title is a
 * <p> inside that group, so without the ancestor prefix the 15px rule wins on
 * specificity even though both are !important. The prefixed selector is (0,4,1),
 * so 20px wins — same technique as the promo-callout override. */
.cim-widget-dialog .cim-widget-message-group.embedded p.cim-widget-msg-pdp__title,
.cim-widget-dialog .cim-widget-message-group.embedded .cim-widget-msg-pdp__title-link {
    font-family: 'Mulish', var(--cim-widget-font-family, sans-serif) !important;
    font-weight: 900 !important;
    font-size: 20px !important;
    line-height: 1.25 !important;
    color: #181818 !important;
}

/* Price (sale amount): Mulish Bold, 20px. Scoped under .cim-widget-msg-pdp
 * so the tile / comparison price (same .cim-widget-price__amount class)
 * keeps its smaller size; the struck-through compare price is untouched. */
.cim-widget-msg-pdp .cim-widget-price__amount {
    font-family: 'Mulish', var(--cim-widget-font-family, sans-serif) !important;
    font-weight: 700 !important;
    font-size: 20px !important;
}

/* Color swatches: 6 across, each filling its grid column for a bigger
 * touch target while still showing every color. The swatch is normally a
 * fixed 36px square; stretch it to the cell and keep it square. */
.cim-widget-msg-pdp__swatches {
    display: grid !important;
    grid-template-columns: repeat(6, 1fr) !important;
    gap: 0.375rem !important;
}

.cim-widget-msg-pdp__swatches label.cim-widget-msg-pdp__swatch {
    width: 100% !important;
    height: auto !important;
    min-width: 0 !important;
    min-height: 0 !important;
    aspect-ratio: 1 / 1 !important;
}

/* Size chips: 6 across for larger touch targets. Keyed by CHIP COUNT, not by
 * aria-labelledby — the earlier "variant-label-size" scope depended on the
 * attribute id being exactly "size", which doesn't hold on every catalog, so
 * Size fell back to natural wrapping (7 across). `:has(…:nth-child(7))` matches
 * any chip group with 7+ options → that's Size; Width (1–2 options) never has a
 * 7th chip, so it stays inline automatically. No attribute-id assumption. */
.cim-widget-msg-pdp__chips:has(.cim-widget-msg-pdp__chip:nth-child(7)) {
    display: grid !important;
    grid-template-columns: repeat(6, 1fr) !important;
    gap: 0.375rem !important;
}

.cim-widget-msg-pdp__chips:has(.cim-widget-msg-pdp__chip:nth-child(7)) label.cim-widget-msg-pdp__chip {
    width: 100% !important;
    min-width: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* Remove the Quantity row (label + stepper). The quantity block is a
 * generic .cim-widget-msg-pdp__variant; the stepper is unique to it, so
 * :has() isolates it without touching Color / Width / Size. The override's
 * quantity state stays at its minimum (1), so Add-to-cart still adds one. */
.cim-widget-msg-pdp__variant:has(.cim-widget-msg-pdp__stepper) {
    display: none !important;
}

/* Add-to-cart: solid blue, full-width Primary CTA (was an outlined button).
 * Matched to the storefront's primary filled-button spec: #0063BA fill, an
 * 8px corner radius, and a 2px #0059A7 bottom border (the pressed-edge look),
 * darkening to #004F95 on hover. Uses the storefront button design tokens with
 * the design-provided hex fallbacks so it tracks the system if those tokens are
 * defined on the page. */
button.cim-widget-msg-pdp__add-to-cart {
    width: 100% !important;
    min-height: 48px !important;
    background-color: var(--Buttons-button-primary-filled-default-fill, #0063BA) !important;
    border: none !important;
    border-bottom: 2px solid var(--Buttons-button-primary-filled-default-border-bottom, #0059A7) !important;
    border-radius: var(--buttons-button-new-spacing-corner-radius, 8px) !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    font-size: 1rem !important;
}

button.cim-widget-msg-pdp__add-to-cart:hover:not(:disabled) {
    background-color: var(--skx-atc-bg-hover, #004F95) !important;
}

/* 16px between the CTA and the "View Full Details" link beneath it. */
.cim-widget-msg-pdp__actions {
    gap: 16px !important;
}

/* "View Full Details" link under the CTA (markup added in the override
 * bundle). Centered 15px storefront-style link; it is a plain full-page
 * navigation to the PDP, which unmounts the widget — i.e. closes the agent. */
.skx-msg-pdp__view-details {
    align-self: center !important;
    color: var(--Buttons-button-primary-filled-default-fill, #0063BA) !important;
    font-size: 15px !important;
    text-decoration: none !important;
}

.skx-msg-pdp__view-details:hover {
    text-decoration: underline !important;
}

/* ============================================================================
 * Design feedback — round 2 (CSS-only).
 *   #2 Pill hover darkens — applied in the base .cim-widget-suggestion-button:hover
 *      rule above (kept there to avoid a duplicate selector).
 *   #3 Comparison names black   #6 Remove modal icon
 * (#1 navbar a11y and #4 agentscript are owned elsewhere, not styling.)
 * ========================================================================== */

/* #3 Comparison product names read as links (blue). Make them the neutral
 * near-black used elsewhere so they don't look clickable. */
.cim-widget-product-comparison__name,
.cim-widget-product-comparison__name-link {
    color: #181818 !important;
}

/* #6 Modal/expand view is broken — remove its entry point. Hides the dialog's
 * "Expand" (diagonal-arrows) control so the widget stays in its dialog size. */
.cim-widget-toggle-modal-button {
    display: none !important;
}

/* ============================================================================
 * Design feedback — round 3 (CSS-only, easy to revert: delete this block).
 *   Sale price red + grey strikethrough (tile + card) · header button hover
 * ========================================================================== */

/* Sale price in the storefront reduced-price red (#c00, from
 * `.sales.reduced-price { color:#c00 }`), with the original left as a grey
 * strikethrough — identical on the carousel tile and the detail card. The sale
 * amount only turns red when a struck compare price is present (:has), i.e. the
 * item is actually discounted; non-sale prices keep their default color. */
.cim-widget-msg-product-card .cim-widget-price:has(.cim-widget-price__compare) .cim-widget-price__amount,
.cim-widget-msg-pdp .cim-widget-price:has(.cim-widget-price__compare) .cim-widget-price__amount {
    color: var(--skx-sale-red, #c00) !important;
}

/* Struck original price: one consistent solid grey on both surfaces (replaces
 * the semi-transparent default so tile and carousel match exactly). */
.cim-widget-msg-product-card .cim-widget-price__compare,
.cim-widget-msg-pdp .cim-widget-price__compare {
    color: #767676 !important;
    opacity: 1 !important;
}

/* Header controls — the overflow "⋮" menu (.cim-widget-icon-button) and the
 * close "X" (.cim-widget-close-button, which does NOT carry the icon-button
 * class, so it is named explicitly). Both get the SAME hover: the button grows
 * (scale) with a drop shadow and fills to a dark translucent circle with a
 * WHITE glyph. That reads clearly on BOTH the gradient (behind the X) and the
 * kebab's resting grey circle, and keeps the glyph above the WCAG 3:1 floor at
 * any gradient position (replacing the near-invisible stock #f0f0f0 tint). The
 * kebab's dots (react-icons, fill:currentColor) follow `color`, so they flip
 * white to match the X exactly.
 *
 * IMPORTANT — exclude the launcher: on some widget builds (e.g. BDCN) the
 * minimized FAB button carries BOTH .cim-widget-minimized-button AND
 * .cim-widget-icon-button, so these header-control rules would otherwise bleed
 * onto the FAB — overriding its own `width 0.25s` drawer transition and adding
 * the scale(1.18) zoom on hover (the FAB "zooms out" instead of sliding open as
 * a drawer). :not(.cim-widget-minimized-button) keeps these scoped to the real
 * header controls so the launcher keeps its pill/drawer animation. */
.cim-widget-icon-button:not(.cim-widget-minimized-button),
.cim-widget-close-button {
    transition: transform 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease !important;
}

.cim-widget-icon-button:not(.cim-widget-minimized-button):hover:not(:disabled),
.cim-widget-close-button:hover:not(:disabled) {
    background-color: rgba(0, 0, 0, 0.32) !important;
    color: #ffffff !important;
    transform: scale(1.18) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35) !important;
}

.cim-widget-icon-button:not(.cim-widget-minimized-button):hover:not(:disabled) svg {
    fill: currentColor !important;
}

/* ============================================================================
 * Hide the in-cart coupon entry (CSS-only, easy to revert: delete this block).
 * .cim-widget-cart-coupon is the widget's coupon-row flex container (holds the
 * input field + submit button). Skechers does not want coupon entry inside the
 * agent cart, so the whole row is removed. !important beats the widget's
 * runtime-injected `display: flex` on the same selector.
 * ========================================================================== */
.cim-widget-cart-coupon {
    display: none !important;
}

/* ============================================================================
 * Shopper Agent header button — "Shop With AI" (design: brand gradient pill)
 * ----------------------------------------------------------------------------
 * Restyles the base .cc-header-button (a plain black pill in the mirrored base
 * rules above) to the purple->blue brand gradient pill from Figma, and places
 * it responsively. The SAME template (cimulate/headerButton) is included twice:
 *   - tablet + desktop (>=768px): in the header bar, left of the search box
 *     (pageHeader.isml, inside .c-header-global__search-container)
 *   - mobile (<768px): full-width at the top of the hamburger flyout
 *     (menu.isml, inside .menu-group)
 * Each instance is shown ONLY in its own breakpoint via the ancestor-scoped
 * rules below, so there is never a visible duplicate.
 *
 * Visibility is gated to the agent being ACTIVE: .cc-header-entry is hidden by
 * default and revealed only under body.cc-agent-active, which messagingWidget's
 * activateAgent() sets exactly when the FAB appears (and, under dark launch,
 * only after enableAgent()) — so the button mirrors the FAB. The pill styling
 * and the hidden-until-active default now live with the base .cc-header-button
 * rules near the top of this file; only the responsive placement rules remain
 * below.
 * ========================================================================== */

/* ── Header-bar placement: tablet + desktop (left of the search box) ── */
@media (min-width: 768px) {
    body.cc-agent-active .c-header-global__search-container .cc-header-entry {
        display: inline-flex !important;
        align-items: center !important;
        margin: 0 12px 0 0 !important;
    }
}

/* Keep the pill snug to the LEFT of the search box on desktop. Base sets
 * .c-search { width:100% } at Skechers' lg (1280px+), which stretches the search
 * cell to fill .c-header-global__search-container and strands the pill at the far
 * left (next to the nav) with a big gap before the input. Collapsing the cell to
 * its content width lets the container's justify-content:flex-end group
 * [pill][search][cart] together on the right — the Figma layout. Breakpoint must
 * match the base rule (lg = 1280px, not Bootstrap's 992px). Scoped to
 * cc-agent-active so the search box is untouched whenever the agent is off. */
@media (min-width: 1280px) {
    body.cc-agent-active .c-header-global__search-container .c-search {
        width: auto !important;
    }
}

/* ── Mobile flyout placement: full-width pill at the top of the hamburger menu.
 * Re-show the label here (the base mobile rule hides .cc-header-button-label)
 * and let the pill fill the flyout width. ── */
@media (max-width: 767.98px) {
    body.cc-agent-active .menu-group .cc-header-entry {
        display: block !important;
        margin: 12px 16px 4px !important;
    }
    .menu-group .cc-header-button {
        width: 100% !important;
        justify-content: center !important;
        padding: 13px 16px !important;
        font-size: 15px !important;
    }
    .menu-group .cc-header-button-label { display: inline !important; }
}

/* ============================================================================
 * Shopper Agent PDP action buttons — "Shop With AI" / "Build an Outfit" /
 * "Show similar products". Injected CLIENT-SIDE by static/js/ccPdpButtons.js
 * into the main .c-product-details__attributes container on PDP (no
 * app_skechers edit); the loader cimulate/pdpButtonsClient.isml gates rendering
 * on configHelper.isPdpButtonEnabled().
 * ----------------------------------------------------------------------------
 * Same dark-launch gate as the FAB and the header button: the whole row is
 * display:none until body.cc-agent-active is set (messagingWidget activateAgent),
 * so these appear exactly when the FAB does. Primary pill reuses the brand
 * gradient; the two action pills are the white/outline variant from Figma with
 * a brand-coloured sparkle.
 * ========================================================================== */

/* Hidden until the agent activates. */
.cc-pdp-entry { display: none !important; }

body.cc-agent-active .cc-pdp-entry {
    display: flex !important;
    flex-wrap: wrap;
    gap: 10px;
    margin: 14px 0 0 0;
}

.cc-pdp-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border-radius: 999px;
    padding: 10px 18px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    border: 1px solid transparent;
    transition: filter 0.15s ease, background 0.15s ease;
}

.cc-pdp-button__icon  { width: 16px; height: 16px; flex: 0 0 auto; }
.cc-pdp-button__label { white-space: nowrap; letter-spacing: 0.01em; }

/* Primary — brand gradient pill (matches the header button / FAB). */
.cc-pdp-button--primary {
    background: linear-gradient(135deg, #9731A0, #2478C1);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}
.cc-pdp-button--primary:hover  { filter: brightness(0.94); }
.cc-pdp-button--primary:active { filter: brightness(0.90); }
.cc-pdp-button--primary .cc-pdp-button__icon { color: #ffffff; }

/* Secondary — white/outline pill with a brand-coloured sparkle. */
.cc-pdp-button--secondary {
    background: #ffffff;
    color: #1a1a1a;
    border-color: #c9c9c9;
}
.cc-pdp-button--secondary:hover  { background: #f6f6f6; }
.cc-pdp-button--secondary:active { background: #efefef; }
.cc-pdp-button--secondary .cc-pdp-button__icon { color: #9731A0; }
