/* Layer Viewer */

/* prevent background scroll while fullscreen viewer is open */
body.ilv-open {
    overflow: hidden !important;
}

/* thumbnail image */
.ilv-thumbnail {
    position: relative;
    display: block;
    width: 100%;
    padding: 0;
    border: none;
    background: none;
    cursor: pointer;
    border-radius: 13px;
    overflow: hidden;
}

.ilv-thumbnail .ilv-thumbnail-img {
    width: 100%;
    height: auto;
    display: block;
    transition: all 0.2s linear;
}

.ilv-thumbnail-icon {
    position: absolute;
    right: 0.5rem;
    top: 0.5rem;
    width: fit-content;
    height: fit-content;
    border: 0;
    border: unset;
    background-color: var(--vtr-green);
    font-size: 0.8rem;
    line-height: 1;
    color: #fff;
    border-radius: 8px;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s linear;
}

.ilv-thumbnail-icon img {
    width: 1.5rem;
    height: auto;
    transition: all 0.15s linear;
}

/* thumbnail hover */
.ilv-thumbnail:hover .ilv-thumbnail-img {
    transform: scale(1.05);
}

.ilv-thumbnail:hover .ilv-thumbnail-icon {
    background-color: #fff;
    color: var(--vtr-dark-blue);
}

.ilv-thumbnail:hover .ilv-thumbnail-icon img {
    filter: invert(1);
}

/* fullscreen overlay */
.ilv-fullscreen {
    position: fixed;
    width: 100vw;
    height: 100vh;
    inset: 0;
    z-index: 9999;
    background: color-mix(in srgb, var(--vtr-dark-blue) 92%, transparent);
}

.ilv-fullscreen[hidden] {
    display: none;
}

.ilv-fullscreen-inner {
    position: relative;
    width: 100%;
    height: 100%;
}

.ilv-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 3;
    width: 2rem;
    height: 2rem;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
}

.ilv-close img {
    width: 100%;
    height: 100%;
}

/* toolbar top left */
.ilv-toolbar {
    position: absolute;
    top: 1rem;
    left: 1rem;
    min-width: 300px;
    width: 30vw;
    max-width: 450px;
    z-index: 3;
    display: flex;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.8rem;
    border-radius: 15px;
    background: color-mix(in srgb, var(--vtr-dark-blue) 70%, transparent);
}

.ilv-button-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* toolbar button */
.ilv-toolbar button {
    background: var(--vtr-dark-blue);
    color: #fff;
    border: 1px solid #fff;
    border-radius: 10px;
    padding: 0.4rem 0.5rem;
    font-size: 0.85rem;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: background 0.2s ease;
}

.ilv-toolbar button img {
    width: 1.3rem;
    height: 1rem;
    transition: all 0.15s ease;
}

/* toolbar button hover */
.ilv-toolbar button:hover {
    background: #fff;
    color: var(--vtr-dark-blue);
}

.ilv-toolbar button:hover img {
    filter: invert(1);
}

/* layer toggle buttons */
.ilv-toolbar button.ilv-toggle-layer {
    position: relative;
    background: #fff;
    border: none;
    color: #9F9F9F;
    padding-left: 2.2rem;
}

.ilv-toolbar button.ilv-toggle-layer::before {
    content: "";
    position: absolute;
    left: 0.6rem;
    top: 50%;
    width: 1.3rem;
    height: 1rem;
    transform: translateY(-50%);
    background-image: url('/wp-content/themes/levelup-child/images/icon-hide-light.svg');
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
}

.ilv-toolbar button.ilv-toggle-layer:hover {
    background: var(--vtr-green);
    color: #fff;
}

.ilv-toolbar button.ilv-toggle-layer:hover::before {
    background-image: url('/wp-content/themes/levelup-child/images/icon-show-dark.svg');
    filter: brightness(0) invert(1);
}

.ilv-toolbar button.ilv-toggle-layer.is-active {
    background: var(--vtr-green);
    color: #fff;
}

.ilv-toolbar button.ilv-toggle-layer.is-active::before {
    background-image: url('/wp-content/themes/levelup-child/images/icon-show-dark.svg');
}

.ilv-toolbar button.ilv-toggle-layer.is-active:hover {
    background: #fff;
    color: #9F9F9F;
}

.ilv-toolbar button.ilv-toggle-layer.is-active:hover::before {
    background-image: url('/wp-content/themes/levelup-child/images/icon-hide-light.svg');
    filter: none;
}

/* stage in the center */
.ilv-stage {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ilv-stage img {
    position: absolute;
    max-width: 80%;
    max-height: 90%;
    width: auto;
    height: auto;
    object-fit: contain;
    pointer-events: none;
    border-radius: 11px;
}

.ilv-stage .ilv-layer {
    opacity: 0;
    transition: opacity 0.2s ease;
}

.ilv-stage .ilv-layer.is-visible {
    opacity: 1;
}

/* annotations bottom left */
.ilv-annotations {
    position: absolute;
    bottom: 1rem;
    left: 1rem;
    z-index: 3;
    max-width: 24rem;
    height: fit-content;
    max-height: 80%;
    overflow-y: auto;
    background: color-mix(in srgb, var(--vtr-dark-blue) 70%, transparent);
    border-radius: 11px;
    padding: 0.8rem;
}

.ilv-annotations .ilv-annotations-headline {
    color: white;
    font-size: 1rem;
    line-height: 1.2;
    margin-bottom: 0.5rem;
}

.ilv-annotations .ilv-annotations-description {
    color: white;
}

.ilv-annotations .ilv-annotations-description p {
    line-height: 1.4;
    margin-bottom: 0.5rem;
}


.ilv-annotations ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.ilv-annotation {
    position: relative;
    display: none;
    color: #fff;
    padding-left: 1.1rem;
    border-radius: 6px;
    margin-bottom: 0;
    font-size: 0.85rem;
}

.ilv-annotation strong {
    font-weight: 700;
}

.ilv-annotation .ilv-annotation-icon {
    position: absolute;
    left: 0;
    top: 0.15rem;
    width: 0.7rem;
    height: auto;
}

.ilv-annotation.is-visible {
    display: block;
}

.ilv-annotation p {
    margin: 0;
}


.ilv-annotations-toggle {
    display: none;
}

/* - - - - R E S P O N S I V E - - - - */

/* P H O N E  only */
@media (max-width: 767px) {
    .ilv-toolbar {
        max-width: calc(100% - 2rem);
        width: 100%;
        z-index: 1;
    }

    .ilv-annotations {
        max-width: calc(100% - 2rem);
    }

    /* headline always visible, rest behind toggle */
    .ilv-annotations-toggle {
        display: block;
        margin-top: 0.2rem;
        padding: 0.4rem 0.8rem;
        background: var(--vtr-green);
        color: #fff;
        border: 0;
        border-radius: 6px;
        font-size: 0.85rem;
        cursor: pointer;
    }

    .ilv-annotations .ilv-annotations-body {
        display: none;
        margin-top: 0.6rem;
    }

    .ilv-annotations.is-expanded .ilv-annotations-body {
        display: block;
    }

    /* hide layer buttons */
    .ilv-button-container.layers {
        display: none;
    }

    /* image layout */
    .ilv-stage img {
        max-width: calc(100% - 2rem);
    }
}