/*! HTML5 Boilerplate v8.0.0 | MIT License | https://html5boilerplate.com/ */

/* main.css 2.1.0 | MIT License | https://github.com/h5bp/main.css#readme */
/*
 * What follows is the result of much research on cross-browser styling.
 * Credit left inline and big thanks to Nicolas Gallagher, Jonathan Neal,
 * Kroc Camen, and the H5BP dev community and team.
 */

/* ==========================================================================
   Base styles: opinionated defaults
   ========================================================================== */
:root {
  --primary: #C90629;
  --blue: #002273;
  --yellow: #F5DD06;
  --white:  white;
  --5: #F5F5FA;
  --10: #E6E6EB;
  --20: #CDCDD1;
  --30: #B4B4B8;
  --40: #9B9B9E;
  --50: #828285;
  --60: #69696B;
  --70: #505052;
  --80: #373738;
  --90: #1E1E1F;
  --95: #121212;
}

html {
  color: #222;
  font-size: 1em;
  line-height: 1.4;
  font-family: sans-serif;
}

.main {
  margin: 30px;
  max-width: 1290px;
  position: relative;
}
/*
 * Remove text-shadow in selection highlight:
 * https://twitter.com/miketaylr/status/12228805301
 *
 * Vendor-prefixed and regular ::selection selectors cannot be combined:
 * https://stackoverflow.com/a/16982510/7133471
 *
 * Customize the background color to match your design.
 */

::-moz-selection {
  background: #b3d4fc;
  text-shadow: none;
}

::selection {
  background: #b3d4fc;
  text-shadow: none;
}

/*
 * A better looking default horizontal rule
 */

hr {
  display: block;
  height: 1px;
  border: 0;
  border-top: 1px solid #ccc;
  margin: 1em 0;
  padding: 0;
}

/*
 * Remove the gap between audio, canvas, iframes,
 * images, videos and the bottom of their containers:
 * https://github.com/h5bp/html5-boilerplate/issues/440
 */

audio,
canvas,
iframe,
img,
svg,
video {
  vertical-align: middle;
}

/*
 * Remove default fieldset styles.
 */

fieldset {
  border: 0;
  margin: 0;
  padding: 0;
}

/*
 * Allow only vertical resizing of textareas.
 */

textarea {
  resize: vertical;
}

/* ==========================================================================
   Author's custom styles
   ========================================================================== */
/****HEADER CSS****/
header {
  background-color: var(--10);
}
header .top-header {
  display: flex;
  max-width: 1290px;
  margin: 0 auto;
  justify-content: space-between;
  padding: 2% 5%;
}

.top-header ul.top-header-right {
    list-style: none;
    margin: 0;
    padding: 0;
  }
.top-header ul.top-header-right li {
  display: inline-block;
  font-family: var(--primary-font);
}
.top-header ul.top-header-right li:not(:first-child) {
  margin-left: 20px;
}
.top-header a {
  text-decoration: none;
  color: inherit;
  letter-spacing: 1.5px;
  transition: all .3s ease-in-out;
  border-bottom: 3px solid var(--10);
  padding-bottom: 5px;
}
.top-header a:hover {
  border-bottom-color: var(--primary);
  color: var(--primary);
}
.top-header a.active {
  border-bottom: 3px solid var(--primary);
  color: var(--primary);
}

.page-header {
  background-color: var(--primary);
  text-align: center;
  padding: 60px 15px;
}

.page-header h1 {
  margin: 0 auto;
  font-family: var(--primary-font);
  color: var(--white);
  letter-spacing: 7px;
  max-width: 1290px;
  text-transform: uppercase;
}
/****HOME PAGE CSS****/
.row {
  display: block;
}

.one-half {
  background-color: var(--5);
  border-radius: 2px;
  padding: 30px;
  text-align: center;
  display: flex;
  align-content: center;
  justify-content: center;
  align-items: center;
  font-size: 44px;
  letter-spacing: 7px;
  text-transform: uppercase;
  color: white;
  text-decoration: none;
}

.pango-home {
  background-color: rgb(0, 47, 135);
  font-family: "Sintony", sans-serif;
  padding: 30px;
  color: white;
  text-decoration: none;
  border-radius: 2px;
}

.dango-home {
  background-color: #BE0814;
  font-family: proxima-nova, sans-serif;
  padding: 30px;
  color: white;
  text-decoration: none;
  border-radius: 2px;
}

.kawgo-home {
  background-color: rgb(0, 38, 119);
  font-family: 'Black Ops One', cursive;
  padding: 30px;
  color: white;
  text-decoration: none;
  border-radius: 2px;
}

.cityo-home {
  background-color: #ec1458;
  font-family: 'mlsgo-bold', sans-serif;
  padding: 30px;
  color: white;
  text-decoration: none;
  border-radius: 2px;
}

.row-2 {
  margin-top: 30px;
  display: block;
  background-color: var(--5);
  border-radius: 2px;
  padding: 30px;
}

.one-third img {
  width: 100%;
}

/****GAME BOARD CSS***/
#board {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  grid-gap: 0px;
  justify-content: center;
  align-items: center;
  justify-items: center;
  max-width: 1290px;
  margin: 30px 10px;
  width: calc(100% - 20px);
  border: 1px solid var(--primary);
  transition: all .3s ease-in-out;
  align-items: center;
}

#board .board-header {
  border-top-color: var(--primary) !important;
}
#board .board-header:first-child {
  border-left-color: var(--primary);
}
#board .board-header:last-child {
  border-right-color: var(--primary);
}

#board .box-outer {
  border: 1px solid var(--primary);
  text-align: center;
  transition: all .3s ease-in-out;
  background-color: var(--white);
  line-height: 1.1em;
  font-size: 12px;
  padding: 15px 5px;
  width: calc(100% - 10px);
  height: calc(100% - 30px);
  display: flex;
  align-content: center;
  justify-content: center;
  align-items: center;
}

#board .box-outer:hover {
  cursor: pointer;
  background-color: var(--highlight);
  color: var(--white);
}

#board .box-outer.selected {
  background-color: var(--primary);
  color: var(--white);
  border-color: var(--white);
  font-weight: bold;
}

#board .box-outer.winner {
  background-color: var(--secondary) !important;
  color: var(--white) !important;
  border-color: var(--white);
  font-weight: bold;
}

#board .board-header {
  font-family: var(--primary-font);
  color: var(--white);
  background-color: var(--primary);
  font-weight: bold;
  text-align: center;
  font-size: 24px;
  border: 1px solid white;
  width: 100%;
  padding: 10px 0;
}

.three-column {
  display: block;
}

.two-column {
  display: block;
}

#board-generator {
  color: white;
  background-color: var(--primary);
  text-align: center;
  font-weight: bold;
  padding: 13px 25px;
  line-height: 1em;
  border-radius: 5px;
  transition: all .3s ease-in-out;
  margin-bottom: 20px;
}

#board-generator:hover {
  cursor: pointer;
  background-color: var(--secondary);
  color: white;
  transition: all .3s ease-in-out;
}

#submit-phrase-button, #share-button {
  color: white;
  background-color: var(--secondary);
  text-align: center;
  font-weight: bold;
  padding: 13px 25px;
  line-height: 1em;
  border-radius: 5px;
  transition: all .3s ease-in-out;
  display: block;
  width: calc(100% - 50px);
  text-decoration: none;
}

#submit-phrase-button:hover, #share-button:hover {
  cursor: pointer;
  background-color: var(--primary);
  color: white;
  transition: all .3s ease-in-out;
}

ul.social-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

ul.social-links li {
  display: inline-block;
  font-size: 32px;
  margin-right: 15px;
}

ul.social-links li a {
  color: var(--primary);
  transition: all .3s ease-in-out;
}

ul.social-links li a:hover {
  color: var(--secondary);
}

.main iframe {
  display: block;
  margin: 0 auto;
}

footer {
  
  background-color: var(--60);
  color: var(--white);
  text-align: center;
  font-family: sans-serif;
  font-weight: normal;
  font-size: 14px;
  padding: 15px;
  width: calc(100% - 30px);
}

footer span {
  display: block;
  width: 100%;
}


/* The Modal (background) */
.modal {
  display: none; /* Hidden by default */
  position: fixed; /* Stay in place */
  z-index: 1; /* Sit on top */
  left: 0;
  top: 0;
  width: 100%; /* Full width */
  height: 100%; /* Full height */
  overflow: auto; /* Enable scroll if needed */
  background-color: rgb(0,0,0); /* Fallback color */
  background-color: rgba(0,0,0,0.4); /* Black w/ opacity */
}

/* Modal Content/Box */
.modal-content {
  background-color: #fefefe;
  margin: 15% auto; /* 15% from the top and centered */
  padding: 20px;
  border: 1px solid #888;
  width: 80%; /* Could be more or less, depending on screen size */
}

/* The Close Button */
.close {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
}

.close:hover,
.close:focus {
  color: black;
  text-decoration: none;
  cursor: pointer;
}

/******SOCIAL SHARE CSS*******/

.social-share-link-wrapper {
    text-align: right;
    max-width: 1290px;
    margin: 30px auto 10px;
    padding: 0 10px;
}

.social-share-link-wrapper .social-share-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.social-share-link-wrapper .social-share-link #share-button {
    width: auto !important;
}

.social-share-link-wrapper h6 {
    text-transform: normal;
    font-size: 14px;
    line-height: 1.5em;
    color: var(--50);
    margin-bottom: 5px;
    font-family: var(--primary-font);
    text-transform: uppercase;
    letter-spacing: 1.4px;
}

.social-share-link-wrapper .social-share-link a {
    font-size: 24px;
    margin-right: 15px;
    color: var(--primary);
    transition: all .3s ease-in-out;
}

.social-share-link-wrapper .social-share-link a:hover {
  color: var(--secondary);
  transition: all .3s ease-in-out;
}

[data-tooltip] {
    position: relative;
    z-index: 2;
    cursor: pointer;
}

/* Hide the tooltip content by default */
[data-tooltip]:before,
[data-tooltip]:after {
    visibility: hidden;
    -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";
    filter: progid: DXImageTransform.Microsoft.Alpha(Opacity=0);
    opacity: 0;
    pointer-events: none;
}

/* Position tooltip above the element */
[data-tooltip]:before {
    position: absolute;
    bottom: 150%;
    left: 50%;
    margin-bottom: 5px;
    margin-left: -80px;
    padding: 7px;
    width: 160px;
    -webkit-border-radius: 3px;
    -moz-border-radius: 3px;
    border-radius: 3px;
    background-color: #000;
    background-color: hsla(0, 0%, 20%, 0.9);
    color: #fff;
    content: attr(data-tooltip);
    text-align: center;
    font-size: 14px;
    line-height: 1.2;
}

/* Triangle hack to make tooltip look like a speech bubble */
[data-tooltip]:after {
    position: absolute;
    bottom: 150%;
    left: 50%;
    margin-left: -5px;
    width: 0;
    border-top: 5px solid #000;
    border-top: 5px solid hsla(0, 0%, 20%, 0.9);
    border-right: 5px solid transparent;
    border-left: 5px solid transparent;
    content: " ";
    font-size: 0;
    line-height: 0;
}

/* Show tooltip content on hover */
[data-tooltip]:hover:before,
[data-tooltip]:hover:after {
    visibility: visible;
    -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=100)";
    filter: progid: DXImageTransform.Microsoft.Alpha(Opacity=100);
    opacity: 1;
}

/* ==========================================================================
   Helper classes
   ========================================================================== */

/*
 * Hide visually and from screen readers
 */

.hidden,
[hidden] {
  display: none !important;
}

/*
 * Hide only visually, but have it available for screen readers:
 * https://snook.ca/archives/html_and_css/hiding-content-for-accessibility
 *
 * 1. For long content, line feeds are not interpreted as spaces and small width
 *    causes content to wrap 1 word per line:
 *    https://medium.com/@jessebeach/beware-smushed-off-screen-accessible-text-5952a4c2cbfe
 */

.sr-only {
  border: 0;
  clip: rect(0, 0, 0, 0);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  white-space: nowrap;
  width: 1px;
  /* 1 */
}

/*
 * Extends the .sr-only class to allow the element
 * to be focusable when navigated to via the keyboard:
 * https://www.drupal.org/node/897638
 */

.sr-only.focusable:active,
.sr-only.focusable:focus {
  clip: auto;
  height: auto;
  margin: 0;
  overflow: visible;
  position: static;
  white-space: inherit;
  width: auto;
}

/*
 * Hide visually and from screen readers, but maintain layout
 */

.invisible {
  visibility: hidden;
}

/*
 * Clearfix: contain floats
 *
 * For modern browsers
 * 1. The space content is one way to avoid an Opera bug when the
 *    `contenteditable` attribute is included anywhere else in the document.
 *    Otherwise it causes space to appear at the top and bottom of elements
 *    that receive the `clearfix` class.
 * 2. The use of `table` rather than `block` is only necessary if using
 *    `:before` to contain the top-margins of child elements.
 */

.clearfix::before,
.clearfix::after {
  content: " ";
  display: table;
}

.clearfix::after {
  clear: both;
}

/* ==========================================================================
   EXAMPLE Media Queries for Responsive Design.
   These examples override the primary ('mobile first') styles.
   Modify as content requires.
   ========================================================================== */

@media only screen and (min-width: 768px) {
  /* Style adjustments for viewports that meet the condition */
  .main {
    margin: 60px auto;
  }
  #board {
    margin: 60px auto;
  }
  #board .box-outer {
    font-size: 1em;
    padding: 30px 15px;
    width: calc(100% - 30px);
    height: calc(100% - 60px);
  }
  .three-column {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    column-gap: 30px;
  }
  .two-column {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    column-gap: 30px;
  }
  .row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-gap: 30px;
    min-height: 300px;
  }
  .row-2 {
    display: grid;
    grid-template-columns: 2fr 1fr;
    grid-gap: 30px;
  }
  .one-third img {
    max-width: 350px;
    float: right;
  }
  .modal .setting-wrapper {
    width:  33.33% !important;
    justify-content: center;
  }
}

@media print,
  (-webkit-min-device-pixel-ratio: 1.25),
  (min-resolution: 1.25dppx),
  (min-resolution: 120dpi) {
  /* Style adjustments for high resolution devices */
}

/* ==========================================================================
   Print styles.
   Inlined to avoid the additional HTTP request:
   https://www.phpied.com/delay-loading-your-print-css/
   ========================================================================== */

@media print {
  *,
  *::before,
  *::after {
    background: #fff !important;
    color: #000 !important;
    /* Black prints faster */
    box-shadow: none !important;
    text-shadow: none !important;
  }

  a,
  a:visited {
    text-decoration: underline;
  }

  a[href]::after {
    content: " (" attr(href) ")";
  }

  abbr[title]::after {
    content: " (" attr(title) ")";
  }

  /*
   * Don't show links that are fragment identifiers,
   * or use the `javascript:` pseudo protocol
   */
  a[href^="#"]::after,
  a[href^="javascript:"]::after {
    content: "";
  }

  pre {
    white-space: pre-wrap !important;
  }

  pre,
  blockquote {
    border: 1px solid #999;
    page-break-inside: avoid;
  }

  /*
   * Printing Tables:
   * https://web.archive.org/web/20180815150934/http://css-discuss.incutio.com/wiki/Printing_Tables
   */
  thead {
    display: table-header-group;
  }

  tr,
  img {
    page-break-inside: avoid;
  }

  p,
  h2,
  h3 {
    orphans: 3;
    widows: 3;
  }

  h2,
  h3 {
    page-break-after: avoid;
  }
}

/*******MODAL*******/

.settings-icon#settingsBtn {
    font-size: 24px;
    color: var(--highlight);
    display: inline-block;
    float: right;
    margin-top: 30px;
    margin-right: 15px;
    margin-bottom: 15px;
}

.settings-icon#settingsBtn:hover {
  color:  var(--primary);
  cursor: pointer;
  transition: .3s all ease-in-out;
}

.modal-content h2, .modal-content p {
  text-align: center;
}

.modal .setting-wrapper {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
  width: 50%;
  float: left;
}

.modal .setting-wrapper .label {
  padding-left: 7px;
}

.modal {
  display: none; /* Hidden by default */
  position: fixed; /* Stay in place */
  z-index: 1; /* Sit on top */
  left: 0;
  top: 0;
  width: 100%; /* Full width */
  height: 100%; /* Full height */
  overflow: auto; /* Enable scroll if needed */
  background-color: rgb(0,0,0); /* Fallback color */
  background-color: rgba(0,0,0,0.4); /* Black w/ opacity */
}

div#settings {
    min-height: 14vh;
    padding-top: 15px;
}

div#commercial-message {
    text-align: center;
    font-size: 14px;
    color: var(--50);
    font-style: italic;
}

/* Modal Content/Box */
.modal .modal-content {
  background-color: white;
  margin: 15% auto; /* 15% from the top and centered */
  padding: 20px;
  border: 1px solid #888;
  width: 80%; /* Could be more or less, depending on screen size */
}

/* The Close Button */
.close {
  color: var(--primary);
  float: right;
  font-size: 28px;
  font-weight: bold;
}

.close:hover,
.close:focus {
  color: var(--highlight);
  text-decoration: none;
  cursor: pointer;
}

/*******TOGGLE SWITCHES*******/

.switch {
  position: relative;
  display: inline-block;
  width: 60px;
  height: 34px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  -webkit-transition: .4s;
  transition: .4s;
}

.slider:before {
  position: absolute;
  content: "";
  height: 26px;
  width: 26px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  -webkit-transition: .4s;
  transition: .4s;
}

input:checked + .slider {
  background-color: var(--primary);
}

input:focus + .slider {
  box-shadow: 0 0 1px var(--primary);
}

input:checked + .slider:before {
  -webkit-transform: translateX(26px);
  -ms-transform: translateX(26px);
  transform: translateX(26px);
}

/* Rounded sliders */
.slider.round {
  border-radius: 34px;
}

.slider.round:before {
  border-radius: 50%;
}

#settings .label {
  display: inline-block;
  line-height: 26px;
}

