/* Mobile buying path (0.4.66) — inc/mobile-buy.php, assets/js/mobile-buy.js */

/* ---------- C: "Checkout" in the added-to-cart message ---------- */
.cart-toast-checkout {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 14px;
  border-radius: var(--radius, 4px);
  background: var(--green, #5fd31e);
  color: #111214;
  font-weight: 700;
  font-size: 0.82rem;
  text-decoration: none;
  white-space: nowrap;
}
.cart-toast-checkout:hover { filter: brightness(1.05); text-decoration: none; }

@media (max-width: 620px) {
  .cart-toast { left: 12px; right: 12px; max-width: none; transform: none; }
  .cart-toast .cart-toast-inner { flex-wrap: wrap; row-gap: 10px; padding: 12px; }
  .cart-toast .cart-toast-msg {
    flex: 1 1 calc(100% - 70px); /* message + close on the first line, the two buttons below */
    max-width: none;
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    font-size: 0.85rem;
  }
  .cart-toast .cart-toast-close { order: 2; }
  .cart-toast .cart-toast-link,
  .cart-toast .cart-toast-checkout { order: 3; flex: 1 1 40%; min-height: 44px; font-size: 0.9rem; }
  .cart-toast .cart-toast-link { border: 1px solid var(--dark-border, #3a3c40); border-radius: var(--radius, 4px); color: #fff; }
}

/* ---------- B: sticky Add to cart bar (phones, product pages) ---------- */
.mm-sbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 90; /* under the cart drawer / menu (200) and the toast (300) */
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px));
  background: #fff;
  border-top: 1px solid rgba(17, 18, 20, 0.12);
  box-shadow: 0 -6px 20px rgba(17, 18, 20, 0.1);
  transform: translateY(110%);
  visibility: hidden;
  transition: transform 0.22s ease, visibility 0s linear 0.22s;
}
.mm-sbar.is-shown { transform: none; visibility: visible; transition: transform 0.22s ease; }
@media (min-width: 1024px) { .mm-sbar { display: none; } }
@media (prefers-reduced-motion: reduce) { .mm-sbar, .mm-sbar.is-shown { transition: none; } }
.mm-sbar-info { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; line-height: 1.2; }
.mm-sbar-price { font-weight: 700; font-size: 1.05rem; color: #111214; white-space: nowrap; }
.mm-sbar-price small { margin-left: 5px; font-weight: 500; font-size: 0.75rem; color: #5c6066; }
.mm-sbar-sub { font-size: 0.82rem; color: #3f4247; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mm-sbar-sub.is-needed { color: #111214; font-weight: 600; }
.mm-sbar-sub.is-needed::before { content: "\2192\00a0"; }
.mm-sbar-btn {
  flex: 0 0 auto;
  min-height: 48px;
  padding: 0 20px;
  border: 0;
  border-radius: var(--radius, 4px);
  font: inherit;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
}
.mm-sbar-btn.is-loading { opacity: 0.7; pointer-events: none; }
@media (max-width: 1023px) {
  body.mm-sbar-on .cart-toast { bottom: calc(84px + env(safe-area-inset-bottom, 0px)); }
}
