@import '/widgy/css/widgy_common.scss';

@mixin outside-button {
  // This button style is for buttons that exist outside of the widgy editor.
  @include rounded(3px);
  background: transparent;
  border: 1px solid $blue;
  color: $blue;
  display: inline-block;
  height: auto;
  font-weight: bold;
  font-size: 12px;
  line-height: 18px;
  padding: 4px 8px;
  width: auto;

  &:hover {
    background-color: lighten($blue,35%);
    color: $blue;
  }

  &.cancel {
    border-color: $grey;
    color: $grey;
    
    &:hover {
      background: lighten($lightgrey,15%);
    }
  }
  
  &.delete {
    border-color: $red;
    color: $red;
    
    &:hover {
      background: lighten($red,35%);
    }
  }
  
  &.loading {
    @extend %loading;
  }
  
  &[type='submit'] {
    @include rounded(3px);
    border-color: $green;
    color: $green;
    height: auto;
    font-weight: bold;
    line-height: 16px;
    padding: 5px !important;
    position: relative;
    top: -1px;
    
    &:hover {
      background: lighten($green,50%);
    }
  }
}

a.button {
  @include outside-button;
}

/* Widgy Tools Buttons
--------------------------------------------------*/

ul.widgy-tools {
  @include clearfix;
  margin-bottom: 15px;
  
  li {
    display: inline;
    float: left;
    margin-right: 5px;
    
    a {
      @include outside-button;
      font-size: 13px;
      font-weight: bold;
      padding: 2px 8px !important;
      
      &.commit {
        border-color: $green;
        color: $green;
        
        &:hover {
          background-color: lighten($green,50%);
        }
      }
      
      &.reset {
        border-color: $red;
        color: $red;
        
        &:hover {
          background-color: lighten($red,35%);
        }
      }
    }
  }
}

/* History/Basic Page Styles
--------------------------------------------------*/

section.main {
  @include clearfix;
  @include default;
  @include html;
  
  ol.history {
    list-style: none;
    padding: 0px !important;
    
    li {
      @include gradient(#eeeeee,#fafafa);
      @include rounded(5px);
      @include shadow($black30,0px,2px,0px);
      @include clearfix;
      margin: 0px 0px 15px 0px;
      padding: 0px;
      
      div.top {
        border-bottom: 1px solid #cccccc;
        display: block;
        float: none;
        height: auto;
        line-height: 26px;
        margin: 0px !important;
        padding: 5px 10px 5px 10px;
        width: auto;
        
        div.actions {
          float: right;
        }
      }
        
      form {
        display: inline;

        input.button[type='submit'] {
          @include outside-button;
          
          &.unapprove {
            border-color: $red;
            color: $red;
    
            &:hover {
              background: lighten($red,35%);
            }
          }
        }
      }
      
      blockquote {
        border: 0px;
        margin: 0px;
        padding: 5px 10px 5px 10px;
        
        p {
          margin: 0px !important;
        }
      }
    }
  }
}

/* Message List Form Fix
--------------------------------------------------*/

ul.messagelist {
  li {
    form {
      display: inline;
    }
  }
}
