/********** variables **********/

:root {
  --bgTan: #e4e0cc;
  --navColor: #7b7b7b;
  --navHover: #595959;
  --navCurrent: #3c3c3c;
  --buttonColor: #4f4f4f;
  --buttonActive: #7b7b7b;
}

@keyframes attention {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }

  50% {
    transform: translateX(-100px) scale(1.5);
  }
}

/********** page defaults **********/

* {
  box-sizing: border-box;
}

html {
  background: #5d5d5d;
  font: 17px Verdana, Geneva, Tahoma, sans-serif;
}

body {
  display: grid;
  grid-template: repeat(3, auto) / auto 1fr;
  max-width: 90%;
  margin: 3rem auto;
}

a {
  border-radius: 5px;
  text-decoration: none;
}

/********** header **********/

header {
  background: var(--bgTan);
  border-bottom-right-radius: 10px;
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
  grid-area: 1 / 1 / 1 / -1;
  margin: 0;
  text-align: center;
  width: 100%;
}

header h1 {
  font-size: 2.25rem;
}

/********** nav **********/

nav {
  background: var(--bgTan);
  display: flex;
  grid-area: 2 / 1 / 3 / 1;
  z-index: 100;
}

nav ul {
  list-style: none;
  padding: 1rem;
}

nav li {
  flex: 1;
  margin-bottom: .5rem;
}

nav a,
table a {
  background: var(--navColor);
  border: 1px solid #000;
  color: #fff;
  display: block;
  padding: .5rem;
  text-align: center;
}

nav a:hover,
table a:hover,
.back-link:hover,
#create-link:hover {
  background: var(--navHover);
}

.current {
  background: var(--navCurrent);
}

.back-link,
#create-link {
  background: var(--navColor);
  border: 1px solid #000;
  color: #fff;
  display: block;
  font-size: 16px;
  margin-bottom: 1rem;
  padding: .15rem;
  text-align: center;
  width: 140px;
}

#create-link {
  width: 180px;
}

/********** main **********/

main {
  background: #fff;
  box-shadow: inset 0 0 10px 8px rgba(0, 0, 0, .5);
  display: flex;
  flex-direction: column;
  grid-area: 2 / 2 / 3 / -1;
  padding: 3rem;
  margin-right: 1rem;
}

main h2 {
  background: var(--bgTan);
  border-radius: 10px;
  box-shadow: 0 0 8px 0;
  font-weight: lighter;
  margin: 0 0 1rem;
  padding: .52rem;
  text-align: center;
}
  
main a {
  padding-bottom: .5rem;
}

/********** footer **********/

footer {
  background: var(--bgTan);
  border-bottom-right-radius: 10px;
  border-bottom-left-radius: 10px;
  border-top-right-radius: 10px;
  padding-left: 1rem;
  grid-area: 3 / 1 / -1 / -1;
}

/********** tables **********/

table,
th,
td {
  border: 1px solid;
  border-collapse: collapse;
  padding: .5rem;;
}

.tableText {
  font-size: 16px;
}

table a {
  margin-bottom: .5rem;
  padding: .3rem;
}

table a:last-child {
  margin-bottom: 0;
}

/********** forms **********/

form {
  align-items: left;
  display: flex;
  flex-direction: column;
  gap: .5rem;
  margin: 0;
  max-width: 500px;
  padding: 0;
}

input[type="text"] {
  background: var(--bgTan);
  border: none;
  box-shadow: inset 0 0 3px 0 #000;
  height: 25px;
}

input[type="text"]:focus,
textarea:focus {
  background-color: #fff;
}

textarea {
  background: var(--bgTan);
  border: none;
  box-shadow: inset 0 0 3px 0 #000;
}
 
input[type="submit"] {
  display: flex;
  background: var(--buttonColor);
  border: none;
  border-radius: 5px;
  color: #fff;
  padding: .3rem .5rem;
}

input[type='submit']:hover {
  background: var(--navColor);
}

input[type="submit"]:active {
  background: var(--buttonActive);
}

/********** other **********/

#post {
  animation: attention 1s;
  align-self: center;
  font-weight: bold;
  grid-area: 3 / 2;
  justify-self: end;
  padding-right: 1rem;
  z-index: 100;
}
