:root {
    --border: 1px solid black;
    --block-bg: #ffffff;
    --interactive-bg: #e9eaf5;
    --active-color: #c9ccec;
    --main-text-color: #2a0b0b;
    --main-width: 90%;
}
html {
    margin: 0;
    padding: 0;
}
body {
    width: var(--main-width);
    margin: 5% auto auto;
    font-family: sans-serif;
    background: #374085;
    color: var(--main-text-color);
}

/* Flash messages */
.flash {
    padding: 20px 10px;
    border-radius: 10px;
}
.flash.success {
    color: #158315;
    background: #cae5ca;
}
.flash.error {
    color: #B0413E;
    background: #e5caca;
}
.flash.notice {
    background: #e5e1ca;
    color: #837115;
}

/* Element defaults */
h1 {
    text-align: center;
    padding: 10pt;
}
h2 {
    margin: 0 0 0.5em;
    padding: 10px;
    font-size: 1.5em;
    font-weight: bold;
}
ul {
    list-style-type: none;
    padding: 0;
}
a {
    text-decoration: none;
    color: var(--main-text-color);
}
select, input, textarea {
    border: var(--border);
    padding: 5px;
    background: var(--interactive-bg);
    width: calc(100% - 12px);
    border-radius: 10px;
    color: var(--main-text-color);
}
select {
    width: 100%;
}
select:hover, select:focus, input:hover, input:focus, textarea:hover, textarea:focus {
    background: var(--active-color);
}
select:focus {
    border-bottom-right-radius: 0;
    border-bottom-left-radius: 0;
}
textarea {
    resize: none;
    height: 6em;
    min-width: 200px;
}
button {
    width: 100%;
    border: none;
    border-top: var(--border);
    padding: 10px;
    background: var(--block-bg);
    cursor: pointer;
    border-bottom-right-radius: 10px;
    border-bottom-left-radius: 10px;
    color: var(--main-text-color);
}
button:hover {
    background: var(--active-color);
}

/* Blocks */
.renovaid > * {
    background: var(--block-bg);
    border: var(--border);
    border-radius: 10px;
    margin: 30px 0;
}

/* Reusable styling */
.horizontal {
    padding: 0;
    display: flex;
    align-content: stretch;
    flex-wrap: wrap;
}
.horizontal > * {
    padding: 10px;
    flex-grow: 1;
}

.floating {
    position: fixed;
    width: var(--main-width);
    margin: 0;
}
.floating.bottom {
    bottom: 0;
}
.floating button {
    border-radius: 0;
}
.green {
    background: #cae5ca;
}
.green > * {
    color: #158315;
}
.yellow {
    background: #e5e1ca;
}
.yellow > * {
    color: #837115;
}
.red {
    background: #e5caca;
}
.red > * {
    color: #B0413E;
}
.strikethrough {
    color: #737373;
    text-decoration: line-through;
}

/* Menu */
.menu {
    padding: 0;
    display: flex;
}
.menu > * {
    width: 50%;
    border: var(--border);
    text-align: center;
    border-radius: 10px;
    margin: 10px;
    background: var(--interactive-bg);
}
.menu a {
    display: block;
    padding: 10px 0;
    width: 100%;
    border-radius: 10px;
}
.menu a:hover {
    background: var(--active-color);
}
.menu .current a:hover {
    background: var(--interactive-bg);
}

/* List */
.todos {
    padding: 20px;
    border: var(--border);
}
.todos > * {
    border: var(--border);
    margin: 10px 0;
    padding: 0;
    display: flex;
}
.todos > *:first-child {
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
}
.todos > *:first-child a {
    border-top-left-radius: 10px;
}
.todos > *:first-child .actions {
    border-top-right-radius: 10px;
}
.todos > *:last-child {
    border-bottom-left-radius: 10px;
    border-bottom-right-radius: 10px;
}
.todos > *:last-child a {
    border-bottom-left-radius: 10px;
}
.todos > *:last-child .actions {
    border-bottom-right-radius: 10px;
}
.todos a {
    display: block;
    min-width: calc(100% - 220px);
    width: calc(90% - 20px);
    padding: 10px;
    background: var(--interactive-bg);
}
.todos a:hover {
    background: var(--active-color);
}
.todos .actions {
    max-width: 250px;
    min-width: 130px;
    width: 20%;
    margin: 0;
    border-left: var(--border);
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
    background: var(--interactive-bg);
}
.todos .actions > * {
    border: var(--border);
    margin: 10px;
    width: calc(100% - 20px);
    text-align: left;
    border-radius: 10px;
}
.todos .none {
    width: 100%;
    padding: 10px;
    background: var(--interactive-bg);
    border-radius: 10px;
}

/* To-do  */
.since {
    font-size: small;
    float: right;
}
.description {
    font-style: italic;
    margin: 0 10px;
}
.attributes {
    display: flex;
    flex-wrap: wrap;
}
.attributes > * {
    border: var(--border);
    text-align: center;
    margin: 10px 1em;
    padding: 10px 1em;
    border-radius: 10px;
}

/* Floor Plan */
.floor-plan {
    margin: 20px;
    position: relative;
}
.floor-plan .plan {
    width: 100%;
    border-radius: 10px;
}
.floor-plan .pin {
    position: absolute;
    left: var(--x);
    bottom: calc(100% - var(--y));
}
.floor-plan .pinned {
    color: #B0413E;
    font-size: 5em;
    margin: 0 0 0 -0.5em;
    padding: 0;
}
.floor-plan a:hover .pinned {
    color: #c95f5d;
}
.floor-plan .pinned.small-pin {
    font-size: 3em;
}

/* Editing */
.edit .title {
    margin: 10px;
    padding: 10px;
    width: calc(100% - 40px);
    border: none;
    font-size: 1.5em;
    font-weight: bold;
}
.edit .description {
    width: calc(100% - 30px);
    border: none;
    font-family: sans-serif;
}
.edit > button {
    margin-top: 10px;
    border: none;
    border-bottom: var(--border);
}
.edit .remove, .edit .tag-ok {
    border: none;
    width: 1em;
    font-size: 1.2em;
    padding: 0;
    margin-left: 10px;
    border-radius: 10px;
}
.edit .tag-input {
    border: none;
    width: auto;
    margin: 0;
    padding: 0;
}

/* Adding locations */
.locate a {
    border: var(--border);
    padding: 10px;
    border-radius: 10px;
}
.location {
    display: none;
}
.location:target {
    display: block;
    margin: 0;
}
.location:target .plan {
    cursor: crosshair;
    border: none;
    padding: 0;
    display: none;
    width: 0;
    margin: auto;
}
.location:target .plan.w1500 {
    display: block;
    width: 1500px;
}
@media (max-width: 1900px) {
    .location:target .plan.w1500 {
        display: none;
        width: 0;
    }
    .location:target .plan.w1000 {
        display: block;
        width: 1000px;
    }
}
@media (max-width: 1300px) {
    .location:target .plan.w1500 {
        display: none;
        width: 0;
    }
    .location:target .plan.w1000 {
        display: none;
        width: 0;
    }
    .location:target .plan.w500 {
        display: block;
        width: 500px;
    }
}
@media (max-width: 640px) {
    .location:target .plan.w1500 {
        display: none;
        width: 0;
    }
    .location:target .plan.w1000 {
        display: none;
        width: 0;
    }
    .location:target .plan.w500 {
        display: none;
        width: 0;
    }
    .location:target .plan.w250 {
        display: block;
        width: 250px;
    }
}
