/* Magic Cart Min/Max - Modern Minimal Popup */

/* CSS Variables */
.magic-cart-popup {
  --magic-cart-color: #000000;
  --magic-cart-z-index: 999999;
  --magic-cart-bg: #ffffff;
  --magic-cart-text: #1a1a1a;
  --magic-cart-text-secondary: #666666;
  --magic-cart-radius: 16px;
  --magic-cart-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* Hidden by default */
.magic-cart-popup {
  display: none;
  position: fixed;
  inset: 0;
  z-index: var(--magic-cart-z-index);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* Visible state */
.magic-cart-popup--visible {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

/* Overlay - glassmorphism effect */
.magic-cart-popup__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  cursor: pointer;
  animation: magicCartFadeIn 0.2s ease-out;
}

@keyframes magicCartFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Dialog - clean modern card */
.magic-cart-popup__dialog {
  position: relative;
  background: var(--magic-cart-bg);
  border-radius: var(--magic-cart-radius);
  max-width: 400px;
  width: 100%;
  padding: 32px;
  box-shadow: var(--magic-cart-shadow);
  text-align: center;
  animation: magicCartSlideIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

@keyframes magicCartSlideIn {
  from {
    opacity: 0;
    transform: translateY(-24px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Icon indicator - uses white icon on colored background for contrast */
.magic-cart-popup__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  margin: 0 auto 20px;
  background: var(--magic-cart-color);
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.magic-cart-popup__icon svg {
  width: 28px;
  height: 28px;
  stroke: #ffffff;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

/* Title */
.magic-cart-popup__title {
  font-size: 18px;
  font-weight: 600;
  color: var(--magic-cart-text);
  margin: 0 0 8px 0;
  line-height: 1.4;
  letter-spacing: -0.02em;
}

/* Message */
.magic-cart-popup__message {
  font-size: 14px;
  color: var(--magic-cart-text-secondary);
  margin: 0 0 24px 0;
  line-height: 1.6;
  max-height: 120px;
  overflow-y: auto;
}

/* Button - modern flat style */
.magic-cart-popup__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 140px;
  background: var(--magic-cart-color);
  color: #fff;
  border: none;
  padding: 14px 28px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  letter-spacing: 0.01em;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.magic-cart-popup__button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.magic-cart-popup__button:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.magic-cart-popup__button:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.1), 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Responsive adjustments */
@media (max-width: 480px) {
  .magic-cart-popup__dialog {
    padding: 24px;
    border-radius: 12px;
  }
  
  .magic-cart-popup__icon {
    width: 48px;
    height: 48px;
    margin-bottom: 16px;
  }
  
  .magic-cart-popup__icon svg {
    width: 24px;
    height: 24px;
  }
  
  .magic-cart-popup__title {
    font-size: 16px;
  }
  
  .magic-cart-popup__message {
    font-size: 13px;
  }
  
  .magic-cart-popup__button {
    width: 100%;
    padding: 16px 24px;
  }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  .magic-cart-popup {
    --magic-cart-bg: #1a1a1a;
    --magic-cart-text: #ffffff;
    --magic-cart-text-secondary: #a0a0a0;
  }
  
  .magic-cart-popup__dialog {
    border-color: rgba(255, 255, 255, 0.1);
  }
}
