#gem-container {
  /*background-color: pink;*/
}

@media (min-width: 640px) and (max-width: 767px) {
  #gem-container {
    width: 640px;
  }
}

@media (max-width: 639px) {
  #gem-container {
    width: 320px;
  }
}

/**
The outer element for a gem
**/
.gem {
  cursor: pointer;
  margin-top: 20px;
  height: 300px;
  overflow: hidden;

/* testing only */  
  /* background: blue; */

}

/**
The gem's name
**/
.gem-name {
  display: block;
  font-family: Bold;
  height: 40px;
  margin: 10px 10px -50px 10px;
  overflow: hidden;
  position: relative;
  text-align: center;
  text-overflow: ellipsis;
  text-shadow: 1px 1px #CCC;
  white-space: nowrap;
  z-index: 5;
}

/**
The gem's image wrapper. Clips the corners of the image. Works like a Photoshop mask... sort of.
**/
.gem-image {
  border-radius: 150px;
  margin: 0 auto;
  height: 300px;
  overflow: hidden;
}

.gem-image img {
  max-width: none;
}

/**
The gem's SVG
**/
.gem-svg {
  height: 300px;
  position: relative;
  top: -300px;
  width: 300px;
}

/**
Setting the correct min-height based on viewport and the responsive layout
**/
@media (min-width: 1200px) {
  .gem {
    margin-top: 30px;
    height: 270px;
  }
  
  .gem-image {
    border-radius: 135px;
    height: 270px;
  }
  
  .gem-svg {
    height: 270px;
    top: -270px;
    width: 270px;
  }
}
 
@media (min-width: 768px) and (max-width: 979px) {
  .gem {
    margin-top: 20px;
    height: 352px;
  }
  
  .gem-image {
    border-radius: 176px;
    height: 352px;
  }
  
  .gem-svg {
    height: 352px;
    top: -352px;
    width: 352px;
  }
}

@media (min-width: 640px) and (max-width: 767px) {
  .gem {
    float: left;
    margin: 20px 10px 0;
    height: 300px;
    width: 300px;
  }
  
  .gem-image {
    border-radius: 150px;
    height: 300px;
  }
}
 
@media (max-width: 639px) {
  .gem {
    float: left;
    margin: 10px 5px 0;
    height: 150px;
    width: 150px;
  }
  
  .gem-image {
    border-radius: 75px;
    height: 150px;
  }
  
  .gem-svg {
    height: 150px;
    top: -150px;
    width: 150px;
  }
}


/* Tag colors */
.tagcolor-delicate {
    fill: #B5B2D9;
    background-color: #B5B2D9 !important;
}

.tagcolor-robust {
    fill: #B32317;
    background-color: #B32317 !important;
}

.tagcolor-playful {
    fill: #F89828;
    background-color: #F89828 !important;
}

.tagcolor-serious {
    fill: #00457C;
    background-color: #00457C !important;
}

.tagcolor-organic {
    fill: #78A22F;
    background-color: #78A22F !important;
}

.tagcolor-geometric {
    fill: #C9CBCC;
    background-color: #C9CBCC !important;
}

.tagcolor-stable {
    fill: #ACA095;
    background-color: #ACA095 !important;
}

.tagcolor-dynamic {
    fill: #FFC425;
    background-color: #FFC425 !important;
}

.tagcolor-relaxing {
    fill: #AFDDD2;
    background-color: #AFDDD2 !important;
}

.tagcolor-exciting {
    fill: #EE3424;
    background-color: #EE3424 !important;
}

.tagcolor-majestic {
    fill: #522E91;
    background-color: #522E91 !important;
}

.tagcolor-humble {
    fill: #9A5107;
    background-color: #9A5107 !important;
}


/* Gem animations - requires prefixfree.js */
.gem-updated {
    animation-duration: 1s;
    animation-name: gem-rotate;
    animation-iteration-count: 2;
    animation-direction: alternate;
}

@keyframes gem-rotate {
    from {
        -webkit-transform: rotate(0deg);
    }

    to {
        -webkit-transform: rotate(90deg);
    }
}


.tag-updated {
    animation-duration: 0.5s;
    animation-name: tag-animate;
    animation-iteration-count: 2;
    animation-direction: alternate;
}

@keyframes tag-animate {
    from {
        opacity: 1.0;
    }

    to {
        opacity: 0.5;
    }
}
