html, body {
    font-family: 'OpenSansRegular', sans-serif;
    height: 100%;
    overflow: auto;
    height: 100vh;
    width: 100vw;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
}

/*@media only screen and (max-device-width: 1024px) {
    html, body {
        height: 100%;
        position: fixed;
        overflow: hidden;
    }
}
*/
#app {
    height: auto;
    min-height: 100%;
}

.navbar-dark {
    background-color: #303030 !important;
}

a, .btn-link {
    color: #006bb7;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 1.1rem;
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNz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cnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

/* Global styles */
* {
    box-sizing: border-box;
}

.app-temp {
    min-height: 100vh;
    min-width: 100vw;
    width: 100%;
}

figure {
    margin: 0;
}

/* Population cards */
.population-grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    padding: 10px;
    max-width: 100%;
    width: 100%;
    --add-population-text: #fff;
    --border-color: #666;
    --border-color-hover: #888;
    --population-hover: rgba(0,0,0,0.56);
    --population-hover-text: #fff;
    --population-header-bg: rgba(0, 0, 0, 0.60);
    --population-header: #fff;
    --population-header-location: #c6c6c6;
    --population-header-spec: #919191;
    --population-footer: #b7b7b7;
    --population-footer-num: #fff;
}

.light-theme .population-grid-container {
    --add-population-text: #666666;
    --border-color: #D5D6D6;
    --population-hover: rgba(255,255,255,0.7);
    --population-hover-text: #000;
    --population-header-bg: rgba(224,224,224, 0.8);
    --population-header: #000;
    --population-header-location: #4d4d4d;
    --population-header-spec: #757575;
    --population-footer: #818181;
    --population-footer-num: #000;
}

    .light-theme .population-grid-container .population-join img,
    .light-theme .population-grid-container .population-header-items img,
    .light-theme .population-grid-container .population-header-photos img {
        filter: unset;
    }

.population-grid-item {
    aspect-ratio: 760/560;
    height: auto;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    border: 2px solid var(--border-color);
    transition: border 0.3s ease-in-out;
    text-decoration: none;
}

    .population-grid-item:not(:has(.population-join-wrap)):hover {
        border-color: var(--border-color-hover);
    }

        .population-grid-item:not(:has(.population-join-wrap)):hover .population-img img {
            scale: 1.05;
        }

    .population-grid-item:has(.population-no-img) {
        flex-direction: column;
        text-decoration: none;
    }

        .population-grid-item:has(.population-no-img) .population-header,
        .population-grid-item:has(.population-no-img) .population-footer,
        .population-grid-item:has(.population-no-img) .population-no-img {
            position: static;
        }

        .population-grid-item:has(.population-no-img) .population-header {
            order: -1;
        }

.population-img,
.population-no-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

    .population-img img,
    .population-no-img img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: scale 0.9s ease-in-out;
    }

.population-no-img {
    display: flex;
    align-items: center;
    max-width: 50%;
}

    .population-no-img img {
        width: auto;
        height: auto;
        object-fit: contain;
    }

.population-header {
    min-height: 74px;
    background: var(--population-header-bg);
    backdrop-filter: blur(1px);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    padding: 10px 13px;
    display: flex;
    gap: 10px;
    color: var(--population-header);
}

.population-header-left {
    flex: 1;
    overflow: hidden;
}

    .population-header-left > * {
        width: 100%;
        white-space: nowrap;
        text-overflow: ellipsis;
        overflow: hidden;
        max-width: 100%;
    }

.population-header-title {
    font-size: 14.5px;
    margin: 0;
    line-height: 19px;
    white-space: unset;
    font-weight: bold !important;
}

.population-header-location {
    font-size: 12px;
    color: var(--population-header-location);
}

.population-header-spec {
    font-size: 12px;
    color: var(--population-header-spec);
    font-style: italic;
}

.population-header-right {
    display: flex;
    flex-shrink: 0;
    flex-direction: column;
    align-items: flex-end;
    gap: 5px;
}

.population-header-items,
.population-header-photos {
    display: flex;
    align-items: center;
    gap: 7px;
    justify-content: center;
    font-size: 15px;
}

    .population-header-items > *,
    .population-header-photos > * {
        flex-shrink: 0;
    }

    .population-header-items img {
        width: 30px;
        filter: invert(1);
    }

    .population-header-photos img {
        width: 18px;
        filter: invert(1);
    }

.population-footer {
    background: var(--population-header-bg);
    backdrop-filter: blur(1px);
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    padding: 10px 13px;
    display: flex;
    justify-content: space-between;
    color: var(--population-footer);
    font-size: 14.5px;
}

    .population-footer span {
        color: var(--population-footer-num);
    }

.population-grid-item:has(.add-population-wrap) {
    text-decoration: none;
    transition: background 0.1s ease-in-out;
}

    .population-grid-item:has(.add-population-wrap):hover {
        background: rgba(255,255,255,0.025);
    }

        .population-grid-item:has(.add-population-wrap):hover .add-population-btn {
            transform: scale(1.05);
        }

.add-population-wrap {
    display: flex;
    flex-direction: column;
    gap: 45px;
    align-items: center;
}

    .add-population-wrap .add-population-btn {
        height: 110px;
        width: 110px;
        border: 2px solid var(--border-color);
        border-radius: 50em;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 106px;
        line-height: 85px;
        text-decoration: none;
        color: #989797;
        transition: transform 0.1s ease-in-out;
        background: rgba(255,255,255,0.05);
        user-select: none;
    }

        .add-population-wrap .add-population-btn span {
            transform: translateY(-3px);
        }

    .add-population-wrap .add-population-title {
        font-size: 18px;
        color: var(--add-population-text);
        font-weight: bold;
    }

.population-join-wrap {
    position: absolute;
    inset: 0;
    cursor: default;
    z-index: 2;
}

.population-join {
    position: absolute;
    border: unset;
    top: calc(50% + 20px);
    user-select: none;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--population-hover);
    color: var(--population-hover-text);
    border-radius: 5px;
    padding: 0 25px;
    height: 50px;
    white-space: nowrap;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    font-weight: bold;
    cursor: pointer;
    transition: opacity 0.2s ease-in-out;
}

    .population-join:hover {
        opacity: 0.85;
    }

    .population-join img {
        filter: invert(1);
        width: 18px;
        height: auto;
    }

/* Encounters grid */
.encounters-grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    padding: 10px;
    max-width: 100%;
    width: 100%;
}

.encounters-grid-item {
    position: relative;
    aspect-ratio: 760/560;
    height: auto;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 2px solid var(--border-color);
    transition: border 0.3s ease-in-out;
    text-decoration: none;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    -webkit-background-size: cover;
    -moz-background-size: cover;
}

@media (max-width: 1200px) {
    .encounters-grid-container {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}

@media (max-width: 768px) {
    .encounters-grid-container {
        grid-template-columns: 1fr;
    }
}

.encounter-overlay {
    position: absolute;
    padding: 16px;
    top: 0;
    left: 0;
    background-color: rgba(0, 0, 0, 0.4);
    height: 100%;
    width: 100%;
    color: white !important;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
}

.encounter-title {
    width: 90%;
    font-size: 1rem;
}

.encounter-title-small {
    width: 90%;
    font-size: 0.7rem;
}

.encounter-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}

.indicators {
    width: 20px;
    height: 100%;
}

.invert-color {
    filter: invert(1);
}

.indicators .icon {
    height: 20px;
    width: 20px;
    border-radius: 50%;
    margin-top: 5px;
}

.indicators .NEW {
    border: 2px solid #910000;
}

.indicators .IN_PROGRESS {
    border: 2px solid #b7b700;
}

.indicators .FINISHED {
    border: 2px solid #228022;
}

.indicators .complete {
    background: white;
}

.indicators .incomplete {
    background: conic-gradient(white 0deg 280deg, transparent 280deg 360deg);
}

.indicators .default {
    border: 2px solid white;
}

/* Info page */
.info-about-banner .info-banner-img img {
    max-width: 1279px;
    width: 100%;
    height: auto;
}

.info-about-banner {
    max-height: 45vh;
    overflow: hidden;
}

.info-descriptive-content {
    display: flex;
    justify-content: space-evenly;
    align-items: flex-start;
}

    .info-descriptive-content .info-blurb {
        margin-right: 32px;
    }

    .info-descriptive-content .info-description {
        width: 50%;
        margin: 32px 0;
    }

        .info-descriptive-content .info-description h2 {
            font-size: 24px;
        }

.info-stats .info-stats-container h3 {
    display: flex;
    align-items: center;
    font-size: 22px;
    margin: 0;
}

.info-contributors {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    padding: 10px;
    margin: 10px 0;
}

.info-centered {
    display: flex;
    align-items: center;
    justify-content: center;
}

.info-contributors .info-contributor .info-contributor-logo img {
    max-height: 150px;
    max-width: 250px;
}

/* Offcanvas */
.offcanvas-backdrop {
    position: fixed !important;
    z-index: 9998 !important;
}

.offcanvas {
    position: fixed !important;
    z-index: 9999 !important;
}

/* Safari iOS specific */
@supports (-webkit-touch-callout: none) {
    .offcanvas {
        margin-top: 3.3rem;
    }

    .modal-header {
        margin-top: 3.3rem;
    }
}

/* Image Viewer */
.transition-img {
    transition: transform 0.3s ease, opacity 0.3s ease;
}

    .transition-img.swipe-left {
        transform: translateX(-100%);
        opacity: 0;
    }

    .transition-img.swipe-right {
        transform: translateX(100%);
        opacity: 0;
    }

#imageGrid .image-col {
    flex: 0 0 33.3333%;
}

.card-300 {
    max-width: 300px;
}

@media (min-width: 768px) {
    #imageGrid .image-col {
        flex: 0 0 auto;
    }
}

/* Menu styles */
.menu-box {
    text-align: left;
    color:white;
    
}

    .menu-box i {
        width: 1.5rem;
        flex-shrink: 0;
        text-align: center;
    }

.icon-default {
    width: 1.5rem;
    flex-shrink: 0;
    text-align: center;
    font-size: 15px;
}


.encounters-ids {
    display: -webkit-box;
    -webkit-line-clamp: 5;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.encounters-grid-item {
    container-type: inline-size;
}


@container (max-width: 340px) {
    .encounters-ids {
        -webkit-line-clamp: 4;
    }
}

@container (max-width: 320px) {
    .encounters-ids {
        -webkit-line-clamp: 3;
    }
}

@container (max-width: 300px) {
    .encounters-ids {
        -webkit-line-clamp: 2;
    }
}

@container (max-width: 280px) {
    .encounter-info {
        gap: 5px;
        line-height: 1.3;
    }
}





/* Individuals page */

/* Individuals grid styles */
.individuals-grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(17.5rem, 1fr));
    gap: 1.25rem;
    padding: 0.625rem;
    max-width: 100%;
    width: 100%;
}

.individuals-grid-item {
    position: relative;
    width: 100%;
    max-width: 17.5rem;
    aspect-ratio: 1;
    border-radius: 0.625rem;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    text-decoration: none;
    color: inherit;
    border: 0.125rem solid var(--border-color, #666);
    transition: border 0.3s ease-in-out, transform 0.2s ease-in-out;
    -webkit-background-size: cover;
    -moz-background-size: cover;
}

    .individuals-grid-item:hover {
        border-color: var(--border-color-hover, #888);
        transform: translateY(-0.125rem);
    }

.individual-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient( to bottom, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0.3) 30%, transparent 50% );
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    padding: 0.75rem;
}

.individual-info {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.individual-title {
    color: white;
    font-size: 0.875rem;
    font-weight: 600;
    text-shadow: 0 0.0625rem 0.1875rem rgba(0, 0, 0, 0.8);
    line-height: 1.2;
    max-width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Responsive styles */
@media (max-width: 75rem) {
    .individuals-grid-container {
        grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
    }

    .individuals-grid-item {
        max-width: 15rem;
    }
}

@media (max-width: 48rem) {
    .individuals-grid-container {
        grid-template-columns: repeat(auto-fill, minmax(12.5rem, 1fr));
        gap: 1rem;
    }

    .individuals-grid-item {
        max-width: 12.5rem;
    }

    .individual-overlay {
        padding: 0.5rem;
    }

    .individual-title {
        font-size: 0.75rem;
    }
}

@media (max-width: 30rem) {
    .individuals-grid-container {
        grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr));
    }

    .individuals-grid-item {
        max-width: 10rem;
    }
}

/* Loading or empty state */
.individuals-grid-container > div:not(.individuals-grid-item) {
    grid-column: 1 / -1;
    text-align: center;
    padding: 2rem;
    color: var(--text-muted, #666);
    font-size: 1.125rem;
}

/* Additional styles for light/dark theme */
.light-theme .individuals-grid-item {
    --border-color: #D5D6D6;
    --border-color-hover: #999;
}

.light-theme .individual-overlay {
    background: linear-gradient( to bottom, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.4) 30%, transparent 50% );
}

/* Card appearance animation */
.individuals-grid-item {
    animation: fadeInUp 0.3s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(1.25rem);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}
