/* ============================================
   AAAPOS – CART NOTIFICATION
   COMPACT ROW TOAST
   NOW WITH COUPON SUPPORT - ROW LAYOUT FOR TITLE
   ============================================ */

.aaapos-cart-notification {
  position: fixed;
  top: 120px;
  right: 24px;
  width: 56px;
  height: 56px;
  background: var(--color-primary);
  color: var(--color-white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 20px 40px rgba(0,0,0,.25);
  z-index: 999999;
  opacity: 0;
  transform: scale(0);
  pointer-events: none;

  transition:
    right .45s cubic-bezier(.4,0,.2,1),
    width .45s cubic-bezier(.4,0,.2,1),
    height .45s cubic-bezier(.4,0,.2,1),
    border-radius .45s cubic-bezier(.4,0,.2,1),
    background .3s ease,
    transform .3s ease,
    opacity .3s ease;
}

/* Visible */
.aaapos-cart-notification.is-active {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

/* Center slide */
.aaapos-cart-notification.is-center {
  right: 50%;
  transform: translateX(50%) scale(1);
}

/* Expanded (COMPACT) */
.aaapos-cart-notification.is-expanded {
  width: 520px;
  height: 60px;
  border-radius: 50px;
  background: var(--color-white);
  color: var(--color-text-dark);
}

/* Tick */
.aaapos-cart-tick {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity .25s ease, transform .25s ease;
}

.aaapos-cart-tick svg {
  width: 100%;
  height: 100%;
  display: block;
}

.is-expanded .aaapos-cart-tick {
  opacity: 0;
  transform: scale(0.5);
}

/* Content row */
.aaapos-cart-content.aaapos-cart-row {
  position: absolute;
  inset: 0;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .3s ease, transform .3s ease;
}

.is-expanded .aaapos-cart-content {
  opacity: 1;
  transform: translateY(0);
}

/* Icon */
.aaapos-cart-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-primary);
  color: var(--color-white);
  border-radius: 50%;
  flex-shrink: 0;
}

.aaapos-cart-icon svg {
  width: 20px;
  height: 20px;
  display: block;
}

/* Coupon-specific icon styling */
.aaapos-cart-icon--coupon {
  background: var(--color-primary);
}

.aaapos-cart-icon--coupon svg {
  width: 18px;
  height: 18px;
}

/* Text container - ROW LAYOUT */
.aaapos-cart-text {
  display: flex;
  flex-direction: row; 
  align-items: center; 
  gap: 8px;
  min-width: 0;
  flex: 1;
}

/* Product Name */
.aaapos-cart-product-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-text-dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Status text */
.aaapos-cart-status {
  font-size: 0.875rem;
  color: var(--color-text-light);
  white-space: nowrap;
}

/* Remove old title and description styles */
.aaapos-cart-title,
.aaapos-cart-desc {
  display: none;
}

/* Title */
.aaapos-cart-title {
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-shrink: 1; 
}

/* Description */
.aaapos-cart-desc {
  font-size: 0.8rem;
  color: var(--color-text-light);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-shrink: 0;
}

/* Actions */
.aaapos-cart-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.aaapos-cart-view {
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  background: var(--color-primary);
  color: var(--color-white);
  transition: all .2s ease;
  white-space: nowrap;
}

.aaapos-cart-view:hover {
  background: var(--color-primary-hover);
  transform: translateY(-1px);
  color: var(--color-white);
}

/* Close */
.aaapos-cart-close {
  margin-left: 10px;
  font-size: 20px;
  cursor: pointer;
  color: var(--color-text-light);
  flex-shrink: 0;
}

.aaapos-cart-close:hover {
  color: var(--color-text-dark);
}

/* ============================================
   MOBILE RESPONSIVE - MAINTAIN ROW LAYOUT
   ============================================ */

/* Tablet */
@media (max-width: 768px) {
  .aaapos-cart-notification {
    top: 100px;
    right: 16px;
    width: 50px;
    height: 50px;
  }

  .aaapos-cart-tick {
    width: 24px;
    height: 24px;
  }

  .aaapos-cart-notification.is-expanded {
    width: calc(100vw - 32px);
    max-width: 520px;
    height: 56px;
  }

  .aaapos-cart-content.aaapos-cart-row {
    padding: 0 16px;
    gap: 10px;
  }

  .aaapos-cart-icon {
    width: 28px;
    height: 28px;
  }

  .aaapos-cart-icon svg {
    width: 16px;
    height: 16px;
  }

  .aaapos-cart-icon--coupon svg {
    width: 15px;
    height: 15px;
  }

  .aaapos-cart-text {
    gap: 6px; /* Slightly smaller gap on tablet */
  }

  .aaapos-cart-title {
    font-size: 0.8rem;
  }

  .aaapos-cart-desc {
    font-size: 0.75rem;
  }

  .aaapos-cart-view {
    padding: 5px 12px;
    font-size: 0.75rem;
  }

  .aaapos-cart-close {
    font-size: 18px;
    margin-left: 8px;
  }
}

/* Mobile - Keep row layout */
@media (max-width: 480px) {
  .aaapos-cart-notification {
    top: 80px;
    right: 12px;
    width: 46px;
    height: 46px;
  }

  .aaapos-cart-tick {
    width: 22px;
    height: 22px;
  }

  .aaapos-cart-notification.is-expanded {
    width: calc(100vw - 24px);
    height: auto;
    min-height: 50px;
    border-radius: 40px;
    padding: 8px 0;
  }

  .aaapos-cart-content.aaapos-cart-row {
    padding: 0 12px;
    gap: 8px;
    flex-wrap: nowrap;
    justify-content: flex-start;
  }

  .aaapos-cart-icon {
    width: 26px;
    height: 26px;
  }

  .aaapos-cart-icon svg {
    width: 14px;
    height: 14px;
  }

  .aaapos-cart-icon--coupon svg {
    width: 13px;
    height: 13px;
  }

  .aaapos-cart-text {
    display: flex;
    flex-direction: row; /* Maintain row layout on mobile */
    align-items: center;
    gap: 6px;
    min-width: 0;
    flex: 1;
  }

  .aaapos-cart-title {
    font-size: 0.7rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .aaapos-cart-desc {
    font-size: 0.65rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .aaapos-cart-actions {
    margin-left: auto;
    flex-shrink: 0;
  }

  .aaapos-cart-view {
    padding: 4px 10px;
    font-size: 0.7rem;
  }

  .aaapos-cart-close {
    font-size: 16px;
    margin-left: 6px;
  }
}

/* Extra small screens */
@media (max-width: 360px) {
  .aaapos-cart-notification {
    width: 44px;
    height: 44px;
  }

  .aaapos-cart-tick {
    width: 20px;
    height: 20px;
  }

  .aaapos-cart-notification.is-expanded {
    height: auto;
    min-height: 48px;
    border-radius: 36px;
    padding: 8px 0;
  }

  .aaapos-cart-content.aaapos-cart-row {
    padding: 0 10px;
    gap: 6px;
  }

  .aaapos-cart-icon {
    width: 24px;
    height: 24px;
  }

  .aaapos-cart-icon svg {
    width: 13px;
    height: 13px;
  }

  .aaapos-cart-icon--coupon svg {
    width: 12px;
    height: 12px;
  }

  .aaapos-cart-text {
    flex: 1;
    min-width: 0;
    gap: 4px;
  }

  .aaapos-cart-title {
    font-size: 0.65rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .aaapos-cart-desc {
    font-size: 0.6rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .aaapos-cart-view {
    padding: 4px 8px;
    font-size: 0.65rem;
  }

  .aaapos-cart-close {
    font-size: 14px;
    margin-left: 4px;
  }
}

/* Very small screens - Optional: Hide description to save space */
@media (max-width: 320px) {
  .aaapos-cart-desc {
    display: none;
  }

  .aaapos-cart-text {
    justify-content: flex-start;
  }
}

/* ============================================
   HIDE DUPLICATE WOOCOMMERCE CART NOTIFICATIONS ONLY
   ============================================ */

/* Only hide cart messages, not all WooCommerce messages */
.woocommerce-message.cart-message,
.cart-message--success,
.woocommerce-notices-wrapper .woocommerce-message {
  display: none !important;
}

/* Don't hide search result messages */
.search-no-results,
.search-results,
.no-results {
  display: block !important;
}

/* ============================================
   COUPON ERROR NOTICE - Custom JS Generated
   Styles for "Please enter a coupon code"
   ============================================ */

.coupon-error-notice {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1rem;
  margin: 0 0 1rem 0;
  background: #FEF2F2;
  border-left: 4px solid #EF4444;
  border-radius: 6px;
  color: #991B1B;
  font-size: 0.875rem;
  line-height: 1.4;
  font-weight: 500;
}

/* Add warning icon before the text */
.coupon-error-notice::before {
  content: '⚠';
  font-size: 1.125rem;
  color: #EF4444;
  flex-shrink: 0;
  font-weight: 600;
}

/* Responsive styling */
@media (max-width: 768px) {
  .coupon-error-notice {
    padding: 0.5rem 0.875rem;
    font-size: 0.8125rem;
    margin-bottom: 0.875rem;
  }

  .coupon-error-notice::before {
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  .coupon-error-notice {
    padding: 0.5rem 0.75rem;
    font-size: 0.8125rem;
    gap: 0.5rem;
  }

  .coupon-error-notice::before {
    font-size: 1rem;
  }
}