/* Imports Roboto font in case it doesn't already exist on the user's computer */
@import url('https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap');

/* TEXT STYLES */

body {
    font-family: 'Roboto', sans-serif;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    height: 1vh;
    margin: 0;
    padding: 2rem 1rem;
    box-sizing: border-box;
}

h1 {
    font-weight: 700;
    padding: 0px;
}

p {
  font-weight: 400;
  line-height: 1.5; /* More legible text */
}

.line-wrap {
    line-height: 25%;
}

/* DIV STYLES*/

.header {
    width: 95%;
    margin-left: auto; 
    margin-right: auto;
    text-align: center;
}

#header-with-menu {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    column-gap: 15px;
}

#header-title {
    flex: 2 1 90%;
    margin: 0;
}

#header-menu {
    flex: 1 2 auto;
}

.content {
    width: 95%;
    margin-left: auto; 
    margin-right: auto;
    text-align: center;
}

.footer {
    width:50%;
    display:flex;
    align-items: center; 
    justify-content: center;
    flex-direction: column-reverse;
    margin-left:auto;
    margin-right:auto;
    font-size: 10pt;
    font-style: italic;
}
.footer p {
  margin: 0.5em 0 0 0;
}

#social-icons-flexbox {
    display: flex;
    width:100%;
    flex-direction: row;
    justify-content: space-evenly;
    align-items: center;
    font-size: 14pt;
}

/* TABLE */

table {
    text-align: left;
    text-justify: inter-word;
    width: 95%;
    margin-left: auto; 
    margin-right: auto;    
}

td {
    padding: 0px 10px 10px 10px;
    font-weight: 400;

}

.score-banner {
    display:flex;
    flex-direction: row;
    justify-content: space-between;
    width: 100%;
    gap: 0 20px;
    margin: 20px 0 0 0 ;

}

#total-count {
    flex-grow: 2;
    margin:0;
}
#correct-count {
    flex-grow: 2;
    margin:0;

}

/* TEXT DECORATIION */

.error {
    text-decoration-line: underline;
    text-decoration-style: wavy;
    text-decoration-color: red;
    text-decoration-thickness:1px;
    text-underline-offset: 10%;
}

.boxed {
    border: 1px black solid;
    padding: 10px;
    border-radius: 5px;
    box-shadow: 5px 5px 0px black;
}

.boxed-black {
    border: 1px black solid;
    padding: 10px;
    border-radius: 5px;
    background-color: black;
    color: white;
    margin: 1.5em 0 0.5em 0;
}

/* BUTTONS */

a {
    text-decoration: none;
    color: black;
    -webkit-tap-highlight-color: rgba(0,0,0,0);
}

.btn {
    color: black;
    padding: 10px 30px 10px 30px;
    width:fit-content;  
    margin-left: auto;
    margin-right: auto;
    -webkit-tap-highlight-color: rgba(0,0,0,0);
}

.btn.boxed:hover {
    transform: translate(5px, 5px);
    box-shadow: 0px 0px 0px black;
    transition: .1s;
}

.social-icon:hover {
    color: red;
    transition: .2s;
}


/* KEYBOARD */
#keyboard-cont {
    margin: 1rem 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    row-gap: 2px;
}
  
#keyboard-cont div {
    display: flex;
    justify-content: center;
    align-items: center;
    width:90%;
    gap:3px;
}

.fourth-row{
    padding: 0px 0 0px 0;
}

.keyboard-button {
    cursor: pointer;
    color: black;
    font-family: 'Roboto Mono', monospace;
    background-color: white;
    line-height: 1.5;
    font-size:12pt;
    touch-action: manipulation;
    user-select: none;
    flex: 1 1 0px;
    margin-left: auto;
    margin-right: auto;
}

.keyboard-button.clicked {
    transform: translate(2px,2px);
    box-shadow: 0px 0px 0px black;
}

.keyboard-button.pending-accent {
    background-color: hsl(54, 83%, 67%);
    transform: translate(2px,2px);
    box-shadow: 0px 0px 0px black;
}

/* ATTEMPT ENTRY */

#attempt-box {
    width: 200px;
    max-width: 50%;
    border: 2px black solid;
    border-radius: 5px;
    background-color: white;
    font-family: 'Roboto Mono', 'Segoe UI', 'Arial Unicode MS', sans-serif;
    font-size: 16pt;
    color: black;
    padding: 10px 25px;
    line-height: 2;
    text-align: center;
    box-shadow: 3px 3px 0px black;
    transition: all 0.2s ease;
    margin: 10px 0;
    unicode-bidi: normal;
}

#attempt-box:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25), 3px 3px 0px black;
    transform: translate(-1px, -1px);
}

#attempt-box[readonly] {
    caret-color: transparent;
}

#attempt-box::placeholder {
    font-family: 'Roboto Mono', monospace;
}

/* Input container and submit button */
#input-container {
    display: flex;
    align-items: center;
    font-family: 'Roboto Mono', monospace;
    gap: 0px;
    justify-content: center;
    margin: 0px 0;
    flex-wrap: wrap;
}

#submit-btn {
    padding: 16px 16px;
    font-size: 12pt;
    font-weight: 500;
    white-space: nowrap;
    font-family: 'Roboto Mono', monospace;
    min-width: 70px;
}

/* ATTEMPT BOXES */

#word-prompts {
    display: flex;
    flex-direction: row;
    gap: 0.1vw; /* FIX: Gap is dependent on screen size | smaller screen = smaller spacing */
    margin: 10px 0 10px 0;
}

.prompt {
    flex: 1 1 0px;
    padding: 10px;
    aspect-ratio: 1/1;
    align-items: center;
    margin: 5px 5px 1rem 5px;
    position: relative;
}
.prompt::before { /* Center the play icon */
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.prompt.clicked {
    transform: translate(5px, 5px);
    box-shadow: 0px 0px 0px black;
}

/* PRACTICE MODE */
#practice-prompt {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    margin: 15pt 0 15pt 0;
}