/* Veyra — mini-cart Apple Pay express button styles.
 *
 * F-WC-MINICART-APPLEPAY (2026-07-24).
 *
 * Renders inside the FunnelKit slide-out cart footer (.fkcart-footer). Reuses
 * the same genuine, Apple-drawn black button treatment as the checkout wallet
 * button in classic.css so the two surfaces feel identical.
 *
 * Brand-clean: no "Veyra" / "Stripe" strings. SAQ-A: every selector targets
 * host-side elements only; no card data is ever near this CSS.
 */

.veyra-mce {
  box-sizing: border-box;
  width: 100%;
  margin: 0 0 10px;
}

/* F-WC-MINICART-SPAN (2026-08-04) — claim a full-width row in ANY footer.
 *
 * The express button is injected as a child of the cart's own footer, and that
 * footer is not always a plain block. Elementor's Menu Cart renders
 * `.elementor-menu-cart__footer-buttons` as `display:grid` with
 * `grid-template-columns:140px 140px`, so a plain child becomes a single 140px
 * CELL — the Apple Pay button ended up sitting beside "VIEW CART" with
 * "CHECKOUT" pushed to a second row, and `width:100%` only filled that 140px
 * cell. FunnelKit's footer is flex, others are block.
 *
 * Each declaration below is inert in the layout modes it does not apply to
 * (`grid-column` is ignored outside grid, `flex` outside flex), so one rule
 * covers all three without sniffing the host. Discovered on purechainpeps.com.
 */
.veyra-mce {
  grid-column: 1 / -1;
  grid-row: auto;
  flex: 0 0 100%;
  min-width: 0;
  max-width: 100%;
  align-self: stretch;
}

/* Genuine Apple Pay button via the native `-apple-pay-button` appearance —
 * Safari/WebKit draws the official black button + Apple Pay mark, so no brand
 * SVG and no extra CSP origin are needed. `!important` overrides FunnelKit /
 * theme button resets (many ship `button { -webkit-appearance: none }`). */
.veyra-mce .veyra-mce-btn {
  -webkit-appearance: -apple-pay-button !important;
  appearance: -apple-pay-button !important;
  -apple-pay-button-type: buy;
  -apple-pay-button-style: black;
  display: block;
  width: 100%;
  height: 48px;
  min-height: 48px;
  margin: 0;
  padding: 0 !important;
  border: none !important;
  border-radius: 10px;
  background: #000 !important;
  box-shadow: none;
  cursor: pointer;
  box-sizing: border-box;
}

/* Keep Apple's button pristine (HIG) — no theme hover tint / lift. */
.veyra-mce .veyra-mce-btn:hover,
.veyra-mce .veyra-mce-btn:active {
  filter: none;
  transform: none;
  box-shadow: none;
}

.veyra-mce .veyra-mce-btn:focus-visible {
  outline: 2px solid rgba(15, 23, 42, 0.55);
  outline-offset: 2px;
}

/* Defensive fallback: a browser that exposes ApplePaySession but not the
 * native button appearance still shows a black branded button (never an empty
 * box). Should effectively never trigger. */
@supports not ((-webkit-appearance: -apple-pay-button) or (appearance: -apple-pay-button)) {
  .veyra-mce .veyra-mce-btn {
    background: #000 !important;
    color: #fff;
    font-weight: 600;
    font-size: 15px;
  }
  .veyra-mce .veyra-mce-btn::after {
    content: "Pay with Apple Pay";
  }
}

.veyra-mce .veyra-mce-error {
  color: #a4291f;
  font-size: 12.5px;
  line-height: 1.4;
  margin-top: 6px;
  min-height: 0;
  text-align: center;
}

.veyra-mce .veyra-mce-error:empty {
  display: none;
}
