/* AS6 motion language: compression → travelling chevrons → confirmed landing. */
:root { --as6-motion-out: cubic-bezier(.16,1,.3,1); --as6-motion-spring: cubic-bezier(.2,.85,.25,1.2); }
:where(.as6-host button, .as6-mini button, .as6-location-dialog button, [data-as6-motion-press]) {
  transition: scale 150ms var(--as6-motion-spring), box-shadow 180ms ease, background-color 160ms ease;
  -webkit-tap-highlight-color: transparent;
}
:where(.as6-host button, .as6-mini button, .as6-location-dialog button, [data-as6-motion-press]):active:not(:disabled):not([aria-disabled="true"]) { scale: .965; }
:where(.as6-host button, .as6-mini button, .as6-location-dialog button, [data-as6-motion-press]):focus-visible { outline: 3px solid #7399d4; outline-offset: 3px; }
[data-as6-motion-state] { position: relative; isolation: isolate; }
[data-as6-motion-state]:not(input) { color: transparent !important; }
[data-as6-motion-state]:not(input) > * { visibility: hidden; }
[data-as6-motion-state]:not(input)::after {
  content: attr(data-as6-motion-label); position: absolute; inset: 0; display: flex;
  align-items: center; justify-content: center; color: #fff; background: #1d4f9e;
  border-radius: inherit; padding-inline: 8px; font: inherit; white-space:nowrap; pointer-events: none;
}
[data-as6-motion-state]:not(input)::before {
  content: ''; position: absolute; z-index: 2; pointer-events: none; width: 27px; height: 8px;
  bottom: 5px; left: calc(50% - 13px); background: linear-gradient(90deg,#fff5,#fff);
  clip-path: polygon(0 0,36% 0,54% 50%,36% 100%,0 100%,18% 50%,38% 0,74% 0,100% 50%,74% 100%,38% 100%,64% 50%);
  animation: as6-motion-run 850ms cubic-bezier(.4,0,.2,1) infinite;
}
[data-as6-motion-state="slow"]:not(input)::before { animation-duration: 1500ms; }
[data-as6-motion-state="success"]:not(input)::after { content: '✓  ' attr(data-as6-motion-label); background: #196649; animation: as6-motion-land 300ms var(--as6-motion-spring); }
[data-as6-motion-state="success"]:not(input)::before, [data-as6-motion-state="error"]:not(input)::before, [data-as6-motion-state="uncertain"]:not(input)::before { content: none; }
[data-as6-motion-state="error"]:not(input)::after, [data-as6-motion-state="uncertain"]:not(input)::after { background: #8f3339; }
[data-as6-motion-state="pending"], [data-as6-motion-state="slow"] { cursor: progress; }
[data-as6-motion-state="uncertain"] { cursor: help; }
[data-as6-motion-disclosure] { box-sizing: border-box; }
[data-as6-ship-toggle] .as6-co-card-x::after { transition: transform 240ms var(--as6-motion-out); }
.as6-motion-note {
  position: fixed; z-index: 100100; left: max(16px, env(safe-area-inset-left)); bottom: max(88px, calc(env(safe-area-inset-bottom) + 24px));
  width: min(420px, calc(100vw - 32px)); box-sizing: border-box; display: flex; flex-wrap: wrap; align-items: center;
  gap: 8px 12px; padding: 15px 44px 15px 18px; color: #162337; background: #fff;
  border: 1px solid #d9e3f1; border-left: 4px solid #1d4f9e; border-radius: 14px; box-shadow: 0 12px 40px #182c5024;
  font: 500 14px/1.45 'Golos Text', system-ui, sans-serif;
}
.as6-motion-note[hidden] { display: none; }
.as6-motion-note[data-placement="top"] { top:max(16px, env(safe-area-inset-top));bottom:auto; }
[data-screen-label="Попап выбора вариации"] > .as6-motion-note {
  position: relative; inset: auto; width: 100%; max-width: none; grid-column: 1 / -1; margin-top: 12px;
}
.as6-motion-note[data-tone="error"] { border-left-color: #a23842; }
.as6-motion-note a { color: #1d4f9e; text-decoration: underline; text-underline-offset: 3px; }
.as6-motion-note button { position: absolute; right: 4px; top: 4px; width: 36px; height: 36px; border: 0; background: transparent; color: #52647e; font-size: 24px; cursor: pointer; }
.as6-motion-note :focus-visible { outline: 2px solid #1d4f9e; outline-offset: 2px; }
@keyframes as6-motion-run { 0% { transform: translateX(-16px); opacity: .25; } 50% { opacity: .95; } 100% { transform: translateX(16px); opacity: .25; } }
@keyframes as6-motion-land { 0% { transform: scale(.97); } 65% { transform: scale(1.018); } 100% { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) {
  :where(.as6-host button, .as6-mini button, .as6-location-dialog button, [data-as6-motion-press]), [data-as6-ship-toggle] .as6-co-card-x::after { transition: none; }
  :where(.as6-host button, .as6-mini button, .as6-location-dialog button, [data-as6-motion-press]):active { scale: 1 !important; }
  [data-as6-motion-state]::before, [data-as6-motion-state]::after { animation: none !important; }
}
/* Theme search feedback leaves the input and third-party search controls usable. */
.as6-search-feedback { display:flex;align-items:center;gap:12px;padding:10px 12px;font-size:13px;color:#40536e; }
.as6-search-feedback[hidden] { display:none; }
.as6-search-feedback button { border:0;background:none;color:inherit;text-decoration:underline;font:inherit;min-height:44px;cursor:pointer; }
.as6-oc-pending { display:block;width:28px;height:4px;background:#1d4f9e;border-radius:4px;align-self:center;animation:as6-motion-run 850ms ease-in-out infinite; }
.as6-oc-pending[hidden] { display:none; }
@media (prefers-reduced-motion:reduce) { .as6-oc-pending { animation:none; } }
@media (prefers-reduced-motion:reduce) { .as6-host .sheetm, .as6-host .sheetm > *, .as6-location-dialog { animation:none!important;transition:none!important; } }

/* Native integration r1: touch press and existing cart drawer respect reduce. */
:where(.as6-host button, .as6-mini button, .as6-location-dialog button, [data-as6-motion-press]).as6-motion-pressed:not(:disabled):not([aria-disabled="true"]) { scale: .965; }
@media (prefers-reduced-motion:reduce) {
  .as6-motion-pressed { scale: 1 !important; }
  .as6-host .drawerBg, .as6-host .drawerBg > [data-screen-label="Мини-корзина"] { animation: none !important; transition: none !important; }
}

/* Native r2: feedback is a row in the drawer's scrollable body, not a footer overlay. */
.as6-motion-note[data-placement="drawer"] {
  position: relative; inset: auto; width: 100%; max-width: none; flex: 0 0 auto;
  margin: 0; max-height: min(240px, 40vh); overflow: auto; box-shadow: none;
}

/* Visual-only v1 over r4: no new event, transport, response or form owner. */
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  :where(.as6-host button, .as6-mini button, .as6-location-dialog button, [data-as6-motion-press]):not(:disabled):not([aria-disabled="true"]):not([data-as6-motion-state]):hover {
    translate: 0 -2px;
    box-shadow: 0 5px 12px #1b4f9c24;
  }
}
:where(.as6-host button, .as6-mini button, .as6-location-dialog button, [data-as6-motion-press]) {
  transition-property: scale, translate, box-shadow, background-color;
  transition-duration: 150ms, 160ms, 180ms, 160ms;
}
:where(.as6-host button, .as6-mini button, .as6-location-dialog button, [data-as6-motion-press]):is(:active, .as6-motion-pressed):not(:disabled):not([aria-disabled="true"]):not([data-as6-motion-state]) {
  translate: 0 0;
  box-shadow: 0 0 0 3px #1b4f9c24, 0 1px 3px #17243820;
}
/* The existing r4 marker appears only for a committed, eligible disclosure transition. */
form.woocommerce-checkout [data-as6-frag="checkout-ship"] [data-as6-ship-body][data-as6-motion-disclosure]:not([hidden]) {
  animation: as6-visual-ship-enter 220ms var(--as6-motion-out) both;
}
form.woocommerce-checkout [data-as6-frag="checkout-ship"] [data-as6-ship-body][data-as6-motion-disclosure]:focus-within {
  animation: none;
}
@keyframes as6-visual-ship-enter { from { translate: 0 6px; } to { translate: 0 0; } }
@media (prefers-reduced-motion: reduce) {
  :where(.as6-host button, .as6-mini button, .as6-location-dialog button, [data-as6-motion-press]) { transition: none; translate: none; }
  form.woocommerce-checkout [data-as6-frag="checkout-ship"] [data-as6-ship-body][data-as6-motion-disclosure] { animation: none; }
}
