/**
 * Mobile Sticky Mini Cart Styles
 * PinkAngel Theme - Mobile-only sticky cart bar
 */

/* Hide by default on all screens */
.pa-mobile-sticky-cart {
  display: none !important;
}

/* Show only on mobile devices (tablets and below) */
@media screen and (max-width: 768px) {
  .pa-mobile-sticky-cart {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: #fff;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    padding: 12px 16px;
    transition: transform 0.3s ease, opacity 0.3s ease;
    display: block !important;
  }

  /* Hidden state - slides down out of view */
  .pa-mobile-sticky-cart.hidden {
    transform: translateY(100%);
    opacity: 0;
    pointer-events: none;
  }

  /* Content wrapper with flexbox layout */
  .pa-sticky-cart-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    max-width: 100%;
  }

  /* Left side: cart info (icon, count) */
  .pa-sticky-cart-info {
    display: flex;
    flex: 1;
    align-items: center;
    gap: 16px;
  }

  /* Cart count badge */
  .pa-sticky-cart-count {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    color: #333;
    font-weight: 600;
    cursor: pointer;
    user-select: none;
  }

  .pa-sticky-cart-count i {
    font-size: 20px;
    color: #e91e63;
    transition: transform 0.2s ease;
  }

  .pa-sticky-cart-count:hover i {
    transform: scale(1.1);
  }

  .pa-sticky-cart-count-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    min-width: 32px;
    padding: 0;
    background: #e91e63;
    color: #fff;
    border-radius: 9999px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease;
  }

  .pa-sticky-cart-count-number:hover {
    background: #c2185b;
    transform: scale(1.1);
  }

  .pa-sticky-cart-count-number:active {
    transform: scale(0.95);
  }

  /* Checkout button with price */
  .pa-sticky-cart-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 48px;
    padding: 0 10px;
    background: #e91e63;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.1s ease;
    flex: 1;
    white-space: nowrap;
  }

  .pa-sticky-cart-button:hover,
  .pa-sticky-cart-button:focus {
    background: #c2185b;
    transform: scale(1.01);
    text-decoration: none;
    color: #fff;
  }

  .pa-sticky-cart-button:active {
    transform: scale(0.98);
  }

  .pa-sticky-cart-button i {
    font-size: 18px;
    flex-shrink: 0;
  }

  /* Cart total price inside button */
  .pa-sticky-cart-button .pa-sticky-cart-total {
    font-size: 17px;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
  }

  .pa-sticky-cart-button .pa-sticky-cart-total .amount {
    color: #fff;
    font-size: 17px;
    font-weight: 700;
  }

  .pa-sticky-cart-button .pa-sticky-cart-total bdi {
    font-weight: 700;
  }

  /* Screen reader only text */
  .screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
  }

  /* Adjust for smaller mobile screens */
  @media screen and (max-width: 480px) {
    .pa-mobile-sticky-cart {
      padding: 10px 12px;
    }

    .pa-sticky-cart-info {
      gap: 12px;
    }

    .pa-sticky-cart-button {
      min-height: 44px;
      font-size: 15px;
    }

    .pa-sticky-cart-button .pa-sticky-cart-total {
      font-size: 15px;
    }

    .pa-sticky-cart-button .pa-sticky-cart-total .amount {
      font-size: 15px;
    }
  }

  /* Extra small screens - compact layout */
  @media screen and (max-width: 360px) {
    .pa-sticky-cart-count {
      font-size: 14px;
    }

    .pa-sticky-cart-count i {
      font-size: 18px;
    }

    .pa-sticky-cart-button {
      font-size: 14px;
      gap: 8px;
    }

    .pa-sticky-cart-button .pa-sticky-cart-total {
      font-size: 14px;
    }

    .pa-sticky-cart-button .pa-sticky-cart-total .amount {
      font-size: 14px;
    }

    .pa-sticky-cart-button i {
      font-size: 16px;
    }
  }
}

/* Hide sticky cart on cart and checkout pages */
body.woocommerce-cart .pa-mobile-sticky-cart,
body.woocommerce-checkout .pa-mobile-sticky-cart {
  display: none !important;
}

/* Animation for cart updates */
@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

.pa-sticky-cart-count-number.updating {
  animation: pulse 0.4s ease;
}

.pa-sticky-cart-count i.fa-solid.fa-shopping-bag {
  font-size: 35px;
}