@import 'vars';

#crossword {
  margin: 0;
  padding: 0;
  width: 100%;
  min-width: 512px;
  * {
    font-family: Arial, sans-serif;
    font-size: 14px;
    color: $color1;
  }
  .sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
  }
  #preloader {
    width:0;
    height:0;
    background-color:$color6;
    display:none;
    position: absolute;
    z-index: 1000;
    &.show {
      width:100%;
      height:100%;
      display:block;
    }
    #loader {
      text-align: center;
      position: absolute;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
      #loaderSpinner {
          display: inline-block;
          border-width: 6px;
          border-style: solid;
          border-color: rgb(52, 152, 219) rgb(243, 243, 243) rgb(243, 243, 243);
          border-image: initial;
          border-radius: 50%;
          width: 40px;
          height: 40px;
          transform: rotate(0deg);
      }
    }
  }
  input[type="button"], button {
    display: inline-block;
    border: 1px solid $color7;
    border-radius: $border-radius;
    padding: 3px 8px;
    background-color: $color6;
    vertical-align: top;
    line-height: 1.5;
    transition: background-color 0.25s, color 0.25s;
    cursor: pointer;
    margin-right: 10px;
    &[aria-pressed="true"], &.active {
      background-color: $color7;
      color: $color6;
      outline: none;
    }
    &:focus:not([aria-pressed="true"]):not(.active), &:hover:not([aria-pressed="true"]):not(.active) {
      background-color: $color7;
      color: $color6;
    }
    &[aria-pressed="true"], &.active {
      cursor: default;
    }
  }
  #topMenuContainer {
    background-color: $color13;
    padding: 10px;

    #languagesContainer {
      input[type="button"] {
        margin-right: 0;
        margin-left: 10px;
      }
      &.hidden {
        display: none;
      }
    }
  }
  #gridContainer {
    display: inline-block;
    float:left;
    width: 50%;
    height:512px;
    padding: 10px 0;
    text-align: center;
    overflow: auto;
    @media screen and (max-width: 1023px) {
      display: block;
      float:none;
      width: 100%;
    }
    #gridGfx {
      display: inline-block;
      border: 1px solid $color1;
      .row {
        display: table-row;
        clear: both;
        margin: 0;
        height: 20px;
        border: 1px solid $color1;
        .cell {
          border: 1px solid $color1;
          width: 24px;
          height: 24px;
          text-align: center;
          line-height: 24px;
          float: left;
          position: relative;
          &.dev {
            .devInfo {
              position: absolute;
              font-size: 7.5px;
              width: 100%;
              text-align: center;
              color: lighten($color1, 50%)
            }
            .num {
              display: none;
            }
          }
          &.cellInput {
            background-color: transparent;
            &.highlight {
              background-color: $color13;
            }
            &.currentHighlight {
              background-color: $color12;
            }
            input[type="textbox"] {
              border: none;
              width: 22px;
              height: 22px !important;
              position: absolute;
              left: 0;
              background-color: transparent;
              text-align: center;
            }
          }
          .cellBkg{
            width:24px;
            height:24px;
            display:blue;
          }
          span {
            font-size: 8px;
            line-height: 8px;
            display: block;
            position: absolute;
            top: 2px;
            left: 2px;
            color: $color1;
          }
        }
      }
    }
  }
  #cluesContainer {
    display: inline-block;
    background-color: $color5;
    float: left;
    width: 50%;
    height:532px;
    overflow: auto;
    @media screen and (max-width: 1023px) {
      height:auto;
      width: 100%;
      padding-bottom: 5px;
    }
    h1 {
      text-align: center;
      font-size:16px;
    }
    #cluesAcrossContainer, #cluesDownContainer {
      float: left;
      width: 47%;
      margin-left: 2%;
      & > div {
        display: table;
        width: 100%;
        .item {
          display: table-row;
          padding: 5px;
          &.highlight {
            background-color: $color13;
          }
          &:hover {
            cursor: pointer;
          }
          div {
            &.num {
              display: table-cell;
              vertical-align: top;
              width: 24px;
              padding-top: 5px;
              padding-left: 5px;
              font-weight: bold;
            }
            &.txt {
              display: table-cell;
              padding-top: 5px;
              padding-right: 5px;
              p {
                margin: 0;
              }
              input[type="text"] {
                width: 98%;
                border: 1px solid $color1;
                margin: 5px 0 10px 0;
                padding: 5px 0;
                text-indent: 5px;
                &.correct {
                  background-image: url(../images/tick.gif);
                }
                &.incorrect {
                  background-image: url(../images/cross.gif);
                }
                background-repeat: no-repeat;
                background-position: right center;
                &[disabled] {
                  color: $color1;
                }
              }
            }
          }
        }
      }
    }
  }
  #menuContainer {
    background-color: $color4;
    float: left;
    width: 100%;
    input[type="button"] {
      margin: 10px;
    }
  }
  #resultsContainer {
    padding:10px;
    display:block;
    clear: both;
  }
  @media print {
    #topMenuContainer, #menuContainer {
      display:none;
    }
  }
}