/*
 * This file is part of the Access to Memory (AtoM) software.
 *
 * Access to Memory (AtoM) is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * Access to Memory (AtoM) is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with Access to Memory (AtoM).  If not, see <http://www.gnu.org/licenses/>.
 */

// Alternative to .btn for action buttons

.c-btn {
  display: inline-block;
  .ie7-inline-block();
  padding: 4px 12px;
  margin-bottom: 0; // For input.btn
  font-size: @baseFontSize;
  line-height: @baseLineHeight;
  text-align: center;
  vertical-align: middle;
  cursor: pointer;
  border: 2px solid @white;
  .border-radius(@baseBorderRadius);
  .ie7-restore-left-whitespace(); // Give IE7 some love
  color: @white;

  // Hover state
  &:hover {
    color: @grayDark;
    text-decoration: none;
    background-color: @white;
  }

  // Focus state for keyboard and accessibility
  &:focus {
    .tab-focus();
  }

  // Active state
  &.active,
  &:active {
    background-image: none;
    outline: 0;
    // .box-shadow(~"inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05)");
  }

  // Disabled state
  &.disabled,
  &[disabled] {
    cursor: default;
    background-image: none;
    .opacity(65);
    .box-shadow(none);
  }
}

// Fix for Firefox's height of inputs

input.c-btn {
  height: 32px;
}

// Alternate .c-btn

.c-btn-submit {
  background-color: transparent;
  background-color: rgba(50, 90, 150, 0.25);
}

.c-btn-delete {
  background-color: transparent;
  background-color: rgba(150, 50, 50, 0.25);
}

.c-btn-right-align {
  float: right;
}

// Integrate caret

.c-btn .caret {
  border-top-color: @white;
  border-bottom-color: @white;
  margin-top: 7px;
  margin-left: 4px;
}

.c-btn:hover .caret,
.open .c-btn .caret {
  border-top-color: @grayDarker;
  border-bottom-color: @grayDarker;
}

.open .c-btn {
  background-color: @white;
  color: @black;
}

/*
 * .x-btn
 */

.x-btn {
  cursor: pointer;
  padding: 8px;
  background: none;
  border: 2px solid @gray;
  .border-radius(4px);
  color: @gray;
  display: block;
  i {
    margin-right: 4px;
  }
}

.btn-wide {
  width: 95%;
  margin: 0 auto;
  cursor: pointer;
  font-size: 16px;
}

.btn-wide:hover,
.btn-wide.open {
  background-color: @white;
  color: @black;
}

/*
 * Clipboard
 */

button.clipboard,
button.clipboard-wide {
  border-radius: 5px;
  outline: none;
  color: @grayLight;

  &:before {
    font-family: 'FontAwesome';
    font-size: 20px;
    color: @grayLight;
    content: "\f0c6";
  }

  &.added {
    background-color: @blue;
    color: @white;

    &:before {
      color: @white;
    }
  }

  &:hover {
    background-color: @grayLight;
    color: @white;

    &:before {
      color: @white;
    }
  }
}

button.clipboard {
  position: absolute;
  right: 0;
  top: 0;
  height: 20px;
  width: 20px;
  .hide-text();

  &:before {
    font-weight: normal;
    font-style: normal;
    text-align: center;
    font-size: 20px;
    position: absolute;
    top: 10px;
    left: 2px;
  }

  &.repository-or-digital-obj-browse {
    position: relative;
    float: right;
  }
}

button.clipboard-wide {
  position: relative;
  background: none;
  border: none;
  box-shadow: none;
  text-align: left;
  padding: 4px 7px 4px 24px;
  color: @blue;
  font-size: 12px;

  &:before {
    margin-right: 25px;
    color: @grayLight;
    position: absolute;
    top: 5px;
    left: 5px;
    font-size: 16px;
  }
}

a.clipboard-print {
  display: inline-block;

  > i {
    font-size: 15px;
    padding-right: 3px;
    color: @grayLight;
  }

  &:hover > i {
    color: @orange;
  }
}

// generic help icon/button
.generic-help-box {
  display: inline-block;
  width: 100%;

  .generic-help-type {
    display: inline-block;

    label {
      display: inline-block;
    }
  }

  .generic-help-icon {
    width: 4%;
    float: right;
    margin-left: 1%;
    font-size: 20px;
    text-align: right;
    display: inline-block;

    &:focus {
      color: @blue;
      text-decoration: none;
    }

    &:hover {
      color: @blueDark;
    }
  }
}

.generic-help {
  display: none;
  line-height: 20px;
  padding: 10px;
  margin-top: 20px;
  margin-bottom: 10px;
}

#fullwidth-treeview-reset-button, #fullwidth-treeview-more-button {
  display: none;
}

/*
 * YUI
 */

.yui-button {
  display: inline-block;
  vertical-align: text-bottom;
  border-width: 1px 0;
  border-style: solid;
  border-color: #808080;
  background: url(../../../../vendor/yui/assets/skins/sam/sprite.png) repeat-x 0 0;
  margin: auto .25em;

  .first-child {
    display: block;
    border-width: 0 1px;
    border-style: solid;
    border-color: #808080;
    margin: 0 -1px;
  }

  button, a {
    display: block;
    border: none;
    margin: 0;
    padding: 0 10px;
    font-size: 93%;
    line-height: 2;
    min-height: 2em;
    color: #000;
  }

  button {
    background-color: transparent;
    cursor: pointer;
  }

  a {
    text-decoration: none;
  }
}

.yui-button-focus {
  border-color: #7D98B8;
  background-position: 0 -1300px;

  .first-child {
    border-color: #7D98B8;
  }

  button, a {
    color: #000;
  }
}

.yui-button-hover {
  border-color: #7D98B8;
  background-position: 0 -1300px;

  .first-child {
    border-color: #7D98B8;
  }

  button, a {
    color: #000;
  }
}

.yui-button-active {
  border-color: #7D98B8;
  background-position: 0 -1700px;

  .first-child {
    border-color: #7D98B8;
  }

  button, a {
    color: #000;
  }
}

.yui-button-disabled {
  border-color: #ccc;
  background-position: 0 -1500px;

  .first-child {
    border-color: #ccc;
  }

  button, a {
    color: #A6A6A6;
    cursor: default;
  }
}
