.sidebar {
    height: calc(100% - 200px);
    max-width: calc(min(98vw, 500px));
    position: fixed;
    z-index: 100;
    top: 200px;
    left: 0;
    border-top: 1px solid black;
    border-right: 1px solid black;
    padding-top: 0.5rem;
    background-color: var(--bs-tertiary-bg);
    display: flex;
    flex-direction: column;
}

.sidebar-labels {
    background-color: var(--bs-secondary-bg);
    color: var(--fgColor-default, --bs-secondary-text-emphasis, white);
    margin-left: 2px;
    margin-right: -2px;
}

.theme-webtrees-labels {
    background-color: #81a9cb !important;
    color: white;
}

.theme-webtrees-options {
    background-color: #edf7f9 !important;
}

.theme-primer-listitem {
    background-color: white;
}


.no-right-margin {
    margin-right: 0px !important;
}

.sidebar__formfields {
    overflow-x: hidden;
    overflow-y: scroll;
    flex-shrink: 1;
}

.sidebar__buttons {
    border-top: 1px solid black;
    padding: 0.5rem;
}

.sidebar_toggle {
    position: fixed;
    left: 0;
    top: 400px;
    transform-origin: left bottom;
    transform: rotate(90deg);
}
.help-toggle {
    position: fixed;
    right: 0;
    top: 400px;
    transform-origin: right bottom;
    transform: rotate(-90deg);
}

.help-sidebar {
    height: calc(100% - 200px);
    width: 500px;
    max-width: calc(min(98vw, 500px));
    position: fixed;
    z-index: 100;
    top: 200px;
    right: 0;
    border-top: 1px solid black;
    border-left: 1px solid black;
    padding: 0.5rem;
    background-color: var(--bs-tertiary-bg);
    display: flex;
    flex-direction: column;
}

.btn-hover {
    position: absolute;
    right: 5px;
    top: 5px;
    z-index: 200;
}
.btn-help-home {
    position: absolute;
    right: 45px;
    top: 5px;
    z-index: 200;
}

.help-home {
    padding-left: 8px !important;
    width: 36px;
    height: 36px;
}
.btn-help-search {
    position: absolute;
    right: 85px;
    top: 5px;
    z-index: 200;
}

.help-search {
    padding-left: 8px !important;
    width: 36px;
    height: 36px;
}

.hide-help {
    width: 36px;
    height: 36px;
}

.help-title {
    padding-left: 0px;
    max-width: calc(min(90vw - 100px, 370px));
}

.help-breadcrumb {
    font-style: italic;
}

#help-content {
    overflow: auto;
    padding: 0 5px 5px 5px;
}


.red-text {
    color: red;
}

/* Style for toast messages */
#toast-container {
    position: fixed;
    left: 50%;
    bottom: 30px;
}

#toast {
    visibility: hidden;
    min-width: 250px;
    margin-left: -125px;
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: 2px;
    padding: 16px;
    z-index: 1;
    margin-bottom: 5px;
}

#people-advanced-button, #appearance-advanced-button, #files-advanced-button,
.settings_ellipsis_menu_item, .pointer {
    cursor: pointer;
}

#toast.show {
    visibility: visible; /* Show the snackbar */
    animation: fadein 0.5s, fadeout 0.5s 5s;
}

#toast.error {
    background-color: #633;
}

/* Animations to fade the snackbar in and out */
@keyframes fadein {
    from {
        bottom: 0;
        opacity: 0;
    }
    to {
        bottom: 30px;
        opacity: 1;
    }
}

@keyframes fadeout {
    from {
        bottom: 30px;
        opacity: 1;
    }
    to {
        bottom: 0;
        opacity: 0;
    }
}

.advanced-settings-btn {
    text-align: right;
    padding: 10px;
}

.check-list {
    vertical-align: top;
    margin-left: 5px;
    margin-bottom: 5px;
}

#rendering {
    min-height: 300px;
    width: 100%;
    height: 100%;
    margin: 0;
    touch-action: none;
    border: 1px solid black;
    overflow: hidden;
}

.picker-label {
    margin-left: 3px;
    margin-bottom: 1px;
    padding-right: 10px;
    display: flex;
    align-items: center;
    min-height: 32px;
}

.picker {
    vertical-align: top;
    width: 32px;
    float: right;
}

.highlight_picker {
    width: 32px;
    margin-top: 4px !important;
}

#highlight_list {
    margin-top: 10px;
}

.setting_subgroup .picker {
    margin-right: 2px !important;
}

.setting_subgroup {
    margin-left: 20px;
    margin-right: 3px;
    padding: 2px !important;
}

.indi_list_item, .settings_list_item {
    position: relative;
    border: 1px solid;
    border-color: var(--bs-border-color);
    background-color: var(--data-gray-color-muted, var(--bs-body-bg, white));
    border-radius: 5px;
    margin: 3px;
    width: 100%;
    display: flex;
}

.list-item-highlight {
    width: 80%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 40px;
}

.list_item_content {
    width: 95%;
}

.options-panel-background {
    background-color: var(--bs-tertiary-bg);
    padding: .25rem .75rem;
}

span.NAME {
    padding-left: 3px;
}

.settings_list_item {
    padding-left: 5px;
}

#indi_list {
    margin-top: 10px;
    margin-right: 10px;
}

.saved-settings-ellipsis {
    position: absolute;
    top: -2px;
    right: 5px;
    line-height: initial;
}

#clear_list, #clear_stop_list {
    text-align: right;
    margin-right: 20px;
}

#render-container {
    position: absolute;
}

#render_button_container {
    position: absolute;
    top: 0;
    right: 10px;
    text-align: center;
}
#render_menu_container {
    position: absolute;
    top: 0;
    left: 10px;
}

.fullscreen {
    font-size: 2.8em;
}

.close-fullscreen {
    font-size: 2em;
}

.search_icon {
    font-size: 1.8em;
}

.menu-fullscreen {
    font-size: 1.8em;
}
@media screen and (max-device-width:480px) {
    .fullscreen {
        font-size: 2em;
    }
    .search_icon {
        font-size: 1.5em;
    }
    .close-fullscreen {
        font-size: 1.2em;
    }
}

#diagram_search_box {
    margin: 0;
}

#diagram_search_box_container {
    position: absolute;
    top: 3em;
    right: 3em;
    max-width: 350px;
    min-width: calc(min(90vw - 100px, 350px));
    text-align: left;
}

/* The modal background */
.modal {
    display: block;
    position: fixed;
    z-index: 400;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto; /* Enable scroll if needed */
    background-color: rgb(0, 0, 0); /* Fallback color */
    background-color: rgba(0, 0, 0, 0.7);
}

/* Modal Content/Box */
.modal-content {
    display: block;
    background-color: #fefefe;
    margin: 15% auto;
    padding: 0 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 600px;
}

.modal h3 {
    margin-left: 0;
}

.modal h4 {
    margin-left: 5px;
}

.modal h5 {
    margin-left: 10px;
}
.modal p {
    margin-left: 15px;
}

/* The Close Button */
.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    line-height: 10px;
    margin-top: 20px;
}

.close:hover,
.close:focus,
.sharednote-delete:hover,
.sharednote-delete:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

.label-group {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding-right: 5px !important;
}

.info-icon {
    width: 16px;
    padding: 0 !important;
    font-size: 15px;
    line-height: 14px;
    height: 16px;
    opacity: 0.8;
}

.label-text {
    width: calc(100% - 16px);
    margin-top: -6px;
}

.help-link {
    text-decoration: underline;
}


#context_menu, .settings_ellipsis_menu {
    --gve-context-top: -5px;
    --gve-context-right: 1px;
    --gve-context-up: var(--gve-context-border);
    --gve-context-down: transparent;
    --gve-context-border: #333333;
    position: absolute;
    padding: 5px;
    z-index: 300;
    background-color: var(--bs-tertiary-bg);
    border-color: #333333;
    border-width: 1px;
    border-style: solid;
    border-radius: 5px 0 5px 5px;
    white-space: nowrap;
    width: auto;
    right: 0;
    top: 28px;
}


#context_menu::after, .settings_ellipsis_menu::after {
    content: "";
    position: absolute;
    top: -1px;
    right: -1px;
    width: 10px;
    height: 10px;
    border-color: transparent #333333 transparent transparent;
    border-style: solid;
    border-width: 1px;
}
/* pointy arrow bit of menu */
#context_menu::before, .settings_ellipsis_menu::before {
    content: "";
    position: absolute;
    top: var(--gve-context-top);
    right: var(--gve-context-right);
    width: 10px;
    height: 10px;
    background-color: var(--bs-tertiary-bg);
    border: 1px solid var(--gve-context-up);
    border-bottom-color: var(--gve-context-down);
    border-left-color: var(--gve-context-down);
    transform: rotate(-45deg);
    transform-origin: 50% 50%;
}

#menu-info {
    position: absolute;
    top: 0;
    right: 5px;
}

.settings_ellipsis_menu_item {
    display: block;
}

.settings_ellipsis_menu_icon {
    display: inline-block;
    width: 30px;
}

.modal-button {
    position: relative;
    right: 0;
}

.modal-container {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 100px;
    padding: 10px;
}

.modal-button-container {
    display: flex;
    margin-top: 0.5em;
    justify-content: flex-end;
    width: 100%;
}

.modal-button {
    margin: 5px !important;
}

.align-middle-container {
    display:flex;
    align-items:center;
    justify-content: space-between;
}
.max-level-box {
    width: 60px;
    display: inline;
    height: 2em;
    margin-top: 5px !important;
    padding: 5px !important;
}

.col-2-width-checkbox {
    width: 88%;
}

.padding-left-10 {
    padding-left: 10px;
}

.fit-content {
    width: fit-content;
}

.margin-bottom {
    margin-bottom: 10px;
}

.margin-top {
    margin-top: 10px;
}

.width-90pc {
    width: 90%;
}
.width-80pc {
    width: 80%;
}

.font-small {
    font-size: 0.8em;
}

h4 {
    text-indent: -5px;
}

.sharednote-heading {
    font-size: 1.1em;
    font-weight: bold;
}

.sharednote-label {
    margin-right: 8px;
}

.sharednote-list-item {
    display: flex;
    flex-direction: column;
    width: 80%;
    padding: 5px;
}
.sharednote-item-group {
    align-self: flex-end;
    margin-top: 5px;
}

.sharednote-delete {
    color: #aaa;
    position: absolute;
    right: 5px;
    top: 5px;
    font-size: 28px;
    font-weight: bold;
    line-height: 10px;
}

.sharednote-list-item.over {
    border-top: 2px solid #000000;
}

.sharednote-group {
    display: flex;
    flex-direction: column;
    width: 100%;
}
.sharednotes-save {
    align-self: flex-end;
    margin-bottom: 15px !important;
}

#sharednote-count {
    margin: 5px;
}

.shared-note-list-end {
    width: 100%;
    height: 32px;
}

.vspace-10 {
    margin-top: 10px;
    margin-bottom: 10px;
}