/*
 * The original styles and markup are from http://codepen.io/airpwn/pen/JycBg
 *
 * thanks to Taufik Nurrohman https://github.com/tovic
 */

/**
 * Pure CSS3 Piano by Taufik Nurrohman
 * On: 1 December 2011
 * URL: http://hompimpaalaihumgambreng.blogspot.com/
 * Note: This experiment is under the God Almighty License.
 * Please do not replace or remove the attribution above if you want to save/modify this project legally.
 * Good luck!
 */


#beautiful-piano :focus {
  outline:none !important;
}

#beautiful-piano {
  padding: 0;
  margin: 0;
}

#beautiful-piano li {
  list-style:none;
  float:left;
  display:inline;
  width:40px;
  position:relative;
  border-top:2px solid #222;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -khtml-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

#beautiful-piano li a,#beautiful-piano li div.anchor {
  display:block;
  height:220px;
  background:#fff;
  background:-webkit-linear-gradient(-30deg,#f5f5f5,#fff);
  background:-moz-linear-gradient(-30deg,#f5f5f5,#fff);
  background:-ms-linear-gradient(-30deg,#f5f5f5,#fff);
  background:-o-linear-gradient(-30deg,#f5f5f5,#fff);
  background:linear-gradient(-30deg,#f5f5f5,#fff);
  border:1px solid #ccc;
  -webkit-box-shadow:inset 0 1px 0px #fff,inset 0 -1px 0px #fff,inset 1px 0px 0px #fff,inset -1px 0px 0px #fff,0 4px 3px rgba(0,0,0,0.7);
  -moz-box-shadow:inset 0 1px 0px #fff,inset 0 -1px 0px #fff,inset 1px 0px 0px #fff,inset -1px 0px 0px #fff,0 4px 3px rgba(0,0,0,0.7);
  box-shadow:inset 0 1px 0px #fff,inset 0 -1px 0px #fff,inset 1px 0px 0px #fff,inset -1px 0px 0px #fff,0 4px 3px rgba(0,0,0,0.7);
  -webkit-border-radius:0 0 3px 3px;
  -moz-border-radius:0 0 3px 3px;
  border-radius:0 0 3px 3px;
}

#beautiful-piano li div.anchor:active, #beautiful-piano li div.anchor.active {
  -webkit-box-shadow:0 2px 2px rgba(0,0,0,0.4);
  -moz-box-shadow:0 2px 2px rgba(0,0,0,0.4);
  box-shadow:0 2px 2px rgba(0,0,0,0.4);
  position:relative;
  top:2px;
  height:216px;
}

#beautiful-piano li div.anchor:active:before, #beautiful-piano li div.anchor.active:before {
  content:"";
  width:0px;
  height:0px;
  border-width:216px 5px 0px;
  border-style:solid;
  border-color:transparent transparent transparent rgba(0,0,0,0.1);
  position:absolute;
  left:0px;
  top:0px;
}

#beautiful-piano li div.anchor:active:after, #beautiful-piano li div.anchor.active:after {
  content:"";
  width:0px;
  height:0px;
  border-width:216px 5px 0px;
  border-style:solid;
  border-color:transparent rgba(0,0,0,0.1) transparent transparent;
  position:absolute;
  right:0px;
  top:0px;
}

/* Black Tuts */
#beautiful-piano li span {
  position:absolute;
  top:0px;
  left:-12px;
  width:20px;
  height:120px;
  background:#333;
  background:-webkit-linear-gradient(-20deg,#333,#000,#333);
  background:-moz-linear-gradient(-20deg,#333,#000,#333);
  background:-ms-linear-gradient(-20deg,#333,#000,#333);
  background:-o-linear-gradient(-20deg,#333,#000,#333);
  background:linear-gradient(-20deg,#333,#000,#333);
  z-index:10;
  border-width:1px 2px 7px;
  border-style:solid;
  border-color:#666 #222 #111 #555;
  -webkit-box-shadow:inset 0px -1px 2px rgba(255,255,255,0.4),0 2px 3px rgba(0,0,0,0.4);
  -moz-box-shadow:inset 0px -1px 2px rgba(255,255,255,0.4),0 2px 3px rgba(0,0,0,0.4);
  box-shadow:inset 0px -1px 2px rgba(255,255,255,0.4),0 2px 3px rgba(0,0,0,0.4);
  -webkit-border-radius:0 0 2px 2px;
  -moz-border-radius:0 0 2px 2px;
  border-radius:0 0 2px 2px;
}

#beautiful-piano li span:active, #beautiful-piano li span.active {
  border-bottom-width:2px;
  height:123px;
  -webkit-box-shadow:inset 0px -1px 1px rgba(255,255,255,0.4),0 1px 0px rgba(0,0,0,0.8),0 2px 2px rgba(0,0,0,0.4),0 -1px 0px #000;
  -moz-box-shadow:inset 0px -1px 1px rgba(255,255,255,0.4),0 1px 0px rgba(0,0,0,0.8),0 2px 2px rgba(0,0,0,0.4),0 -1px 0px #000;
  box-shadow:inset 0px -1px 1px rgba(255,255,255,0.4),0 1px 0px rgba(0,0,0,0.8),0 2px 2px rgba(0,0,0,0.4),0 -1px 0px #000;
}

/* white keys */
.piano-show-names #beautiful-piano div[data-keyname]:not(:active):not(.active):after {
  font-family: Arial, sans-serif;
  font-size: 20px;
  content: attr(data-keyname);
  position: absolute;
  bottom: 25px;
  left: 20%;
}

/* black keys */
.piano-show-names #beautiful-piano span[data-keyname]:not(:active):not(.active):after {
  color: white;
  font-family: Arial, sans-serif;
  font-size: 11px;
  content: attr(data-keyname);
  position: absolute;
  bottom: 8px;
}
