body {
    color: #404040;
    font: 400 15px/22px 'Source Sans Pro', 'Helvetica Neue', sans-serif;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
}

* {
    box-sizing: border-box;
}

h1 {
    font-size: 32px;
    margin: 0;
    font-weight: 400;
    line-height: 20px;
    padding: 20px 2px;
}

table tr:last-child {
    border-bottom: none;
}

td {
    vertical-align: top;
}

tr  {
    border-bottom: solid 1px gray;
}

.banner {
    border-bottom: solid 2px green;
    text-align: center;
}

.grid-for-place {
    display: grid;
    grid-gap: 0;
    grid-template-areas:
    'header header header'
    'image image image'
    'map map map';
    grid-template-rows: 30px 120px auto;
    grid-template-columns: 400px auto;
    height: calc(100vh - 132px);
}

.grid-for-place-no-image {
    display: grid;
    grid-gap: 0;
    grid-template-areas:
    'header header header'
    'map map map';
    grid-template-rows: 30px auto;
    grid-template-columns: 400px auto;
    height: calc(100vh - 132px);
}

.grid-for-waypoint {
    display: grid;
    grid-gap: 0;
    grid-template-areas:
    'header header header'
    'items title image'
    'items map map';
    grid-template-rows: 30px 120px auto;
    grid-template-columns: 400px 400px auto;
    height: calc(100vh - 132px);
}

.grid-header {
    grid-area: header;
    background-color: #ece3ca;
    font-size: 20px;
    padding: 4px 0 8px 12px;
}

.grid-image {
    grid-area: image;
}

.grid-image img {
    max-height: 100%;
    margin-right: 8px;
}

.grid-items {
    grid-area: items;
    background-color: #f1f1f1;
}

.grid-map {
    grid-area: map;
    xmargin-top: 8px;
}

.grid-title {
    grid-area: title;
    overflow: hidden;
    padding: 8px;
    margin-right: 8px;
    background-color: #EBEEF0;
}

.grid-title a {
    text-decoration: underline;
}

.heading {
    background: #fff;
    border-bottom: 1px solid #eee;
    line-height: 18px;
    padding: 0 10px;
    overflow-wrap: anywhere;
}

.heading label {
    font-weight: bold;
    font-size: 20px;
}

.images {
    display: flex;
}

.item {
    box-sizing: border-box;
    border-bottom: 3px solid #eee;
    padding: 4px;
    text-decoration: none;
    height: 70px;
    overflow: hidden;
    background-color: white;
}

.item:hover {
    background-color: #edf3ff;
}

.item:last-child {
    border-bottom: none;
}

.item.active {
    background-color: #bad7f8;
}

.item-list {
    height: 100%;
    overflow: auto;
    padding-bottom: 60px;
}

.item .title {
    display: block;
    color: #333;
    font-weight: 700;
}

.item a {
    text-decoration: none;
}

#map {
    height: 100%;
}

.mapboxgl-popup-close-button {
    display: none;
}

.mapboxgl-popup-content {
    font: 400 15px/22px 'Source Sans Pro', 'Helvetica Neue', sans-serif;
    padding: 0;
    min-width: 540px;
    max-width: 640px;
}

.mapboxgl-popup-content h3 {
    background: #0756ac;
    color: #fff;
    margin: 0;
    padding: 10px;
    border-radius: 3px 3px 0 0;
    font-weight: 700;
    margin-top: -15px;
}

.mapboxgl-popup-content h4 {
    margin: 0;
    padding: 10px;
    font-weight: 400;
}

.mapboxgl-popup-anchor-top > .mapboxgl-popup-content {
    margin-top: 15px;
}

.mapboxgl-popup-anchor-top > .mapboxgl-popup-tip {
    border-bottom-color: #91c949;
}

.mapboxgl-popup-anchor-top .mapboxgl-popup-tip,
.mapboxgl-popup-anchor-top-left .mapboxgl-popup-tip,
.mapboxgl-popup-anchor-top-right .mapboxgl-popup-tip {
    border-bottom-color: #0756ac;
}
.mapboxgl-popup-anchor-bottom .mapboxgl-popup-tip,
.mapboxgl-popup-anchor-bottom-left .mapboxgl-popup-tip,
.mapboxgl-popup-anchor-bottom-right .mapboxgl-popup-tip {
    border-top-color: #0756ac;
}
.mapboxgl-popup-anchor-left .mapboxgl-popup-tip {
    border-right-color: #0756ac;
}
.mapboxgl-popup-anchor-right .mapboxgl-popup-tip {
    border-left-color: #0756ac;
}

.marker,
.marker-mention,
.marker-multiple,
.marker-person,
.marker-place,
.marker-event {
    border: none;
    cursor: pointer;
    height: 32px;
    width: 32px;
    background-repeat: no-repeat;
}

.marker-event {
    background-image: url(images/event.png);
}

.marker-mention {
    background-image: url(images/mention.png);
}

.marker-multiple {
    background-image: url(images/multiple.png);
}

.marker-person {
    background-image: url(images/person.png);
}

.marker-place {
    background-image: url(images/place.png);
}

.mapboxgl-popup {
    padding-bottom: 50px;
}

.page-wrapper {
    margin: 12px 12px;
}

.person-name {
    font-weight: bold;
    font-style: italic;
}

.person-family {
    font-style: italic;
    margin-left: 8px;
}

.place-start,
.place-end {
    width: 24px;
}

.popup-category {
    font-weight: bold;
}

.popup-content {
    max-height: 300px;
    padding: 8px;
    overflow: auto;
}

.popup-item-title {
    font-weight: bold;
}

.popup-subtitle {
    display: flex;
    justify-content: space-between;
    padding: 8px 8px 0 8px;
    color: #0756ac;
}

.popup-table {
    border-collapse: collapse;
    width: 100%;
}

.popup-table-date {
    padding-right: 8px;
}

.popup-table-link {
    text-align: right;
    padding-right: 8px;
}

.popup-table-link a {
    text-decoration: none;
}

.popup-table-type {
    padding-right: 12px;
}

.popup-url {
    color: #0756ac;
    text-decoration: underline;
    outline: none;
}

#timeline {
    width: 98%;
}

.places-header {
    margin: 8px 0 8px 0;
    font-size: 24px;
}

.timeline-header {
    margin: 8px 0 8px 8px;
    font-size: 24px;
}

.topnav {
    background-color: #333;
    overflow: hidden;
}

.topnav a {
    float: left;
    color: #f2f2f2;
    text-align: center;
    padding: 6px 16px;
    text-decoration: none;
    font-size: 17px;
}

.topnav a:hover {
    background-color: #ddd;
    color: black;
}

.topnav a.active {
    background-color: #04AA6D;
    color: white;
}

.waypoint-list {
    overflow: auto;
    cursor: pointer;
    font-size: 15px;
    line-height: 20px;
    padding: 4px 4px;
    user-select: none;
}

.waypoint,
.place {
    cursor: pointer;
    display: flex;
    column-gap: 16px;
}

.waypoint:hover {
    background-color: #bad7f8;
}

.waypoint-id,
.waypoint-count {
    text-align: right;
    min-width: 32px;
}

.waypoint-start,
.waypoint-end {
    min-width: 32px;
}

.waypoint-name {
    overflow-wrap: anywhere;
}

.waypoint-item-date {
}

.waypoint-item-place {

}

.waypoint-item-warning {
    color: red;
}

#waiting {
    display: none;
    flex-direction: column;
    align-items: center;
    color: black;
    font-weight: bold;
    width: 200px;
    padding: 20px;
    position: fixed;
    top: 30vh;
    left: calc(50vw - 122px);
    border: solid 2px #999;
    background-color: #EBEEF0;
    box-shadow: 6px 9px 7px 0 #9e9e9e99;
}

#waiting div {
    margin-bottom: 8px;
}
