@import url("https://fonts.googleapis.com/css?family=Montserrat:400|Inconsolata:400");
*,
::after,
::before {
  box-sizing: border-box;
}
:root {
  /* COLORS  */
  /* primary */
  --primary-0: #f0efff;
  --primary-50: #d8d6ff;
  --primary-100: #c1beff;
  --primary-200: #aaa5ff;
  --primary-300: #938dff;
  --primary-400: #7b74ff;
  /* main */
  --primary-500: #645cff;
  --primary-600: #554ed9;
  --primary-700: #4640b3;
  --primary-800: #37338c;
  --primary-900: #282566;
  --primary-1000: #191740;
  --primary-1100: #0a0919;
  /* grey */
  --grey-0: #fafbfc;
  --grey-50: #f2f4f8;
  --grey-100: #eaedf3;
  --grey-200: #e2e7ef;
  --grey-300: #dbe0ea;
  --grey-400: #d3dae6;
  --grey-500: #cbd3e1;
  --grey-600: #adb3bf;
  --grey-700: #8e949e;
  --grey-800: #70747c;
  --grey-900: #51545a;
  --grey-1000: #333538;
  --grey-1100: #141516;

  /* rest */
  --black: #222;
  --white: #fff;
  --red-light: #f8d7da;
  --red-dark: #842029;
  --green-light: #d1e7dd;
  --green-dark: #0f5132;
  /* box shadows */
  --shadow-1: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  --shadow-2: 0 4px 6px -1px rgba(0, 0, 0, 0.1),
    0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-3: 0 10px 15px -3px rgba(0, 0, 0, 0.1),
    0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-4: 0 20px 25px -5px rgba(0, 0, 0, 0.1),
    0 10px 10px -5px rgba(0, 0, 0, 0.04);
  /* typography */
  --defaultFontSize: 87.5%;
  --headingFont: "Inconsolata", monospace;
  --bodyFont: "Arial", sans-serif;
  --smallText: 0.8em;
  /* rest */
  --backgroundColor: var(--grey-50);
  --textColor: var(--grey-1000);
  --borderRadius: 0.25rem;
  --letterSpacing: 2px;
  --transition: 0.2s ease-in-out all;
  --max-width: 1170px;
  --fixed-width: 600px;
}

body {
  background: var(--backgroundColor);
  color: var(--textColor);
  font-family: var(--bodyFont);
  font-weight: 400;
  line-height: 1.75;
}

nav {
  height: 4rem;
  background: var(--primary-500);
  display: flex;
  align-items: center;
  justify-content: center;
}
.nav-center {
  color: var(--white);
  display: flex;
  width: 64%;
  align-items: center;
  text-align: center;
  justify-content: center;
  padding: 0 1em;
  text-transform: capitalize;
}

.nav-center a {
  color: var(--white);
  font-size: 1rem;
  padding: 5px;
  text-decoration: none;
}

input::placeholder {
  color: var(--grey-600);
}

button {
  cursor: pointer;
  color: var(--white);
  background: var(--primary-500);
  border: none;
  border-radius: var(--borderRadius);
  letter-spacing: var(--letterSpacing);
  padding: 0.375rem 0.75rem;
  transition: var(--transition);
  text-transform: capitalize;
}
button:hover {
  color: var(--white);
  background: var(--primary-700);
}
button:disabled {
  cursor: default;
  background: var(--grey-600);
}

.grid-container {
  width: 60%;
  max-width: 26em;
  background: var(--white);
  border-radius: var(--borderRadius);
  box-shadow: var(--shadow-2);
  padding: 1rem 1rem;

  margin: 0 auto;
  margin-top: 2rem;
  height: fit-content;

  display: grid;
  grid-row-gap: 1rem;
}

.grid-item {
  color: black;
  background: var(--backgroundColor);
  border-radius: var(--borderRadius);
  box-shadow: var(--shadow-2);
  width: 100%;
  text-align: left;
  padding: 1em;

  line-height: 20px;
  margin: 0 auto;

  display: grid;
  row-gap: 1rem;
}

.vocab {
  font-size: 1.5em;
  margin: 0 0 0.5em 0;
}

.inline-editor {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4em;
  background: var(--grey-50);
  border-radius: var(--borderRadius);
  padding: 0.4em;
}

.inline-editor input[type="text"],
.inline-editor input[type="password"] {
  flex: 1 1 100%;
  width: 100%;
  padding: 0.3rem 0.4rem;
  font-size: var(--smallText);
}

.add-actions {
  display: flex;
  gap: 0.5em;
}

.add-actions button {
  font-size: var(--smallText);
  padding: 0.375rem 0.75rem;
}

.editor-cancel-btn {
  background: var(--grey-600);
}

.editor-cancel-btn:hover {
  background: var(--grey-700);
}

.editor-error {
  color: var(--red-dark);
  font-size: var(--smallText);
}

.hidden {
  display: none;
}

.section-note {
  font-size: var(--smallText);
  color: var(--grey-800);
  margin: 0;
}

.auth-links {
  font-size: var(--smallText);
  margin: 0.5em 0 0 0;
}

.auth-links a {
  color: var(--primary-600);
  text-decoration: none;
}

.auth-links a:hover {
  text-decoration: underline;
}

#google-btn-wrap {
  display: flex;
  justify-content: center;
}

@media (max-width: 768px) {
  .nav-center {
    width: 95%;
  }

  button {
    padding: 0.5rem 0.8rem;
    font-size: 0.9rem;
  }

  .grid-container {
    width: 95%;
    padding: 0.8rem;
  }

  .grid-item {
    padding: 0.8rem;
  }

  .vocab {
    font-size: 1.3em;
  }

  .inline-editor {
    flex-direction: column;
    gap: 0.5em;
  }

  .inline-editor input[type="text"],
  .inline-editor input[type="email"],
  .inline-editor input[type="password"] {
    width: 100%;
    padding: 0.5rem;
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  nav {
    height: auto;
    padding: 0.5rem 0;
  }

  .nav-center {
    flex-direction: column;
    gap: 0.5em;
  }

  .nav-center a {
    font-size: 0.9rem;
  }

  button {
    padding: 0.6rem 1rem;
    font-size: 0.95rem;
    min-height: 44px;
  }

  label {
    font-size: 0.75rem;
  }

  .vocab {
    font-size: 1.3em;
  }
}
