/**
 *  Variables
 */
:root {
    --body-colour: #222;
    --heading-colour: #333;
    --background-colour: #d6f8d6;
    --secondary-bg-colour: #7fc6a4;
    --accent-colour: #d05353;
    --foreground-colour: rgba(255, 255, 255, 0.9);
    --entry-colour: #fdfdfd;
    --transparency: 0.9;
}


/**
 *  Generic types
 */
html {
    /* Prevents centred element from moving around
        when the scrollbar pop up */
    width: 100vw;
    overflow-x: hidden;
    margin: 0px, 0px;
    padding: 0px, 0px;
}

h1, h2, h3 {
    line-height: 1.2;
    color: var(--heading-colour);
    font-family: sans-serif;
}

a {
    color: var(--accent-colour);
    font-weight: bold;
    text-decoration: none;
}


/**
 *  Custom Types
 */
.main {
    min-height: 90vh;
    margin: 0px auto;
    padding: 30px 4%;
    max-width: 650px;
    font-family: sans-serif;
    color: var(--body-colour);
    background-color: var(--foreground-colour);
    font-size: 1em;
}

.navbar {
    display: flex;
    flex-direction: row;
    justify-content: space-around;
}

.list-entry {
    border-radius: 20px;
    background-color: var(--entry-colour);
    box-shadow: 0px 6px rgb(0, 0, 0, 0.2);
    padding: 20px 25px;
    margin: 20px 0px;
}

.taglist {
    margin-top: 5px;
}

.taglist__tag {
    text-decoration-style: dotted;
    font-size: 0.9rem;
    margin-left: 10px;
}

.sortby {
    font-size: 0.9rem;
    font-style: italic;
}

.sortby__back {
    float: right;
}

.searchbar {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
}

.spaced-buttons {
    margin-top: 10px;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-between;
}

.editform {
    position: relative;
    padding-bottom: 60px;
}

.editform__label {
    font-size: 0.8rem;
    display: block;
    margin-bottom: 2px;
}

.longfield {
    width: 100%;
    margin-bottom: 10px;
}

.editform__field {
    margin-bottom: 10px;
}

.editform__left-button {
    position: absolute;
    bottom: 15px;
    left: 25px;
}

.editform__right-button {
    position: absolute;
    bottom: 15px;
    right: 25px;
}

.editform__cancel {
    float: right;
    margin-bottom: 10px;
}

.spacer {
    height: 20px;
}

.pager {
    text-align: center;
}

textarea.wide {
    width: 100%;
    margin-bottom: 20px;
}

.keyname {
    margin: 6px 0px;
}

.login-failed {
  animation: fadeIn linear 0.5s;
  -webkit-animation: fadeIn linear 0.5s;
  -moz-animation: fadeIn linear 0.5s;
  -o-animation: fadeIn linear 0.5s;
  -ms-animation: fadeIn linear 0.5s;
}

.tag-info {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
}


/**
 *  Verbose, fancy stuff
 */

/* old background
 * body {
 *     background: linear-gradient(90deg, rgba(255, 225, 132, .7) 50%, rgba(255,255,255, 0) 50%),
 *     linear-gradient(90deg, rgba(32, 113, 120, .3) 50%, rgba(255,255,255, 0) 50%),
 *     linear-gradient(90deg, rgba(255, 150, 102, .3) 50%, rgba(255,255,255, 0) 50%),
 *     linear-gradient(90deg, rgba(23, 76, 79, .1) 50%, rgba(255,255,255, 0) 50%);
 *     background-size: 7em 7em, 5em 5em, 3em 3em, 1em 1em;
 *     background-color: #F5E9BE;
 * }
 */

body {
    background-color: var(--background-colour);
    /*background-image: radial-gradient(currentColor 1px, transparent 1px), radial-gradient(currentColor 1px, transparent 1px);
     *background-size: calc(20 * 1px) calc(20 * 1px);
     *background-position: 0 0, calc(10 * 1px) calc(10 * 1px);
     */
    background-image: repeating-linear-gradient(45deg, var(--secondary-bg-colour) 25%, transparent 25%, transparent 75%, var(--secondary-bg-colour) 75%, var(--secondary-bg-colour)), repeating-linear-gradient(45deg, var(--secondary-bg-colour) 25%, transparent 25%, transparent 75%, var(--secondary-bg-colour) 75%, var(--secondary-bg-colour));
    background-position: 0 0, 100px 100px;
    background-size: calc(2 * 100px) calc(2 * 100px);
}

button.linkbutton {
    font: inherit;
    color: var(--accent-colour);
    font-weight: bold;

    align-items: normal;
    background-color: rgba(0,0,0,0);
    border-color: rgb(0, 0, 0, 0);
    border-style: none;
    box-sizing: content-box;
    cursor: pointer;
    display: inline;
    height: auto;
    padding: 0;
    perspective-origin: 0 0;
    text-align: start;
    transform-origin: 0 0;
    width: auto;
    -moz-appearance: none;
    -webkit-logical-height: 1em; /* Chrome ignores auto, so we have to use this hack to set the correct height  */
    -webkit-logical-width: auto; /* Chrome ignores auto, but here for completeness */
}

hr {
    width: 50%;
    margin: 2em auto;
}

@keyframes fadeIn {
  0% {opacity:0;}
  100% {opacity:1;}
}

@-moz-keyframes fadeIn {
  0% {opacity:0;}
  100% {opacity:1;}
}

@-webkit-keyframes fadeIn {
  0% {opacity:0;}
  100% {opacity:1;}
}

@-o-keyframes fadeIn {
  0% {opacity:0;}
  100% {opacity:1;}
}

@-ms-keyframes fadeIn {
  0% {opacity:0;}
  100% {opacity:1;}
}
