/* Tag Selection Modal */
.tag-selection-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.tag-selection-modal.active {
  display: flex;
}

.tag-selection-modal .modal-content {
  background: #ffffff;
  border-radius: 12px;
  width: 90%;
  max-width: 600px;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
  border: 1px solid #e9ecef;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.tag-selection-modal .modal-header {
  padding: 1rem;
  border-bottom: 1px solid #e9ecef;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #f8f9fa;
}

.tag-selection-modal .modal-header h3 {
  color: #000000;
  margin: 0;
}

.tag-selection-modal .close-modal {
  background: none;
  border: none;
  color: #666666;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.tag-selection-modal .close-modal:hover {
  color: #000000;
  background-color: #e9ecef;
}

/* Tags Grid Layout */
.tags-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 1rem;
  padding: 1rem;
}

.tag-box {
  background: #f8f9fa;
  border: 2px solid #e9ecef;
  border-radius: 12px;
  padding: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.tag-box:hover {
  background: #e9ecef;
  border-color: #000000;
}

.tag-box.selected {
  border-color: #000000;
  background: #e9ecef;
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.1);
}

.tag-image {
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tag-image img {
  width: 120%;
  height: 120%;
  object-fit: contain;
}

.tag-name {
  font-size: 0.9rem;
  color: #000000;
  text-align: center;
}

/* Add Tag Button */
.add-tag-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #ffffff;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.add-tag-btn i {
  font-size: 1.1rem;
}

.add-tag-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  transform: translateY(-2px);
}








.add-pet-btn, .add-tag-btn {
  flex: 0 0 auto;
}














/* Selected Tags Display */
.selected-tags {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 0.8rem;
  margin-top: 1rem;
  padding-top: 0.5rem;
  border-top: 1px solid #e9ecef;
}


.selected-tag {
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
  transition: all 0.2s ease;
}

.selected-tag:hover {
  background: #e9ecef;
}



.selected-tag .tag-icon {
  width: 64px;
  height: 64px;
  object-fit: contain;
  margin-bottom: 0.5rem;
}


.selected-tag .tag-text {
  font-size: 0.8rem;
  color: #000000;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
  padding: 0 0.25rem;
}


/* Counter Styles */
.selection-info {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1rem;
}

.selection-counter,
.tag-counter {
  background: #f8f9fa;
  padding: 0.5rem 1rem;
  border-radius: 16px;
  font-size: 0.9rem;
  color: #000000;
  border: 1px solid #e9ecef;
}

























