@font-face {
  font-family: "Beleren-Bold", sans-serif;
  src: url('../fonts/Beleren2016-Bold.ttf'), format('truetype'),
       url('../fonts/Beleren2016-Bold.svg'), format('svg'),
       url('../fonts/Beleren2016-Bold.woff'), format('woff');
}

@font-face {
  font-family: "Keyrune", sans-serif;
  src: url('../fonts/Keyrune.ttf');
}

@font-face {
  font-family: "Mana", sans-serif;
  src: url('../fonts/mana.ttf');
}

body {
  font-size: 16px;
  font-family: 'Roboto', sans-serif;
  font-weight: 400;
  overflow-x: hidden;
}

/* typography */

h1 {
  font-family: "Beleren-Bold", Fallback, sans-serif;
  font-size: 2.25rem;
  color: white;
  line-height: 1.75;
}

h2 {
  font-family: "Roboto", sans-serif;
  font-weight: 300;
  font-size: 1.15rem;
  color: white;
}

p {
  font-family: "Roboto", sans-serif;
  font-size: 1rem;
}

@media only screen and (max-width: 37.5rem) {
  h1 {
    line-height: 1.25;
  }
  h2 {
    padding-top: 1rem;
    line-height: 1.25;
  }
}

@media only screen and (max-width: 32rem) {
  h1 {
    font-size: 1.5rem;
    line-height: 1.1;
  }
  h2 {
    font-size: 1rem;
  }
}

/* dynamic classes */

.hide {
  display: none;
}

.selected {
  background-color: #223151 !important;
  color: white;
}


/* modal loading gif div */

.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  top: 0;
  height: 100%;
  width: 100%;
  background: url('../images/ajax-loader.gif') 50% 50% no-repeat;
}

body.loading .modal {
  overflow: hidden;
  display: block;
}

/* scrollbar styles */

/* width */
::-webkit-scrollbar {
width: 8px;
}

/* Track */
::-webkit-scrollbar-track {
background: #d7dde2;
}

/* Handle */
::-webkit-scrollbar-thumb {
background: #888;
}


@media only screen and (max-width: 32rem) {
  ::-webkit-scrollbar {

  }
}

/* home page | index.html */

.home {
  background-image: url('../images/background.jpg');
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  background-size: cover;
}

.home-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  max-width: 60rem;
  padding-top: 5rem;
  padding-bottom: 8rem;
}

.headline {
  width: 100%;
  text-align: center;
}

.headline img {
  width: 60px;
  height: 60px;
  padding-bottom: 1rem;
}

.home-search {
  display: flex;
  padding: 1rem;
  background-color: #e3edfc;
  border: 1px solid #19359b;
  width: 80%;
  margin: 3.5rem 1.5rem 1.5rem 1.5rem;
}

.home-search input {
  font-family: "Beleren-Bold", sans-serif;
  width: 100%;
  font-size: 1.25rem;
  border: none;
  background-color: #e3edfc;
}

.home-search input:focus {
  outline: none;
}

.home-search input::placeholder {
  color: #617591;
}

.home-search i {
  color: #19359b;
  padding-left: 0.75rem;
}

.home-search i:hover{
  color: #4676e0;
  cursor: pointer;
}

.option-buttons {
  display: flex;
}

.option-buttons img {
  width: 25px;
  height: 25px;
  padding-left: 1rem;
}

.option-buttons img:hover {
  cursor: pointer;
}

.option-buttons a {
  text-decoration: none;
}

.option {
  display: flex;
  padding: 0.5rem 1rem;
  margin: 0 1rem;
  align-items: center;
  justify-content: space-between;
  color: white;
  border: 1px solid #e3edfc;
}

.option p {
  font-size: 1rem;
  font-family: "Roboto", sans-serif;
}

.option:hover {
  background-color: #19359b;
  border-color: white;
}

@media only screen and (max-width: 36.25rem) {
  .headline {
    width: 85%;
  }
}


@media only screen and (max-width: 31.25rem) {
  .home-container {
    padding-top: 2.5rem;
  }
  .headline {
    width: 95%;
  }
  .headline img {
    width: 40px;
    height: 40px;
  }
  .home-search {
    margin: 2rem;
    padding: 0.75rem;
  }
  .option-buttons {
    flex-direction: column;
    padding-bottom: 8rem;
  }
  .option {
    margin-bottom: 1rem;
  }
}

/* about page */

.about {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  max-width: 60rem;
  padding: 5rem 0;
  width: 85%;
}

.about h1 {
  text-align: center;
  padding-bottom: 1.5rem;
}

.about h2 {
  text-align: left;
  font-size: 1.35rem;
  font-weight: 400;
  padding: 1rem 0;
  text-decoration: underline;
}

.about p {
  text-align: left;
  font-size: 1.1rem;
  font-family: "Roboto", sans-serif;
  font-weight: 300;
  color: white;
  line-height: 1.3;
}

.about a {
  color: white;
}

@media only screen and (max-width: 31.25rem) {
  .about {
    padding-top: 2.5rem;
    padding-bottom: 4rem;
  }
}

/* 404 div */

.no-results {
  margin: 0 auto;
  text-align: center;
  padding-top: 7rem;
}

.no-results h1 {
  color: black;
  padding-top: 1rem;
}

.no-results h2 {
  color: black;
}

/* advanced search page | search.html */

header {
  width: 100%;
  height: 70px;
  background-color: #223151;
  display: flex;
  align-items: center;
}

.logo {
  flex: 1;
}

nav {
  display: flex;
  align-items: center;
  padding-right: 0.5rem;
}

.logo img {
  width: 40px;
  height: 40px;
  padding-left: 1rem;
}

nav img {
  width: 35px;
  height: 35px;
  padding: 0 1rem;
}

.advanced-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  max-width: 60rem;
}

.advanced-search {
  width: 100%;
  max-width: 50rem;
  height: auto;
  background-color: white;
  border-radius: 10px;
  margin: 1.5rem 0;
}

#intro {
  font-style: italic;
  padding: 1rem 0;
  text-align: center;
  color: gray;
}

.search-input {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 2.5rem 1.5rem 1.5rem;
  border-bottom: 0.25px solid #dddddd;
}

.search-input p {
  width: 15%;
  text-align: right;
  padding-right: 2rem;
}

.search-input input {
  width: 80%;
  padding: 0.75rem;
  border: 1px solid #4676e0;
  font-size: 1rem;
}

.search-input input::placeholder {
  color: #b7b7b7;
}

.search-input input:focus {
  outline: none;
  box-shadow: 0px 0px 3px #19359b;
}

.dropdown-row, .colors-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 84%;
}

.dropdown-row select {
  margin-left: 1rem;
  width: 25%;
  height: 2.75rem;
  font-size: 1rem;
}

.dropdown-row select:focus {
  outline: none;
  box-shadow: 0px 0px 3px #19359b;
}

.type-lines {
  display: flex;
  width: 84%;
  justify-content: space-between;
}

.type {
  width: 30%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.type input {
  width: 86%;
}

.type label {
  width: 86%;
  font-size: 0.85rem;
  text-align: center;
  padding-bottom: 0.5rem;
}

.colors-row {
  display: flex;
  width: 84%;
  flex-wrap: wrap;
}

.colors-row p {
  width: 100%;
  text-align: left;
  flex-basis: 100%;
  padding: 1.5rem 0 0 0;
  font-size: 0.85rem;
  color: gray;
  line-height: 1.2;
  font-style: italic;
}

.colors-row select {
  width: 25%;
  height: 2.75rem;
  font-size: 1rem;
}

.colors-row select:focus {
  outline: none;
  box-shadow: 0px 0px 3px #19359b;
}

.color-inputs {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.check-button {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  user-select: none;
}

.check-button img {
  width: 25px;
  height: 25px;
}

/* custom checkboxes */
.check-button input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.check-button .checkmark {
  position: relative;
  margin-top: 0.5rem;
  top: 0;
  left: 0;
  height: 25px;
  width: 25px;
  background-color: white;
  border: 1px solid #4676e0;
}

.check-button #common:checked ~ .checkmark {
  background-color: black;
}

.check-button #uncommon:checked ~ .checkmark {
  background-color: slategray;
}

.check-button #rare:checked ~ .checkmark {
  background-color: #a58e4a;
}

.check-button #mythic:checked ~ .checkmark {
  background-color: #bf4427;
}

.check-button input:checked ~ .checkmark {
  background-color: #19359b;
}

.check-button span:after {
  left: 9px;
  top: 5px;
  width: 5px;
  height: 10px;
  border: solid white;
  border-width: 0 3px 3px 0;
  -webkit-transform: rotate(45deg);
  -ms-transform: rotate(45deg);
  transform: rotate(45deg);
}

.checkmark:after {
  content: "";
  position: absolute;
  display: none;
}

.check-button input:checked ~ .checkmark:after {
  display: block;
}

label .checkmark:after {
  left: 9px;
  top: 5px;
  width: 5px;
  height: 10px;
  border: solid white;
  border-width: 0 3px 3px 0;
  -webkit-transform: rotate(45deg);
  -ms-transform: rotate(45deg);
  transform: rotate(45deg);
}
/* end custom checkboxes*/

.rarity-buttons {
  display: flex;
  width: 84%;
  justify-content: space-between;
}

.rarity-buttons .check-button p {
  width: 100%;
  font-size: 0.85rem;
  padding: 0;
}

.input-stats {
  display: flex;
  width: 84%;
  align-items: center;
}

.input-stats #power {
  margin-right: 1rem;
  width: 50%;
}

.input-stats span {
  padding-right: 1rem;
  font-size: 1.25rem;
  color: #19359b;
}

.input-stats #toughness {
  width: 50%;
}

.search-button {
  padding: 2.5rem 1.5rem 1.5rem 1.5rem;
  display: flex;
  justify-content: center;
}

.search-button button {
  padding: 0.75rem 3rem;
  background-color: #19359b;
  font-family: "Beleren-Bold", sans-serif;
  color: white;
  font-size: 1rem;
  border-radius: 5px;
}

.search-button button:hover {
  cursor: pointer;
}

.search-button button:focus {
  outline: none;
}

@media only screen and (max-width: 48.675rem) {
  .advanced-search {
    width: 100%;
  }
}

@media only screen and (max-width: 37.5rem) {
  .advanced-search {
    margin: 0;
  }
  .ui-autocomplete-menu {
    width: 100%;
  }
  #intro {
    padding: 2rem 0 1rem 0;
    width: 80%;
    margin: 0 auto;
    text-align: center;
  }
  #card-name, #cmc, #text, #set, #artist-name {
    width: 100%;
  }
  select {
    padding: 0 0.5rem;
  }
  .search-input {
    flex-wrap: wrap;
    width: 100%;
    box-sizing: border-box;
    padding: 0 1.5rem 1.5rem 1.5rem;
  }
  .search-input:first-child {
    padding: 1.5rem;
  }
  .search-input p {
    padding: 1rem 0;
    text-align: left;
    width: 100%;
  }
  .dropdown-row, .colors-row, .input-stats {
    width: 100%;
  }
  .type-lines {
    flex-direction: column;
    width: 100%;
  }
  .type {
    width: 100%;
    box-sizing: border-box;
  }
  .type input {
    width: 100%;
    box-sizing: border-box;
  }
  .type label {
    width: 100%;
    text-align: left;
    padding: 0.75rem 0 0.5rem 0;
  }
  .textline {
    flex-wrap: wrap;
  }
  .textline select {
    flex-basis: 100%;
    margin: 2rem 0 0 0;
  }
  .colors-row {
    flex-wrap: wrap;
  }
  .colors-row p {
    padding: 1.5rem 0 0 0;
  }
  .color-inputs {
    width: 100%;
    flex-wrap: wrap;
  }
  #color-specifics {
    margin: 2rem 0 0 0;
    width: 50%;
    flex-basis: 100%;
  }
  .rarity-buttons {
    width: 100%;
  }
  .rarity-buttons label {
    width: 25%;
  }
  .rarity-buttons .check-button p {
    text-align: center;
    padding-top: 1rem;
  }
  .search-button {
    padding: 1.5rem 0 3.5rem 0;
    width: 75%;
    margin: 0 auto;
    display: flex;
    justify-content: center;
  }
  .search-button button {
    padding: 0.75rem 3rem;
    width: 100%;
    background-color: #19359b;
    font-family: "Beleren-Bold", sans-serif;
    color: white;
    font-size: 1rem;
    border: 1px solid #19359b;
    border-radius: 10px;
  }
}

/* jquery ui styles */

.ui-menu-item {
  padding: 0.25rem;
  font-family: "Roboto", sans-serif;
}

.ui-menu {
  max-height: 20rem;
  overflow-y: scroll;
}

/* card image results | search.html */

.action-button {
  text-align: center;
  padding:  3rem 0 2rem 0;
  font-size: 1rem;
  margin: 0 auto;
}

.action-button button {
  background-color: #d5e0f7;
  border-radius: 0;
  width: 10rem;
  height: 2rem;
  font-size: 0.8rem;
  border-radius: 5px;
}

.action-button button:hover {
  cursor: pointer;
  background-color: #19359b;
  color: white;
  font-weight: 700;
}

.search-results {
  max-width: 80rem;
  margin: 0 auto;
}

.results-rows {
  width: 100%;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  max-width: 80rem;
  margin: 0 auto;
}

.card-result {
  position: relative;
  text-align: center;
  margin: 0.75rem;
}

.card-result:hover {
  cursor: pointer;
}

.placeholder {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 75%;
}

.card-result p:first-child {
  font-size: 1.15rem;
  line-height: 1.15;
  font-family: "Beleren-Bold", sans-serif;
}

.card-result p:last-child {
  font-family: "Roboto", sans-serif;
  font-size: 0.85rem;
  padding-top: 0.3rem;
}

.card-result img {
  width: 223px;
  height: 310px;
  align-self: center;
}

#card-detail {
  padding: 1.5rem;
}

@media only screen and (max-width: 62.5rem) {
  .results-rows {
    justify-content: center;
  }
}

@media only screen and (max-width: 31.25rem) {
  .card-result {
    width: 90%;
  }
  .card-result img {
    width: 100%;
    height: auto;
  }
}

/* single card result | search.html */

.back-to-results {
  text-align: center;
  padding-top: 3rem;
  font-size: 1rem;
  margin: 0 auto;
  width: 200px;
}

.back-to-results:hover {
  cursor: pointer;
  color: #19359b;
  font-weight: 700;
  text-decoration: underline;
}

.result {
  max-width: 100%;
  padding-top: 1rem;
  margin: 0 auto;
}

/* info row */

.info-row {
  display: flex;
  justify-content: space-between;
  margin: 0 2rem;
}

.card-image {
  width: 25%;
  max-width: 25%;
}

.card-image img {
  width: 100%;
}

.resource-links {
  padding-top: 1rem;
  display: flex;
  justify-content: space-between;
}

.resource-links a {
  text-decoration: none;
  color: black;
}

.resource-button {
  margin: 0.25rem;
  padding: 0.4rem;
  background-color: #e7f0f7;
  border: 0.5px solid #19359b;
}

.resource-button:hover {
  background-color: #b0c9f4;
  cursor: pointer;
}

.resource-button p {
  font-size: 0.85rem;
  font-family: "Roboto", sans-serif;
}

.active {
  background-color: #19359b;
  color: white;
}

.card-details {
  border-top: 1.5px solid #19359b;
  margin: 0 1.25rem;
  max-width: 36%;
}

.spec-row {
  display: flex;
  align-items: center;
  border-bottom: 0.5px solid #bcbcbc;
}

.spec-row.name p {
  flex: 1;
}

.spec-row:last-child {
  border-bottom: none;
}

.spec-row i {
  margin: 0.1rem;
}

#frontside, #backside:hover {
  cursor: pointer;
}

.spec-row p {
  padding: 0.75rem 0.5rem;
  line-height: 1.2;
  font-size: 1rem;
  font-family: "Roboto", sans-serif;
  font-weight: 300;
}

.spec-row img {
  width: 30px;
  height: 30px;
}

.spec-row img:hover {
  cursor: pointer;
}

.oracle {
  flex-direction: column;
  align-items: flex-start;
}

.oracle p {
  white-space: pre-wrap;
}

#flavor-text {
  font-style: italic;
}

#artist {
  font-size: 0.8rem;
}

.legalities {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.column {
  padding: 0.75rem 0.5rem;
}

.format {
  display: flex;
  padding: 0.25rem 0;
}

.format p {
  padding: 0.5rem;
  font-weight: 300;
  font-size: 0.8rem;
}

.legal {
  width: 100px;
  color: white;
  background-color: #538c64;
  text-align: center;
}

.not_legal {
  width: 100px;
  color: white;
  background-color: #a0a0a0;
  text-align: center;
}

.banned {
  width: 100px;
  color: white;
  background-color: red;
  text-align: center;
}

.restricted {
  width: 100px;
  color: white;
  background-color: orange;
  text-align: center;
}

.card-prices {
  border-top: 2px solid #19359b;
  background-color: white;
  width: 40%;
  max-width: 40%;
  height: auto;
  max-height: 26rem;
  overflow-y: scroll;
}

.print-info {
  padding: 0.75rem;
  display: flex;
  align-items: center;
  background-color: #f0f3f7;
}

.print-info i {
  padding-right: 0.5rem;
}

.print-info:hover {
  cursor: pointer;
  background-color: #d7dde2;
}

.print-info p {
  font-weight: bold;
  font-size: 1rem;
}

.set-data {
  display: flex;
  flex-direction: column;
}

.set-data p:last-of-type {
  font-size: 0.8rem;
  font-weight: 400;
  padding-top: 0.45rem;
}

.prices {
  display: flex;
  justify-content: flex-start;
  padding: 0.75rem 0;
  background-color: white;
}

.prices p {
  font-size: 1rem;
}

.market-value {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.market-value .label {
  padding-bottom: 0.25rem;
  font-size: 0.8rem;
}

.median {
  background-color: #beeab7;
  padding: 0.75rem 1rem;
  margin: 0 0.5rem;
  align-self: center;
  width: 75px;
  text-align: center;
}

.foil {
  background-image: linear-gradient(to bottom right, lightblue, white, lightblue);
  color: black;
  padding: 0.75rem 1rem;
  margin: 0 0.25rem;
  align-self: center;
  width: 75px;
  text-align: center;
}

.shop i {
  padding: 0.75rem;
  margin: 0 0.5rem;
  background-color: #f0f3f7;
}

.shop i:hover {
  color: white;
  background-color: #19359b;
}

/* rulings row */

.rulings-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 2rem;
  padding-bottom: 2rem;
  background-color: #f0f3f7;
}

#rulings-header {
  padding: 2rem 0 1rem 0;
  font-weight: bold;
  border-top: 1px solid #19359b;
  text-align: center;
  width: 100%;
}

#no-rulings {
  text-align: center;
}

.rulings {
  max-width: 70%;
  word-break: break-word;
}

.ruling {
  background-color: white;
  border-top: 1px solid #19359b;
}

.ruling p {
  padding: 1rem;
  border-bottom: 10px solid #f0f3f7;
  line-height: 1.3;
}

.date {
  font-size: 0.85rem;
  font-style: italic;
  color: gray;
}



@media only screen and (max-width: 61rem) {
  .info-row {
    flex-direction: column;
    align-items: center;
  }
  .card-image {
    width: 100%;
    max-width: 100%;
    text-align: center;
  }
  .card-image img {
    max-width: 50%;
  }
  .resource-links {
    justify-content: center;
    max-width: 65%;
    margin: 0 auto;
  }
  .resource-button {
    padding: 0.75rem 1.5rem;
  }
  .resource-button p {
    font-size: 1rem;
  }
  .card-details {
    width: 100%;
    max-width: 65%;
    margin: 1.5rem 0;
  }
  .column {
    width: 45%;
  }
  .legalities {
    justify-content: center;
  }
  .card-prices {
    width: 100%;
    max-width: 65%;
  }
  .prices {
    justify-content: space-between;
  }
  .prices p {
    font-size: 1rem;
  }
  .shop i {
    margin: 0 1rem;
    background-color: #f0f3f7;
  }
  #rulings-header {
    width: 65%;
    border-top: 2px solid #19359b;
  }
  .rulings-row {
    align-items: center;
    background-color: white;
  }
  .rulings {
    max-width: 65%;
  }
  .ruling {
    background-color: #f0f3f7;
  }
  .ruling p {
    border-bottom: 10px solid white;
  }
}

@media only screen and (max-width: 43.75rem) {
  .card-image img {
    max-width: 80%;
  }
  .card-details {
    width: 100%;
    max-width: 100%;
  }
  .resource-links {
    justify-content: space-between;
    width: 100%;
    max-width: 100%;
  }
  .resource-links p {
    font-size: 1rem;
  }
  .spec-row p {
    font-size: 1.15rem;
  }
  #artist {
    font-size: 0.9rem;
  }
  .column {
    width: 50%;
  }
  .format p {
    font-size: 1rem;
  }
  .not_legal, .legal, .banned {
    width: 110px;
  }
  .card-prices {
    width: 100%;
    max-width: 100%;
    max-height: 100%;
  }
  .prices {
    padding: 1rem 0;
  }
  .prices p {
    font-size: 1rem;
  }
  .low, .median, .high, .foil {
    padding: 0.75rem;
  }
  .shop i {
    padding: 0.75rem;
  }
  #rulings-header {
    width: 100%;
  }
  .rulings {
    width: 100%;
    max-width: 100%;
  }
}

@media only screen and (max-width: 31.25rem) {
  .card-image img {
    max-width: 100%;
    width: 100%;
  }
  .resource-links {
    flex-direction: column;
  }
  .legalities {
    flex-direction: column;
  }
  .column {
    width: 100%;
  }
  .legal, .not_legal, .restricted, .banned {
    width: 150px;
  }
  .format {
    padding: 0.25rem 0.5rem;
  }
}
