:root {
    --female-color: #e99;
    --male-color: #88e;
}

h1,
p,
table,
div {
    font-family: sans-serif;
}

table.resulttable,
table.resulttable tr,
table.resulttable th,
table.resulttable td {
    border: solid 1px black;
    padding: 5px;
}

.topicwikidata a {
    font-size: 0.8em;
    color: #666;
}

.numeric {
    text-align: right;
}

table.resulttable {
    border-collapse: collapse;
    margin-bottom: 0.8em;
}

table.resulttable tr.tableheader {
    background-color: #ddd;
}

div#userinput {
    margin-bottom: 0.8em;
}

input#namefind,
input#itemfind {
    font-size: 1.5em;
    margin-right: 1em;
}

span#copylink a {
    font-size: 1.6em;
    text-decoration: none;
    display: none;
}

#maplinks a {
    text-decoration: none;
}

div#betaboilerplate,
div.drlink {
    border: 3px dashed black;
    background-color: #ee5;
    border-radius: 30px;
    padding: 20px;
    margin-top: 20px;
    padding-top: 0px;
    padding-bottom: 0px;
}

sup a {
    text-decoration-style: dashed;
}

.copyright,
.stats {
    font-size: 0.7em;
}

.mapToLink,
.featuretype {
    text-align: center;
}

.mapToLink span {
    cursor: pointer;
}

.localsearch {
    font-style: italic;
}

.popupbirthdeath {
    font-size: 0.8em;
    color: #666;
}

h1.popupplacename {
    font-size: 1rem;
    /* Restrict h1 to one line */
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.popupitemname {
    font-weight: bold;
}

.place-popup .leaflet-popup-content-wrapper {
    background: linear-gradient(180deg, rgb(169, 200, 255) 40px, rgba(255, 255, 255, 1) 40px);
}

#map {
    margin-top: 2px !important;
}

div#maplinks {
    display: flex;
    justify-content: space-between;
}

div#userinput {
    display: flex;
    justify-content: space-between;
}

.location-loader {
    width: 16px;
    height: 16px;
    display: inline;
    margin: 10px auto;
    box-sizing: border-box;
    position: relative;
    transform: scale(0.5);
}

.location-loader::after {
    content: '';
    box-sizing: border-box;
    width: 16px;
    height: 16px;
    left: 0;
    bottom: 0;
    position: absolute;
    border-radius: 50% 50% 0;
    border: 6px solid #8d0000;
    transform: rotate(45deg) translate(0, 0);
    box-sizing: border-box;
    animation: animMarker 0.4s ease-in-out infinite alternate;
}

.location-loader::before {
    content: '';
    box-sizing: border-box;
    position: absolute;
    left: 0;
    right: 0;
    margin: auto;
    top: 150%;
    width: 24px;
    height: 4px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.2);
    animation: animShadow 0.4s ease-in-out infinite alternate;
}

@keyframes animMarker {
    0% {
        transform: rotate(45deg) translate(3px, 3px);
    }

    100% {
        transform: rotate(45deg) translate(-3px, -3px);
    }
}

@keyframes animShadow {
    0% {
        transform: scale(0.5);
    }

    100% {
        transform: scale(1);
    }
}

.ui-autocomplete {
    max-height: 600px ! important;
    max-width: 300px ! important;
    overflow-y: auto ! important;
    /* prevent horizontal scrollbar */
    overflow-x: hidden ! important;
    font-size: 0.8em ! important;
    margin-right: 30px ! important;
}

.autoitemblock .autoitemname {
    font-weight: bold;
}

.autoitemblock .autoitemdetails {
    margin-left: 0.5rem;
    font-size: 0.8rem;
}

.persondetails {
    margin-left: 2.4rem;
    font-size: 0.9rem;
}

#arrondissementstats {
    float: left;
    margin-right: 3em;
}

#arrondissementstats thead tr {
    cursor: pointer;
}

#singlearrondissement {
    float: left;
}

#arrondissementstats tfoot tr {
    border-top: solid 2px black;
    border-bottom: solid 2px black;
    text-align: left;
}

#arrondissementstats tbody tr:hover {
    background-color: #f0f0f0;
}

#arrondissementstats tbody tr.active {
    background-color: #d0e0f0;
}

div.clear {
    clear: both;
}

.percentage-cell {
    position: relative;
    background: linear-gradient(to right,
            var(--female-color) calc(var(--female-percentage, 0) * 1%),
            var(--male-color) calc(var(--female-percentage, 0) * 1%));
    color: black;
    text-align: center;
    font-weight: bold;
}

.percentage-cell::after {
    content: '';
    display: block;
    height: 100%;
    width: 100%;
    position: absolute;
    top: 0;
    left: 0;
    z-index: -1;
    background: none;
}

.percentage-cell[data-female-percentage="0"][data-male-percentage="0"] {
    background: #ccc;
}

.female-color {
    background-color: var(--female-color);
}

.male-color {
    background-color: var(--male-color);
}