/**
* Wordfind.js 0.0.1
* (c) 2012 Bill, BunKat LLC.
* Wordfind is freely distributable under the MIT license.
* For all details and documentation:
*     http://github.com/bunkat/wordfind
*/

body {
  font: 1em Arial;
}

p {
  font: 22pt sans-serif;
  margin: 20px 20px 0px 20px;
}

h1 {
  text-align: center; /* to center #puzzle on small devices */
}

#word-search-title {
  text-align: center;
  letter-spacing: 5px;
  font-family: 'Lato', sans-serif;
  line-height: 1;
  text-transform: uppercase;
  color: white;
  font-size: 60px;
  font-weight: 900;
  margin-top: 0;
  margin-bottom: 35px;
}

@media (max-width: 767px) {
  #word-search-title {
    font-size: 45px;
  }
}

@media (max-width: 575px) {
  #word-search-title {
    font-size: 35px;
  }
}

#main {
  margin: 0 auto;
  max-width: 80rem;
  text-align: center; /* to center #puzzle on small devices */
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  border-radius: 20px;
  padding: 58px 48px;
  height: 100%;
  -webkit-box-shadow: 10px 10px 20px -5px rgba(0,0,0,0.5);
  box-shadow: 10px 10px 20px -5px rgba(0,0,0,0.5);
  background-image: url("../images/word-search.png");
  bbackground-position: 100% 20%;
  background-repeat: no-repeat;
  background-size: cover;
  margin-bottom: 15px;
}
@media only screen and (min-width: 600px) {
  #main {
    text-align: left;
  }
}

/**
* Styles for the puzzle
*/
#puzzle {
  display: inline-block;
  border: 5px solid white;
  padding: 3vw;
  background-color: #3A4F8E;
  border-radius: 30px;
  -webkit-box-shadow: 0px 0px 25px 0px rgba(255,255,255,0.5);
  box-shadow: 0px 0px 25px 0px rgba(255,255,255,0.5);
}

#puzzle > div { /* rows */
  width: 100%;
  margin: 0 auto;
}

/* style for each square in the puzzle */
.puzzleSquare {
  height: 5vw;
  width: 5vw;
  text-transform: uppercase;
  background-color: #3A4F8E;
  border: 0;
  font: 1rem sans-serif;
  border: 1px solid #3A4F8E;
  color: white;
  padding: 3px;
}

@media (max-width: 400px) {
  .puzzleSquare {
    font: 0.7rem sans-serif;
  }
}

@media only screen and (min-width: 575px) {
  .puzzleSquare {
    height: 4vw;
    width: 4vw;
    font: 1rem sans-serif;
  }
}

@media only screen and (min-width: 767px) {
  #puzzle {
    float: left;
    padding: 1rem;
  }
  .puzzleSquare {
    height: 3rem;
    width: 3rem;
    font: 2.2rem sans-serif;
  }
}

.puzzleSquare:focus {
  outline: none;
  border: 1px solid white;
  border-radius: 10px;
}

button::-moz-focus-inner {
  border: 0;
}

/* indicates when a square has been selected */
#puzzle .selected {
  background-color: #db40a6;
  border-radius: 10px;
}

@media (max-width: 575px) {
  #puzzle .selected {
    border-radius: 6px;
  }
}

/* indicates that the square is part of a word that has been found */
#puzzle .found {
  background-color: #db40a6;
  color: white;
  border-radius: 10px;
}

@media (max-width: 575px) {
  #puzzle .found {
    border-radius: 6px;
  }
}

#puzzle .solved {
  background-color: purple;
  color: white;
}

/* indicates that all words have been found */
#puzzle .complete {
  background-color: #03b2b0;
  border-radius: 10px;
}

/**
* Styles for the word list
*/
#words {
  display: inline-block;
  max-width: 100%;
  padding: 1em;
  list-style-type: none;
  text-align: left;
  position: relative;
  padding: 50px 0 30px;
}
#words::before {
  content: "";
  width: 100%;
  height: 100%;
  z-index: 1;
  position: absolute;
  left: 0;
  top: 0;
  opacity: 0;
}

@media only screen and (min-width: 767px) {
  #words {
    -moz-column-count: 5;
    -webkit-column-count: 5;
    column-count: 5;
    column-gap: 20px;
  }
}

#words li {
  padding: 3px 0;
  font: 1em sans-serif;
}

/* indicates that the word has been found */
.wordFound {
  text-decoration: line-through;
  color: gray;
}

/**
* Styles for the controls
*/
#controls {
  display: inline-block;
  max-width: 30rem;
  padding: 1em;
  border: none;
  text-align: left;
}
label {
  white-space: nowrap;
  margin-top: 1em;
}
input {
  border: none;
  font-size: 24px !important;
  color: white !important;
  text-align: center;
  width: 100%;
  background-color: transparent;
}

@media (max-width: 767px) {
  input {
    font-size: 20px !important;
  }
}

input[type="number"] {
  width: 2rem;
}
select {
  max-width: 10rem;
}
#create-grid, #solve {
  display: block;
  margin-top: 1rem;
}
#secret-word {
  text-transform: uppercase;
}

#result-message {
  font-size: 1.2em;
}

#start {
  display: none;
  box-sizing: border-box;
  border-radius: 50px;
  text-transform: uppercase;
  padding: 14px 65px;
  transition: 0.3s;
  text-align: center;
  margin: 10px;
  border: 2px solid white;
  background-color: #db40a6;
  font-size: 20px;
  letter-spacing: 8px;
  font-weight: normal;
  color: white;
  -webkit-box-shadow: inset 0px -20px 25px -10px rgba(0,0,0,0.15);
  box-shadow: inset 0px -20px 25px -10px rgba(0,0,0,0.15);
}

#start:hover {
  color: #db40a6;
  border-color: #db40a6;
  background-color: white;
  text-decoration: none;
  box-shadow: none;
  transition: 0.3s;
  outline: none;
}
