/* ========================================
   SHOPPING LIST STYLES
   ======================================== */

/* Header - Centered */
.header-content {
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.header-title {
  width: 100%;
}

/* Nutrition Section Header with Shopping List Button */
.nutrition-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 24px;
}

.nutrition-header h2 {
  margin: 0;
  flex: 1;
}

.shopping-list-header-btn {
  position: relative;
  background: linear-gradient(135deg, var(--neon-orange), var(--neon-purple));
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
  box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
  display: flex;
  align-items: center;
  gap: 8px;
}

.shopping-list-header-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 107, 53, 0.5);
}

.shopping-badge {
  background: white;
  color: var(--neon-orange);
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  animation: pulse 2s ease-in-out infinite;
}

/* Shopping List Button in Recipe Cards */
.shopping-list-btn {
  background: linear-gradient(135deg, #2ecc71, #27ae60) !important;
  flex: 1;
}

.shopping-list-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(46, 204, 113, 0.4);
}

/* Shopping List Modal */
.shopping-list-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.shopping-list-modal.show {
  opacity: 1;
}

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

.shopping-list-content {
  position: relative;
  z-index: 10001;
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  border-radius: 24px;
  width: 90%;
  max-width: 700px;
  max-height: 85vh;
  overflow: hidden;
  border: 1px solid var(--glass-border);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  animation: slideInUp 0.4s ease;
}

@keyframes slideInUp {
  from {
    transform: translateY(50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.shopping-list-header {
  padding: 24px;
  border-bottom: 1px solid var(--glass-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
}

.shopping-list-header h2 {
  font-size: 1.8rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--neon-blue), var(--neon-purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin: 0;
}

.close-modal-btn {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 1.5rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition-smooth);
  display: flex;
  align-items: center;
  justify-content: center;
}

.close-modal-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  color: var(--text-primary);
  transform: rotate(90deg);
}

.shopping-list-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}

.empty-shopping-list {
  text-align: center;
  padding: 60px 20px;
}

.empty-icon {
  font-size: 5rem;
  margin-bottom: 20px;
  opacity: 0.5;
}

.shopping-list-recipe-group {
  margin-bottom: 24px;
}

.recipe-group-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--neon-orange);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid rgba(255, 107, 53, 0.3);
}

.shopping-list-items {
  list-style: none;
  padding: 0;
}

.shopping-list-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  margin-bottom: 8px;
  transition: var(--transition-smooth);
}

.shopping-list-item:hover {
  background: rgba(255, 255, 255, 0.06);
}

.item-info {
  display: flex;
  gap: 12px;
  flex: 1;
}

.item-amount {
  font-weight: 600;
  color: var(--neon-cyan);
  min-width: 80px;
}

.remove-item-btn {
  background: rgba(255, 107, 53, 0.2);
  border: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  color: var(--neon-orange);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.remove-item-btn:hover {
  background: var(--neon-orange);
  color: white;
}

.shopping-list-footer {
  padding: 24px;
  border-top: 1px solid var(--glass-border);
  background: rgba(0, 0, 0, 0.2);
}

.shopping-list-stats {
  display: flex;
  gap: 20px;
  margin-bottom: 16px;
  justify-content: center;
}

.shopping-list-actions {
  display: flex;
  gap: 12px;
}

.clear-list-btn,
.instacart-btn {
  flex: 1;
  padding: 14px 24px;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.clear-list-btn {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
}

.instacart-btn {
  background: linear-gradient(135deg, #2ecc71, #27ae60);
  color: white;
  box-shadow: 0 4px 15px rgba(46, 204, 113, 0.3);
}

.instacart-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(46, 204, 113, 0.5);
}

/* Instacart Placeholder */
.instacart-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(10px);
  z-index: 10001;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.instacart-overlay.show {
  opacity: 1;
}

.instacart-placeholder-modal {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  border-radius: 24px;
  padding: 40px;
  max-width: 600px;
  width: 90%;
  border: 1px solid var(--glass-border);
  text-align: center;
}

.instacart-logo {
  font-size: 5rem;
  margin-bottom: 20px;
}

.instacart-features {
  margin-bottom: 32px;
  text-align: left;
}

.feature-item {
  display: flex;
  gap: 12px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  margin-bottom: 12px;
}

.instacart-items-preview {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 32px;
  text-align: left;
}

.items-preview-list {
  list-style: none;
  padding: 0;
}

.instacart-actions {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
}

.instacart-cancel-btn,
.instacart-confirm-btn {
  flex: 1;
  padding: 16px 24px;
  border: none;
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
}

.instacart-cancel-btn {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
}

.instacart-confirm-btn {
  background: linear-gradient(135deg, #2ecc71, #27ae60);
  color: white;
}

/* Notification */
.shopping-notification {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: linear-gradient(135deg, #2ecc71, #27ae60);
  color: white;
  padding: 16px 24px;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(46, 204, 113, 0.4);
  font-weight: 600;
  z-index: 10002;
  opacity: 0;
  transform: translateY(20px);
  transition: var(--transition-smooth);
}

.shopping-notification.show {
  opacity: 1;
  transform: translateY(0);
}
