@keyframes pulse {
    from {
        transform: scale(1, 1);
    }

    50% {
        transform: scale(1.2, 1.2);
    }

    to {
        transform: scale(1, 1);
    }
}

@keyframes ring {
    from {
        transform: scale(0.5, 0.5);
        opacity: 1;
    }

    to {
        transform: scale(1.5, 1.5);
        opacity: 0;
    }
}

@keyframes loading {
    0% {
        opacity: 1;
    }
    50% {
        opacity: 0.3;
    }
    100% {
        opacity: 1;
    }
}

html,
body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    font-family: Arial, sans-serif;
    display: flex;
}

#api-frame {
    display: block;
    border: 0;
    width: calc(100% - 340px);
    height: 100%;
}

.annotations__images {
    height: 100%;
    width: 340px;
    background-color: #eeeeee;
    padding: 20px;
    box-sizing: border-box;
    color: #555555;
    font-size: 14px;
    overflow: scroll;
}

.annotations__images [data-annotation] {
    display: none;
    width: 100%;
}

.annotations__images img {
    width: 100%;
}

.annotations__images .--active {
    display: block;
}

.controls {
    width: 260px;
    padding: 20px 20px 10px;
    margin-bottom: 20px;
    background: #ffffff;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.15);
}

.controls__title {
    color: #000000;
    font-size: 35px;
    font-weight: 100;
    margin: 0 0 20px 0;
}

.controls .button {
    display: block;
    margin: 10px 0;
    width: 100%;
}

.annotations {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s;
}

.annotations.visible {
    opacity: 1;
}

.annotation {
    position: absolute;
    top: -8px;
    left: -8px;
    pointer-events: none;
    transition: opacity 0.3s;
}

.annotation.--occluded {
    opacity: 0;
}

.hotspot {
    position: absolute;
    top: 0;
    left: 0;
    width: 16px;
    height: 16px;
    background: #3dcd58;
    border-radius: 50%;
    animation-name: pulse;
    animation-duration: 1s;
    animation-iteration-count: infinite;
}

.hotspot:after {
    content: '';
    display: block;
    position: absolute;
    top: -2px;
    left: -2px;
    width: 16px;
    height: 16px;
    border: 2px solid #3dcd58;
    border-radius: 50%;
    animation-name: ring;
    animation-duration: 1s;
    animation-delay: 0.5;
    animation-iteration-count: infinite;
}

.button {
    appearance: none;
    padding: 4px 13px;
    border: 0;
    background: #42b4e6;
    color: #ffffff;
    font-family: Arial, sans-serif;
    font-size: 13px;
}

.button:hover {
    background: linear-gradient(to bottom, #59bde9 0, #42b4e6 100%);
}

.button:active {
    background: #000000;
}

.loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #fafafa;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.loading.--active {
    opacity: 1;
    pointer-events: auto;
}

.loading__text {
    animation: loading 1s infinite;
    color: #3dcd58;
}
