/* ============================================================================
   v3 · «Поделиться корзиной / Оплати мне» (views/cart-share.js) и «Добавить к заказу»
   (views/add-to-order.js, кнопка на экране заказа). audit/78, идеи 3 и 5.
   Система v3: карточки 20, кнопки 16, фото 16, поле 16, иконки Lucide.
   ========================================================================== */

/* ── Карточка «Попросить оплатить корзину» под товарами (views/cart.js → askPayCardV3) ──
   Арбузная: розовая мякоть → зелёная корка; только текст и кнопка; вся карточка — одна кнопка. */
html.dv3 .v3c-askpay{
  display:flex; align-items:center; align-items:flex-start; width:calc(100% - 32px); margin:10px 16px 0; padding:18px;
  border:0; border-radius:var(--v3-r-card); text-align:left; font:inherit; color:var(--ink); cursor:pointer;
  background:linear-gradient(120deg, color-mix(in srgb, #ff6b81 22%, var(--paper)) 0%, color-mix(in srgb, var(--green) 12%, var(--paper)) 100%);
  box-shadow:0 6px 18px color-mix(in srgb, #ff6b81 14%, transparent);
  -webkit-tap-highlight-color:transparent; touch-action:manipulation;
}
html.dv3 .v3c-askpay:disabled{ opacity:.6; }
html.dv3 .v3c-askpay[aria-busy="true"]{ opacity:1; cursor:progress; }
/* Пока делаем ссылку и тянем картинку (≤2 с) — вместо значка на кнопке крутится кольцо. */
html.dv3 .v3c-askpay[aria-busy="true"] .v3c-askpay-btn .v3-i{ visibility:hidden; }
html.dv3 .v3c-askpay[aria-busy="true"] .v3c-askpay-btn::before{
  content:""; position:absolute; width:15px; height:15px; margin-left:1px; border-radius:50%;
  border:2px solid rgba(255,255,255,.45); border-top-color:#fff; animation:dl-spin .7s linear infinite; }
html.dv3 .v3c-askpay:focus-visible{ outline:2px solid var(--green); outline-offset:2px; }
html.dv3 .v3c-askpay-txt{ flex:1; min-width:0; display:flex; flex-direction:column; gap:3px; }
html.dv3 .v3c-askpay-t{ font-size:17px; font-weight:700; line-height:1.25; }
html.dv3 .v3c-askpay-s{ font-size:13px; line-height:1.35; color:var(--muted); text-wrap:balance; }
html.dv3 .v3c-askpay-btn{
  position:relative; align-self:flex-start; display:inline-flex; align-items:center; gap:6px; min-height:44px; margin-top:12px; padding:0 22px; border-radius:999px;
  background:var(--green); color:#fff; font-size:14px; font-weight:700;
  box-shadow:0 4px 12px color-mix(in srgb, var(--green) 35%, transparent);
}
html.dv3 .v3c-askpay-btn .v3-i{ width:17px; height:17px; }
html.dv3.dk .v3c-askpay{ box-shadow:none;
  background:linear-gradient(120deg, color-mix(in srgb, #ff6b81 22%, var(--paper)) 0%, color-mix(in srgb, var(--green) 20%, var(--paper)) 100%); }

/* ── Экран ссылки ─────────────────────────────────────────────────────── */
html.dv3 [data-view="cart-share"]{ min-height:100dvh; background:var(--bg); }
html.dv3 .v3sh-body{ display:flex; flex-direction:column; gap:var(--v3-gap); padding:0 16px calc(var(--v3-nav-h, 62px) + 24px); }
html.dv3 .v3sh-skel{ height:72px; border-radius:var(--v3-r-card); background:var(--paper); opacity:.7; animation:v3shPulse 1.2s ease-in-out infinite alternate; }
@keyframes v3shPulse{ to{ opacity:.35; } }
html.dv3 .v3sh-note{ display:flex; gap:12px; align-items:flex-start; }
html.dv3 .v3sh-note > .v3-i{ width:22px; height:22px; color:var(--green); margin-top:1px; }
html.dv3 .v3sh-note > span{ display:flex; flex-direction:column; gap:3px; min-width:0; }
html.dv3 .v3sh-note b{ font-size:16px; line-height:1.25; }
html.dv3 .v3sh-note.is-ok{ background:var(--green-soft); }
html.dv3 .v3sh-empty{ display:flex; flex-direction:column; align-items:center; gap:6px; padding:32px 16px; text-align:center; }
html.dv3 .v3sh-empty .v3-i{ width:40px; height:40px; color:var(--v3-sub); margin-bottom:6px; }
html.dv3 .v3sh-empty b{ font-size:17px; }

html.dv3 .v3sh-list{ padding:6px 16px; }
html.dv3 .v3sh-it, html.dv3 .v3add-it{ display:flex; align-items:center; gap:12px; padding:10px 0; border-bottom:1px solid var(--line); }
html.dv3 .v3sh-ph{ flex:none; width:52px; height:52px; border-radius:14px; }
html.dv3 .v3sh-tx{ flex:1; min-width:0; display:flex; flex-direction:column; gap:2px; }
html.dv3 .v3sh-n{ font-size:14px; font-weight:500; line-height:1.3; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
html.dv3 .v3sh-s{ flex:none; font-size:15px; font-variant-numeric:tabular-nums; }
html.dv3 .v3sh-it.is-off{ opacity:.5; }
html.dv3 .v3sh-it.is-off .v3sh-n{ text-decoration:line-through; }
html.dv3 .v3sh-tot{ display:flex; justify-content:space-between; padding:12px 0 8px; font-size:15px; }
html.dv3 .v3sh-tot b{ font-size:17px; font-variant-numeric:tabular-nums; }

html.dv3 .v3sh-bar{
  position:sticky; z-index:5; bottom:var(--v3-nav-h, 62px); margin:4px -16px 0; padding:12px 16px;
  display:flex; flex-direction:column; gap:8px; border-radius:var(--v3-r-card) var(--v3-r-card) 0 0;
}
html.dv3 .v3sh-bar .v3-btn, html.dv3 .v3sh-again{ width:100%; font-family:inherit; font-variant-numeric:tabular-nums; }
html.dv3 .v3sh-bar .v3-btn:disabled{ opacity:.5; }
html.dv3 .v3sh-fine{ text-align:center; }

/* ── Экран заказа: кнопка «Добавить к заказу» ──────────────────────────── */
html.dv3 .v3o-add{
  display:flex; align-items:center; gap:12px; width:calc(100% - 32px); margin:10px 16px 0;
  border:1.5px dashed color-mix(in srgb, var(--green) 45%, transparent); background:var(--green-soft);
  color:inherit; font:inherit; text-align:left; cursor:pointer; -webkit-tap-highlight-color:transparent;
  transition:transform .2s cubic-bezier(.34,1.56,.64,1);
}
html.dv3 .v3o-add:active{ transform:scale(.98); }
html.dv3 .v3o-add > .v3-i{ flex:none; width:36px; height:36px; padding:8px; border-radius:50%; background:var(--green); color:#fff; box-sizing:border-box; }
html.dv3 .v3o-add .v3o-while-tx{ display:flex; flex-direction:column; gap:3px; min-width:0; }
html.dv3 .v3o-add b{ font-size:16px; line-height:1.25; }
html.dv3 .v3o-add:focus-visible{ outline:2px solid var(--green); outline-offset:2px; }
html.dv3 .v3o-it-n .v3-pill{ margin-left:4px; vertical-align:1px; }

/* ── Шторка «Добавить к заказу» ────────────────────────────────────────── */
html.dv3 .v3add{
  width:100%; max-height:88dvh; display:flex; flex-direction:column; box-sizing:border-box;
  background:var(--bg); border-radius:24px 24px 0 0; animation:slideUp .22s cubic-bezier(.4,0,.2,1);
}
html.dv3 .v3add-grip{ width:40px; height:5px; border-radius:3px; background:var(--line); margin:8px auto 0; flex:none; }
html.dv3 .v3add-hd{ display:flex; align-items:flex-start; justify-content:space-between; gap:12px; padding:10px 16px 8px; }
html.dv3 .v3add-hd b{ font-size:20px; line-height:1.2; }
html.dv3 .v3add-x{ flex:none; display:grid; place-items:center; width:40px; height:40px; border:0; border-radius:50%; background:var(--paper); color:var(--ink); cursor:pointer; }
html.dv3 .v3add-shops{ margin:0; padding:2px 16px 6px; }
html.dv3 .v3add-q{ display:flex; align-items:center; gap:8px; margin:4px 16px 8px; padding:0 12px; min-height:44px;
  border-radius:var(--v3-r-ctl); background:var(--paper); color:var(--v3-sub); }
html.dv3 .v3add-q input{ flex:1; min-width:0; border:0; outline:0; background:none; font:inherit; font-size:16px; color:var(--ink); }
html.dv3 .v3add-list{ flex:1; min-height:200px; overflow-y:auto; overscroll-behavior:contain; margin:0 16px; padding:0 14px;
  background:var(--paper); border-radius:var(--v3-r-card); }
html.dv3 .v3add-list .v3sh-skel{ height:52px; margin:10px 0; background:var(--bg); }
html.dv3 .v3add-it:last-child{ border-bottom:0; }
html.dv3 .v3add-none{ padding:28px 8px; text-align:center; color:var(--muted); }
html.dv3 .v3add-it .v3-plus{ flex:none; cursor:pointer; }
html.dv3 .v3add-it .v3-plus .v3-i{ width:18px; height:18px; }
html.dv3 .v3add-step{ flex:none; display:flex; align-items:center; gap:2px; border-radius:20px; background:var(--green); color:#fff; }
html.dv3 .v3add-step button{ display:grid; place-items:center; width:40px; height:40px; border:0; background:none; color:inherit; cursor:pointer; }
html.dv3 .v3add-step b{ min-width:18px; text-align:center; font-variant-numeric:tabular-nums; }
html.dv3 .v3add-ft{ flex:none; display:flex; flex-direction:column; gap:6px; padding:10px 16px calc(12px + env(safe-area-inset-bottom, 0px)); }
html.dv3 .v3add-ft .v3-btn{ width:100%; font-family:inherit; font-variant-numeric:tabular-nums; }
html.dv3 .v3add-ft .v3-btn:disabled{ opacity:.5; justify-content:center; }
html.dv3 .v3add-fine{ text-align:center; }

/* ── Оформление в режиме «Оплати мне» ──────────────────────────────────── */
html.dv3 .v3co-payfor{ display:flex; gap:12px; align-items:flex-start; margin:0 16px 10px; background:var(--green-soft); }
html.dv3 .v3co-payfor > .v3-i{ width:22px; height:22px; color:var(--green); margin-top:1px; }
html.dv3 .v3co-payfor b{ display:block; font-size:15px; margin-bottom:3px; }

@media (prefers-reduced-motion:reduce){
  html.dv3 .v3sh-skel, html.dv3 .v3add{ animation:none; }
  html.dv3 .v3o-add{ transition:none; }
}
