body {
    background-color: #000000;
}

body.viewer {
    color: white;
    margin: 0;
    display: flex;
    flex-direction: row;
    height: 100vh;
}

/* Viewer */

.viewer {
    display: flex;
    height: 100vh;
}

.image_container {
    height: 100%;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.image_viewer {
    flex-grow: 1;
    min-height: 0;
    position: relative;
}

.display-loading {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.display-loading[hidden] {
    display: none;
}

.carousel {
    height: 100px;
    flex-shrink: 0;
    display: flex;
    gap: 8px;
    padding: 8px;
    overflow-x: auto;
}

.carousel img {
    height: 100%;
    width: auto;
    border-radius: 4px;
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.2s;
    flex-shrink: 0;
}

.carousel img:hover,
.carousel img.active {
    opacity: 1;
}

.carousel-sentinel {
    flex-shrink: 0;
    width: 1px;
    align-self: stretch;
}

.subject_image{
    object-fit: contain;
    height: 100%;
    width: 100%;
    display: block;
}

.fade-in {
    opacity: 0;
    transition: opacity 0.5s ease-in;
}

.fade-in.loaded {
    opacity: 1;
}

.image_infos{
    display: flex;
    flex-direction: column;
    margin-top: 16px;
    margin-left: 16px;
    margin-right: 8px;
    margin-bottom: 8px;
    flex-grow: 0;
    width: 175px;
}

/* index */

.card {
    background-color: black;
    border-width: 0;
    margin-bottom: 24px;
}

.card-needs-review {
    border: 2px solid #ffc107 !important;
    border-radius: 10px;
    position: relative;
}

.card img {
    border-radius: 8px;
}

.need-review-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: #ffc107;
    color: #000;
    font-size: 11px;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 4px;
    z-index: 2;
}

.pop-title {
    transition: opacity 0.2s;
    pointer-events: none;
    height: 100%;
    width: 100%;
    position: absolute;
    opacity: 0;
}

.card:hover .pop-title {
    opacity: 1;
}

.card h5 {
    position: absolute;
    bottom: 8px;
    left: 8px;
    margin: auto;
    text-align: center;
    color: white;
    padding: 3px;
    background-color: #00000088;
    border-radius: 8px;
}

.card .btn {
    pointer-events: all;
    position: absolute;
    bottom: 8px;
    right: 8px;
}

.piccard {
    border-width: 0;
    padding: 0;
    background-color:#00000000;
}

/* edit */

.edit_image,
.preview_image{
    object-fit: contain;
    height: 200px;
    width: 100%;
    display: block;
}

/* profile avatar */

.profile-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    overflow: hidden;
    cursor: pointer;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #333;
}

.profile-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.profile-avatar-initial {
    color: #fff;
    font-weight: bold;
    font-size: 14px;
    line-height: 1;
    user-select: none;
}

.profile-avatar:hover {
    opacity: 0.8;
}

.profile-avatar-sm {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    object-fit: cover;
    display: inline-block;
    vertical-align: middle;
    margin-right: 4px;
}

.profile-avatar-sm-init {
    background: #333;
    color: #fff;
    font-weight: bold;
    font-size: 11px;
    line-height: 20px;
    text-align: center;
    user-select: none;
}

.profile-avatar-xs {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    object-fit: cover;
    display: inline-block;
    vertical-align: middle;
}

.profile-avatar-xs-init {
    background: #333;
    color: #fff;
    font-weight: bold;
    font-size: 9px;
    line-height: 16px;
    text-align: center;
    user-select: none;
    display: inline-block;
}

@media (orientation: portrait) {
    .viewer {
        flex-direction: column;
    }

    .image_infos{
        flex-grow: 0;
        width: auto;
    }
}

/* SPA page-announcement focus targets (setPage in pages.js) are non-interactive;
   suppress the browser's default focus ring on them. */
[tabindex="-1"]:focus {
    outline: none;
}

/* Page transitions (setPage in pages.js) */

[id^="page-"] {
    opacity: 1;
    transition: opacity 75ms ease;
}

.page-fade-out,
.page-fade-in {
    opacity: 0;
    pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
    [id^="page-"] {
        transition: none;
    }
}
