body {
  font-family: 'Frank Ruhl Libre', serif;
}

header {
  background-color: rgb(0, 51, 0);
  background-image: url(../images/header-bg.png);
  background-position: bottom right;
  background-repeat: no-repeat;
  border: 1px solid darkgreen;
  box-sizing: border-box;
  color: white;
  margin: 0;
  padding: 0;
}

header h1 {
  font-family: 'Assistant', sans-serif;
  margin-bottom: 0;
  margin-left: 1em;
}

header h2 {
  font-family: 'Assistant', sans-serif;
  font-style: italic;
  margin-left: 4em;
  margin-top: 0;
}

header>h1>a {
  text-decoration: none;
  color: #fff;
}

nav {
  float: right;
  margin: .7em 1.25em .3em 0;
  font-weight: 300;
}

#mobile-menu-icon {
  display: none;
}

nav ul {
  margin: 0;
  padding: 0;
}

nav li {
  background-color: rgba(255, 255, 255, .9);
  border: 1px solid darkblue;
  border-radius: .25em;
  display: inline;
  padding: .1em .2em;
}

nav a {
  text-decoration: none;
  color: blue;
}

nav li:hover {
  background-color: rgba(255, 255, 255, 1);
}

main {
  padding: 1em 20%;
}

main h1 {
  font-family: 'Assistant', sans-serif;
}

table {
  border-collapse: collapse;
  width: 100%;
}

caption {
  font-weight: bold;
  text-align: right;
}

td,
th {
  border: 1px solid black;
  padding: .3em;
}

tfoot td {
  text-align: right;
}

footer {
  background-color: rgba(0, 51, 0, .75);
  border: 1px solid darkgreen;
  clear: both;
  color: #fff;
  padding: 1em;
  text-align: right;
}

footer nav {
  display: inline;
  float: none;
}

footer a,
footer span {
  border-left: 1px solid white;
  color: white;
  padding: .2em 1em;
}

footer span:first-child {
  border: none;
}

footer a:hover {
  background-color: rgba(255, 255, 255, .1);
}

.clear {
  clear: both;
}

.disabled {
  color: #666;
}

tfoot.pagination td {
  border: none;
}

tfoot.pagination td:first-child {
  text-align: left;
}

/* Forms */
main.narrow {
  margin: auto;
  max-width: 400px;
}

label {
  display: block;
  font-family: Arial;
  font-size: 1.5em;
  margin: .3em 0;
}

fieldset label,
label.inline {
  display: inline;
  font-size: .9em;
}

input,
textarea {
  border: 1px solid #333;
  border-bottom: 4px solid #000;
  box-sizing: border-box;
  font-size: 1.3em;
  margin: 0;
  padding: .1em;
  width: 100%;
}

input[type='password'] {
  border-bottom-width: 1px;
  margin-bottom: .5em;
}

fieldset select,
input[type='number'],
input[type='radio'] {
  display: inline;
  margin: 0 1em;
  width: auto;
  border-bottom-width: 1px;
}

input[type='checkbox'] {
  display: inline;
  width: auto;
}

fieldset {
  border: 1px solid #333;
  border-bottom: 4px solid #000;
  margin: .5em 0;
  padding: 1em;
}

fieldset legend {
  font-size: 1.5em;
}

select {
  font-size: 1.3em;
  width: 100%;
}

textarea {
  height: 8em;
  width: 100%;
}

main.narrow button {
  float:right;
  font-size: 1.5em;
  margin: .3em;
}

button.wide {
  box-sizing: border-box;
  float: none;
  font-size: 1.5em;
  margin: .3em 0;
  width: 100%;
}

.error {
  color: #f00;
}

.success {
  color: #4CAF50;
}

/* Poems */
#poems form {
  margin-top: 1em;
  max-width: 200px;
}
#poems form label {
  font-size: 1em;
}

#poems label {
  font-size: 1em;
  font-weight: bold;
}

#poems select {
  font-size: 1em;
}

#poems table {
  clear: both;
}

#admin-poems .pending-approval,
#poems .pending-approval {
  background-color: #ffe;
  color: #666;
  font-style: italic;
}

/* Poem */
article.poem {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.4em;
  line-height: 1.3;
  margin: 1.2rem;
}

#poem h1,
#poem-edit h1 {
  margin: .5rem 0;
}

#poem-edit-menu {
  margin-left: 1rem;
}

#poem nav {
  float: none;
}

#poem nav li {
  background-color: none;
  border: none;
  display: inline;
  padding: .1em .2em;
}

#poem nav a:hover {
  text-decoration: underline;
}

#poem nav i {
  color:silver;
  margin-left: 1em;
}

#approval-status,
#submission-status {
  font-size: .8em;
  margin: .5em 1em;
}

#approval-status a,
#submission-status a {
  background-color: #eef;
  border: 1px solid black;
  border-radius: .25em;
  padding: 0 .5em;
  text-decoration: none;
}

#approval-status a:hover,
#submission-status a:hover {
  background-color: #ddf;
}

#approval-status a:first-child,
#submission-status a:first-child {
  margin-left: .5em;
}

/* Admin Pages */

#admin-nav {
  float: none;
  margin-bottom: 1em;
}

#admin-nav li {
  border: none;
}

#admin-nav-header {
  margin-bottom: 0;
  padding-bottom: 0;
}

#admin-nav a:hover {
  text-decoration: underline;
}

/* Submit / Edit Poem */
#poem-edit textarea,
#poem-submit textarea {
  height: 12em;
}
/* Menu for Mobile */
@media (max-width: 960px) {
  #poem nav li {
    display: block;
  }
}


/* Menu for Mobile */
@media (max-width: 800px) {
  body {
    font-size: .9em;
  }

  main {
    padding: 1em 1em;
    overflow-x: scroll;
  }

  header nav {
    float: none;
    margin: 0;
    padding: 0;
  }

  header nav ul {
    display: none;
    margin: 0;
    padding: 0;
  }

  header nav li {
    display: block;
  }

  #mobile-menu-icon {
    display: block;
    cursor: pointer;
  }

  header nav li:hover {
    background-color: #ddd;
    color: black;
  }

  header nav li.active {
    background-color: #4CAF50;
    color: white;
  }

  footer {
    text-align: center;
  }
  
  footer nav {
    display: block;
    margin: 1em auto;
  }
  
  footer nav a {
    border: 1px solid white;
    border-radius: .25em;
  }
}

/* Error Pages */

#doh {
  background-image: url(../images/doh.jpg); /* https://pixabay.com/en/boy-facepalm-child-youth-666803/ */
}

#page-not-found {
  background-image: url(../images/lost.jpg); /* https://pixabay.com/en/lost-women-woman-female-girl-2607118/ */
}

#doh,
#page-not-found {
  background-position: center top;
  background-repeat: no-repeat;
  background-size: cover;
  color: #fff;
  min-height: 500px;
}

#doh article,
#page-not-found article {
  background-color: rgba(0, 0, 0, .25);
  max-width: 18em;
  padding: .5em;
}

/* Demos */
.pre {
  border: 1px solid silver;
  font-family: 'Courier New', Courier, monospace;
  margin: 0;
  padding: 2em;
  white-space: pre-wrap;
}

output {
  font-size: 2em;
}

.callout {
  border: 1px solid #ddd;
  border-radius: 1em;
  padding: .5em;
  background-color: #ffe;
}