/* AI 采购抽屉：视觉参数与 ai-purchase-assistant/web/styles.css 保持一致。 */
.ai-shopping-search-trigger,
.ai-shopping-search-trigger * {
    box-sizing: border-box;
    letter-spacing: 0;
}

.mainsearchcontent.ai-shopping-search-equipped .searchsku,
.mainsearchcontent.ai-shopping-search-equipped .search-more-textarea {
    padding-right: 188px !important;
}

.ai-shopping-search-trigger {
    position: absolute;
    top: 4px;
    right: 88px;
    z-index: 12;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    width: 96px;
    height: 30px;
    padding: 0 12px;
    color: #333333;
    font-family: -apple-system, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
    font-size: 14px;
    font-weight: 400;
    line-height: 30px;
    white-space: nowrap;
    appearance: none;
    background: #f4f5f6;
    border: 0;
    border-radius: 15px;
    cursor: pointer;
    transition: color 120ms ease, background-color 120ms ease;
}

.ai-shopping-search-trigger:hover {
    color: #1597ee;
    background: #edf8ff;
}

.ai-shopping-search-trigger:active {
    color: #1597ee;
    background: #d4edff;
}

.ai-shopping-search-trigger:focus-visible {
    color: #1597ee;
    background: #edf8ff;
    outline: 2px solid #9bd4fb;
    outline-offset: 1px;
}

.ai-shopping-search-trigger:disabled {
    color: #46505b;
    background: #d9efff;
    cursor: not-allowed;
    opacity: 1;
}

.ai-shopping-search-trigger-icon {
    position: relative;
    display: block;
    width: 17px;
    height: 17px;
    flex: 0 0 17px;
    color: #61748a;
    font-size: 16px;
    line-height: 17px;
}

.ai-shopping-search-trigger-icon::after {
    position: absolute;
    top: -4px;
    right: -2px;
    color: currentColor;
    font-family: Arial, sans-serif;
    font-size: 7px;
    line-height: 1;
    content: "✦";
}

.ai-shopping-search-trigger:hover .ai-shopping-search-trigger-icon,
.ai-shopping-search-trigger:active .ai-shopping-search-trigger-icon,
.ai-shopping-search-trigger:focus-visible .ai-shopping-search-trigger-icon {
    color: #1597ee;
}

.ai-shopping-search-trigger:disabled .ai-shopping-search-trigger-icon {
    color: #5c6976;
}

.ai-shopping-search-trigger-label {
    line-height: 30px;
}

.ai-shopping-launcher,
.ai-shopping-launcher * {
    box-sizing: border-box;
    letter-spacing: 0;
}

.ai-shopping-launcher {
    position: fixed;
    right: 24px;
    bottom: 96px;
    z-index: 10010;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    width: 112px;
    height: 48px;
    padding: 4px 13px 4px 5px;
    appearance: none;
    background: #ffffff;
    border: 1px solid #bfdbfe;
    border-radius: 24px;
    box-shadow: 0 6px 20px rgba(47, 107, 255, 0.22);
    cursor: pointer;
    transition: box-shadow 160ms ease, transform 160ms ease;
}

.ai-shopping-launcher[hidden] {
    display: none !important;
}

.ai-shopping-launcher:hover {
    box-shadow: 0 8px 24px rgba(47, 107, 255, 0.3);
    transform: translateY(-2px);
}

.ai-shopping-launcher:focus-visible {
    outline: 2px solid #2f6bff;
    outline-offset: 3px;
}

.ai-shopping-launcher-icon {
    display: block;
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    object-fit: contain;
    border-radius: 50%;
}

.ai-shopping-launcher-text {
    color: #1f53e0;
    font-family: -apple-system, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
    font-size: 13px;
    font-weight: 600;
    line-height: 20px;
    white-space: nowrap;
}

.ai-shopping-drawer-root,
.ai-shopping-drawer-root * {
    box-sizing: border-box;
    letter-spacing: 0;
}

.ai-shopping-drawer-root {
    --ai-blue: #2f6bff;
    --ai-blue-dark: #1f53e0;
    --ai-blue-light: #eef4ff;
    --ai-ink: #333333;
    --ai-muted: #9aa3b2;
    --ai-line: #ececec;
    --ai-panel-bg: #eef2f8;
    --ai-price: #ff5a1f;
    --ai-green: #22a06b;
    --ai-shadow: 0 1px 6px rgba(0, 0, 0, 0.05);
    position: fixed;
    inset: 0;
    z-index: 10020;
    visibility: hidden;
    color: var(--ai-ink);
    font-family: -apple-system, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
    font-size: 12px;
    line-height: 1.5;
    pointer-events: none;
}

.ai-shopping-drawer-root.is-open {
    visibility: visible;
    pointer-events: auto;
}

.ai-shopping-drawer-root [hidden] {
    display: none !important;
}

.ai-shopping-drawer-root .sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.ai-shopping-backdrop {
    position: absolute;
    inset: 0;
    background: transparent;
}

.ai-shopping-panel {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    width: 500px;
    max-width: 100vw;
    min-width: 340px;
    height: 100vh;
    overflow: hidden;
    background: var(--ai-panel-bg);
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.16);
    transform: translateX(100%);
    transition: transform 250ms ease;
    outline: none;
}

.ai-shopping-drawer-root.is-open .ai-shopping-panel {
    transform: translateX(0);
}

.ai-shopping-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex: 0 0 auto;
    min-height: 54px;
    padding: 15px 18px;
    color: #ffffff;
    background: linear-gradient(135deg, #3b82f6, #2f6bff);
}

.ai-shopping-brand {
    display: flex;
    align-items: center;
    min-width: 0;
    gap: 8px;
}

.ai-shopping-brand-icon {
    display: block;
    width: 24px;
    height: 24px;
    flex: 0 0 24px;
    padding: 1px;
    object-fit: contain;
    background: #ffffff;
    border-radius: 50%;
}

.ai-shopping-brand-copy h2 {
    margin: 0;
    color: #ffffff;
    font-size: 15px;
    font-weight: 700;
    line-height: 24px;
}

.ai-shopping-brand-copy p {
    display: none;
}

.ai-shopping-debug-badge {
    padding: 2px 5px;
    color: #9a3412;
    background: #ffedd5;
    border-radius: 4px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 9px;
    font-weight: 800;
    line-height: 14px;
}

.ai-shopping-header-actions {
    display: flex;
    align-items: center;
    gap: 2px;
}

.ai-shopping-icon-button,
.ai-shopping-icon-button:first-child {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    padding: 0;
    color: #ffffff;
    background: transparent;
    border: 0;
    border-radius: 4px;
    font-size: 18px;
    line-height: 1;
    opacity: 0.9;
    cursor: pointer;
}

.ai-shopping-icon-button:hover,
.ai-shopping-icon-button:focus-visible {
    background: rgba(255, 255, 255, 0.14);
    opacity: 1;
    outline: none;
}

.ai-shopping-icon-button .glyphicon {
    font-size: 13px;
}

.ai-shopping-skill-promo {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: stretch;
    flex: 0 0 auto;
    min-height: 72px;
    color: #25344f;
    background: #f1f7ff;
    border-left: 3px solid #2f6bff;
    border-bottom: 1px solid #dbe8f7;
    box-shadow: inset 0 1px 0 #ffffff, 0 2px 8px rgba(37, 104, 211, 0.08);
}

.ai-shopping-skill-promo[hidden] {
    display: none;
}

.ai-shopping-skill-promo-link {
    display: flex;
    align-items: center;
    min-width: 0;
    flex: 1 1 auto;
    gap: 10px;
    padding: 10px 34px 10px 12px;
    color: inherit;
    text-decoration: none;
    transition: background-color 140ms ease;
}

.ai-shopping-skill-promo-link:hover,
.ai-shopping-skill-promo-link:focus-visible {
    color: inherit;
    background: #e9f3ff;
    text-decoration: none;
    outline: none;
}

.ai-shopping-skill-promo-link:focus-visible {
    box-shadow: inset 0 0 0 2px #93c5fd;
}

.ai-shopping-skill-promo-icon {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    color: #258df4;
    background: #ffffff;
    border: 1px solid #b9dcff;
    border-radius: 6px;
    box-shadow: 0 2px 7px rgba(37, 141, 244, 0.13);
}

.ai-shopping-skill-promo-icon .icon {
    font-size: 20px;
    line-height: 1;
}

.ai-shopping-skill-promo-icon::after {
    position: absolute;
    top: 3px;
    right: 3px;
    color: #2f6bff;
    font-family: Arial, sans-serif;
    font-size: 8px;
    line-height: 1;
    content: "✦";
}

.ai-shopping-skill-promo-copy {
    display: flex;
    min-width: 0;
    flex: 1 1 auto;
    flex-direction: column;
}

.ai-shopping-skill-promo-copy strong {
    overflow: hidden;
    color: #1d2f4d;
    font-size: 13px;
    font-weight: 700;
    line-height: 20px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ai-shopping-skill-promo-copy > span {
    overflow: hidden;
    color: #62738c;
    font-size: 11px;
    line-height: 18px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ai-shopping-skill-promo-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 30px;
    flex: 0 0 auto;
    gap: 5px;
    color: #ffffff;
    background: #2f6bff;
    border-radius: 6px;
    box-shadow: 0 3px 8px rgba(47, 107, 255, 0.2);
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
    transition: background-color 140ms ease, box-shadow 140ms ease;
}

.ai-shopping-skill-promo-action .glyphicon {
    top: 0;
    font-size: 10px;
    line-height: 1;
}

.ai-shopping-skill-promo-link:hover .ai-shopping-skill-promo-action,
.ai-shopping-skill-promo-link:focus-visible .ai-shopping-skill-promo-action {
    background: #1f5fe5;
    box-shadow: 0 4px 10px rgba(31, 95, 229, 0.26);
}

.ai-shopping-skill-promo-dismiss {
    position: absolute;
    top: 4px;
    right: 4px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    padding: 0;
    color: #8996a9;
    background: transparent;
    border: 0;
    border-radius: 4px;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
}

.ai-shopping-skill-promo-dismiss:hover,
.ai-shopping-skill-promo-dismiss:focus-visible {
    color: #3c4d67;
    background: #e8f1fd;
    outline: none;
}

.ai-shopping-conversation {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 0;
}

.ai-shopping-load-older {
    align-self: center;
    flex: 0 0 auto;
    margin: 10px 0 -5px;
    padding: 4px 12px;
    color: var(--ai-blue);
    background: #ffffff;
    border: 1px solid #cbd9f8;
    border-radius: 4px;
    font-size: 11px;
    cursor: pointer;
}

.ai-shopping-load-older:disabled {
    color: var(--ai-muted);
    cursor: wait;
}

.ai-shopping-history-snapshot-notice {
    display: flex;
    align-items: flex-start;
    flex: 0 0 auto;
    gap: 8px;
    margin: 0;
    padding: 8px 12px;
    color: #7a6240;
    background: #fff8e8;
    border-bottom: 1px solid #f0e0bf;
    font-size: 12px;
    line-height: 1.45;
}

.ai-shopping-history-snapshot-notice[hidden] {
    display: none !important;
}

.ai-shopping-history-snapshot-notice-icon {
    flex: 0 0 auto;
    margin-top: 1px;
    color: #c3922f;
    font-size: 12px;
}

.ai-shopping-history-snapshot-notice-text {
    flex: 1 1 auto;
    margin: 0;
    min-width: 0;
}

.ai-shopping-history-snapshot-notice-close {
    flex: 0 0 auto;
    width: 20px;
    height: 20px;
    margin: -2px -4px 0 0;
    padding: 0;
    color: #9a8060;
    background: transparent;
    border: 0;
    border-radius: 4px;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
}

.ai-shopping-history-snapshot-notice-close:hover,
.ai-shopping-history-snapshot-notice-close:focus-visible {
    color: #6b5335;
    background: rgba(195, 146, 47, 0.12);
    outline: none;
}

.ai-shopping-messages {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 11px;
    min-height: 0;
    padding: 16px;
    overflow-x: hidden;
    overflow-y: auto;
    background: var(--ai-panel-bg);
    overscroll-behavior: contain;
}

.ai-shopping-messages > * {
    flex-shrink: 0;
}

.ai-shopping-message-row {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    max-width: 100%;
}

.ai-shopping-message-row.is-user {
    justify-content: flex-end;
}

.ai-shopping-message-row.is-send-failed {
    display: grid;
    grid-template-columns: minmax(0, auto) 30px;
    grid-template-areas:
        "bubble avatar"
        "failed avatar";
    align-items: start;
    align-content: start;
    justify-content: end;
    column-gap: 9px;
    row-gap: 4px;
}

.ai-shopping-message-row.is-send-failed > .ai-shopping-bubble {
    grid-area: bubble;
}

.ai-shopping-message-row.is-send-failed > .ai-shopping-avatar {
    grid-area: avatar;
}

.ai-shopping-history-failed {
    display: inline-flex;
    grid-area: failed;
    align-items: center;
    justify-self: start;
    gap: 3px;
    color: #d92d20;
    font-size: 10px;
    line-height: 14px;
}

.ai-shopping-history-failed::before {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 11px;
    height: 11px;
    border: 1px solid currentColor;
    border-radius: 50%;
    content: "!";
    font-size: 8px;
    font-weight: 600;
    line-height: 1;
}

.ai-shopping-history {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 0;
    background: #ffffff;
}

.ai-shopping-history-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex: 0 0 auto;
    min-height: 44px;
    padding: 7px 14px;
    border-bottom: 1px solid var(--ai-line);
}

.ai-shopping-history-back,
.ai-shopping-history-refresh {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-height: 28px;
    padding: 0 7px;
    color: #4b5563;
    background: transparent;
    border: 0;
    font-size: 12px;
    cursor: pointer;
}

.ai-shopping-history-refresh {
    width: 28px;
    padding: 0;
}

.ai-shopping-history-back .glyphicon,
.ai-shopping-history-refresh .glyphicon {
    top: 0;
    line-height: 18px;
}

.ai-shopping-history-back .glyphicon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 18px;
    flex: 0 0 14px;
}

.ai-shopping-history-back-label {
    display: inline-block;
    line-height: 18px;
}

.ai-shopping-history-back:hover,
.ai-shopping-history-refresh:hover {
    color: var(--ai-blue);
}

.ai-shopping-history-state {
    flex: 0 0 auto;
    padding: 22px 16px 8px;
    color: #667085;
    text-align: center;
}

.ai-shopping-history-state.is-error {
    color: #b42318;
}

.ai-shopping-history-list {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.ai-shopping-history-item {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 32px;
    padding: 0 10px 0 16px;
    border-bottom: 1px solid #edf0f4;
}

.ai-shopping-history-item:hover {
    background: #f8fafc;
}

.ai-shopping-history-open-item {
    display: flex;
    align-items: flex-start;
    flex-direction: column;
    min-width: 0;
    padding: 13px 8px 12px 0;
    text-align: left;
    background: transparent;
    border: 0;
    cursor: pointer;
}

.ai-shopping-history-item-title,
.ai-shopping-history-item-preview,
.ai-shopping-history-item-meta {
    display: block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ai-shopping-history-item-title {
    color: #20242a;
    font-size: 13px;
    font-weight: 600;
    line-height: 20px;
}

.ai-shopping-history-item-preview {
    margin-top: 2px;
    color: #667085;
    font-size: 11px;
    line-height: 18px;
}

.ai-shopping-history-item-meta {
    margin-top: 3px;
    color: #98a2b3;
    font-size: 10px;
    line-height: 16px;
}

.ai-shopping-history-menu {
    align-self: start;
    width: 28px;
    height: 28px;
    margin-top: 10px;
    padding: 0;
    color: #667085;
    background: transparent;
    border: 0;
    border-radius: 4px;
    cursor: pointer;
}

.ai-shopping-history-menu:hover {
    color: var(--ai-blue);
    background: #eef4ff;
}

.ai-shopping-history-actions {
    display: flex;
    align-items: center;
    grid-column: 1 / -1;
    gap: 7px;
    padding: 0 0 10px;
}

.ai-shopping-history-actions > button {
    min-height: 26px;
    padding: 0 9px;
    color: #344054;
    background: #ffffff;
    border: 1px solid #d0d5dd;
    border-radius: 4px;
    font-size: 11px;
    cursor: pointer;
}

.ai-shopping-history-actions > button.is-primary {
    color: #ffffff;
    background: var(--ai-blue);
    border-color: var(--ai-blue);
}

.ai-shopping-history-actions > button.is-danger {
    color: #b42318;
    border-color: #f4b8b2;
}

.ai-shopping-history-actions > button:disabled {
    cursor: wait;
    opacity: 0.55;
}

.ai-shopping-history-actions > span {
    margin-right: auto;
    color: #b42318;
    font-size: 11px;
}

.ai-shopping-history-rename-input {
    min-width: 0;
    height: 28px;
    flex: 1 1 auto;
    padding: 4px 8px;
    color: #20242a;
    background: #ffffff;
    border: 1px solid #9bbcff;
    border-radius: 4px;
    font-size: 12px;
    outline: none;
}

.ai-shopping-history-more {
    flex: 0 0 auto;
    min-height: 38px;
    color: var(--ai-blue);
    background: #ffffff;
    border: 0;
    border-top: 1px solid var(--ai-line);
    font-size: 12px;
    cursor: pointer;
}

.ai-shopping-history-more:disabled {
    color: var(--ai-muted);
    cursor: wait;
}

.ai-shopping-avatar {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    padding: 2px;
    overflow: hidden;
    color: #333333;
    background: linear-gradient(135deg, #cfe0ff, #eaf1ff);
    border: 1px solid #d6e3ff;
    border-radius: 50%;
    font-size: 12px;
}

.ai-shopping-avatar img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.ai-shopping-avatar.is-user {
    color: #ffffff;
    background: linear-gradient(135deg, #2f6bff, #5b8bff);
    border: 0;
}

.ai-shopping-bubble {
    width: fit-content;
    max-width: calc(100% - 39px);
    padding: 9px 12px;
    border-radius: 11px;
    font-size: 12px;
    line-height: 1.6;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    animation: ai-shopping-rise 220ms ease;
}

.ai-shopping-bubble.is-assistant {
    background: #ffffff;
    border-top-left-radius: 3px;
    box-shadow: var(--ai-shadow);
}

.ai-shopping-bubble.is-user {
    color: #ffffff;
    background: var(--ai-blue);
    border-top-right-radius: 3px;
}

.ai-shopping-bubble.is-error {
    color: #b42318;
    background: #fff4f1;
    border: 1px solid #f4c2ba;
}

@keyframes ai-shopping-rise {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

/* “为你分析”沿用原项目商品卡推荐理由样式。 */
.ai-shopping-analysis {
    align-self: stretch;
    width: calc(100% - 39px);
    margin: 2px 0 2px 39px;
    padding: 8px 10px;
    color: #3a4a44;
    background: #f3fdf8;
    border: 1px solid #cdeede;
    border-radius: 6px;
    font-size: 11px;
    line-height: 1.75;
}

.ai-shopping-analysis-title {
    margin-bottom: 5px;
    color: var(--ai-green);
    font-weight: 700;
}

.ai-shopping-analysis-title::before {
    content: "✓ ";
}

.ai-shopping-analysis-text {
    margin: 0;
    color: #3a4a44;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

/* 商品卡：排列、字号和间距直接对齐原项目 .pcard/.pc-*。 */
.ai-shopping-product-response {
    align-self: stretch;
    width: 100%;
}

.ai-shopping-product-response-text {
    flex: 1 1 auto;
    min-width: 0;
    margin: 0 0 8px;
    padding: 9px 12px;
    background: #ffffff;
    border-radius: 11px;
    box-shadow: var(--ai-shadow);
    font-size: 12px;
    line-height: 1.6;
}

.ai-shopping-product-list {
    display: flex;
    flex-direction: column;
    gap: 11px;
    width: 100%;
}

.ai-shopping-product-card {
    position: relative;
    align-self: stretch;
    width: calc(100% - 39px);
    margin-left: 39px;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid #eeeeee;
    border-radius: 12px;
    box-shadow: var(--ai-shadow);
}

.ai-shopping-product-card > .ai-shopping-analysis {
    box-sizing: border-box;
    width: auto;
    margin: 0 12px 12px;
}

.ai-shopping-product-main {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    padding: 5px 13px 0;
}

.ai-shopping-product-thumb {
    display: grid;
    place-items: center;
    width: 60px;
    height: 60px;
    flex: 0 0 60px;
    overflow: hidden;
    background: linear-gradient(135deg, #eef2ff, #f6f8fc);
    border: 1px solid #eeeeee;
    border-radius: 7px;
    font-size: 26px;
    text-decoration: none;
}

a.ai-shopping-product-thumb {
    cursor: pointer;
}

a.ai-shopping-product-thumb:hover {
    border-color: #8ec9f7;
}

.ai-shopping-product-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.ai-shopping-product-heading {
    flex: 1 1 auto;
    min-width: 0;
}

.ai-shopping-product-model {
    display: inline-block;
    margin: 2px 0 5px;
    color: var(--ai-blue);
    font-size: 13.5px;
    font-weight: 800;
    line-height: 20px;
    overflow-wrap: anywhere;
    text-decoration: none;
}

a.ai-shopping-product-model:hover {
    color: #0879ce;
    text-decoration: underline;
}

.ai-shopping-product-brand,
.ai-shopping-product-meta {
    display: block;
    color: #777777;
    font-size: 11px;
    line-height: 1.7;
    overflow-wrap: anywhere;
}

.ai-shopping-product-brand b {
    color: #555555;
    font-weight: 600;
}

.ai-shopping-product-facts {
    display: block;
    padding: 0 13px;
}

.ai-shopping-product-price {
    display: block;
    margin-top: 5px;
    color: var(--ai-price);
    font-size: 17px;
    font-weight: 800;
    line-height: 25px;
}

.ai-shopping-product-facts > span {
    display: block;
    margin-top: 2px;
    color: var(--ai-muted);
    font-size: 11px;
}

.ai-shopping-product-facts > span:last-child {
    font-size: 10px;
}

.ai-shopping-product-params {
    margin: 6px 13px 0;
    padding: 5px 8px;
    color: #5a6b85;
    background: #f3f7ff;
    border-radius: 4px;
    font-size: 11px;
    line-height: 1.6;
    overflow-wrap: anywhere;
}

.ai-shopping-product-params b {
    color: #1f3a5f;
    font-weight: 600;
}

.ai-shopping-product-purchase {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 6px 13px 0;
}

.ai-shopping-quantity-label {
    display: none;
}

.ai-shopping-stepper {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    overflow: hidden;
    border: 1px solid #dddddd;
    border-radius: 4px;
}

.ai-shopping-stepper button,
.ai-shopping-stepper input {
    height: 28px;
    padding: 0;
    color: #555555;
    background: #ffffff;
    border: 0;
    text-align: center;
}

.ai-shopping-stepper button {
    width: 26px;
    background: #f6f7f9;
    font-size: 15px;
    cursor: pointer;
}

.ai-shopping-stepper input {
    width: 58px;
    border-right: 1px solid #dddddd;
    border-left: 1px solid #dddddd;
    font-size: 12px;
    outline: none;
}

.ai-shopping-product-subtotal {
    margin-left: auto;
    color: #666666;
    font-size: 11px;
    white-space: nowrap;
}

.ai-shopping-product-availability {
    display: none;
    color: var(--ai-price);
    font-size: 11px;
}

.ai-shopping-product-availability.is-short {
    display: block;
}

.ai-shopping-product-actions {
    display: flex;
    gap: 10px;
    padding: 11px 13px 13px;
}

.ai-shopping-product-actions button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 1 1 0;
    gap: 6px;
    min-height: 35px;
    padding: 8px 0;
    border-radius: 7px;
    font-size: 12.5px;
    font-weight: 700;
    cursor: pointer;
}

.ai-shopping-product-actions .is-secondary {
    color: var(--ai-blue);
    background: #ffffff;
    border: 1px solid var(--ai-blue);
}

.ai-shopping-product-actions .is-primary {
    color: #ffffff;
    background: var(--ai-blue);
    border: 0;
}

.ai-shopping-product-actions button:hover {
    filter: brightness(0.97);
}

.ai-shopping-product-actions button:disabled {
    color: #98a2b3;
    background: #f2f4f7;
    border-color: #d0d5dd;
    cursor: not-allowed;
    filter: none;
}

.ai-shopping-product-actions button.is-pending:disabled {
    color: #667085;
    background: #f2f4f7;
    border: 1px solid #d0d5dd;
}

.ai-shopping-product-actions button .glyphicon {
    top: 0;
    line-height: 1;
}

.ai-shopping-product-actions button.is-pending .glyphicon {
    animation: ai-shopping-action-spin 0.9s linear infinite;
}

.ai-shopping-product-actions button.is-success:disabled {
    color: #18794e;
    background: #ecfdf3;
    border: 1px solid #86d9ad;
}

@keyframes ai-shopping-action-spin {
    to {
        transform: rotate(360deg);
    }
}

/* 快捷操作直接对齐原项目 .choices/.chips/.chip。 */
.ai-shopping-choices {
    align-self: stretch;
    width: calc(100% - 39px);
    margin-left: 39px;
}

.ai-shopping-section-label {
    margin-bottom: 7px;
    color: var(--ai-muted);
    font-size: 11px;
}

.ai-shopping-choice-list {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.ai-shopping-choice {
    max-width: 100%;
    padding: 5px 12px;
    color: var(--ai-blue);
    background: #ffffff;
    border: 1px solid #bcd0ff;
    border-radius: 16px;
    font-size: 11.5px;
    line-height: 17px;
    overflow-wrap: anywhere;
    cursor: pointer;
    transition: 150ms ease;
}

.ai-shopping-choice:hover,
.ai-shopping-choice:focus-visible {
    color: #ffffff;
    background: var(--ai-blue);
    border-color: var(--ai-blue);
    outline: none;
}

.ai-shopping-choice:disabled,
.ai-shopping-choice:disabled:hover {
    color: #98a2b3;
    background: #f5f7fa;
    border-color: #d8dee8;
    cursor: default;
}

.ai-shopping-choice-search {
    display: block;
    width: 100%;
    max-width: 220px;
    margin-bottom: 8px;
    padding: 5px 10px;
    color: #333333;
    background: #ffffff;
    border: 1px solid #d4def5;
    border-radius: 8px;
    font-size: 11.5px;
    outline: none;
}

.ai-shopping-choice-search:focus {
    border-color: var(--ai-blue);
}

.ai-shopping-choice-toggle {
    margin-top: 8px;
    padding: 2px 0;
    color: var(--ai-blue);
    background: transparent;
    border: 0;
    font-size: 11.5px;
    cursor: pointer;
}

.ai-shopping-choice-input {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 9px;
}

.ai-shopping-choice-input input {
    width: 110px;
    padding: 5px 10px;
    color: #333333;
    background: #ffffff;
    border: 1px solid #d4def5;
    border-radius: 8px;
    font-size: 11.5px;
    outline: none;
}

.ai-shopping-choice-input span {
    color: var(--ai-muted);
    font-size: 11.5px;
}

.ai-shopping-choice-input button {
    padding: 6px 14px;
    color: #ffffff;
    background: var(--ai-blue);
    border: 0;
    border-radius: 8px;
    font-size: 11.5px;
    cursor: pointer;
}

/* 横向比价、订单和人工提示沿用原项目卡片密度。 */
.ai-shopping-compare,
.ai-shopping-order,
.ai-shopping-inquiry-form,
.ai-shopping-inquiry-prompt,
.ai-shopping-inquiry-receipt,
.ai-shopping-datasheet,
.ai-shopping-handoff {
    align-self: stretch;
    width: calc(100% - 39px);
    margin-left: 39px;
}

.ai-shopping-compare {
    overflow: hidden;
    background: #ffffff;
    border: 1px solid #eeeeee;
    border-radius: 12px;
    box-shadow: var(--ai-shadow);
}

.ai-shopping-compare .ai-shopping-analysis {
    width: auto;
    margin: 10px 12px;
}

.ai-shopping-compare-header {
    padding: 8px 12px;
    color: var(--ai-muted);
    background: #f7f9fd;
    border-bottom: 1px solid #eef1f5;
    font-size: 11px;
}

.ai-shopping-compare-header-top {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 4px 10px;
}

.ai-shopping-compare-title {
    color: var(--ai-ink);
    font-size: 12px;
    font-weight: 600;
}

.ai-shopping-compare-caption {
    line-height: 1.5;
}

.ai-shopping-compare-constraints {
    margin-top: 3px;
    color: #667085;
    line-height: 1.55;
    overflow-wrap: anywhere;
}

.ai-shopping-compare-item {
    padding: 9px 12px;
    border-bottom: 1px solid #f2f3f5;
}

.ai-shopping-compare-item:last-child {
    border-bottom: 0;
}

.ai-shopping-compare-item.is-best {
    background: #fff8f0;
}

.ai-shopping-compare-top,
.ai-shopping-compare-meta,
.ai-shopping-compare-purchase {
    display: flex;
    align-items: center;
}

.ai-shopping-compare-top {
    justify-content: space-between;
    gap: 8px;
}

.ai-shopping-compare-title {
    display: flex;
    align-items: center;
    gap: 5px;
    min-width: 0;
}

.ai-shopping-compare-model {
    color: var(--ai-blue);
    font-size: 13.5px;
    font-weight: 700;
    overflow-wrap: anywhere;
    text-decoration: none;
}

.ai-shopping-compare-model:hover {
    text-decoration: underline;
}

.ai-shopping-compare-best {
    flex: 0 0 auto;
    padding: 1px 5px;
    color: #ffffff;
    background: var(--ai-price);
    border-radius: 3px;
    font-size: 9px;
    font-weight: 700;
    line-height: 16px;
}

.ai-shopping-compare-package {
    flex: 0 0 auto;
    padding: 2px 8px;
    color: #5b6b88;
    background: #eef2f8;
    border-radius: 4px;
    font-size: 10.5px;
    white-space: nowrap;
}

.ai-shopping-compare-meta {
    justify-content: space-between;
    gap: 8px;
    margin-top: 3px;
    color: #555555;
    font-size: 12px;
}

.ai-shopping-compare-meta .is-stock {
    color: var(--ai-muted);
    font-size: 11px;
    text-align: right;
    white-space: nowrap;
}

.ai-shopping-compare-params {
    margin-top: 5px;
    padding: 4px 7px;
    color: #5a6b85;
    background: #f3f7ff;
    border-radius: 5px;
    font-size: 11px;
    line-height: 1.6;
    overflow-wrap: anywhere;
}

.ai-shopping-compare-params b {
    color: #1f3a5f;
    font-weight: 600;
}

.ai-shopping-compare-purchase {
    gap: 8px;
    margin-top: 8px;
}

.ai-shopping-compare-unit {
    color: #666666;
    font-size: 11.5px;
    white-space: nowrap;
}

.ai-shopping-compare-unit b {
    color: #333333;
}

.ai-shopping-stepper.is-compact {
    border-radius: 5px;
}

.ai-shopping-stepper.is-compact button {
    width: 22px;
    height: 24px;
    font-size: 13px;
}

.ai-shopping-stepper.is-compact input {
    width: 48px;
    height: 24px;
    font-size: 11px;
}

.ai-shopping-compare-total {
    margin-left: auto;
    color: #666666;
    font-size: 11px;
    white-space: nowrap;
}

.ai-shopping-compare-total b {
    color: var(--ai-price);
    font-size: 14px;
}

.ai-shopping-compare-cart {
    flex: 0 0 auto;
    padding: 6px 11px;
    color: #ffffff;
    background: var(--ai-blue);
    border: 0;
    border-radius: 5px;
    font-size: 11px;
    white-space: nowrap;
    cursor: pointer;
}

.ai-shopping-compare-cart:hover {
    filter: brightness(0.95);
}

.ai-shopping-compare-cart:disabled {
    color: #98a2b3;
    background: #f2f4f7;
    cursor: not-allowed;
    filter: none;
}

.ai-shopping-order {
    overflow: hidden;
    background: #ffffff;
    border: 1px solid #eeeeee;
    border-radius: 12px;
    box-shadow: var(--ai-shadow);
}

.ai-shopping-order-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 15px;
    background: #f7f9fd;
    border-bottom: 1px solid var(--ai-line);
}

.ai-shopping-order-header strong {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 13px;
}

.ai-shopping-order-header span {
    padding: 3px 11px;
    color: var(--ai-blue);
    background: var(--ai-blue-light);
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
}

.ai-shopping-order-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 2px 10px;
    padding: 11px 15px;
    border-bottom: 1px dashed var(--ai-line);
}

.ai-shopping-order-item strong {
    font-size: 13.5px;
}

.ai-shopping-order-item span {
    color: var(--ai-muted);
    font-size: 12px;
}

.ai-shopping-order-item span:last-child {
    grid-column: 2;
    grid-row: 1 / 3;
    align-self: center;
    color: var(--ai-price);
}

.ai-shopping-order-track {
    padding: 10px 15px;
    color: #667788;
    background: #f7f9fd;
    font-size: 12px;
}

.ai-shopping-handoff {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    color: #b4760a;
    background: #fff7e8;
    border: 1px solid #ffe2ad;
    border-radius: 10px;
    font-size: 13px;
}

/* 询价入口、表单和回执对齐原项目 .iprompt/.icard/.ireceipt。 */
.ai-shopping-inquiry-prompt {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    padding: 9px 12px;
    color: #5a6577;
    background: #f7f9fc;
    border: 1px solid #e6ebf3;
    border-radius: 10px;
    font-size: 12.5px;
}

.ai-shopping-inquiry-prompt span {
    flex: 1 1 auto;
    min-width: 0;
}

.ai-shopping-inquiry-prompt button {
    flex: 0 0 auto;
    padding: 6px 13px;
    color: var(--ai-blue);
    background: #ffffff;
    border: 1px solid var(--ai-blue);
    border-radius: 8px;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
}

.ai-shopping-inquiry-form {
    padding: 13px 15px;
    background: #ffffff;
    border: 1px solid #e6ebf3;
    border-radius: 12px;
    box-shadow: var(--ai-shadow);
}

.ai-shopping-inquiry-title {
    margin-bottom: 11px;
    color: #2b3445;
    font-size: 14px;
    font-weight: 700;
}

.ai-shopping-form-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 8px 0;
    font-size: 13px;
}

.ai-shopping-form-row > .ai-shopping-form-label {
    width: 92px;
    flex: 0 0 92px;
    display: flex;
    align-items: center;
    color: #8a93a3;
}

.ai-shopping-form-label-text {
    white-space: nowrap;
}

.ai-shopping-required-mark {
    margin-right: 2px;
    color: #e53935;
    font-style: normal;
}

.ai-shopping-form-row > input,
.ai-shopping-lead-range input {
    flex: 1 1 auto;
    min-width: 0;
    padding: 6px 9px;
    color: #333333;
    background: #ffffff;
    border: 1px solid #dfe4ec;
    border-radius: 8px;
    font-size: 13px;
    outline: none;
}

.ai-shopping-form-row > input:focus,
.ai-shopping-lead-range input:focus {
    border-color: var(--ai-blue);
}

.ai-shopping-delivery-options {
    display: flex;
    align-items: center;
    gap: 18px;
    min-width: 0;
}

.ai-shopping-radio-option {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #4f5969;
    cursor: pointer;
}

.ai-shopping-radio-option input {
    width: 14px;
    height: 14px;
    margin: 0;
    accent-color: var(--ai-blue);
}

.ai-shopping-lead-range {
    display: flex;
    flex: 1 1 auto;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.ai-shopping-lead-range input {
    width: 0;
}

.ai-shopping-lead-separator {
    flex: 0 0 auto;
    color: #98a2b3;
}

.ai-shopping-inquiry-contact {
    margin-top: 11px;
    padding-top: 10px;
    border-top: 1px solid #eef1f5;
}

.ai-shopping-inquiry-contact-title {
    margin-bottom: 6px;
    color: #4f5969;
    font-size: 12px;
    font-weight: 600;
}

.ai-shopping-inquiry-submit {
    width: 100%;
    margin-top: 11px;
    padding: 9px;
    color: #ffffff;
    background: var(--ai-blue);
    border: 0;
    border-radius: 9px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.ai-shopping-inquiry-submit:disabled {
    color: #98a2b3;
    background: #eef1f5;
    cursor: not-allowed;
}

.ai-shopping-inquiry-error {
    margin-top: 7px;
    color: #d93025;
    font-size: 12px;
    line-height: 18px;
}

.ai-shopping-inquiry-receipt {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 12px 14px;
    color: #555555;
    background: #f6fbf7;
    border: 1px solid #c3e6cb;
    border-radius: 12px;
    font-size: 13px;
}

.ai-shopping-inquiry-receipt strong,
.ai-shopping-inquiry-receipt .is-status {
    color: #2b8a3e;
    font-weight: 700;
}

.ai-shopping-datasheet {
    padding: 12px 14px;
    background: #ffffff;
    border: 1px solid #dbe7fb;
    border-radius: 8px;
    box-shadow: var(--ai-shadow);
}

.ai-shopping-datasheet-header {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 6px 10px;
    margin-bottom: 9px;
}

.ai-shopping-datasheet-header strong {
    color: #2b3445;
    font-size: 13px;
}

.ai-shopping-datasheet-header span {
    color: var(--ai-muted);
    font-size: 11px;
}

.ai-shopping-datasheet-links {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ai-shopping-datasheet-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 34px;
    padding: 7px 10px;
    color: var(--ai-blue);
    background: #f4f8ff;
    border: 1px solid #d4e2ff;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    line-height: 18px;
    text-decoration: none;
}

.ai-shopping-datasheet-link:hover,
.ai-shopping-datasheet-link:focus-visible {
    color: #164fd3;
    background: #eaf2ff;
    border-color: #9fbdff;
    outline: none;
    text-decoration: none;
}

.ai-shopping-datasheet-link .glyphicon {
    top: 0;
    flex: 0 0 auto;
}

.ai-shopping-empty {
    width: calc(100% - 39px);
    margin-left: 39px;
    padding: 16px;
    color: var(--ai-muted);
    background: #ffffff;
    border: 1px dashed #d6dce5;
    border-radius: 10px;
    text-align: center;
}

.ai-shopping-toast {
    position: absolute;
    top: 64px;
    left: 50%;
    z-index: 10;
    width: calc(100% - 28px);
    max-width: 430px;
    padding: 10px 12px;
    color: #175cd3;
    background: #eff8ff;
    border: 1px solid #b2ddff;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    line-height: 18px;
    text-align: left;
    pointer-events: none;
    box-shadow: 0 6px 18px rgba(16, 24, 40, 0.12);
    transform: translateX(-50%);
}

.ai-shopping-toast[data-tone="success"] {
    color: #18794e;
    background: #ecfdf3;
    border-color: #86d9ad;
}

.ai-shopping-toast[data-tone="error"] {
    color: #b42318;
    background: #fef3f2;
    border-color: #fecdca;
}

/* 输入区直接对齐原项目 .ask-bar。 */
.ai-shopping-composer {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
    gap: 9px;
    padding: 12px 14px;
    background: #ffffff;
    border-top: 1px solid var(--ai-line);
}

.ai-shopping-composer input {
    flex: 1 1 auto;
    min-width: 0;
    height: 40px;
    padding: 9px 14px;
    color: #333333;
    background: #ffffff;
    border: 1px solid #d8e0ec;
    border-radius: 20px;
    font-size: 13px;
    outline: none;
}

.ai-shopping-composer input:focus {
    border-color: var(--ai-blue);
}

.ai-shopping-send {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    padding: 0;
    color: #ffffff;
    background: var(--ai-blue);
    border: 0;
    border-radius: 50%;
    font-size: 16px;
    cursor: pointer;
}

.ai-shopping-send:disabled,
.ai-shopping-composer input:disabled {
    cursor: wait;
    opacity: 0.5;
}

.ai-shopping-typing-row {
    min-height: 30px;
}

.ai-shopping-typing-row.is-expanded,
.ai-shopping-typing-row.is-completed {
    width: 100%;
}

.ai-shopping-typing {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: 0;
    padding: 12px 15px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: var(--ai-shadow);
}

.ai-shopping-typing-compact,
.ai-shopping-typing-dots {
    display: flex;
    align-items: center;
}

.ai-shopping-typing-compact {
    gap: 4px;
}

.ai-shopping-typing-dots {
    gap: 4px;
}

.ai-shopping-typing-row.is-expanded .ai-shopping-typing,
.ai-shopping-typing-row.is-completed .ai-shopping-typing {
    display: block;
    width: calc(100% - 39px);
    max-width: 430px;
    padding: 0;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: none;
}

.ai-shopping-typing-row.is-expanded .ai-shopping-typing-compact,
.ai-shopping-typing-row.is-completed .ai-shopping-typing-compact {
    display: none;
}

.ai-shopping-stage-label {
    margin-left: 5px;
    color: var(--ai-muted);
    font-size: 11px;
    white-space: nowrap;
}

.ai-shopping-progress-panel {
    width: 100%;
    min-width: 0;
    padding: 13px 14px 12px;
    color: #303642;
    background: #ffffff;
}

.ai-shopping-progress-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-width: 0;
    width: 100%;
    margin-bottom: 10px;
    padding: 0;
    color: inherit;
    font-family: inherit;
    text-align: left;
    letter-spacing: 0;
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
    border: 0;
    cursor: default;
}

.ai-shopping-progress-header:disabled {
    color: inherit;
    opacity: 1;
}

.ai-shopping-typing-row.is-completed .ai-shopping-progress-header {
    cursor: pointer;
}

.ai-shopping-progress-title {
    min-width: 0;
    overflow: hidden;
    font-size: 12px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ai-shopping-progress-timing {
    flex: 0 0 auto;
    color: #94a0b2;
    font-size: 10px;
    white-space: nowrap;
}

.ai-shopping-progress-toggle {
    display: none;
    width: 7px;
    height: 7px;
    flex: 0 0 7px;
    border-right: 1px solid #7b8798;
    border-bottom: 1px solid #7b8798;
    transform: rotate(45deg);
    transition: transform 160ms ease;
}

.ai-shopping-typing-row.is-completed .ai-shopping-progress-toggle {
    display: block;
}

.ai-shopping-typing-row.is-completed.is-expanded .ai-shopping-progress-toggle {
    transform: rotate(225deg);
}

.ai-shopping-typing-row.is-completed:not(.is-expanded) .ai-shopping-progress-header {
    margin-bottom: 0;
}

.ai-shopping-typing-row.is-completed:not(.is-expanded) .ai-shopping-progress-track,
.ai-shopping-typing-row.is-completed:not(.is-expanded) .ai-shopping-progress-list {
    display: none;
}

.ai-shopping-progress-track {
    position: relative;
    width: 100%;
    height: 3px;
    overflow: hidden;
    background: #e8edf4;
    border-radius: 2px;
}

.ai-shopping-progress-fill {
    display: block;
    width: 0;
    height: 100%;
    background: #6f86b7;
    border-radius: 2px;
    transition: width 180ms ease;
}

.ai-shopping-progress-list {
    display: grid;
    gap: 7px;
    margin: 11px 0 0;
    padding: 0;
    list-style: none;
}

.ai-shopping-progress-step {
    display: grid;
    grid-template-columns: 14px minmax(0, auto) minmax(0, 1fr);
    align-items: center;
    gap: 6px;
    min-height: 16px;
    color: #657083;
    font-size: 11px;
    line-height: 1.35;
}

.ai-shopping-progress-icon {
    display: inline-grid;
    place-items: center;
    width: 14px;
    height: 14px;
    color: #1daa72;
}

.ai-shopping-progress-step.is-done .ai-shopping-progress-icon::before {
    content: "✓";
    font-size: 12px;
    font-weight: 600;
}

.ai-shopping-progress-step.is-running .ai-shopping-progress-icon::before {
    width: 8px;
    height: 8px;
    content: "";
    border: 1px solid #2f6bff;
    border-right-color: transparent;
    border-radius: 50%;
    animation: ai-shopping-progress-spin 800ms linear infinite;
}

.ai-shopping-progress-label {
    color: #3f4754;
    white-space: nowrap;
}

.ai-shopping-progress-summary {
    min-width: 0;
    overflow: hidden;
    color: #98a2b3;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ai-shopping-progress-summary:focus {
    outline: 1px solid #84adff;
    outline-offset: 2px;
}

.ai-shopping-progress-tooltip {
    position: fixed;
    z-index: 10030;
    max-width: min(360px, calc(100vw - 16px));
    padding: 7px 9px;
    color: #ffffff;
    overflow-wrap: anywhere;
    background: rgba(35, 43, 56, 0.96);
    border-radius: 4px;
    box-shadow: 0 5px 14px rgba(16, 24, 40, 0.18);
    font-size: 11px;
    line-height: 1.45;
    pointer-events: none;
}

.ai-shopping-progress-tooltip[hidden] {
    display: none;
}

/* 历史处理摘要复用实时阶段视觉，但由原生 details 独立控制折叠状态。 */
.ai-shopping-process-summary {
    width: calc(100% - 39px);
    max-width: 430px;
    padding: 13px 14px 12px;
    overflow: hidden;
    color: #303642;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

.ai-shopping-process-summary-header {
    display: flex;
    align-items: center;
    min-height: 18px;
    list-style: none;
    cursor: pointer;
    user-select: none;
}

.ai-shopping-process-summary-header::-webkit-details-marker {
    display: none;
}

.ai-shopping-process-summary-header::after {
    width: 7px;
    height: 7px;
    margin-left: auto;
    content: "";
    border-right: 1px solid #7b8798;
    border-bottom: 1px solid #7b8798;
    transform: rotate(45deg);
}

.ai-shopping-process-summary[open] .ai-shopping-process-summary-header::after {
    transform: rotate(225deg);
}

.ai-shopping-process-summary:not([open]) .ai-shopping-progress-list {
    display: none;
}

@keyframes ai-shopping-progress-spin {
    to {
        transform: rotate(360deg);
    }
}

.ai-shopping-error-message {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    max-width: calc(100% - 39px);
    padding: 9px 12px;
    color: #9f2d2d;
    background: #fff7f7;
    border: 1px solid #f3cccc;
    border-radius: 11px;
    font-size: 12px;
    line-height: 1.5;
}

.ai-shopping-retry {
    padding: 3px 10px;
}

.ai-shopping-support {
    padding: 3px 10px;
    color: #475569;
    border-color: #cbd5e1;
}

.ai-shopping-error-trace {
    flex: 0 0 100%;
    overflow: hidden;
    color: var(--ai-muted);
    font-size: 10px;
    line-height: 1.35;
    text-overflow: ellipsis;
    user-select: text;
    white-space: nowrap;
}

.ai-shopping-error-elapsed {
    flex: 0 0 100%;
    color: var(--ai-muted);
    font-size: 10px;
    line-height: 1.35;
}

/* 每轮回复反馈：保持轻量，不与业务卡片争夺视觉层级。 */
.ai-shopping-feedback-row {
    display: flex;
    align-items: flex-start;
    width: calc(100% - 39px);
    min-height: 28px;
    margin: -5px 0 2px 39px;
}

.ai-shopping-feedback-actions {
    display: flex;
    flex: 1 1 auto;
    flex-wrap: wrap;
    gap: 4px;
    min-width: 0;
}

.ai-shopping-feedback-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    color: #98a2b3;
    background: transparent;
    border: 0;
    border-radius: 5px;
    line-height: 1;
    cursor: pointer;
    transition: color 0.15s ease, background-color 0.15s ease;
}

.ai-shopping-feedback-button .glyphicon {
    top: 0;
    font-size: 14px;
}

.ai-shopping-feedback-button:hover,
.ai-shopping-feedback-button:focus-visible {
    color: var(--ai-blue);
    background: #edf6ff;
    outline: none;
}

.ai-shopping-feedback-button:focus-visible {
    box-shadow: 0 0 0 2px rgba(30, 144, 255, 0.2);
}

.ai-shopping-feedback-button:active {
    color: #0879ce;
    background: #dceeff;
}

.ai-shopping-feedback-button:disabled {
    cursor: wait;
    opacity: 0.5;
}

.ai-shopping-feedback-elapsed {
    flex: 0 0 auto;
    margin-left: 10px;
    color: var(--ai-muted);
    font-size: 10px;
    line-height: 28px;
    white-space: nowrap;
}

.ai-shopping-feedback-done {
    color: var(--ai-muted);
    font-size: 10.5px;
    line-height: 24px;
}

.ai-shopping-feedback-card {
    width: min(100%, 350px);
    padding: 10px;
    background: #ffffff;
    border: 1px solid #e2e6ec;
    border-radius: 8px;
    box-shadow: var(--ai-shadow);
}

.ai-shopping-feedback-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
}

.ai-shopping-feedback-card-header strong {
    color: #475467;
    font-size: 11px;
}

.ai-shopping-feedback-cancel {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    padding: 0;
    color: #98a2b3;
    background: transparent;
    border: 0;
    border-radius: 4px;
    cursor: pointer;
}

.ai-shopping-feedback-cancel:hover,
.ai-shopping-feedback-cancel:focus-visible {
    color: #475467;
    background: #f2f4f7;
    outline: none;
}

.ai-shopping-feedback-cancel .glyphicon {
    top: 0;
    font-size: 11px;
}

.ai-shopping-feedback-cancel:disabled {
    cursor: wait;
    opacity: 0.45;
}

.ai-shopping-feedback-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.ai-shopping-feedback-chip {
    padding: 4px 8px;
    color: #667085;
    background: #f8fafc;
    border: 1px solid #dfe4ea;
    border-radius: 5px;
    font-size: 10.5px;
    cursor: pointer;
}

.ai-shopping-feedback-chip.is-selected {
    color: var(--ai-blue);
    background: var(--ai-blue-light);
    border-color: #9cb8ff;
}

.ai-shopping-feedback-extra {
    width: 100%;
    margin-top: 8px;
    padding: 6px 8px;
    color: #344054;
    background: #ffffff;
    border: 1px solid #dfe4ea;
    border-radius: 5px;
    font-size: 11px;
    outline: none;
}

.ai-shopping-feedback-extra:focus {
    border-color: var(--ai-blue);
}

.ai-shopping-feedback-submit {
    width: 100%;
    margin-top: 8px;
    padding: 6px 10px;
    color: #ffffff;
    background: var(--ai-blue);
    border: 0;
    border-radius: 5px;
    font-size: 11px;
    cursor: pointer;
}

.ai-shopping-feedback-submit:disabled {
    cursor: default;
    opacity: 0.5;
}

/* 工作流调试卡：仅 BFF Debug 模式放行，默认折叠。 */
.ai-shopping-debug-panel {
    align-self: stretch;
    width: calc(100% - 39px);
    margin-left: 39px;
    overflow: hidden;
    color: #303846;
    background: #f7f8fa;
    border: 1px dashed #aeb7c5;
    border-radius: 8px;
}

.ai-shopping-debug-panel summary {
    display: flex;
    align-items: center;
    gap: 7px;
    min-height: 36px;
    padding: 0 10px;
    list-style: none;
    font-size: 11px;
    cursor: pointer;
    user-select: none;
}

.ai-shopping-debug-panel summary::-webkit-details-marker {
    display: none;
}

.ai-shopping-debug-panel summary::after {
    margin-left: auto;
    color: #7c8798;
    content: ">";
    transform: rotate(90deg);
}

.ai-shopping-debug-panel[open] summary::after {
    transform: rotate(-90deg);
}

.ai-shopping-debug-icon {
    color: #596579;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-weight: 700;
}

.ai-shopping-debug-title {
    color: #303846;
    font-size: 11px;
}

.ai-shopping-debug-tag {
    padding: 2px 5px;
    color: #9a3412;
    background: #ffedd5;
    border-radius: 4px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 9px;
    font-weight: 800;
}

.ai-shopping-debug-meta {
    min-width: 0;
    overflow: hidden;
    color: #7c8798;
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ai-shopping-debug-content {
    position: relative;
    background: #171b23;
    border-top: 1px solid #d9dee7;
}

.ai-shopping-debug-copy {
    position: absolute;
    top: 8px;
    right: 10px;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    height: 24px;
    padding: 0 7px;
    color: #cbd5e1;
    background: #2b3340;
    border: 1px solid #465163;
    border-radius: 5px;
    font-size: 10px;
    line-height: 1;
    cursor: pointer;
}

.ai-shopping-debug-copy .glyphicon {
    top: 0;
    font-size: 10px;
}

.ai-shopping-debug-copy:hover,
.ai-shopping-debug-copy:focus-visible {
    color: #ffffff;
    background: #3a4657;
    border-color: #718096;
    outline: none;
}

.ai-shopping-debug-copy.is-copied {
    color: #bbf7d0;
    border-color: #3f8060;
}

.ai-shopping-debug-copy.is-failed {
    color: #fecaca;
    border-color: #9f5555;
}

.ai-shopping-debug-panel pre {
    max-height: 360px;
    margin: 0;
    padding: 38px 11px 10px;
    overflow: auto;
    color: #d9e2f1;
    background: #171b23;
    font: 10px/1.6 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
}

.ai-shopping-typing i {
    width: 7px;
    height: 7px;
    background: #cbd5e1;
    border-radius: 50%;
    animation: ai-shopping-blink 1200ms infinite;
}

.ai-shopping-typing i:nth-child(2) {
    animation-delay: 200ms;
}

.ai-shopping-typing i:nth-child(3) {
    animation-delay: 400ms;
}

@keyframes ai-shopping-blink {
    0%, 60%, 100% {
        opacity: 0.3;
    }
    30% {
        opacity: 1;
    }
}

@media (max-width: 860px) {
    .ai-shopping-launcher {
        right: 14px;
        bottom: 84px;
        width: 108px;
        height: 46px;
    }

    .ai-shopping-launcher-icon {
        width: 36px;
        height: 36px;
        flex-basis: 36px;
    }

    .ai-shopping-panel {
        width: 100vw;
        min-width: 0;
    }

    .ai-shopping-progress-step {
        grid-template-columns: 14px minmax(0, 1fr);
    }

    .ai-shopping-progress-summary {
        grid-column: 2;
        overflow: visible;
        text-overflow: clip;
        white-space: normal;
    }
}

@media (max-width: 400px) {
    .ai-shopping-skill-promo-link {
        gap: 8px;
        padding-right: 28px;
        padding-left: 9px;
    }

    .ai-shopping-skill-promo-icon {
        width: 32px;
        height: 32px;
        flex-basis: 32px;
    }

    .ai-shopping-skill-promo-icon .icon {
        font-size: 18px;
    }

    .ai-shopping-skill-promo-copy strong {
        font-size: 12px;
    }

    .ai-shopping-skill-promo-action {
        width: 64px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ai-shopping-panel,
    .ai-shopping-bubble,
    .ai-shopping-typing i,
    .ai-shopping-progress-fill,
    .ai-shopping-progress-step.is-running .ai-shopping-progress-icon::before {
        transition: none;
        animation: none;
    }
}
