:root {
    --theme-color: #2e74b3;
    --hover-background-color: #ddd;
    --line-color: #aaa;
    --border-radius: 5px;
}

body {
    font-family: sans-serif;
    overflow-y: scroll; /* always show scrollbar to prevent content jumps */
}

body > * {
    width: 35rem;
    max-width: 95%;
    margin: auto;
}

input, select, button {
    font: inherit;
    border: 1px solid var(--line-color);
    border-radius: var(--border-radius);
    padding: 0.5rem;
}

input, select, button, a {
    outline-color: var(--theme-color);
}

button:active {
    background-color: var(--theme-color);
    color: white;
}

select {
    width: 10rem;
}

select.filter-active {
    color: white;
    background-color: var(--theme-color);
}

/* Site header */

header > h1 {
    font-size: 2.7rem;
    margin-right: 1rem;
    color: var(--theme-color);
}

header > * {
    display: inline-block;
}

header p {
    margin: 0;
    color: #555;
}

/* Search and filter section */

#searchBox {
    width: 100%;
}

#filters {
    margin-bottom: 1rem;
}

#filters > div {
    padding: 0.5em 0;
}

/* Song list */

#songlist a {
    display: block;
    color: inherit;
    padding: 0.5em;
    text-decoration: none;
    border-radius: var(--border-radius);
}

#songlist a:hover {
    background-color: var(--hover-background-color);
}

/* Song details dialog */

#songDetailsLinks a {
    padding: 1em 0;
    margin-right: 0.5em;
    color: var(--theme-color);
    text-decoration: none;
}

#songDetailsLinks a:hover {
    text-decoration: underline;
}

dialog {
    position: fixed;
    border: none;
    border-radius: var(--border-radius);
    box-shadow: 0px 10px 15px -3px rgba(0,0,0,0.1);
    box-sizing: border-box;
    min-width: 50%;
    min-height: 60%;
}

dialog h1 {
    font-size: 1.5rem;
    font-weight: normal;
    border-bottom: 1px solid var(--line-color);
    padding-right: 2.5rem; /* space for close button */
}

dialog .close {
    position: absolute;
    top: 0.5em;
    right: 0.75em;
    padding: 0.25em 0.5em;
    cursor: pointer;
    font-weight: bold;
    font-size: 1.5rem;
    border-radius: var(--border-radius);
}

dialog .close:hover {
    background: var(--hover-background-color);
}

.tagsContainer {
    display: flex;
    gap: 0.5em;
}

.tag {
    background-color: #ddd;
    border-radius: 0.5em;
    padding: 0.3em;
}