/* Himmel chat design system. Scoped to .h-chat; no dependency on the host page's
   card/button styles. Layout > conversation > structured messages > composer. */
:is(.help-chat-page, .h-chat) {
    --chat-motion-fast: 140ms;
    --chat-motion-enter: 280ms;
    --chat-motion-reveal: 420ms;
    --chat-ease-out: cubic-bezier(.22, 1, .36, 1);
}
.help-chat-page {
    height: var(--chat-screen-height, 100dvh); min-height: 0; overflow: hidden;
    display: flex; flex-direction: column; background: #08090c;
}
.help-chat-page > header { flex: 0 0 auto; padding: 18px 32px; background: #08090c; }
.help-chat-page .content-wrapper { flex: 1; min-height: 0; width: 100%; max-width: 1440px; padding: 24px 32px; display: flex; }
.help-chat-page > footer, .help-chat-page .support-float-wrapper { display: none; }
.help-chat-standalone .content-wrapper { max-width: 1040px; }
.h-chat {
    --chat-bg: #0d0e12; --chat-surface: #15161c; --chat-raised: #1c1d25;
    --chat-text: #eeeef3; --chat-muted: #a4a5b4; --chat-line: #ffffff12;
    --chat-accent: #c5b8f6; --chat-accent-soft: #b9a1ff10;
    --chat-success: #6cddb4; --chat-warning: #e8be7b; --chat-error: #ffa3ac;
    --chat-radius: 16px; --chat-gutter: clamp(16px, 4cqi, 32px);
    container: hchat / inline-size; position: relative; isolation: isolate;
    flex: 1; display: flex; flex-direction: column; width: 100%; min-width: 0; min-height: 0;
    overflow: hidden; border: 1px solid var(--chat-line); border-radius: 24px;
    background: var(--chat-bg); color: var(--chat-text); font: 400 15px/1.6 'Inter', sans-serif;
    text-align: left; color-scheme: dark;
}
.h-chat *, .h-chat *::before, .h-chat *::after { box-sizing: border-box; }
.h-chat [hidden] { display: none !important; }
.h-chat :is(button, textarea, select) { font: inherit; }
.h-chat button { cursor: pointer; }
.h-chat button:disabled { cursor: default; }
.h-chat :is(button, a, textarea, select, [tabindex]):focus-visible { outline: 2px solid var(--chat-accent) !important; outline-offset: 3px !important; box-shadow: none !important; }
.h-chat svg { display: block; width: 22px; height: 22px; flex: none; }
.h-chat .chat-header { display: flex; flex: none; justify-content: space-between; align-items: center; gap: 12px; padding: 18px var(--chat-gutter); border-bottom: 1px solid var(--chat-line); }
.h-chat .chat-header-info { display: flex; align-items: center; gap: 12px; min-width: 0; }
.h-chat .chat-bot-avatar { display: grid; place-items: center; width: 42px; height: 42px; flex: none; border: 1px solid #c5b8f62b; border-radius: 14px; background: var(--chat-accent-soft); color: var(--chat-accent); }
.h-chat .chat-bot-avatar svg { width: 26px; height: 26px; }
.h-chat .chat-header h2 { margin: 0; color: var(--chat-text); font-size: 16px; font-weight: 650; line-height: 1.4; letter-spacing: -.03em; }
.h-chat .chat-header h2 span { display: inline-block; margin-left: 3px; padding: 1px 5px; border: 1px solid #c5b8f629; border-radius: 5px; color: var(--chat-accent); font-size: 10px; font-weight: 600; letter-spacing: .02em; vertical-align: 2px; }
.h-chat .chat-status-indicator { display: flex; align-items: center; gap: 6px; color: var(--chat-muted); font-size: 11px; margin-top: 3px; }
.h-chat .chat-status-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--chat-success); flex: none; }
.h-chat .chat-status-indicator.is-warning .chat-status-dot { background: var(--chat-warning); }
.h-chat .chat-status-indicator.is-offline .chat-status-dot { background: var(--chat-error); }
.h-chat .chat-header-actions { display: flex; gap: 4px; }
.h-chat .chat-icon-btn { display: grid; place-items: center; width: 44px; height: 44px; padding: 10px; border: 1px solid transparent; border-radius: 12px; background: transparent; color: var(--chat-muted); }
.h-chat .chat-icon-btn:hover, .h-chat .chat-icon-btn[aria-expanded=true] { background: var(--chat-surface); color: var(--chat-text); }
.h-chat .chat-close-btn { display: none; }
html.is-embedded .h-chat .chat-close-btn { display: grid; }
.h-chat .chat-topics { flex: none; border-bottom: 1px solid var(--chat-line); background: var(--chat-surface); padding: 12px var(--chat-gutter); display: grid; gap: 4px; max-height: 45%; overflow-y: auto; }
.h-chat .chat-topics p { margin: 0 0 6px; font-size: 12px; color: var(--chat-muted); }
.h-chat .chat-topics :is(a, button) { display: flex; justify-content: space-between; text-align: left; gap: 12px; align-items: center; border: 0; border-radius: 8px; background: transparent; color: var(--chat-text); text-decoration: none; padding: 10px; min-height: 44px; font-size: 13px; }
.h-chat .chat-topics :is(a, button):hover { background: var(--chat-raised); }
.h-chat .chat-conversation { flex: 1; position: relative; min-height: 0; display: flex; }
.h-chat .chat-messages-viewport { position: relative; flex: 1; min-width: 0; min-height: 0; overflow-x: hidden; overflow-y: auto; overscroll-behavior-y: contain; scrollbar-width: thin; scrollbar-color: #363640 transparent; overflow-anchor: none; padding: 28px var(--chat-gutter); scroll-padding: 20px; }
.h-chat .chat-messages-viewport:has(.chat-welcome:not([hidden])) { display: flex; flex-direction: column; }
.h-chat .chat-welcome { width: 100%; max-width: 540px; margin: auto; padding: 12px 0 24px; }
.h-chat .chat-welcome-mark { display: grid; place-items: center; width: 64px; height: 64px; border: 1px solid #c5b8f629; border-radius: 22px; color: var(--chat-accent); background: radial-gradient(circle at 20% 10%, #bfa5ff20, #bfa5ff04); margin-bottom: 28px; }
.h-chat .chat-welcome-mark svg { width: 38px; height: 38px; }
.h-chat .chat-eyebrow { margin: 0 0 14px; color: var(--chat-accent); font-size: 10px; font-weight: 600; letter-spacing: .16em; }
.h-chat .chat-welcome h1 { margin: 0; font-size: clamp(30px, 5.4cqi, 42px); line-height: 1.17; letter-spacing: -.055em; font-weight: 550; color: var(--chat-text); }
.h-chat .chat-welcome-description { color: var(--chat-muted); font-size: 14px; line-height: 1.65; margin: 16px 0 28px; }
.h-chat .chat-suggestions { display: grid; gap: 8px; }
.h-chat .chat-suggestions button { display: flex; align-items: center; gap: 14px; min-width: 0; padding: 14px; min-height: 68px; border: 1px solid var(--chat-line); border-radius: 14px; background: #ffffff02; color: var(--chat-text); text-align: left; transition: background .15s, border-color .15s; }
.h-chat .chat-suggestions button:hover { background: var(--chat-accent-soft); border-color: #c5b8f638; }
.h-chat .chat-suggestion-icon { flex: none; color: var(--chat-accent); }
.h-chat .chat-suggestions strong { display: block; font-weight: 500; font-size: 13px; }
.h-chat .chat-suggestions small { display: block; color: var(--chat-muted); font-size: 11px; margin-top: 2px; }
.h-chat .chat-suggestion-arrow { color: var(--chat-muted); margin-left: auto; }
.h-chat .message-row { position: relative; display: flex; flex-direction: column; width: 100%; max-width: 720px; margin: 0 auto 28px; min-width: 0; gap: 8px; }
.h-chat .message-row.user { align-items: flex-end; }
.h-chat .message-author { display: flex; gap: 7px; align-items: center; font-size: 11px; font-weight: 500; color: var(--chat-muted); }
.h-chat .message-row.ai .message-author::before { content: '✧'; color: var(--chat-accent); font-size: 19px; line-height: 1; }
.h-chat .message-row.user .message-author { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.h-chat .message-bubble { min-width: 0; max-width: 100%; white-space: pre-wrap; overflow-wrap: anywhere; word-break: normal; line-height: 1.7; font-size: 15px; color: var(--chat-text); }
.h-chat .message-row.user .message-bubble { max-width: 85%; padding: 12px 16px; background: #242032; border: 1px solid #bda5ff1a; border-radius: 18px 18px 5px 18px; color: #f1edf9; }
.h-chat .message-bubble:has(.chat-rich-paragraph), .h-chat .message-bubble:has(.chat-tracking-card), .h-chat .message-bubble:has(.change-status-card) { white-space: normal; }
.h-chat .chat-rich-paragraph { margin: 0 0 12px; }
.h-chat .chat-rich-paragraph:last-child { margin-bottom: 0; }
.h-chat .chat-rich-heading { margin: 20px 0 10px; font-size: 15px; color: #f0edf9; }
.h-chat .chat-rich-heading:first-child { margin-top: 0; }
.h-chat .chat-rich-list { display: grid; gap: 8px; padding-left: 20px; margin: 12px 0; }
.h-chat .chat-rich-list li::marker { color: var(--chat-accent); }
.h-chat .chat-link { color: var(--chat-accent); text-decoration: underline; text-underline-offset: 3px; }
.h-chat .chat-link.chat-tracking-link { display: inline-block; padding: 5px 0; font-weight: 600; }
.h-chat .chat-latest { position: absolute; z-index: 2; bottom: 12px; left: 50%; transform: translateX(-50%); min-height: 44px; width: max-content; max-width: calc(100% - 24px); border: 1px solid #c5b8f645; border-radius: 24px; background: #262231; color: #eee8fc; box-shadow: 0 5px 20px #0006; padding: 9px 16px; font-size: 12px; }
.h-chat .chat-latest span { margin-left: 8px; }
/* Structured product rails: never shrink cards to fit the phone. */
.h-chat .chat-products-carousel-container { width: 100%; min-width: 0; margin-top: 16px; white-space: normal; }
.h-chat .chat-products-carousel { display: flex; gap: 12px; overflow-x: auto; padding: 3px 3px 12px; scroll-snap-type: x proximity; scroll-padding: 3px; scrollbar-width: thin; scrollbar-color: #484251 transparent; touch-action: pan-x pan-y pinch-zoom; }
.h-chat .chat-product-card { display: flex; flex: 0 0 clamp(164px, 44cqi, 200px); flex-direction: column; min-width: 0; border: 1px solid var(--chat-line); border-radius: 16px; overflow: hidden; background: var(--chat-surface); color: var(--chat-text); text-decoration: none; padding: 0; text-align: left; scroll-snap-align: start; white-space: normal; }
.h-chat .chat-product-card:hover { border-color: #c5b8f648; }
.h-chat .chat-product-card[aria-busy=true] { opacity: .65; }
.h-chat .chat-product-img-container { position: relative; width: 100%; aspect-ratio: 1; flex: none; background: #f6f6f6; overflow: hidden; }
.h-chat .chat-product-img { display: block; width: 100%; height: 100%; object-fit: contain; }
.h-chat .chat-product-img.is-image-error { visibility: hidden; }
.h-chat .chat-product-img-container.has-image-error::after { content: 'Imagen no disponible'; position: absolute; inset: 0; display: grid; place-items: center; padding: 12px; color: #555; font-size: 12px; }
.h-chat .chat-product-info { flex: 1; display: flex; flex-direction: column; gap: 10px; padding: 12px; }
.h-chat .chat-product-title { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; margin: 0; color: var(--chat-text); font-size: 13px; font-weight: 500; line-height: 1.45; }
.h-chat .chat-product-price-stock { display: grid; gap: 3px; margin-top: auto; }
.h-chat .chat-product-price { font-size: 14px; font-weight: 600; }
.h-chat :is(.chat-product-stock,.chat-product-variants) { font-size: 11px; color: var(--chat-muted); }
.h-chat .btn-buy-product { display: flex; align-items: center; justify-content: center; gap: 7px; min-height: 44px; padding: 9px; margin: 0 10px 10px; border: 1px solid #c5b8f626; border-radius: 10px; background: var(--chat-accent-soft); color: var(--chat-accent); font-size: 12px; font-weight: 500; }
.h-chat .out-of-stock { border-color: var(--chat-line); background: transparent; color: var(--chat-muted); }
/* Tracking and returns use the same surface, spacing and semantic colors. */
.h-chat :is(.chat-tracking-card,.change-status-card) { width: 100%; margin-top: 16px; padding: 18px; border: 1px solid var(--chat-line); border-radius: var(--chat-radius); background: var(--chat-surface); white-space: normal; font-size: 13px; }
.h-chat .change-status-card:first-child { margin-top: 0; }
.h-chat .chat-tracking-title { font-size: 16px; font-weight: 600; margin-bottom: 16px; }
.h-chat .chat-tracking-title i { color: var(--chat-accent); margin-right: 7px; }
.h-chat .chat-tracking-summary { display: flex; gap: 12px; padding: 14px; border-radius: 12px; background: #a997f20b; border: 1px solid var(--chat-line); margin-bottom: 20px; }
.h-chat .chat-tracking-summary-icon { color: var(--chat-accent); padding-top: 2px; }
.h-chat .chat-tracking-summary-copy { min-width: 0; }
.h-chat .chat-tracking-summary-heading { display: grid; gap: 4px; }
.h-chat .chat-tracking-summary-label { color: var(--chat-muted); font-size: 10px; text-transform: uppercase; letter-spacing: .08em; }
.h-chat .chat-tracking-summary-status { font-size: 15px; font-weight: 600; }
.h-chat .chat-tracking-summary-description { margin: 8px 0; color: var(--chat-muted); }
.h-chat .chat-tracking-summary-next { margin: 0; }
.h-chat .chat-t-step { position: relative; display: flex; gap: 12px; padding: 0 0 20px; color: var(--chat-muted); }
.h-chat .chat-t-step:not(:last-child)::before { content: ''; position: absolute; top: 27px; bottom: 0; left: 13px; width: 1px; background: #ffffff14; }
.h-chat .chat-t-icon { display: grid; place-items: center; flex: 0 0 27px; width: 27px; height: 27px; border: 1px solid #ffffff18; border-radius: 50%; font-size: 10px; background: var(--chat-surface); z-index: 1; }
.h-chat .chat-t-step.active .chat-t-icon { color: var(--chat-success); border-color: #6cddb447; background: #6cddb40a; }
.h-chat .chat-t-step.next .chat-t-icon { color: var(--chat-accent); border-color: #c5b8f655; }
.h-chat .chat-t-content { min-width: 0; padding-top: 2px; }
.h-chat .chat-t-content h5 { font-size: 13px; font-weight: 500; margin: 0 0 4px; color: var(--chat-text); }
.h-chat .chat-t-content p { font-size: 12px; margin: 0; }
.h-chat .chat-tracking-logistics { display: grid; gap: 6px; margin-top: 10px; }
.h-chat .chat-tracking-official-link { display: inline-block; padding: 8px 0; color: var(--chat-accent); }
.h-chat .chat-tracking-products-sec { padding-top: 14px; border-top: 1px solid var(--chat-line); }
.h-chat .chat-tracking-products-title { font-weight: 500; }
.h-chat .chat-tracking-products-list { display: grid; gap: 10px; margin-top: 12px; }
.h-chat .chat-tracking-product-item { display: flex; align-items: center; gap: 10px; }
.h-chat :is(.chat-tracking-product-img,.chat-tracking-product-img-placeholder) { width: 36px; height: 36px; object-fit: contain; border-radius: 6px; font-size: 10px; flex: none; }
.h-chat .chat-tracking-product-qty { color: var(--chat-muted); font-size: 11px; }
.h-chat .change-status-card__header { display: flex; flex-wrap: wrap; align-items: start; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.h-chat .change-status-card__eyebrow { color: var(--chat-accent); font-size: 11px; margin: 0 0 5px; }
.h-chat .change-status-card__order { color: var(--chat-text); font-size: 16px; margin: 0; }
.h-chat .change-status-card__status { padding: 4px 9px; border-radius: 6px; border: 1px solid currentColor; font-size: 11px; }
.h-chat .status-success { color: var(--chat-success); }
.h-chat .status-warning { color: var(--chat-warning); }
.h-chat .status-danger { color: var(--chat-error); }
.h-chat .status-info { color: var(--chat-accent); }
.h-chat .chat-tracking-summary { color: var(--chat-text); }
.h-chat .chat-tracking-summary.status-danger .chat-tracking-summary-status { color: var(--chat-error); }
.h-chat .chat-tracking-summary.status-warning .chat-tracking-summary-status { color: var(--chat-warning); }
.h-chat .change-status-card__products { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.h-chat .change-status-card__products.is-return-only { grid-template-columns: 1fr; }
.h-chat .change-product-panel { background: #ffffff03; border: 1px solid var(--chat-line); border-radius: 10px; padding: 12px; }
.h-chat .change-product-panel__label { font-size: 11px; color: var(--chat-muted); margin-bottom: 10px; }
.h-chat .change-product-panel__items { padding-left: 16px; margin: 0; display: grid; gap: 8px; }
.h-chat :is(.change-status-card__meta,.change-status-card__empty-state) { color: var(--chat-muted); margin: 12px 0; }
.h-chat .change-status-card__payment { border: 1px solid #e8be7b35; background: #e8be7b08; border-radius: 10px; padding: 12px; margin: 12px 0; }
.h-chat .change-status-card__payment-title { color: var(--chat-warning); font-weight: 600; margin-bottom: 5px; }
.h-chat .change-status-card__payment.is-paid { border-color: #6cddb435; }
.h-chat .change-status-card__payment.is-paid .change-status-card__payment-title { color: var(--chat-success); }
.h-chat :is(.change-status-card__actions,.chat-error-actions) { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.h-chat :is(.change-status-card__action,.chat-retry-btn,.btn-wa-redirect) { display: inline-flex; justify-content: center; align-items: center; gap: 8px; min-height: 44px; border: 1px solid #c5b8f635; border-radius: 10px; color: var(--chat-accent); background: var(--chat-accent-soft); text-decoration: none; padding: 10px 12px; font-size: 12px; white-space: normal; }
.h-chat .chat-error-bubble { padding: 14px; border: 1px solid #ffa3ac30; border-radius: 14px; background: #ffa3ac08; }
.h-chat .wa-redirect-card { display: grid; gap: 12px; padding-top: 16px; }
.h-chat .wa-redirect-text { color: var(--chat-muted); font-size: 12px; }
/* Composer stays outside the scrolling transcript, including while the keyboard is open. */
.h-chat .chat-composer { flex: none; padding: 12px var(--chat-gutter) max(12px, env(safe-area-inset-bottom)); background: var(--chat-bg); border-top: 1px solid var(--chat-line); }
.h-chat .chat-composer-field { display: flex; gap: 8px; align-items: flex-end; padding: 6px; background: var(--chat-surface); border: 1px solid #ffffff18; border-radius: 18px; }
.h-chat .chat-composer-field:focus-within { border-color: #c5b8f673; }
.h-chat .chat-input-wrapper { flex: 1; min-width: 0; }
.h-chat #chatInput { display: block; resize: none; width: 100%; min-height: 44px; max-height: 132px; margin: 0; padding: 11px 10px; border: 0; outline: none; background: transparent; border-radius: 10px; color: var(--chat-text); font-size: 16px; line-height: 22px; overflow-y: hidden; }
.h-chat #chatInput:focus-visible { outline: none !important; }
.h-chat #chatInput::placeholder { color: #9493a5; }
.h-chat .chat-send-btn { display: grid; place-items: center; flex: 0 0 44px; width: 44px; height: 44px; padding: 10px; background: var(--chat-accent); color: #211a33; border: 0; border-radius: 12px; transition: background .15s; }
.h-chat .chat-send-btn:hover:not(:disabled) { background: #ded3ff; }
.h-chat .chat-send-btn:disabled { background: #292632; color: #8b839b; }
.h-chat .chat-composer-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: #9694a3; font-size: 10px; line-height: 1.5; margin: 9px 4px 0; }
.h-chat .char-counter { white-space: nowrap; color: var(--chat-warning); }
.h-chat .chat-storefront-context { padding: 8px var(--chat-gutter); background: var(--chat-surface); border-top: 1px solid var(--chat-line); display: grid; gap: 4px; flex: none; }
.h-chat .chat-storefront-context label { color: var(--chat-accent); font-size: 10px; }
.h-chat .chat-storefront-context select { width: 100%; min-width: 0; min-height: 44px; border: 1px solid var(--chat-line); border-radius: 8px; background: var(--chat-bg); color: var(--chat-text); padding: 8px; font-size: 12px; text-overflow: ellipsis; }
.h-chat .chat-storefront-context span { color: var(--chat-muted); font-size: 10px; }
/* Established Himmel Orbit loading indicator. */
.h-chat #typingContainer { max-width: 720px; margin: 0 auto; }
.h-chat .typing-bubble { display: flex; align-items: center; gap: 12px; padding: 6px 0 16px; color: var(--chat-muted); font-size: 12px; }
.h-chat .himmel-orbit-spinner { position: relative; width: 28px; height: 28px; flex: 0 0 28px; }
.h-chat .himmel-orbit-spinner .circle { position: absolute; width: 100%; height: 100%; border-radius: 50%; }
.h-chat .circle.one { left: 0; top: 0; animation: chat-orbit-one 1.2s linear infinite; border-bottom: 2px solid #c084fc; box-shadow: 0 4px 10px #c084fc44; }
.h-chat .circle.two { right: 0; top: 0; animation: chat-orbit-two 1.2s linear infinite; border-right: 2px solid #38bdf8; box-shadow: 4px 0 10px #38bdf844; }
.h-chat .circle.three { right: 0; bottom: 0; animation: chat-orbit-three 1.2s linear infinite; border-top: 2px solid #6366f1; box-shadow: 0 -4px 10px #6366f144; }
@keyframes chat-orbit-one { from { transform: rotateX(35deg) rotateY(-45deg) rotateZ(0deg); } to { transform: rotateX(35deg) rotateY(-45deg) rotateZ(360deg); } }
@keyframes chat-orbit-two { from { transform: rotateX(50deg) rotateY(10deg) rotateZ(0deg); } to { transform: rotateX(50deg) rotateY(10deg) rotateZ(360deg); } }
@keyframes chat-orbit-three { from { transform: rotateX(35deg) rotateY(55deg) rotateZ(0deg); } to { transform: rotateX(35deg) rotateY(55deg) rotateZ(360deg); } }
html.is-embedded .h-chat.chat-page-container { background: var(--chat-bg) !important; border-radius: 0; }
html.is-embedded .help-chat-page .content-wrapper { max-width: none; padding: 0; }
@media (min-width: 901px) {
    /* Keep the transcript and composer on one reading column on public pages. */
    .help-chat-page .h-chat { --chat-content-width: 960px; }
    .help-chat-page .h-chat :is(.chat-messages-viewport, .chat-composer, .chat-storefront-context) { scrollbar-gutter: stable both-edges; scrollbar-width: thin; }
    .help-chat-page .h-chat :is(.chat-composer, .chat-storefront-context) { overflow: hidden; }
    .help-chat-page .h-chat :is(.message-row, #typingContainer, .chat-composer-field, .chat-composer-meta, .chat-storefront-context > *) { width: 100%; max-width: var(--chat-content-width); margin-inline: auto; }
}
@container hchat (max-width: 480px) {
    .h-chat .chat-header { padding-block: 12px; }
    .h-chat .chat-welcome { padding-top: 4px; }
    .h-chat .chat-welcome-mark { width: 48px; height: 48px; border-radius: 17px; margin-bottom: 20px; }
    .h-chat .chat-welcome-mark svg { width: 30px; height: 30px; }
    .h-chat .chat-welcome-description { font-size: 13px; margin-bottom: 22px; }
    .h-chat .message-bubble { font-size: 14px; }
    .h-chat .chat-messages-viewport { padding-top: 20px; }
    .h-chat .change-status-card__products { grid-template-columns: 1fr; }
    .h-chat :is(.chat-tracking-card,.change-status-card) { padding: 14px; }
    .h-chat .chat-composer-meta { font-size: 9px; }
    .h-chat .chat-wide-break { display: none; }
}
@media (max-width: 900px) {
    .help-chat-page { position: fixed; inset: 0; top: var(--chat-screen-top, 0px); bottom: auto; }
    .help-chat-page > header { padding: 12px 16px; min-height: 54px; }
    .help-chat-page > header img { width: 92px; height: 25px; }
    .help-chat-page .header-links { display: flex; align-items: center; gap: 16px; }
    .help-chat-page .header-links a { margin: 0; font-size: 11px; }
    .help-chat-page .content-wrapper { padding: 0; max-width: none; }
    .help-chat-standalone .h-chat { border: 0; border-radius: 0; }
}
@media (max-height: 520px) {
    .h-chat .chat-header { padding-block: 6px; }
    .h-chat .chat-composer { padding-top: 6px; padding-bottom: max(6px, env(safe-area-inset-bottom)); }
    .h-chat .chat-composer-meta, .h-chat .chat-storefront-context span { display: none; }
    .h-chat .chat-welcome-mark { display: none; }
}
@media (max-height: 700px) {
    .h-chat .chat-welcome-mark { display: none; }
    .h-chat .chat-welcome-description { margin-block: 12px 16px; }
    .h-chat .chat-welcome h1 { font-size: 28px; }
    .h-chat .chat-suggestions button { min-height: 60px; padding-block: 10px; }
}
/* Safari may shrink only visualViewport when its software keyboard opens. */
.is-chat-compact .h-chat .chat-header { padding-block: 6px; }
.is-chat-compact .h-chat .chat-composer-meta { display: none; }
.is-chat-compact .h-chat .chat-composer { padding-block: 6px max(6px, env(safe-area-inset-bottom)); }
@media (max-width: 900px) {
    .help-chat-page.is-chat-compact > header { display: none; }
    .help-chat-page.is-chat-compact .mobile-tabs-container { padding-block: 4px; }
}
/* One motion language: short interaction feedback, softer content entrances.
   Only opacity/transform animate on entry; transcript geometry stays stable. */
@media (prefers-reduced-motion: no-preference) {
    .h-chat .message-row.is-entering .message-bubble { animation: chat-message-arrive var(--chat-motion-enter) var(--chat-ease-out) backwards; }
    .h-chat .chat-welcome > :not(.chat-suggestions) { animation: chat-content-arrive var(--chat-motion-reveal) var(--chat-ease-out) backwards; }
    .h-chat .chat-welcome h1 { animation-delay: 40ms; }
    .h-chat .chat-welcome-description { animation-delay: 80ms; }
    .h-chat .chat-suggestions button { animation: chat-content-arrive var(--chat-motion-reveal) var(--chat-ease-out) backwards; }
    .h-chat .chat-suggestions button:nth-child(1) { animation-delay: 100ms; }
    .h-chat .chat-suggestions button:nth-child(2) { animation-delay: 150ms; }
    .h-chat .chat-suggestions button:nth-child(3) { animation-delay: 200ms; }
    .h-chat .chat-topics:not([hidden]) { animation: chat-content-arrive 180ms var(--chat-ease-out) backwards; }
    .h-chat .chat-latest:not([hidden]), .h-chat .typing-bubble { animation: chat-fade-in 160ms ease-out backwards; }
    .h-chat :is(.chat-icon-btn, .chat-send-btn, .chat-suggestions button, .chat-product-card) { transition: transform var(--chat-motion-fast) var(--chat-ease-out), background var(--chat-motion-fast) ease, border-color var(--chat-motion-fast) ease, color var(--chat-motion-fast) ease; }
    .h-chat :is(.chat-icon-btn, .chat-send-btn):active:not(:disabled) { transform: scale(.94); }
    .h-chat .chat-suggestions button:active:not(:disabled) { transform: scale(.99); }
    .h-chat .chat-composer-field { transition: border-color 180ms ease; }
    .h-chat .chat-suggestion-arrow { transition: transform 180ms var(--chat-ease-out); }
}
@media (prefers-reduced-motion: no-preference) and (hover: hover) and (pointer: fine) {
    .h-chat .chat-suggestions button:hover:not(:disabled) { transform: translateY(-1px); }
    .h-chat .chat-suggestions button:hover:not(:disabled) .chat-suggestion-arrow { transform: translate(2px, -2px); }
    .h-chat .chat-product-card:hover { transform: translateY(-2px); }
    .h-chat .chat-product-img { transition: transform var(--chat-motion-reveal) var(--chat-ease-out); }
    .h-chat .chat-product-card:hover .chat-product-img { transform: scale(1.025); }
}
@keyframes chat-message-arrive { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes chat-content-arrive { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes chat-fade-in { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
    .h-chat *, .h-chat *::before, .h-chat *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
