/**
 * Copyright (c) since 2010 Stripe, Inc. (https://stripe.com)
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Academic Free License version 3.0
 * that is bundled with this package in the file LICENSE.md.
 * It is also available through the world-wide-web at this URL:
 * https://opensource.org/licenses/AFL-3.0
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@prestashop.com so we can send you a copy immediately.
 *
 * @author    Stripe <https://support.stripe.com/contact/email>
 * @copyright Since 2010 Stripe, Inc.
 * @license   https://opensource.org/licenses/AFL-3.0 Academic Free License version 3.0
 */

/* Styles for the Apple Pay button containers in the minicart */
.blockcart-apple-pay-container,
.apple-pay-button-target {
  padding: 0;
  margin-top: 10px;
  width: 100%;
  display: block;
  position: relative;
  clear: both;
}

/* Ensure the button has proper spacing and positioning */
.blockcart-apple-pay-container .stripe-minicart-element,
.apple-pay-button-target .stripe-minicart-element {
  margin-bottom: 10px;
  width: 100%;
  display: block;
  position: relative;
  min-height: 40px;
}

/* Ensure the Stripe iframe is properly sized */
.blockcart-apple-pay-container .stripe-minicart-element iframe,
.apple-pay-button-target .stripe-minicart-element iframe {
  width: 100% !important;
  min-height: 40px !important;
  position: relative !important;
  left: 0 !important;
  top: 0 !important;
}

/* Style for error messages */
.blockcart-apple-pay-container .stripe-minicart-error,
.apple-pay-button-target .stripe-minicart-error {
  color: red;
  font-size: 12px;
  text-align: center;
  margin-top: 5px;
  width: 100%;
  display: block;
}

/* Mobile-specific styles */
@media (max-width: 767px) {
  /* Ensure the mobile button is properly displayed */
  #mobile-apple-pay-button-target {
    padding: 0;
    margin-top: 10px;
    width: 100%;
    display: block !important;
    position: relative;
    clear: both;
    z-index: 100; /* Ensure it's above other elements */
  }
  
  /* Ensure the button is properly sized on mobile */
  #mobile-apple-pay-button-target .stripe-minicart-element {
    margin-bottom: 10px;
    width: 100%;
    display: block !important;
    position: relative;
    min-height: 40px;
  }
  
  /* Ensure the iframe is properly sized on mobile */
  #mobile-apple-pay-button-target .stripe-minicart-element iframe {
    width: 100% !important;
    min-height: 40px !important;
    position: relative !important;
    left: 0 !important;
    top: 0 !important;
  }
  
  /* Fix for mobile cart updates */
  #_mobile_blockcart-content .cart-buttons {
    position: relative;
    z-index: 10;
  }
}