/*
 * ggf-hummingbird-child — express payment buttons (GGF-PAYMENTS, 22.10.2026), layout variant 1 chosen by the owner:
 * native Stripe placement. The hooks render inside .ggf-express, then Stripe.js moves its own elements: on the product page
 * the Klarna message to the top of .product-add-to-cart and the Google Pay / Apple Pay / Klarna buttons after the add-to-cart
 * button; in the cart the buttons under the totals and the Klarna message above the checkout button. The group keeps the
 * PayPal button (PayPal module, 44 px, full width) and the PayPal pay-later message. Markup: templates/catalog/_partials/
 * product-add-to-cart.tpl, templates/checkout/_partials/cart-detailed-actions.tpl, templates/checkout/cart.tpl,
 * modules/paypal/views/templates/shortcut/. In the cart Stripe is rendered once outside the re-rendered actions block.
 */

.ggf-express {
  display:grid;
  grid-template-columns:minmax(0, 1fr);
  gap:10px;
  width:100%;
  min-width:0;
  margin:12px 0 0;
}

.ggf-express:empty {
  display:none;
}

/* Stripe: hidden helper inputs of product-page.tpl take no space; empty containers until Stripe.js mounts content. */
.ggf-express > input[type="hidden"] {
  display:none;
}

.ggf-express #stripe-express-checkout-element,
.ggf-express #payment-method-messaging-element {
  width:100%;
  min-width:0;
}

.ggf-express #stripe-express-checkout-element:empty,
.ggf-express #stripe-error-message:empty,
.ggf-express #payment-method-messaging-element:empty {
  display:none;
}

/* Cart: like the PayPal group (rendered by the actions block only when checkout is allowed), the Stripe buttons and the
   Klarna message are hidden while checkout is blocked — empty cart, products above stock, minimum purchase. The state
   comes from data-ggf-checkout on the actions block, which PrestaShop re-renders on every cart update. Collapsed rather than
   display:none, so Stripe.js mounting on a blocked cart still measures the column width and lays the buttons out correctly
   when checkout becomes available; visibility:hidden keeps them out of the tab order and the accessibility tree. */
.cart-summary:has(.js-cart-detailed-actions[data-ggf-checkout="blocked"]) :is(#stripe-express-checkout-element, #stripe-error-message, #payment-method-messaging-element, .ggf-express--cart-stripe) {
  visibility:hidden !important;
  height:0 !important;
  min-height:0 !important;
  margin:0 !important;
  padding:0 !important;
  overflow:hidden !important;
}

.ggf-express #stripe-error-message:not(:empty) {
  color:#b42318;
  font-size:13px;
  line-height:1.4;
}

/* PayPal: the SDK container gets an inline pixel width from the panel setting; never wider than the column. */
.ggf-express [data-container-express-checkout] {
  display:block;
  width:100%;
  min-width:0;
  margin:0;
}

.ggf-express [paypal-button-container] {
  max-width:100%;
  margin:0;
}

.ggf-express [paypal-messaging-banner] {
  width:100%;
  min-width:0;
  margin:0;
}
