html, body {
    height: 100%;
    width: 100%;
    margin: 0;
    padding: 0;
    color: #242119;
    font-family: "new-order", sans-serif;
    font-weight: 400;
    font-style: normal;
}
body.internal { background-color: #ecede4; }
body.boilerplate { background-color: #e9ddc6; }

header {
    background-color: #e9ddc6;
    overflow: hidden;
    border-bottom: solid 36px #242119;
}
header.boilerplate {
    border: none;
}

header.internal {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    background-color: #ecede4;
    border-bottom: none;
    padding: 30px 100px;
}
header.internal h1 {
    font-family: "dunbar-tall", sans-serif;
    text-transform: uppercase;
    font-weight: 700;
    font-style: normal;
    font-size: 20px;
    width: 125px;
    text-align: left;
    margin: 0;
    text-decoration: none;
}
a.logo { text-decoration: none; }

#logo-container {
    width: 100%;
    max-width: min(70vw, 970px);
}
#logo-container.gallery-page {
    display: flex;
    flex-direction: row;
    justify-content: center;
    margin: 20px auto;
}

.header-links {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    width: 150px;
}

header.boilerplate .header-links {
    margin-left: auto;
    padding: 10px 10px 0 0;
    text-align: right;
}

.boilerplate-page-section {
    display: flex;
    flex-direction: row;
    justify-content: start;
    margin-top: 30px;
    max-width: min(70vw, 975px);
    margin-left: auto;
    margin-right: auto;
}
.page-section-header {
    display: flex;
    flex-direction: row;
    justify-content: end;
    writing-mode: sideways-lr;
    color: #242119;
    font-family: "dunbar-tall", sans-serif;
    font-weight: 700;
    font-style: normal;
    font-size: 25px;
    text-transform: uppercase;
    border-right: solid 10px #242119;
    padding: 0 10px 0 0;
    width: 30px;
}
.page-section-header.no-border {
    border-right: none;
    padding-right: 20px;
}
.page-section-content {
    padding-left: 15px;
    width: 65vw;
}
dl { margin-top: 0; }
dl dt { font-weight: bold; }
dl dd { margin-bottom: 10px; }

.logo-h1 {
    color: #242119;
    font-family: "dunbar-tall", sans-serif;
    font-weight: 700;
    font-style: normal;
}

.gallery-page .header-links {
    padding-top: 10px;
    padding-right: 10px;
    margin-left: auto;
    width: 150px;
}
.header-links a {
    color: #242119;
    text-align: center;
    font-family: "new-order", sans-serif;
    font-weight: 500;
    font-style: normal;
    font-size: 18px;
    text-decoration: none;
}

h1 {
    color: #242119;
    font-family: "dunbar-tall", sans-serif;
    font-weight: 700;
    font-style: normal;
}

.toggle-switch-container {
    text-align: right;
    padding: 0 10px 10px 0;
}
.toggle-switch {
    display: inline-flex;
    border: solid 2px #242119;
    border-radius: 20px;
    margin-left: auto;
}
.toggle-switch a {
    color: #242119;
    font-family: "new-order", sans-serif;
    font-weight: 500;
    font-style: normal;
    font-size: 18px;
    text-decoration: none;
    padding: 5px 10px;
}
.toggle-switch .active {
    background-color: #ecede4;
    border-radius: 20px;
}
.toggle-switch .active.left { border-right: solid 2px #242119; }
.toggle-switch .active.right { border-left: solid 2px #242119; }

.hidden { display: none!important; }

.filter-and-gallery-container {
    display: grid;
    grid-template-columns: minmax(0, 300px) 1fr;
    gap: 36px;
    background-color: #242119;
    min-height: 100%;
}

#filter-div {
    background-color: #ecede4;
    padding: 20px;
}

#gallery-search-box {
    border: 2px solid #242119;
    border-radius: 25px;
    padding: 6px 15px;
    font-family: "new-order", sans-serif;
    font-weight: 400;
    font-style: normal;
    font-size: 20px;
    outline: none;
    width: 90%;
    margin-bottom: 30px;
}
#gallery-search-box::placeholder { color: #242119; }

#filter-indicator-div {
    margin-bottom: 20px;
}
.filter-indicator {
    color: #ecede4;
    border-radius: 20px;
    padding: 5px 12px;
    font-size: 16px;
    font-family: "new-order", sans-serif;
    font-weight: 400;
    font-style: normal;
    align-items: center;
    gap: 4px;
    display: inline-flex;
    justify-content: center;
}
.filter-indicator.yellow { background: #cba52a; }
.filter-indicator.red { background: #eb5534; }
.filter-indicator.blue { background: #4d82a1; }

.icon-button {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    color: inherit;
    display: inline-flex;
}
.filter-share-button {
    vertical-align: top;
}

.facet-list, .gallery {
    display: flex;
    flex-direction: row;
    margin-bottom: 30px;
}

.facet-list-header, .gallery-header {
    display: flex;
    flex-direction: row;
    gap: 8px;
    flex-wrap: nowrap;
    justify-content: end;
    writing-mode: sideways-lr;
    color: #242119;
    font-family: "new-order", sans-serif;
    font-weight: 500;
    font-style: normal;
    font-size: 25px;
    white-space: nowrap;
    padding-right: 10px;
}

.facet-list-content {
    color: #242119;
    max-height: 40vh;
    overflow-y: auto;
}

.facet-list-content a {
    color: #242119;
    text-decoration: none;
    font-family: "new-order", sans-serif;
    font-weight: 400;
    font-style: normal;
    display: block;
    margin-bottom: 10px;
    margin-left: 20px;
    text-indent: -20px;
}

.count-badge {
    background-color: #242119;
    color: #ecede4;
    border-radius: 50%;
    padding: 5px;
    font-size: 10px;
    vertical-align: middle;
    display: inline-block;
    text-indent: 0;
    min-width: 12px;
    text-align: center;
}
.facet-list-header .count-badge, .gallery-header .count-badge {
    font-size: 16px;
    writing-mode: horizontal-tb;
}

#gallery-div {
    background-color: #e9ddc6;
    padding: 20px;
}

#splash-div {
    background-color: #ecede4;
    padding: 0;
    border: solid 2px #242119;
    margin-bottom: 20px;
}
#splash-controls {
    height: 20px;
    padding: 2px 2px 0 0;
    display: flex;
    flex-direction: row;
    justify-content: end;
}
#splash-div p { margin: 0 20px 20px 20px; }

.link-button {
    text-decoration: none;
    background-color: #242119;
    color: #ecede4;
    border-radius: 20px;
    padding: 5px 10px;
    font-size: 15px;
    text-align: center;
}

#galleries {
    margin: 0;
    padding: 0;
    width: 100%;
    min-height: 100%;
}

.gallery {
    max-height: 100vh;
    overflow-y: scroll;
    padding-bottom: 20px;
}
.gallery.height-restricted {
    max-height: 60vh;
}
.gallery.yellow { border-bottom: solid 4px #cba52a; }
.gallery.red { border-bottom: solid 4px #eb5534; }
.gallery.blue { border-bottom: solid 4px #4d82a1; }

.gallery-header {
    position: sticky;
    top: 0;
    font-size: 30px;
}
.gallery-header .count-badge {
    font-size: 20px;
}
.gallery-content {
    display: grid;
    gap: 10px;
    grid-template-columns: 1fr;
    width: 100%;
    height: 100%;
}
.gallery-content.map {
    gap: 30px;
}
@media (min-width: 768px) {
    .gallery-content:not(.map) {
        grid-template-columns: repeat(3, 1fr);
    }
}
@media (min-width: 1024px) {
    .gallery-content:not(.map) {
        grid-template-columns: repeat(5, 1fr);
    }
}
.gallery-pane {
    position: relative;
    overflow: hidden;
}
.gallery-pane.map { aspect-ratio: 16 / 9; }
.gallery-pane:not(map) {
    aspect-ratio: 1;
}
.gallery-pane img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.2s ease, filter 0.2s ease;
    cursor: pointer;
}
.gallery-pane img:hover {
    transform: scale(1.05);
    filter: brightness(1.1);
}
.gallery-pane .tray {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;

    background: rgba(0, 0, 0, 0.65);
    color: #fff;
    font-size: 19px;
    padding: 10px 14px;

    /* Start hidden below the card */
    transform: translateY(100%);
    transition: transform 0.28s ease-in-out;
    cursor: pointer;
}
.gallery-pane:hover .tray {
    transform: translateY(0);
}

#feature-detail-modal {
    position: sticky;
    top: 0;
    color: #ecede4;
    background-color: rgba(36, 33, 25, 0.9);
    width: 100%;
    height: 65vh;
    margin-bottom: -65vh;
    display: flex;
    flex-direction: column;
    padding: 0;
    z-index: 50;
}

#feature-detail-controls {
    height: 30px;
    display: flex;
    flex-direction: row;
    justify-content: end;
}
#feature-detail-close-button { padding: 5px; }
#feature-detail-content {
    display: flex;
    flex-direction: row;
    height: calc(60vh - 50px);
    padding: 0 20px 20px 20px;
}
#feature-detail-meta-pane {
    display: flex;
    flex-direction: column;
    font-family: "new-order", sans-serif;
    font-weight: 400;
    font-style: normal;
    max-height: 100%;
    overflow-y: scroll;
    width: 25%;
    height: 100%;
}

#feature-detail-dragon-pane {
    width: 75%;
    height: 100%;
    padding-left: 20px;
}

.feature-detail-title {
    font-size: 22px;
    margin-bottom: 20px;
}

.feature-detail-metadatum {
    display: flex;
    flex-direction: column;
    margin-bottom: 20px;
}
.feature-detail-metadatum-field {
    font-weight: 500;
    display: flex;
    align-items: start;
    width: 100%;
    border-bottom: solid 1px #ecede4;
    margin-bottom: 8px;
}
.feature-detail-metadatum-value {
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: start;
}
.feature-detail-metadatum-value a { color: #ecede4; text-decoration: none; }
.feature-detail-metadatum-value a:hover { text-decoration: underline; }
.feature-detail-metadatum-value p { margin: 0 0 10px 0; }

.place-marker-label {
    color: #F39931;
    font-size: 16px;
}


main.internal {
    padding: 0 150px;
    height: 100%;
}
main.boilerplate { background-color: #e9ddc6; }
.map-detail-viewer {
    display: grid;
    grid-template-columns: minmax(0, 300px) 1fr;
    gap: 36px;
    min-height: 100%;
}

#map-title {
    font-family: "new-order", sans-serif;
    font-weight: 500;
    font-style: normal;
    font-size: 48px;
}

#metadata-div {
    font-family: "new-order", sans-serif;
    font-style: normal;
    font-size: 18px;
}

.feature-detail-metadatum-field.white-bg { border-bottom: solid 1px #242119; }
.feature-detail-metadatum-value.white-bg > a { color: #242119; }
.feature-detail-metadatum.values-below {
    flex-direction: column;
}
.feature-detail-metadatum.values-below .feature-detail-metadatum-value {
    width: 100%;
}

#dragon-div {
    position: sticky;
    top: 0;
    width: 100%;
    height: 100vh;
}

.feature-overlay {
    cursor: pointer;
}
.feature-overlay.yellow { background-color: rgba(203, 165, 42, 0.3); }
.feature-overlay.yellow:hover { background-color: rgba(203, 165, 42, 0.5); border: 2px solid rgb(203, 165, 42); }
.feature-overlay.red { background-color: rgba(235, 85, 52, 0.3); }
.feature-overlay.red:hover { background-color: rgba(235, 85, 52, 0.5); border: 2px solid rgb(235, 85, 52); }
.feature-overlay.blue { background-color: rgba(77, 130, 161, 0.3); }
.feature-overlay.blue:hover { background-color: rgba(77, 130, 161, 0.5); border: 2px solid rgb(77, 130, 161); }
.feature-overlay.yellow.showcased, .feature-overlay.yellow.showcased:hover { background-color: unset; border: 5px solid rgb(203, 165, 42); }
.feature-overlay.red.showcased, .feature-overlay.red.showcased:hover { background-color: unset; border: 5px solid rgb(235, 85, 52); }
.feature-overlay.blue.showcased, .feature-overlay.blue.showcased:hover { background-color: unset; border: 5px solid rgb(77, 130, 161); }
.feature-overlay.disabled { background-color: unset; border: unset; }

.feature-metadata-pane {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.4s ease, opacity 0.4s ease, padding 0.4s ease;
    color: #ecede4;
    font-family: "new-order", sans-serif;
    font-weight: 400;
    font-style: normal;
    background-color: rgba(36, 33, 25, 0.9);
}
.feature-metadata-pane b {

}
.feature-metadata-pane.visible {
    max-height: 100vh;
    opacity: 1;
    padding: 20px;
    width: calc(100% - 36px);
    position: relative;
    left: 36px;
    margin-bottom: 36px;
}