@import url('https://fonts.googleapis.com/css2?family=Sedgwick+Ave&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Yanone+Kaffeesatz&display=swap');

:root {
    --font-title: 'Sedgwick Ave', cursive;
    --font-box: 'Yanone Kaffeesatz', sans-serif;
    --box-bg: #fff;
}

* {
    box-sizing: border-box;
    font-family: var(--font-box);
}

body {
    width: 100vw;
    height: 100vh;
    min-height: 100vh;
    background-color: #F2F3F4;
}

table, th, td {
    border: 1px solid rgb(63, 58, 47);
    border-collapse: collapse;
}

[id^="error_"] {
    display: none;
    color: #f44336;
    font-size: 1.4rem;
}

#header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: #fff;
    overflow: hidden;
    z-index: 5;
    padding: .5rem;
    border-bottom: 2px solid rgb(63, 58, 47);
}

#header .title {
    font-family: var(--font-title);
    font-size: 2.5rem;
}

.no-pointer-events {
    pointer-events: none;
}

.box {
    background-color: var(--box-bg);
}

#canvas {
    cursor: url('../images/pencil-cursor.png'), auto;
}

#speaker-button {
    margin-top: 6px;
    padding-right: 1rem;
}

#exit-door,
#speaker-button:hover {
    cursor: pointer;
}

#game-board {
    display: grid;
    grid-template-columns: 25% 65% auto;
    margin-top: 5.5rem;
    margin-left: .5rem;
    margin-right: .5rem;
    column-gap: 1rem;
    xpadding: 10px;
}

#players-box {
    padding: 2rem;
    padding-top: 1rem;
    padding-left: 1rem;
    font-size: 1.5rem; 
    overflow: scroll;
}

[id^="plyr-"] {
    cursor: pointer;
}

#color-box {
    display: flex;
    flex-direction: column;
    margin-top: 1rem;
}

#color-box button {
    margin-bottom: 1rem;
}

#drawing-box {
    display: grid;
    grid-template-columns: 5% 95%;
    padding: 1rem;
}

#canvas-box {
    width: 100%;
    height: 100%;
}

#status-box {
    background-color: var(--box-bg);
    padding: 1rem;
    text-align: center;
    margin-top: 1rem;
    margin-left: .5rem;
    margin-right: 1.5rem;
    font-size: 1.5rem;
}

.color-button {
    width: 35px;
    height: 35px;
    padding: 0px;
    cursor: pointer;
}

.pen-border {
    border: solid 3px #6e7491;
    border-radius: 255px 15px 225px 15px/15px 225px 15px 255px;
}

button > .pen-border {
    border: solid 1px #000;
}

input[type=text] {
    padding: 8px 15px;
    margin: 8px 0;
    outline: none;
    background-color: var(--box-bg);
    font-size: 1.5rem;
}

.user-emoji {
    background: url('../images/emoji-ss.jpg') 0 0;
    background-repeat: no-repeat;  
    width: 32px;
    height: 32px;
}

#player_guess_text {
    xbackground-image: url('../images/guess.jpeg');
    xbackground-size: 40px 40px;
    xbackground-repeat: no-repeat;
    xpadding-left: 40px;
    xfont-size: 1.5rem;
    xtransition: width 0.4s ease-in-out;
}

#player_guess_text:focus {
    xwidth: 50%;
}

button {
    padding: 8px 15px;
    font-size: 1.5rem;
}

#rotate-phone-msg {
    font-family: var(--font-box);
    font-size: 1.5rem;
    background-color: #fff;
    padding: .5rem;
    xmargin-left: 2rem;
    xmargin-right: 2rem;
    margin-top: 1rem;
    text-align: center;
}

.modal {
    position: fixed;
    z-index: 10; 
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: #474e5d;
    padding-top: 50px;
}

.modal-content {
    padding: 2rem;
    background-color: #fefefe;
    margin: 5% auto 15% auto;
    border: 1px solid #888;
    text-align: center;
}

.close {
    position: absolute;
    right: 35px;
    top: 15px;
    font-size: 40px;
    font-weight: bold;
    color: #f1f1f1;
}
  
.close:hover,
.close:focus {
    color: #f44336;
    cursor: pointer;
}

.clearfix::after {
    content: "";
    clear: both;
    display: table;
}

.hidden {
    display: none;
}

ul {
    xlist-style-image: url('sqpurple.gif');
}

li {
    cursor: pointer;
}

.black {
    background-color: #000000;
}

.blue {
    background-color: #0000EE;
}

.green {
    background-color: #66CD00;
}

.red {
    background-color: #FF0000;
}

.yellow {
    background-color: #FFFF00;
}

.clear, .white {
    background-color: white;
}


/*******************************************************************/
/* toast popup */
.toast-container {
    position: fixed;
    left: calc(50% - 150px);
    width: 300px;
    top: 100px;
    font-size: 1.7em;
    font-family: var(--font-modal);
  }

  .toast {
    opacity: 0;
    min-height: 30px;
    padding: 10px;
    border: solid 2px #000;
    border-radius: 255px 15px 225px 15px/15px 225px 15px 255px;
    margin-top: 0px;
    background-color: darksalmon;
    box-shadow: 0 3px 4px #0004;
    text-align: center;
    line-height: 30px;
    transform: scale(0.95) translateY(150px);
    transition:
      margin-top 0.7s,
      transform 0.7s,
      opacity 0.7s;
  }

  .toast.open {
    margin-top: 10px;
    transform: scale(1) translateY(0);
    opacity: 1;
  }
  
  /* Custom Toast Style */
  .toast.guessed {
    background-color: rgb(91, 170, 101);
    border-color: rgb(0, 0, 0);
    color: #fff;
  }

  .toast.joined {
    background-color: rgb(108, 127, 195);
    border-color: rgb(0, 0, 0);
    color: #fff;
  }

/*******************************************************************/
/* mobile layout */

@media only screen and (orientation: landscape) and (max-width: 860px) {
    #players-box {
        display: block;
        width: 400px;
        height: 280px;
        border-radius: 0;
        overflow: scroll;
    }

    #drawing-box {
        display: none;
    }

    #status-box {
        display: none;
    }

    #share-game-box {
        display: block;
        padding: 3rem;
        width: 50%;
        margin-left: 20rem;
    }
}

@media only screen and (orientation: portrait) and (max-width: 600px) {
    #game-board {
        display: block;
        margin-top: 5.5rem;
        margin-left: .5rem;
        margin-right: .5rem;
    }

    #drawing-box {
        display: grid;
        grid-template-columns: auto auto;
        xleft: -10px;
    }

    #players-box {
        display: none;
    }

    #canvas-box {
        swidth: 100%;
    }

    #color-box {
        xdisplay: none;
    }

    #color-selection {
        display: flex;
        flex-direction: row;
        xpadding: .5rem;
    }

    #rotate-phone-msg {
        display: block;
    }

}