* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    font-family: 'Open Sans', sans-serif;
}

body {
    background: transparent;
}

body.dark {
    background-color: #222;
}

body.dark label:not(.toggle-label) {
    color: white;
}

#api-frame {
    width: 100%;
    border: 0;
    flex: 1;
}

.configurator-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
}

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

.annotations.visible {
    opacity: 1;
}

@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.0;
    }

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

.annotation {
    position: absolute;
    top: -8px;
    left: -8px;
}

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


.hotspot {
    position: absolute;
    top: 0;
    left: 0;
    width: 16px;
    height: 16px;
    background: #fff;
    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 #fff;
    border-radius: 50%;
    animation-name: ring;
    animation-duration: 1s;
    animation-delay: 0.5;
    animation-iteration-count: infinite;
}

.configurator {
    width: 100%;
    flex: 0 1 auto;
    display: flex;
    justify-content: center;
    padding: 10px;

    color: #fff;

    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s;
    z-index: 1;
}

.configurator.visible {
    opacity: 1;
    pointer-events: auto;
}

.option {
    margin: 0 4px;
    width: 152px;
}

.option > label {
    display: block;
}

.option--color .option__control {
    display: flex;
    flex-wrap: wrap;
}

.option--select .option__control {
    margin-top: 4px;
}

.color {
    flex: 0 0 auto;
    display: block;
    width: 24px;
    height: 24px;
    margin: 4px;
}

.color__swatch {
    display: block;
    position: relative;
    width: 24px;
    height: 24px;
    cursor: pointer;
    transition: border 0.3s, box-shadow 0.3s, transform .2s ease;
    border-radius: 4px;
}

.color__swatch::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    border-radius: 4px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

.color input {
    display: none;
}

.color input:checked + .color__swatch {
    transform: scale(1.15);
}

.color input:checked + .color__swatch::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    border-radius: 4px;
}

.color__name {
    display: none;
}

.option--select select {
    display: none;
}

.option--select .option__control input[type='radio'] {
    display: none;
}

.option label:not(.toggle-label) {
    color: #222;
}

.option--select .option__control label:first-child span {
    border-top-left-radius: 3px;
    border-bottom-left-radius: 3px;
}
.option--select .option__control label:last-child span {
    border-top-right-radius: 3px;
    border-bottom-right-radius: 3px;
}
.option--select .option__control span {
    display: inline-block;
    padding: 4px 8px;
    font-size: 12px;
    background: #333;
    cursor: pointer;
}

.option--select .option__control input:checked + span {
    background: #1caad9;
}

.help__toggle {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 1;

    display: inline-block;
    appearance: none;
    background: rgba(0, 0, 0, 0.8);
    color: #FFF;
    font-weight: bold;
    font-size: 18px;
    border: 0;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    text-align: center;
    line-height: 32px;
}

.help__content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -55%);
    z-index: 2;

    background: rgba(0, 0, 0, 0.8);
    color: #FFF;
    font-size: 14px;
    padding: 20px 40px;
    border-radius: 4px;

    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s, transform 0.2s;
}

.help__content.visible {
    opacity: 1;
    pointer-events: auto;
    transform: translate(-50%, -50%);
    transition: opacity 0.4s, transform 0.4s;
}

.help__content div {
    margin: 20px 0;
}

.help__content p {
    margin: 0;
}

.help__title {
    font-size: 18px;
    font-weight: bolder;
    margin: 0;
}


@media screen and (max-width: 295px) {
    .help__content {
        width: 100%;
        left: 0;
        transform: translate(0%, -55%);
    }

    .help__content.visible {
        transform: translate(0%, -50%);
    }
    .option {
        margin: 0 8px;
        width: 128px;
    }
}

@media screen and (max-width: 410px) and (min-width: 296px) {
    .help__content {
        width: 100%;
        left: 0;
        transform: translate(0%, -55%);
    }

    .help__content.visible {
        transform: translate(0%, -50%);
    }

    .option {
        margin: 0 8px;
        width: 128px;
    }

    .option:nth-child(odd) {
        margin: 0 10px 0 0;
    }

    .option:nth-child(even) {
        margin: 0 0 0 10px;
    }
}

@media screen and (max-width: 1024px) {
    .configurator {
        flex-wrap: wrap;
    }
}

