* { box-sizing: border-box; }

body {
  font-family: sans-serif;
}

/* ---- button ---- */

.button {
  display: inline-block;
  padding: 0.5em 1.0em;
  background: #EEE;
  border: none;
  border-radius: 7px;
  background-image: linear-gradient( to bottom, hsla(0, 0%, 0%, 0), hsla(0, 0%, 0%, 0.2) );
  color: #222;
  font-family: sans-serif;
  font-size: 16px;
  text-shadow: 0 1px white;
  cursor: pointer;
}

.button:hover {
  background-color: #8CF;
  text-shadow: 0 1px hsla(0, 0%, 100%, 0.5);
  color: #222;
}

.button:active,
.button.is-checked {
  background-color: #28F;
}

.button.is-checked {
  color: white;
  text-shadow: 0 -1px hsla(0, 0%, 0%, 0.8);
}

.button:active {
  box-shadow: inset 0 1px 10px hsla(0, 0%, 0%, 0.8);
}

/* ---- button-group ---- */

.button-group {
  margin-bottom: 20px;
}

.button-group:after {
  content: '';
  display: block;
  clear: both;
}

.button-group .button {
  float: left;
  border-radius: 0;
  margin-left: 0;
  margin-right: 1px;
}

.button-group .button:first-child { border-radius: 0.5em 0 0 0.5em; }
.button-group .button:last-child { border-radius: 0 0.5em 0.5em 0; }

/* ---- isotope ---- */

.grid {
  border: 1px solid #333;
}

/* clear fix */
.grid:after {
  content: '';
  display: block;
  clear: both;
}

/* ---- .element-item ---- */

.element-item {
  position: relative;
  float: left;
  width: 100px;
  height: 100px;
  margin: 5px;
  padding: 10px;
  background: #888;
  color: #262524;
}

.element-item > * {
  margin: 0;
  padding: 0;
}

.element-item .name {
  position: absolute;

  left: 10px;
  top: 50px;
  text-transform: none;
  letter-spacing: 0;
  font-size: 12px;
  font-weight: normal;
  z-index: 199;
}

.element-item .symbol {
  position: absolute;
  left: 6px;
  top: 0px;
  font-size: 42px;
  font-weight: bold;
  color: white;
}

.element-item .number {
  position: absolute;
  right: 8px;
  top: 5px;
}

.element-item .att {
  position: absolute;
  left: 10px;
  top: 66px;
  font-size: 10px;
}

.element-item .temp {
  position: absolute;
  left: 10px;
  top: 82px;
  font-size: 10px;
}
.element-item .discovered {
  position: absolute;
  left: 72px;
  top: 40px;
  font-size: 10px;
}
.element-item .created {
	font-size: 12px;
}
.element-item .hidedisc {
	display: none;
}
.hasabundance {
	border: 2px solid #333;
}

.solid .symbol { color: rgba(0,0,0,0.8); }
.liquid .symbol { color: rgba(255,0,0,0.8); }
.gas .symbol { color: rgba(255,255,255,0.8); }
.unknown .symbol { color: rgba(0,0,0,0.2); }


.element-item.alkali          { background: #F00; background: hsl(   0, 100%, 50%); }
.element-item.alkaline-earth  { background: #F80; background: hsl(  24, 100%, 50%); }
.element-item.lanthanides     { background: #FF0; background: hsl(  72, 100%, 25%); }
.element-item.actinides       { background: #FF0; background: hsl(  72, 50%, 25%); }
.element-item.actinoid        { background: #0F0; background: hsl( 108, 100%, 50%); }
.element-item.transition      { background: #0F8; background: hsl( 144, 100%, 50%); }
.element-item.halogen         { background: #F0F; background: hsl( 288, 100%, 50%); }
.element-item.noble-gas       { background: #F08; background: hsl( 324, 100%, 50%); }
.element-item.chalcogens      { background: #FF8; background: hsl( 360, 100%, 50%); }
.element-item.pnictogens      { background: #00F; background: hsl( 252, 100%, 50%); }
.element-item.carbongroup     { background: #0FF; background: hsl( 180, 100%, 50%); }
.element-item.borongroup      { background: #08F; background: hsl( 216, 100%, 50%); }

.element-item.lanthanoid      { background: #FF0; background: hsl(  72, 100%, 50%); }
.element-item.post-transition { background: #0FF; background: hsl( 180, 100%, 50%); }
.element-item.metalloid       { background: #08F; background: hsl( 216, 100%, 50%); }
.element-item.diatomic        { background: #00F; background: hsl( 252, 100%, 50%); }

.name, .created {
    cursor: pointer;
}
.name .tooltiptext, .created .tooltiptext {
    visibility: hidden;
    width: 200px;
    background-color: black;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 5px 0;

    /* Position the tooltip */
    position: absolute;
    top: -50px;
    left: -60px;
    z-index: 1;
}
.name .tooltiptext {
    width: 200px;
}
.created .tooltiptext {
    width: 150px;
}
.name:hover .tooltiptext, .created:hover .tooltiptext {
    visibility: visible;
}

.created {
	width: 0;
	height: 0;
	border-style: solid;
	border-width: 0 0 25px 25px;
	right: 0;
	bottom: 0;
	position: absolute;
	z-index: 1;
}
.big.bang {
	border-color: transparent transparent darkturquoise transparent;
}
.Cosmic.ray.spallation {
	border-color: transparent transparent darksalmon transparent;
}
.Stellar.nucleosynthesis {
	border-color: transparent transparent darkkhaki transparent;
}
.Supernovae {
	border-color: transparent transparent yellow transparent;
}
.Artificial {
	border-color: transparent transparent rgba(143, 188, 143, 0.8) transparent;
}
.Neutron.star.mergers {
	border-color: transparent transparent gold transparent;
}
.Radioactive.decay {
	border-color: transparent transparent slategrey transparent;
}
