.title {
    max-width: 800px;
    margin: 0 auto 0 auto;
}

.title .subtitle {
    opacity: 0.6;
}

h1 {
    margin-bottom: 3px;
}

.description {
    margin: 0 auto 0 auto;
    max-width: 800px;
    text-align: justify;
}

/* Map with all places as markers */
.map {
    max-width: 800px;
    width: 100%;
    margin: 20px auto 20px auto;
    height: 400px;
}

/* Content of each node in the tree,
 * rendered by the rust backend */
.dough {
    position: relative;
    display: grid;
    grid-template-columns: auto;
    grid-template-rows: auto auto auto;
    grid-template-areas:
        "name"
        "content"
        "button";
}

.dough span {
    grid-area: name;
}

.modifiers {
    grid-area: button;
}

/* Add button on each tree node */
.addButton {
    font-size: 10px;
    width: 20px;
    height: 20px;
    border: none;
    cursor: pointer;
    background: aliceblue;
    float: right;
}

table {
    table-layout: fixed;
    text-align: left;
}

td {
    white-space: normal;
    overflow: auto;
    width: 100px;
}

/* Wrapper around the add form */
.add {
    max-width: 800px;
    margin: 0 auto 0 auto;
    overflow: auto;
}

form {
    width: 100%;
}

form .input {
    margin: 10px;
    display: grid;
    grid-gap: 5px;

    grid-template-columns: 1fr;
    grid-template-areas: "content";
}

form .place {
    margin: -5px 10px 10px 10px;
    grid-gap: 0px;
}

form .place .description {
    grid-area: content;
    opacity: 0.55;
}

form .input input, form .input select {
    height: min-content;
    min-height: 35px;
}

form .submit {
    margin: 10px;
}

form .submit button {
    float: right;
    min-height: 35px;
    margin: 5px;
}

/* Feedback field of the form */
.info {
    padding: 10px;
}

/* Coloring modifier */
.warning {
    background-color: rgb(207, 0, 15);
    color: white;
}

.selected {
    background-color: rgb(51, 110, 123);
    color: white !important;
}

.success {
    background-color: rgb(30, 130, 76);
    color: white !important;
}

/* Show two column layout on bigger devices */
@media screen and (min-width: 400px) {
    .input {
        grid-template-columns: 1fr 2fr;
        grid-template-rows: 1fr;
    }

    .place {
        grid-gap: 5px;
        grid-template-areas: "empty content";
    }
}

/* Tree related styling */
.tree {
    width: 80vw;
    margin: 0 auto 0 auto;
    overflow-x: auto;
}

@media screen and (min-width: 1000px) {
    .tree {
        width: 90vw;
    }
}

.tree ul {
    padding-top: 20px;
    position: relative;
    padding-left: 0px;
}

.tree li {
    text-align: center;
    list-style-type: none;
    position: relative;
    padding: 20px 0px 0 5px;
    display: inline-block;
    white-space: nowrap;
    vertical-align: top;
}

.tree li::before, .tree li::after{
    content: '';
    position: absolute; top: 0; right: 50%;
    border-top: 1px solid #ccc;
    width: 50%; height: 20px;
}

.tree li::after{
    right: auto; left: 50%;
    border-left: 1px solid #ccc;
}

.tree li:only-child::after, .tree li:only-child::before {
    display: none;
}

.tree li:only-child {
    padding-top: 0;
    padding-left: 0;
    width: 100%
}

.tree li:first-child::before, .tree li:last-child::after{
    border: 0 none;
}

.tree li:last-child::before{
    border-right: 1px solid #ccc;
    border-radius: 0 5px 0 0;
}
.tree li:first-child::after{
    border-radius: 5px 0 0 0;
}

.tree ul ul::before{
    content: '';
    position: absolute; top: 0; left: 50%;
    border-left: 1px solid #ccc;
    width: 0; height: 20px;
}

.tree li .node {
    border: 1px solid #ccc;
    padding: 5px 10px;
    text-decoration: none;
    color: #666;
    font-family: arial, verdana, tahoma;
    font-size: 12px;
    display: inline-block;
    border-radius: 5px;
    width: 120px;
}
