/**
 * Created by NSure
 * Created on: 2015-03-24 1:54 PM
 * License: Proprietary
 */

@bg-color: #ffffff;
@sections-bg-color: #2185d0;
@border-color: #f0f0f0;
@secondary-color: #676767;
@secondary-font-size: 0.85rem;
@large-font-size: 1.2rem;

body {
  background-color: @bg-color;
  overflow: hidden;
  min-width: 240px;
}

.ns {
  img.background {
    /* Set rules to fill background */
    min-height: 100%;
    min-width: 1024px;

    /* Set up proportionate scaling */
    width: 100%;
    height: auto;

    /* Set up positioning */
    position: absolute;
    z-index: 0;

    top: 0;
    left: 0;
  }

  @media screen and (max-width: 1024px) { /* Specific to this particular image */
    img.background {
      left: 50%;
      margin-left: -512px;   /* 50% */
    }
  }

  &.sections {
    display: table;
    width: 100%;
    table-layout: fixed;

    > .sections-cell {
      display: table-cell;
      vertical-align: top;

      > .section-items {
        width: inherit;
        overflow-x: hidden;
        overflow-y: auto;

        > .ui.menu {
          width: inherit;
        }
      }

      > .section-views {
        border: none;
        width: auto;
        overflow: auto;
      }
    }

    /* TODO: quick fix for hiding sections on mobile devices */
    @media only screen and (max-width: 767px) {
        > .sections-cell.mobile:first-child {
            display: none;
        }
    }

    > .sections-cell:first-child {
      width: 13rem;
      background: @sections-bg-color;
    }
  }

  &.pre.sections {
    padding: 1rem 0.5rem 0.5rem 0.75rem;
    box-sizing: border-box;
  }

  &.post.sections {
    padding: 0.75rem 0.5rem 0.5rem 1rem;
    box-sizing: border-box;
  }


  &.description {
    color: @secondary-color
  }

  &.toggle.checkbox.description {
    padding-left: 63px;
  }

  &.attribute.filter {
     > .ui.form {
       position: relative;

       .field, .fields {
         position: inherit;
       }

       #input {
         margin: 0
       }
     }
   }

  &.letter.filter {
    .ui.button {
      padding-left: 0.6rem;
      padding-right: 0.6rem;
    }
  }

  &.grid {
    > .view {
      .ui.table {
        border: 0;

        /* override semantic ui
        td.negative, tr.negative {
          color: #9f3a38 !important;
          box-shadow: none;
          background: none;
        }

        td.positive, tr.positive {
          color: #2c662d !important;
          box-shadow: none;
          background: none;
        }
        */
      }

      padding: 0;
    }

    iframe.export {
      display:none;
      visibility:hidden;
      height:0;
      border:none;
      padding: 0;
      margin: 0;
    }
  }

  &.multiselect {

    > .count {
      padding: 0.35rem 0 0 0.75rem;
      color: @secondary-color;
      font-weight: bold;
    }

    > .table {
      position: relative;
      display: table;
      width: 100%;

      > .row {
        display: table-row;

        > .cell {
          display: table-cell;
          vertical-align: top;
          width: 50%;
          box-sizing: border-box;

          > .header {
            padding: 0.75rem;
            margin: 0;
          }

          > .actions {
            padding: 0.75rem;

            .input {
              float: right;
              max-width: 180px;
              min-width: 100px;
            }
          }

          > .selected.list, .deselected.list {
            min-height: 100px;
            max-height: 250px;
            overflow: auto;
            padding: 0.75rem;
            margin: 0;

            .item {
              cursor: pointer;
            }
          }

          .selected.count, .deselected.count {
            font-size: 1.1rem;
            color: @secondary-color
          }

          .selected.pagination, .deselected.pagination {
            font-size: 1.1rem;
            color: @secondary-color
          }
        }
      }

      > .row:last-child {

        > .cell {
          vertical-align: middle;
          padding: 10px 10px 0 10px;

          > .ui.grid {
            > .column:nth-child(2) {
              text-align: center;
            }
          }
        }
      }
    }
  }


  .ui.segment.readonly, .ui.form .field.readonly, .ui.form .fields.readonly, .ui.input.readonly, .ui.input > input[type='text'].readonly {
    input, textarea, select, .ui.dropdown, .ui.dropdown .menu > .item, .ui.checkbox, .ui.button, .remove.icon {
      pointer-events: none;
      cursor: default;
    }
  }

  .clickable {
    cursor: pointer;
  }

  .borderless {
    border: none !important;
  }

  .float-left {
    float: left;
  }

  .float-right {
    float: right;
  }

  .text-center {
    text-align: center;
  }

  .text-right {
    text-align: right;
  }


  .clearfix {
    clear: both !important;
  }

  .description {
    font-size: @secondary-font-size;
    color: @secondary-color;
  }
}
