/* 通販の小さい動き (11-23 リョーさん「(AIでつくれるUIアニメ 9 選) 通販サイトでも入れたら？邪魔になったり過剰にならない程度で」)
   入れたのは 5 つだけ。字 ・ 並び ・ 大きさは変えない (一覧の字は価格サイトの巡回が読む)。ご注文手続きの画面には rd_motion.js が何もしない
   01 押した時に 97% に縮んで戻る (カートに入れる ・ 検索 ・ レジに進む などのボタン)
   04 カートに入れる ・ 送る系のボタンで 0.3 秒より待つ時だけ、字の横に小さい輪 (1 周 0.8 秒)
   06 一覧の画像が届くまで灰色の帯が流れる (届いたら消える)
   08 カートに追加しました の窓で、丸の中のチェックを 0.3 秒で描く
   03 カートの合計が変わった時に 1 回だけふくらむ
   動きを減らす設定の端末では 01 ・ 06 ・ 03 を止め、輪はゆっくり回す */
@media (prefers-reduced-motion: no-preference) {
    button:not(:disabled):active,
    input[type=submit]:not(:disabled):active,
    .ec-blockBtn--action:not([disabled]):active,
    .ec-blockBtn--cancel:not([disabled]):active,
    .ec-inlineBtn--action:not([disabled]):active,
    .rd-btn:not(:disabled):active { scale: .97; }

    .rd-ld { background: linear-gradient(100deg, #ececec 30%, #f7f7f7 50%, #ececec 70%) 0 0 / 300% 100%; animation: rd-sk 1s linear infinite; }
    @keyframes rd-sk { from { background-position: 100% 0; } to { background-position: 0 0; } }

    .rd-pop { animation: rd-pop .45s cubic-bezier(.3, 1.6, .5, 1); }
    @keyframes rd-pop { 40% { scale: 1.3; } }
}
.rd-ld { background-color: #ececec; }

.rd-busy { cursor: progress; }
.rd-busy::after { content: ""; display: inline-block; width: .9em; height: .9em; margin-left: .45em; vertical-align: -.12em;
    border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; box-sizing: border-box;
    animation: rd-spin .8s linear infinite; }
@keyframes rd-spin { to { transform: rotate(360deg); } }
/* 一覧の カートに入れる のような絵だけのボタン (幅 34px) は横に並べると切れるので、絵の場所に重ねる */
.rd-busy.rd-ic { position: relative; }
.rd-busy.rd-ic > * { visibility: hidden; }
.rd-busy.rd-ic::after { position: absolute; left: 50%; top: 50%; margin: -.45em 0 0 -.45em; }

.rd-check { display: block; width: 44px; height: 44px; margin: 4px auto 8px; }
.rd-check circle { fill: #7E0308; scale: .5; opacity: 0; transform-origin: 50% 50%; animation: rd-ck-c .25s cubic-bezier(.23, 1, .32, 1) forwards; }
.rd-check path { fill: none; stroke: #fff; stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round;
    stroke-dasharray: 24; stroke-dashoffset: 24; animation: rd-ck-p .3s .2s ease-out forwards; }
@keyframes rd-ck-c { to { scale: 1; opacity: 1; } }
@keyframes rd-ck-p { to { stroke-dashoffset: 0; } }

@media (prefers-reduced-motion: reduce) {
    .rd-busy::after { animation-duration: 1.6s; }
    .rd-check circle, .rd-check path { animation: none; scale: 1; opacity: 1; stroke-dashoffset: 0; }
}
