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 white, 0 0 0 0.25rem #258cfb;
}

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

body {
    /*background-image: url(/end-bg.webp);*/
}

.article-text {
    justify-self: center;
    width: min(55em, 100%);
}

.widgets-list {
    padding-left: 1em;
}

.widget-container {
    justify-items: center;
    border: 2px solid #00000033;
    width: 100%;
}



.clickable {
    cursor: pointer;
}

.pixelated {
    image-rendering: pixelated;
}

.fit-media {
    display: flex;
    justify-content: center;
    /*align-items: center; causes original size at max*/
}

.fit-media img, .fit-media video {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.fit-media-copyable img, .fit-media-copyable video {
    /*
        (for modal)
        allowing context menu
        allowing controls (will be replaced by player)
        and therefore blocks closing by click on gifs!!!
    */
    pointer-events: auto;
}

[editable-field-bubble-list] {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.bubble-list-element {
    min-width: 30px;
    border: 1px solid black;
    display: flex;
}
.bubble-list-element > * {
    padding: 1px 6px;
    align-content: center;
}
.bubble-list-element a {
    color: #000000;
    text-decoration: none;
}
.bubble-list-element a:hover, .bubble-list-add:hover {
    background-color: #0000001F;
}
.bubble-list-element a:active, .bubble-list-add:active {
    background-color: #0000003F;
}
.bubble-list-element .dropdown-menu {
    max-height: 50vh;
    overflow-y: scroll;
}

.bubble-list-remove {
    cursor: pointer;
    display: inline-block;
    border-left: 1px solid black;
    text-align: center;
    min-width: 20px;
    height: 100%;
    background-color: #00000011;
}
.bubble-list-remove:hover {
    background-color: #FF000077;
}
.bubble-list-remove:active {
    background-color: #FF0000CC;
}

.bubble-list-add {
    cursor: pointer;
    width: 100%;
    height: 100%;
    text-align: center;
}

.bubble-list-suggestions-count {
    float: right;
}

.media-link {
    text-decoration: none;
    color: unset;

    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: start;

    margin-bottom: 0.5em;
}
.media-link-preview {
    margin-right: 0.5em;
    height: 3em;
    width: 3em;
}

.media-audio {
    display: flex;
    flex-direction: row;
    align-items: center;
}

.media-audio-main {
    display: flex;
    flex-direction: column;
}

.media-audio-name {
    font-size: 1em;
    line-break: anywhere;
    /*text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;*/
}

.media-document {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
}

.media-document-icon, .media-document-download-button {
    font-size: 1.4em;
    aspect-ratio: 1;
    height: 2.1em;
    text-align: center;
    align-content: center;
}

.media-document-main {
    display: flex;
    flex-direction: column;
}

.media-document-name {
    font-size: 1em;
    line-break: anywhere;
}

.media-document-filename {
    font-size: 0.9em;
    line-break: anywhere;
}

.recent-media-minified {
    aspect-ratio: 1;
    overflow: hidden;
    position: relative;
    word-break: break-all;
}
.media-audio.minified {
    flex-direction: column;
}
.media-document.minified {
    flex-direction: column;
}
.minified .media-document-icon {
    font-size: 2em;
}

[editable-field][multiline] {
    white-space: break-spaces;
}

.fullsize-media {
    margin: auto;
    width: 90vw;
    max-height: calc(90vh - 30px);
}

.unmatching {
    opacity: 0.25;
}
.unmatching:hover {
    opacity: 1;
}

.modal-subtext {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #0000;
    color: #FFFA;
}
.modal-mini-button {
    color: #FFFD;
}
.modal-mini-button:hover {
    color: #FFFA;
}
.featured-media-tags {
    color: #FFFD;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    column-gap: 1.5em;
    row-gap: 0.5em;
    margin-top: 0.5em;
    margin-left: 2em;
    margin-right: 2em;
    max-width: 100vh;
    justify-content: center;
}
.featured-media-tags .editable-field-inactive:hover {
    color: #FFFA;
}
.featured-media-tags .editable-field-active {
    width: 8em;
}
.featured-media-tags:not(.allow-edit) [editable-field="newTag"] {
    display: none;
}


.small-media-panel {
    max-height: 50vh;
    display: flex;
    flex-wrap: wrap;
    overflow-y: scroll;
}

.small-media-panel .media-document {
    width: 100%;
}

.compact-media-panel {
    --media-list-count: 3;
    --media-list-gap: 3px;
    display: flex;
    /*justify-content: space-around;*/
    gap: var(--media-list-gap);
}
.compact-media-panel > * {
    width: calc((100% - var(--media-list-gap) * (var(--media-list-count) - 1)) / var(--media-list-count));
}
.compact-media-panel > * img, .compact-media-panel > * video {
    width: 100%;
}
.compact-media-panel img, .compact-media-panel video {
    vertical-align: middle;
    aspect-ratio: 1;
    object-fit: cover;
}

.media-container {
    justify-content: center;
    margin-top: .5rem;
    gap: 0.3em;
}




.media-card {
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between;
    line-break: anywhere;
    min-width: 50px;
    max-width: 300px;
    min-height: 50px;
}

.media-card-labels {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.media-card img, .media-card video {
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    user-drag: none;

    max-width: 45vw;
    max-height: 30vw;
}

.media-horizontal {
    width: 45vw;
}

.media-vertical {
    height: 30vw;
}

@media (min-width: 576px) {
    .media-card img, .media-card video {
        max-width: calc(270px - 0.5em - 0.75rem - 1px);
        max-height: 200px;
    }

    .media-horizontal {
        width: 300px;
    }

    .media-vertical {
        height: 200px;
    }
}

@media (min-width: 768px) {
    .media-card img, .media-card video {
        max-width: 300px;
        max-height: 200px;
    }
    .media-horizontal {
        width: 300px;
    }
    .media-vertical {
        height: 200px;
    }
}

.media-card audio {
    max-width: 300px;
    max-height: 200px;
}

.media-panel-date-label {
    width: 100%;
    text-align: center;
}

.hide-date-labels .media-panel-date-label {
    display: none;
}

#featuredMediaModalPreview {
    height: 60vh;
    max-height: 60vh;
}

#featuredMediaModal .modal-body {
    min-height: 50vh;
    max-height: 90vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}
@media (min-width: 1024px) {
    #featuredMediaModal .modal-body {
        flex-direction: row;
    }

    #featuredMediaModal .modal-dialog {
        max-width: 90vw;
    }

    #featuredMediaModalPreview {
        width: 60%;
        max-width: 60%;
        flex-direction: column;
        height: auto;
        max-height: 86vh;
    }
    .modal:not(.gallery) #featuredMediaModalInfo {
        width: 40%;
    }
}

.allow-edit .editable-field-inactive {
    min-height: 1.5em;
    cursor: pointer;
}
.allow-edit .editable-field-inactive:hover {
    background: #77777733;
}

.editable-field-placeholder {
    opacity: 0.6;
    font-style: italic;
}

textarea.editable-field-active {
    width: 100%;
}

.editable-field-error {
    color: #EE3333;
}

.editable-field-active-error {
    border: 2px #ff3333 solid;
}

[editable-field="name"] {
    font-size: 1.2em;
}

[editable-field-bubble-list] {
    margin: 6px 0px;
}

#featuredMediaModalInfo {
    padding-left: 10px;
}

.filters-wrapper {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.2em;
}

.filters-extra {
    margin-top: 0.25em;
    width: 100%;
}

.sort-option, .filter-option, .tag-search-filter-suggestions .dropdown-item {
    user-select: none;
}

.filter-toggle:not(.selected) {
    /*background-color: #6c757daf;*/
    /*box-shadow: 0 0 0 5px #fff inset;*/
    color: #ffffff7f;
}

.filter-all-button {
    width: 50%;
    padding: .25rem 0rem;
    text-align: center;
    cursor: pointer;
}
.filter-all-button:hover {
    background-color: #e9ecef;
}

.modal-dialog.fullscreen, .modal.gallery .modal-dialog {
    max-width: unset;
}
.modal-dialog.fullscreen .modal-content, .modal.gallery .modal-content {
    background: transparent;
    border: none;
}
.modal-dialog.fullscreen .modal-body, .modal.gallery .modal-body {
    flex-direction: column !important;
}
.modal-dialog.fullscreen #featuredMediaModalPreview, .modal.gallery #featuredMediaModalPreview {
    height: 80vh;
    max-height: 80vh;
    width: unset;
    max-width: unset;
}
.modal-dialog.fullscreen #featuredMediaModalInfo {
    display:none;
}
.modal.gallery #featuredMediaModalInfo {
    color: #FFF;
    align-self: center;
    max-width: 50em;
}

.modal.gallery #featuredMediaModalInfo > :first-child,
.modal.gallery #featuredMediaModalInfo > :nth-child(3),
.modal.gallery #featuredMediaModalInfo > :nth-child(6),
.modal.gallery #addFeaturedToRecentMediaButton {
    display: none !important;
}

#galleryFinishedAt, #galleryDescription {
    display: none;
}
.modal.gallery #galleryFinishedAt, .modal.gallery #galleryDescription {
    display: block;
    white-space: break-spaces;
}
#galleryFinishedAt {
    text-align: center;
}

.modal.gallery .modal-body {
    max-height: 96vh !important;
}

.month-media-panel {
    justify-content: space-around;
}
.month-media-panel .media-card, .month-media-panel .month-placeholder {
    width: max(20%, 20vh);
}
.month-media-panel .media-horizontal {
    max-width: 100%;
    max-height: 100%;
    height: auto !important;
    object-fit: contain;
}
.month-media-panel .media-vertical {
    max-width: 100%;
    max-height: 100%;
    width: auto !important;
    /*height: 300px;*/
    object-fit: contain;
}
.month-placeholder {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    min-height: 200px;
}
.month-placeholder *:nth-child(2) {
    width: 100%;
    height: 100%;
    background-color: #0000000F;
}
.month-label {
    margin-bottom: 1em;
}

.hint button {
    width: 1.8em;
    height: 1.8em;
    border-radius: 0.9em;
    padding-top: 0.1em;
    padding-left: 0.67em;
    font-style: italic;
    font-weight: 600;
    opacity: 0.7;
}

.media-viewer-switcher {
    position: absolute;
    width: min(30vw, 30vh);
    height: 50vh;
    top: 25vh;
    cursor: pointer;
    user-select: none;
    align-content: center;
    font-size: 8em;
    color: white;
    font-weight: 100;
    opacity: 0.3;
    -webkit-text-stroke: 2px #0000007f;
}
.media-viewer-switcher:hover {
    font-weight: 400;
    opacity: 0.8;
    -webkit-text-stroke: 2px #000000ff;
}
.modal.editing .media-viewer-switcher {
    pointer-events: none;
    opacity: 0.1;
}

.media-viewer-switcher-left {
    left: 0;
    text-align: left;
}

.media-viewer-switcher-right {
    right: 0;
    text-align: right;
}

.hidden {
    display: none !important;
}

.favicon-mini {
    width: 20px;
    height: 20px;
}