/* Subscription Blend Selector Modal */

.subscription-blend-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
}

.subscription-blend-modal.active {
  display: flex;
}

.subscription-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
}

.subscription-modal-content {
  position: relative;
  background: var(--cream, #FFF8E7);
  border-radius: 12px;
  max-width: 1200px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  z-index: 1;
}

.subscription-modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: transparent;
  border: none;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  color: var(--warm-brown, #4A3728);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.2s ease;
  z-index: 2;
}

.subscription-modal-close:hover {
  background: rgba(74, 55, 40, 0.1);
}

.subscription-modal-body {
  padding: 2rem;
}

/* Tier Selector Buttons */
.subscription-tier-selector {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.tier-selector-btn {
  padding: 1rem 2rem;
  background: white;
  border: 2px solid var(--sage-green, #8BB680);
  border-radius: 8px;
  font-size: 1.1rem;
  font-weight: 600;
  font-family: 'Cormorant Garamond', serif;
  color: var(--warm-brown, #4A3728);
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 140px;
}

.tier-selector-btn:hover {
  background: rgba(139, 182, 128, 0.1);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(139, 182, 128, 0.2);
}

.tier-selector-btn.active {
  background: var(--sage-green, #8BB680);
  color: white;
  box-shadow: 0 4px 12px rgba(139, 182, 128, 0.3);
}

/* Header */
.subscription-selector-header {
  text-align: center;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 2px solid var(--warm-brown, #4A3728);
}

.subscription-selector-header h2 {
  font-size: 2rem;
  color: var(--warm-brown, #4A3728);
  margin: 0 0 0.5rem 0;
  font-family: 'Cormorant Garamond', serif;
}

.subscription-selector-description {
  font-size: 1.1rem;
  color: var(--warm-brown, #4A3728);
  margin: 0 0 1rem 0;
  opacity: 0.8;
}

.subscription-benefits {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-top: 1rem;
}

.benefit-item {
  background: rgba(139, 182, 128, 0.15);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.9rem;
  color: var(--warm-brown, #4A3728);
  font-weight: 500;
}

/* Requirements Badge */
.subscription-selector-requirements {
  text-align: center;
  margin-bottom: 1.5rem;
}

.requirement-badge {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 25px;
  font-weight: 600;
  font-size: 1.1rem;
  transition: all 0.3s ease;
}

.requirement-badge.unmet {
  background: rgba(255, 107, 107, 0.2);
  color: #c0392b;
  border: 2px solid #e74c3c;
}

.requirement-badge.met {
  background: rgba(139, 182, 128, 0.2);
  color: #27ae60;
  border: 2px solid #8BB680;
}

.requirement-help {
  margin-top: 0.75rem;
  padding: 0.75rem 1rem;
  background: rgba(255, 193, 7, 0.1);
  border: 2px solid #ffc107;
  border-radius: 8px;
  color: #d68910;
  font-size: 1rem;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

/* Blends Grid */
.subscription-blends-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.subscription-blend-card {
  background: white;
  border-radius: 8px;
  padding: 1rem;
  transition: all 0.3s ease;
  border: 2px solid transparent;
  cursor: pointer;
}

.subscription-blend-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.subscription-blend-card.selected {
  border-color: var(--sage-green, #8BB680);
  background: rgba(139, 182, 128, 0.05);
}

.blend-card-image {
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 6px;
  margin-bottom: 0.75rem;
}

.blend-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.blend-card-info h4 {
  font-size: 1.1rem;
  color: var(--warm-brown, #4A3728);
  margin: 0 0 0.25rem 0;
  font-family: 'Cormorant Garamond', serif;
}

.blend-category {
  font-size: 0.85rem;
  color: var(--warm-brown, #4A3728);
  opacity: 0.6;
  margin: 0 0 0.5rem 0;
}

.blend-price {
  font-size: 1rem;
  color: var(--sage-green, #8BB680);
  font-weight: 600;
  margin: 0 0 0.75rem 0;
}

/* Quantity Control */
.blend-quantity-control {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.blend-quantity-control button {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid var(--sage-green, #8BB680);
  background: white;
  color: var(--sage-green, #8BB680);
  font-size: 1.2rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.blend-quantity-control button:hover:not(:disabled) {
  background: var(--sage-green, #8BB680);
  color: white;
}

.blend-quantity-control button:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.qty-display {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--warm-brown, #4A3728);
  min-width: 30px;
  text-align: center;
}

/* Footer */
.subscription-selector-footer {
  border-top: 2px solid var(--warm-brown, #4A3728);
  padding-top: 1.5rem;
  margin-top: 2rem;
}

.subscription-pricing-summary {
  background: white;
  padding: 1.5rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
}

.pricing-row {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
  font-size: 1rem;
  color: var(--warm-brown, #4A3728);
}

.pricing-row.discount {
  color: var(--sage-green, #8BB680);
  font-weight: 600;
}

.pricing-row.total {
  border-top: 2px solid var(--warm-brown, #4A3728);
  margin-top: 0.5rem;
  padding-top: 1rem;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--warm-brown, #4A3728);
}

.pricing-note {
  text-align: center;
  font-size: 0.9rem;
  color: var(--sage-green, #8BB680);
  margin-top: 0.75rem;
  font-weight: 500;
}

.subscription-continue-btn {
  width: 100%;
  padding: 1.25rem;
  background: var(--sage-green, #8BB680);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1.2rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: 'Cormorant Garamond', serif;
}

.subscription-continue-btn:hover:not(:disabled) {
  background: #7aa670;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(139, 182, 128, 0.3);
}

.subscription-continue-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .subscription-modal-content {
    width: 95%;
    max-height: 95vh;
  }

  .subscription-modal-body {
    padding: 1.5rem 1rem;
  }

  .subscription-selector-header h2 {
    font-size: 1.5rem;
  }

  .subscription-blends-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
  }

  .benefit-item {
    font-size: 0.8rem;
    padding: 0.4rem 0.8rem;
  }

  .subscription-benefits {
    gap: 0.5rem;
  }
}

@media (max-width: 480px) {
  .subscription-blends-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .blend-card-info h4 {
    font-size: 0.95rem;
  }
}
