* {
  box-sizing: border-box;
}

:root {
  --brandprimary: goldenrod;
  --brandprimarylight: gold;
  --brandsecondary: rgb(119, 223, 119);
  --brandsecondarydark: rgb(43, 69, 43);
  --black: rgb(61, 61, 59);
  --white: rgb(246, 245, 207);
  --lightgrey: lightgrey;
  --grey: grey;
  --transparentgrey: #99999933;
}

main {
  min-height: 70vh;
}

body {
  color: var(--black);
}

.flexrow {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
  gap: 1em;
}

ul.cards {
  list-style: none;
  padding-left: 0;
}

ul.cards li {
  background-color: var(--brandsecondary);
  border-radius: 5px;
  padding: 0 1em 0.5em 1em;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 350px;
}

ul.cards li p {
  margin: 0.3em 1em 1em;
}

ul.cards li h3 {
  margin-bottom: 0;
}

ul.cards li img {
  width: 150px;
  max-width: 150px;
  height: auto;
}

body>header {
  display: flex;
  flex-direction: column;
  background: var(--brandprimarylight);
  color: var(--black);
  padding: 1em 0.5em 0;
}

body>footer {
  padding: 1em;
  background: var(--brandprimarylight);
  color: var(--black);
  text-align: center;
}

.topbar {
  display: flex;
  width: 100%;
  justify-content: space-between;
}

body>header a {
  color: grey;
}

body>header nav ul {
  list-style: none;
  display: flex;
  gap: 0.5em;
  justify-content: center;
}

body>header nav li {
  padding: 0.4em;
  border: 1px solid grey;
}

body>header #loginbutton {
  background-color: var(--brandsecondary);
}

div.index.flexrow button#signup {
  padding: 1em;
  border-radius: 15px;
  margin: auto;
  display: block;
  margin-top: 2em;
  font-weight: bold;
  color: var(--black);
}

/*
Index
*/
.index.flexrow div {
  flex: 1;
}

.index.flexrow img {
  width: 400px;
  max-width: 90vw;
  height: auto;
  border-radius: 10px;
}

/*
HEADINGS
*/
main>h1,
main>h2,
main>h3,
main>h4 {
  width: 100%;
  text-align: center;
}


/*
BUTTONS
*/
button,
input[type=submit] {
  padding: 0.5em;
  border: none;
  border-radius: 2px;
  background-color: var(--brandprimarylight);
}


/*
Dashboard
*/
ul.subscription_list,
ul.class_list {
  list-style: none;
  padding-left: 0;
}

ul.subscription_list li,
ul.class_list li {
  display: flex;
  flex-direction: row;
  padding: 1em;
  border: 1px solid var(--lightgrey);
  border-radius: 5px;
}

ul.subscription_list li p span {
  color: var(--grey)
}

.subscriptionitem {
  background: var(--transparentgrey);
  color: var(--grey);
  padding: 1em;
}

.subscriptionitem.active {
  background: none;
  color: var(--black);
}

/*
ADMIN
*/
ul#library_content {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  padding-left: 0;
  align-items: flex-start;
  gap: 0.5em;
}

ul#library_content li .libraryitem,
li .libraryitem {
  padding: 0 1em;
  border: 1px solid var(--grey);
  border-radius: 5px;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 450px;
}

ul#library_content li .libraryitem figure {
  display: flex;
  flex-direction: column;
  align-items: center;
  border: 1px solid var(--lightgrey);
  border-radius: 5px;
}

ul#library_content li .libraryitem figure figcaption {
  background-color: var(--lightgrey);
  width: 100%;
  padding: 0.5em 2em;
}

table.user_admin td {
  padding: 0.3em;
  border: 1px solid var(--grey);
}

table.user_admin thead {
  background-color: var(--lightgrey);
  font-weight: bold;
}

/*
FORMS
 */

form#libraryadmin fieldset,
form#login fieldset {
  width: 100%;
  text-align: right;
}

form label,
form label {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  margin-bottom: 0.5em;
  color: var(--brandsecondarydark);
}

/*
DIALOG
*/

dialog {
  min-width: 400px;
}

dialog #dlg_content {
  padding: 1em 0.5em;
}


dialog#simpleconfirmdlg header {
  display: flex;
  justify-content: space-between;
}

dialog#simpleconfirmdlg footer,
#dlg_header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

#dlg_header {
  border-bottom: 1px solid var(--grey);
}

#dlg_footer,
dialog footer {
  border-top: 1px solid var(--grey);
  display: flex;
  justify-content: space-between;
  padding-top: 0.8em;
}

dialog#main h2 {
  display: flex;
  flex-direction: column;
}

dialog#main h2 span {
  color: var(--grey);
  font-size: smaller;
}

img {
  max-width: 100%;
  height: auto;
}

ul.flashes {
  list-style: none;
  padding: 2em;
  border: 2px dashed var(--brandprimary);
  border-radius: 10px;
  font-size: larger;
  font-weight: bold;
  color: var(--black);
}

@media screen and (min-width: 1024px) {
  p {
    font-size: 1.2em;
  }
}
