@import 'css/_variables.scss';

.accordion > .actions-view-actions:hover {
  background: #f4f4f4;
}

.actions-view {
  > .accordion {
    > .accordion-toggle:hover {
      text-decoration: none;
    }

    .actions-view-actions:before {
      float: left;
      font-size: 1.5em;
      color: #777;
      padding-top: .6275em;
    }

    > .accordion-content {
      padding: 0;
    }
  }

  &.actions-view-mode-output .actions-view-calculate {
    display: none;
  }

  &.actions-view-mode-input .actions-view-edit {
    display: none;
  }
}

.actions-view-actions {
  flex-wrap: wrap;

  > button {
    color: #666;
    flex: none;
    float: left;
    height: 4.5rem;
    line-height: 3rem;
    margin-right: -4px;
    max-width: 300px;
    min-width: 72px;
    width: 40%;

    &:before {
      display: block;
      font-family: monospace;
      font-size: 18px;
      line-height: 0;
      margin: 5px 0 2px;
    }
  }

  > .actions-view-new {
    clear: both;
    margin-left: 41px;

    &:before {
      content: '\002B';
    }
  }

  > .actions-view-upload:before {
    content: '\21e7';
    font-size: 16px;
  }

  > .actions-view-print:before {
    content: '\2399';
  }
}

.actions-view-actions > .actions-view-edit,
.actions-view-actions > .actions-view-calculate {
  clear: none;
  color: #fff;
  line-height: 1;
  margin-left: 0;
  min-width: 72px;
  max-width: 599px;
  width: 79.5%;
}

/**
 * Make the link look like a button. Normally, no; but the link has it's
 * advantages in this case.
 */
.actions-view-download {
  background: #f8f8f8;
  background-image: linear-gradient(to bottom,rgba(255,255,255,.05) 0,
      rgba(0,0,0,.05) 100%);
  border: 0;
  box-shadow: rgba(0,0,0,0.15) 0 0 0 1px inset;
  clear: both;
  color: #666;
  cursor: pointer;
  display: inline-block;
  float: left;
  font-size: 1em;
  height: 4.5rem;
  line-height: 6.3rem;
  margin: 4px -4px 2px 41px;
  max-width: 300px;
  min-width: 72px;
  padding: 0 1em;
  text-align: center;
  text-decoration: none;
  text-shadow: 0 1px 1px #fff;
  vertical-align: top;
  width: 40%;

  &:hover {
    background-image: linear-gradient(to bottom, rgba(255,255,255,0.1) 0,
        rgba(0,0,0,0.1) 100%);
    text-shadow: none;
  }

  &.disabled {
    background: #D3D3D3;
    box-shadow: none;
    color: #999;
    cursor: text;
    text-shadow: none;
  }

  &:visited {
    color: #666;
  }

  &:before {
    content: '\21e7';
    font-family: monospace;
    font-size: 16px;
    display: block;
    line-height: 0;
    position: relative;
    top: 12px;
    transform: rotate(180deg);
  }
}

.actions-view-history {
  display: flex;
  flex-direction: column-reverse;
  list-style: none;
  margin: 0;
  padding: 0;

  > li {
    border-top: 1px solid #e2e2e2;
    padding: 1em 1.5em;

    &:last-child {
      border:none;
    }


    &.selected {
      background-color: #EAF4FF;
    }
  }
}

@media screen and (min-width: $breakpoint-stacking) {
  .actions-view-actions {
    > button,
    > .actions-view-calculate,
    > .actions-view-edit,
    > .actions-view-download {
      float: none;
      font-size: 0.8125em;
      margin-left: 0;
      max-width: auto;
      width: auto;
    }
  }
}
