/*
* Author: Larry Botha
* Website: themousepotatowebsite.co.za
* Post: Reusable CSS: buttons
*
*/

* { margin: 0; padding: 0;}

div {
  background: #577090 url(bg.png);  
  padding: 0 .5em;
}

.btn, input[type="submit"], button {
    position: relative;
    display: inline-block;
    
    background-color: #000000;
    background-color: hsla(0,0%,0%,.3);
    
    font: bold 12px Helvetica, Arial, sans-serif;
    color: #FFF;
    text-decoration: none;
    
    margin: 1em .8em 1em 0;
    padding: .5em 1em;

    border: 1px solid hsla(0,0%,0%,.3);
    border-top: 1px solid hsla(0,0%,0%,.1);
    border-bottom: 1px solid hsla(0,0%,0%,.6);
    border-radius: 8px;
    
    box-shadow: inset 0 4px 4px 4px hsla(0,0%,100%,.05),
                0 2px 2px 0 hsla(0,0%,0%,.5),
                inset 0 4px 4px hsla(0,0%,100%,.3),
                inset 0 -4px 8px hsla(0,0%,0%,.35);
    
    -webkit-transition: all 100ms ease-in;
    -moz-transition: all 100ms ease-in;
    -o-transition: all 100ms ease-in;
    -ms-transition: all 100ms ease-in;
    transition: all 100ms ease-in;
    
    outline: none;
}

input[type="submit"], button { cursor: pointer;}

.btn-primary,
.btn-success,
.btn-warning,
.btn-info {
  color: #F1F1F1;
  text-shadow: 0 -1px 0 hsla(0, 0%, 0%, .5);
}

.btn-primary {
  background-color: #0064CD;
  background-color: hsla(211, 100%, 40%, .5);
}
.btn-success {
  background-color: #57A957;
  background-color: hsla(120, 100%, 50%, .5);
}
.btn-warning {
  background-color: #C43C35;
  background-color: hsla(3, 100%, 49%, .5);
}
.btn-info {
  background-color: #339BB9;
  background-color: hsla(193, 100%, 46%, .5);
}

.btn-left {
  margin-right: 0;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  box-shadow: inset 4px 4px 4px 0 hsla(0,0%,100%,.1),
              0 2px 2px 0 hsla(0,0%,0%,.5),
              inset 0 4px 4px hsla(0,0%,100%,.3),
              inset 0 -4px 8px hsla(0,0%,0%,.35);
}
.btn-middle {
  margin-left: 0;
  margin-right: 0;
  border-radius: 0;
  box-shadow: inset 0 4px 4px 0 hsla(0,0%,100%,.1),
              0 2px 2px 0 hsla(0,0%,0%,.5),
              inset 0 4px 4px hsla(0,0%,100%,.3),
              inset 0 -4px 8px hsla(0,0%,0%,.35);
}
.btn-right {
  margin-left: 0;
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  box-shadow: inset -4px 4px 4px 0 hsla(0,0%,100%,.1),
              0 2px 2px 0 hsla(0,0%,0%,.5),
              inset 0 4px 4px hsla(0,0%,100%,.3),
              inset 0 -4px 8px hsla(0,0%,0%,.35);
}

.btn:hover, input[type="submit"]:hover, button:hover {
  text-shadow: 0 0 8px hsla(0,0%,100%,.6);
  border: 1px solid hsla(0,0%,0%,.3);
  border-top: 1px solid hsla(0,0%,0%,.05);
  border-bottom: 1px solid hsla(0,0%,0%,.5);
}

.btn:active, input[type="submit"]:active, button:active {
  color: #FFF;
  box-shadow: inset 0 0 0 hsla(0,0%,100%,.3);
  -webkit-transition: all 0s;
  -moz-transition: all 0s;
  -o-transition: all 0s;
  -ms-transition: all 0s;
  transition: all 0s;
}

.btn-large {
  font-size: 16px;
  padding: 10px 15px;
}

.btn-disabled, input[type="submit"]:disabled, button:disabled {
  color: #F9f9f9;
  text-shadow: none;
  background-color: #9D9D9D;
  background-color: hsla(0,0%,100%,.3);
  border-top: 1px solid hsla(0,0%,100%,.3);
  border-bottom: 1px solid hsla(0,0%,0%,.3);
  box-shadow: none;
  pointer-events: none;
}

.btn.btn-icon:before, .btn.btn-icon:after {
  position: relative;
  display: inline-block;
  content: "";
  background-image:url(sprite.png);
  background-position: -13px 0;
  background-repeat: no-repeat;
  width: 12px;
  height: 12px;
  top: 1px;
  opacity: .8;
  border: none;
}

.btn.btn-icon-check:before, .btn.btn-icon-x:before,
.btn.btn-icon-plus:before, .btn.btn-icon-minus:before,
.btn.btn-icon-left:before { margin-right: .5em;}

.btn.btn-icon-right:after { margin-left: .5em;}

.btn.btn-icon-up:before , .btn.btn-icon-down:before
.btn.btn-icon-up:after , .btn.btn-icon-down:after  { margin: 0;}

.btn.btn-icon-check:after , .btn.btn-icon-x:after,
.btn.btn-icon-plus:after , .btn.btn-icon-minus:after,
.btn.btn-icon-left:after , .btn.btn-icon-right:before,
.btn.btn-icon-up:after , .btn.btn-icon-down:after { width: 0;}

.btn.btn-icon-check:before { background-position: center top;}
.btn.btn-icon-x:before { background-position: center -12px;}
.btn.btn-icon-plus:before { background-position: center -24px;}
.btn.btn-icon-minus:before { background-position: center -36px;}
.btn.btn-icon-right:after { background-position: center -48px;}
.btn.btn-icon-left:before { background-position: center -60px;}
.btn.btn-icon-up:before { background-position: center -72px;}
.btn.btn-icon-down:before { background-position: center -84px;}

.btn.btn-icon:hover:before, .btn.btn-icon:hover:after{ opacity: 1;}

.btn:before,
.btn.btn-icon-check:after,
.btn.btn-icon-x:after,
.btn.btn-icon-plus:after,
.btn.btn-icon-minus:after,
.btn.btn-icon-right:before,
.btn.btn-icon-left:after,
.btn.btn-icon-up:after,
.btn.btn-icon-down:after {
  position: absolute;
  content: "";
  background: transparent;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  border-radius: 6px;
  border-top: 1px solid hsla(0,0%,100%,.5);
}

.btn-left.btn-icon-up:after, .btn-left.btn-icon-left:after, .btn-left:before { border-top-right-radius: 0;}
.btn-middle:before { border-top-right-radius: 0; border-top-left-radius: 0;}
.btn-right.btn-icon-down:after, .btn-right.btn-icon-right:after, .btn-right:before { border-top-left-radius: 0;}