html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem var(--bs-body-bg), 0 0 0 0.25rem var(--bs-primary);
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}

.footer {
    position: fixed;
    bottom: 0 !important;
    display: flex;
    padding-right: 5px !important;
    padding-left: 5px !important;
    align-items: center;
    width: 100% !important;
    justify-content: center;
    line-height: 1em !important;
}

    .footer .container {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 10px !important;
        z-index: 999 !important;
        background: #ffffffaa !important;
        color: rgb(30, 41, 59) !important;
        font-weight: 400;
        border-top-left-radius: 1rem !important;
        border-top-right-radius: 1rem !important;
        -webkit-backdrop-filter: blur(5px);
        backdrop-filter: blur(5px);
        /* transition: all .1s linear 0s; */
        background-blend-mode: multiply,normal;
        /* opacity: .85; */
    }
.footer-item {
    flex: 1;
}

.footer a {
    color: #003366;
}

    .footer a:hover {
        color: #336699;
    }

.footer-links {
    align-items: end !important;
    justify-content: flex-end !important;
    display: flex;
    gap: 10px;
}

    .footer-links > a {
        text-decoration: none;
        --bg-opacity: 1 !important;
        /*    color:rgb(117 117 117/var(--bg-opacity))!important;*/
        border-radius: 5px !important;
        padding: 5px !important;
        background: rgba(0, 0, 0, 0.50) !important;
        opacity: 0.8;
        color: aliceblue;
        transition: 0.3s;
    }

        .footer-links > a:hover {
            background-color: rgb(0 0 0/var(--bg-opacity)) !important;
            color: var(--bs-white) !important;
        }

[data-bs-theme="dark"] .footer .container {
    background: rgba(18, 24, 31, .82) !important;
    color: var(--bs-body-color) !important;
    border-color: var(--bs-border-color);
}

[data-bs-theme="dark"] .footer a {
    color: var(--bs-link-color);
}

[data-bs-theme="dark"] .footer a:hover {
    color: var(--bs-link-hover-color);
}

[data-bs-theme="dark"] .footer-links > a {
    background: rgba(255, 255, 255, .08) !important;
    color: var(--bs-body-color);
}

[data-bs-theme="dark"] .footer-links > a:hover {
    background-color: rgba(255, 255, 255, .14) !important;
    color: var(--bs-link-hover-color) !important;
}
.footer-item.footer-text {
    flex: unset;
    white-space: nowrap;
}
@media (min-width: 768px) {
    .rm-nav-row .rm-lang-dropdown,
    .rm-nav-row .rm-profile-dropdown,
    .rm-nav-row .rm-menu-dropdown {
        position: relative;
    }

    .rm-nav-row .rm-lang-dropdown > .dropdown-menu,
    .rm-nav-row .rm-profile-dropdown > .dropdown-menu,
    .rm-nav-row .rm-menu-dropdown > .dropdown-menu {
        position: absolute;
        inset: auto 0 auto auto;
        top: 100%;
    }
}

.rm-lang-flag {
    width: 1.25rem;
    height: .875rem;
    object-fit: cover;
    border-radius: 2px;
    box-shadow: 0 0 0 1px rgba(15, 23, 42, .12);
    flex: 0 0 auto;
}

/* ===== Search autocomplete panel ===== */

.autocomplete {
    background: var(--bs-body-bg);
    color: var(--bs-body-color);
    border: 1px solid var(--bs-border-color);
    border-radius: 14px;
    box-shadow: 0 20px 48px rgba(15, 23, 42, .18), 0 4px 12px rgba(15, 23, 42, .07);
    overflow: auto;
    z-index: 1200;
}

/* Container: 3-column grid (full-width items overlap all cols) */
.autocomplete.rm-person-search {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .4rem;
    padding: .5rem;
}

/* Base item reset (each div is a grid child) */
.autocomplete > div {
    line-height: 1.25;
    border-bottom: 0;
}

/* ── Person result cards ── */
.autocomplete.rm-person-search > div.rm-person-card {
    display: grid;
    grid-template-columns: 40px 1fr auto;
    align-items: center;
    gap: .5rem;
    padding: .5rem .7rem;
    min-height: 58px;
    border-radius: 10px;
    border: 1px solid var(--bs-border-color);
    background: var(--bs-body-bg);
    cursor: pointer;
    transition: background-color 55ms ease-in, border-color 55ms ease-in;
}

.autocomplete.rm-person-search > div.rm-person-card:hover,
.autocomplete.rm-person-search > div.rm-person-card.selected {
    background: var(--bs-tertiary-bg);
    border-color: var(--bs-link-color);
}

/* Full-width slots (header, hints, separators) */
.autocomplete.rm-person-search > div.rm-tree-scope-header,
.autocomplete.rm-person-search > div.rm-tree-hint-item,
.autocomplete.rm-person-search > div.group,
.autocomplete.rm-person-search > div.empty {
    grid-column: 1 / -1;
}

/* Photo avatar */
.autocomplete .imgctl {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--bs-secondary-bg);
    border: 1px solid var(--bs-border-color);
    flex-shrink: 0;
}

.autocomplete .imgctl img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;
}

/* Name + occupation column */
.rm-search-info {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: .05rem;
}

.autocomplete-name {
    font-weight: 500;
    font-size: .97rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.autocomplete-name b { font-weight: 700; }

.autocomplete-occ {
    font-size: .82rem;
    color: var(--bs-secondary-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Right column: tree badge (optional) above dates */
.rm-search-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: .08rem;
    min-width: 52px;
}

.autocomplete-date {
    font-size: .82rem;
    color: var(--bs-secondary-color);
    white-space: nowrap;
    text-align: right;
}

/* Tree badge: only shown on non-Family pages */
.rm-result-tree-badge {
    font-size: .65rem;
    padding: .07rem .36rem;
    border-radius: 20px;
    background: var(--bs-secondary-bg);
    color: var(--bs-secondary-color);
    border: 1px solid var(--bs-border-color);
    white-space: nowrap;
    max-width: 88px;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: right;
}

/* ===== Other-tree header banner ===== */

.rm-tree-scope-header {
    display: flex !important;
    align-items: center;
    gap: .6rem;
    padding: .4rem .65rem !important;
    min-height: 42px;
    border-radius: 10px;
    background: rgba(var(--bs-primary-rgb), .07) !important;
    border: 1px solid rgba(var(--bs-primary-rgb), .2) !important;
    cursor: pointer;
    transition: background-color 55ms ease-in, border-color 55ms ease-in;
}

.rm-tree-scope-header:hover,
.rm-tree-scope-header.selected {
    background: rgba(var(--bs-primary-rgb), .13) !important;
    border-color: rgba(var(--bs-primary-rgb), .42) !important;
}

.rm-tree-scope-back-icon {
    font-size: 1rem;
    color: var(--bs-primary);
    flex: 0 0 auto;
    line-height: 1;
}

.rm-tree-scope-label {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--bs-body-color);
    font-weight: 500;
    font-size: .875rem;
}

.rm-tree-scope-close {
    flex: 0 0 20px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(var(--bs-primary-rgb), .12);
    border: none;
    color: var(--bs-primary);
    cursor: pointer;
    font-size: .75rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: background-color 100ms;
}

.rm-tree-scope-close:hover {
    background: rgba(var(--bs-primary-rgb), .26);
}

/* ===== Hints footer divider ===== */

.rm-tree-hints-sep.group {
    display: flex !important;
    align-items: center;
    gap: .45rem;
    padding: .28rem .55rem .1rem !important;
    min-height: unset !important;
    background: transparent !important;
    border: none !important;
    font-size: .67rem;
    font-weight: 600;
    color: var(--bs-secondary-color);
    text-transform: uppercase;
    letter-spacing: .07em;
    cursor: default;
    margin-top: 2px;
}

.rm-tree-hints-sep.group::before,
.rm-tree-hints-sep.group::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--bs-border-color);
}

/* ===== Hint (other-tree) items ===== */

.rm-tree-hint-item {
    display: flex !important;
    align-items: center;
    gap: .55rem;
    padding: .3rem .6rem !important;
    min-height: 42px;
    border-radius: 10px;
    background: transparent !important;
    border: 1px solid transparent !important;
    cursor: pointer;
    font-size: .875rem;
    transition: background-color 55ms ease-in, border-color 55ms ease-in;
}

.rm-tree-hint-item:hover,
.rm-tree-hint-item.selected {
    background: var(--bs-tertiary-bg) !important;
    border-color: var(--bs-border-color) !important;
}

.rm-hint-tree-icon {
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    border-radius: 7px;
    background: var(--bs-secondary-bg);
    border: 1px solid var(--bs-border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .85rem;
}

.rm-hint-tree-name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--bs-body-color);
    font-weight: 500;
}

.rm-hint-match-count {
    flex: 0 0 auto;
    font-size: .72rem;
    color: var(--bs-secondary-color);
    background: var(--bs-secondary-bg);
    border: 1px solid var(--bs-border-color);
    padding: .08rem .42rem;
    border-radius: 20px;
    white-space: nowrap;
}

.rm-hint-chevron {
    flex: 0 0 auto;
    color: var(--bs-secondary-color);
    font-size: .88rem;
}

.rm-search-spinner {
    position: absolute;
    right: 10px;
    top: 50%;
    width: 16px;
    height: 16px;
    margin-top: -8px;
    border-radius: 50%;
    border: 2px solid rgba(100, 116, 139, .22);
    border-top-color: #2563eb;
    animation: rm-spin .7s linear infinite;
    display: none;
    pointer-events: none;
}

.rm-search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    width: 20px;
    height: 20px;
    transform: translateY(-50%);
    pointer-events: none;
    opacity: .72;
}

.rm-nav-search-wrap input {
    padding-left: 42px;
}

@keyframes rm-spin { to { transform: rotate(360deg); } }

.rm-nav-search-wrap.busy .rm-search-spinner {
    display: block;
}

.rm-nav-search-wrap.busy input {
    padding-right: 30px;
}

.rm-mobile-actions {
    display: none;
}

.rm-theme-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
    gap: .75rem;
}

.rm-theme-option {
    border: 1px solid var(--bs-border-color);
    border-radius: 16px;
    background: var(--bs-body-bg);
    padding: .6rem;
    text-align: center;
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.rm-theme-option:hover,
.rm-theme-option.active {
    transform: translateY(-2px);
    border-color: rgba(37, 99, 235, .55);
    box-shadow: 0 12px 28px rgba(15, 23, 42, .12);
}

.rm-theme-option img {
    width: 96px;
    height: 96px;
    max-width: 96px;
    max-height: 96px;
    aspect-ratio: 1 / 1;
    border-radius: 14px;
    object-fit: cover;
    display: block;
    margin: 0 auto .45rem;
}

@media (max-width: 767.98px) {
    .navbar {
        background: transparent !important;
        border-bottom: 0 !important;
        box-shadow: none !important;
    }

    .rm-nav-row {
        justify-content: flex-end;
        min-height: 56px;
        position: relative;
    }

    .rm-nav-row .navbar-brand {
        display: none;
    }

    .rm-mobile-actions {
        display: flex;
        align-items: center;
        gap: .45rem;
        width: auto;
        margin-left: auto;
        justify-content: flex-end;
    }

    .rm-mobile-actions:has(.rm-mobile-search-wrap.open) .navbar-toggler {
        opacity: 0;
        pointer-events: none;
    }

    .rm-mobile-actions.search-open .navbar-toggler {
        opacity: 0;
        pointer-events: none;
    }

    .rm-mobile-search-wrap {
        width: 42px;
        flex: 0 0 42px;
        height: 42px;
        overflow: visible;
        box-sizing: border-box;
        transition: width .24s cubic-bezier(.2, .85, .2, 1), flex-basis .24s cubic-bezier(.2, .85, .2, 1);
        order: 1;
    }

    body.family-page .rm-mobile-actions .navbar-toggler {
        order: 2;
        margin-left: 0 !important;
    }

    body.family-page .rm-mobile-actions .rm-mobile-search-wrap {
        order: 1;
    }

    .rm-mobile-search-wrap.open {
        position: fixed;
        left: 10px;
        right: 10px;
        top: 8px;
        width: calc(100dvw - 20px);
        max-width: calc(100dvw - 20px);
        flex-basis: calc(100dvw - 20px);
        z-index: 1080;
    }

    .rm-mobile-search-toggle {
        position: absolute;
        inset: 0 auto 0 0;
        width: 42px !important;
        height: 42px !important;
        border: 1px solid var(--bs-border-color);
        border-radius: .5rem;
        background: var(--bs-tertiary-bg) !important;
        color: var(--bs-body-color);
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 2;
        box-shadow: 0 4px 16px rgba(15, 23, 42, 0.14) !important;
        padding: 0 !important;
    }

    .rm-mobile-search-wrap.open .rm-mobile-search-toggle {
        opacity: 0;
        pointer-events: none;
    }

    .rm-mobile-actions .navbar-toggler {
        border: 1px solid var(--bs-border-color);
        border-radius: .5rem;
        background: var(--bs-tertiary-bg) !important;
        color: var(--bs-body-color);
        width: 42px !important;
        height: 42px !important;
        padding: 0 !important;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 4px 16px rgba(15, 23, 42, 0.14) !important;
        order: 2;
    }

    .rm-mobile-actions .navbar-toggler .navbar-toggler-icon {
        width: 20px;
        height: 20px;
        background-size: 20px 20px;
    }

    [data-bs-theme="dark"] .rm-mobile-actions .navbar-toggler,
    [data-bs-theme="dark"] .rm-mobile-search-toggle {
        background: var(--bs-secondary-bg) !important;
        border-color: var(--bs-border-color);
    }

    [data-bs-theme="dark"] .rm-mobile-actions .navbar-toggler .navbar-toggler-icon,
    [data-bs-theme="dark"] .rm-mobile-search-toggle img {
     /*   filter: invert(1) grayscale(100%) brightness(1.8);*/
    }

    .autocomplete.rm-person-search {
        grid-template-columns: 1fr;
        border-radius: 18px 18px 0 0;
        max-width: none;
    }

    .autocomplete.rm-person-search > div {
        grid-column: 1 / -1 !important;
    }
}

@media (min-width: 768px) and (max-width: 1199.98px) {
    .autocomplete.rm-person-search {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .autocomplete.rm-person-search > div {
        grid-column: span 1;
    }

    .autocomplete.rm-person-search > div:nth-last-child(1):nth-child(2n + 1) {
        grid-column: 1 / -1;
    }
}

@media (max-width: 767.98px) {
    .rm-mobile-search-wrap .rm-nav-search-wrap {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        height: 42px;
        opacity: 0;
        pointer-events: none;
        transition: opacity .12s ease;
    }
    .rm-mobile-search-wrap .rm-nav-search-wrap .form-control {
        height: 42px;
    }

    .rm-mobile-search-wrap.open .rm-nav-search-wrap {
        opacity: 1;
        pointer-events: auto;
    }

    #mobileNavSheet {
        border-radius: 22px 22px 0 0;
        transition: transform .28s cubic-bezier(.2, .85, .2, 1), opacity .2s ease;
    }
    #mobileNavSheet .navbar-nav .nav-link {
        border-radius: 10px;
        transition: background-color .15s ease, color .15s ease;
    }
    #mobileNavSheet .navbar-nav .nav-link:hover,
    #mobileNavSheet .navbar-nav .nav-link:focus-visible {
        background: var(--bs-tertiary-bg);
        color: var(--bs-link-color) !important;
    }

    .rm-mobile-toolbar {
        display: flex;
        align-items: center;
        gap: .5rem;
        padding: .55rem;
        margin-bottom: .65rem;
        border: 1px solid var(--bs-border-color);
        border-radius: 18px;
        background: var(--bs-tertiary-bg);
    }

    .rm-mobile-tool-btn {
        width: auto;
        min-width: 42px;
        height: 42px;
        border-radius: 14px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: .35rem;
        padding: 0 .7rem;
        border: 1px solid var(--bs-border-color);
        background: var(--bs-body-bg);
        color: var(--bs-body-color);
        transition: transform .18s ease, background .18s ease, border-color .18s ease, color .18s ease;
    }

    .rm-mobile-tool-btn:hover,
    .rm-mobile-tool-btn:focus-visible,
    .rm-mobile-tool-btn.active {
        transform: translateY(-1px);
        background: var(--bs-tertiary-bg);
        border-color: var(--bs-link-color);
        color: var(--bs-link-color);
    }

    .rm-mobile-tool-btn[hidden] {
        display: none !important;
    }

    .rm-mobile-favourites-dropup {
        position: relative;
    }

    .rm-mobile-tool-btn .rm-lang-flag {
        width: 24px;
        height: 24px;
    }

    .rm-mobile-tool-lang {
        margin-left: auto;
        padding: 0 .45rem;
    }

    .rm-theme-grid {
        grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
    }

    .rm-theme-option {
        padding: .5rem;
    }
}

.rm-desktop-tool-btn {
    min-height: 34px;
    border-radius: .65rem;
    display: inline-flex;
    align-items: center;
    gap: .4rem;
}
.rm-language-list .list-group-item {
    border-radius: 0;
    border-left: 1px solid rgba(148, 163, 184, .25);
    border-right: 1px solid rgba(148, 163, 184, .25);
}
.rm-language-list .list-group-item:first-child {
    border-top-left-radius: .75rem;
    border-top-right-radius: .75rem;
    border-top: 1px solid rgba(148, 163, 184, .25);
}
.rm-language-list .list-group-item:last-child {
    border-bottom-left-radius: .75rem;
    border-bottom-right-radius: .75rem;
    border-bottom: 1px solid rgba(148, 163, 184, .25);
}

.shareoncontainer {
    z-index: 1002;
    position: absolute;
    top: 200px;
    border-radius: 9px;
    background: rgba(0, 0, 0, 0.30 ) !important;
    left: 200px;
    width: 150px;
}
img.grayscale {
    filter: url("data:image/svg+xml;utf8,<svg xmlns=\'http://www.w3.org/2000/svg\'><filter id=\'grayscale\'><feColorMatrix type=\'matrix\' values=\'0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0\'/></filter></svg>#grayscale");
    /* Firefox 3.5+, IE10 */
    filter: gray;
    /* IE6-9 */
    -webkit-filter: grayscale(100%);
    /* Chrome 19+ & Safari 6+ */
    -webkit-transition: all .6s ease;
    /* Fade to color for Chrome and Safari */
    -webkit-backface-visibility: hidden;
    /* Fix for transition flickering */
}
    img.grayscale:hover {
        filter: none;
        -webkit-filter: grayscale(0%);
    }
.starfill {
    color: #ecc100 !important;
}
.unselectable {
    -moz-user-select: -moz-none;
    -khtml-user-select: none;
    -webkit-user-select: none;
    user-select: none;
    -webkit-user-select: none;
    user-select: none;
}

.footer {
    position: fixed;
    bottom: 0 !important;
    display: flex;
    padding-right: 5px !important;
    padding-left: 5px !important;
    align-items: center;
    width: 100% !important;
    justify-content: center;
    line-height: 1em !important;
}
.footer .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px !important;
    z-index: 999 !important;
    background: #ffffffaa !important;
    /* color: rgb(30, 41, 59) !important; */
    font-weight: 400;
    border-top-left-radius: 1rem !important;
    border-top-right-radius: 1rem !important;
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
    /* transition: all .1s linear 0s; */
    background-blend-mode: multiply,normal;
    /* opacity: .85; */
}


@media print {

    body {
        margin: 0;
        color: #000;
        background-color: #fff;
    }

    @page {
        size: landscape;
    }

    body {
    }

    .minimap-container {
        display: none;
    }

    #navbar {
        display: none;
    }

    .navbar-brand {
        display: block;
    }

    #content {
        overflow: visible !important;
    }
}   
