:root {
    /* Colors */
    --skfb-blue: #1caad9;
    --skfb-grey-3: #cccccc;

    --s-spacing: 10px;
    --x-s-spacing: 4px;
    --font-size-viewer-controls: 12px;
    --text-color: white;

    --thumb-size: 16px;
    --track-height: 8px;
    --track-fill-color: var(--skfb-blue);
    --track-background-color: #2e3338;
}

html,
body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
}

body {
    overflow: hidden;
    background: #444;
    color: var(--text-color);
    font-family: 'Open Sans', sans-serif;
    -webkit-font-smoothing: antialiased;
    touch-action: none;
}

a {
    color: #80ebff;
    text-decoration: none;
}

a:hover {
    color: var(--text-color);
    text-decoration: underline;
}

.viewer {
    height: 100%;
}

.viewer-fullpage {
    height: 100%;
}

canvas {
    display: block; /* Fix middle button drag on FF */
}

.splash-screen {
    width: 100%;
    height: 100%;
    background: #f9fbff;
    position: absolute;
    left: 0;
    top: 0;
    transition: opacity 0.5s;
    opacity: 1;
}

.splash-screen.hidden {
    opacity: 0;
}

#spinner-container {
    display: block;
    position: relative;
    margin: auto;
    width: 200px;
    top: 40%;
}

#spinner-container-logo-loader {
    position: relative;
}

.wait {
    text-align: center;
    color: black;
}

#spinner-logo {
    display: block;
    position: absolute;
    left: 50%;
    top: 50%;
    margin: -16px 0 0 -16px;
    width: 32px;
    height: 32px;
    animation: pulse 5s ease infinite alternate;
}

@keyframes pulse {
    0%,
    100% {
        opacity: 0.2;
    }
    50% {
        opacity: 1;
    }
}

#spinner-loader {
    display: block;

    margin: 0 auto;
    width: 150px;
    height: 150px;

    border-radius: 50%;
    border: 3px solid transparent;
    border-top-color: #1caad9;
    -webkit-animation: spin 1s linear infinite;
    animation: spin 1s linear infinite;
}

#spinner-loader:before {
    content: '';
    position: absolute;
    top: 5px;
    left: 5px;
    right: 5px;
    bottom: 5px;
    border-radius: 50%;
    border: 3px solid transparent;
    border-top-color: #19295a;
    -webkit-animation: spin 2.3s ease-in-out infinite;
    animation: spin 2.3s ease-in-out infinite;
}

#spinner-loader:after {
    content: '';
    position: absolute;
    top: 15px;
    left: 15px;
    right: 15px;
    bottom: 15px;
    border-radius: 50%;
    border: 3px solid transparent;
    border-top-color: #257fb4;
    -webkit-animation: spin 1.5s ease-in-out infinite;
    animation: spin 1.5s ease-in-out infinite;
}

@-webkit-keyframes spin {
    0% {
        -webkit-transform: rotate(0deg);
        -ms-transform: rotate(0deg);
        transform: rotate(0deg);
    }
    100% {
        -webkit-transform: rotate(360deg);
        -ms-transform: rotate(360deg);
        transform: rotate(360deg);
    }
}

@keyframes spin {
    0% {
        -webkit-transform: rotate(0deg);
        -ms-transform: rotate(0deg);
        transform: rotate(0deg);
    }
    100% {
        -webkit-transform: rotate(360deg);
        -ms-transform: rotate(360deg);
        transform: rotate(360deg);
    }
}

.button.--icon {
    background: transparent;
    border: 0;
    color: var(--text-color);
    display: inline-block;
    -webkit-appearance: none;
    padding: 0;
    margin: 0;
    cursor: pointer;
}

.loading-container {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    pointer-events: none;
}

.progress {
    width: 100%;
    opacity: 0;
    transition: opacity 0.1s;
}

.progress.--active {
    opacity: 1;
}

.progress__display {
    height: 5px;
    background: #1caad9;
    transition: width 0.1s;
}

/**
 * titlebar
 ******************************************************************************/

.titlebar {
    position: absolute;
    pointer-events: none;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
}

.summary {
    display: flex;
    flex: 1 1 auto;
    padding: var(--s-spacing);
}

.summary .avatar {
    margin-right: var(--s-spacing);
}

.avatar .image-container {
    border-radius: 12%;
}

.image-container {
    background-size: cover;
}

.model-info a {
    color: var(--text-color);
    pointer-events: auto;
}

.model-info a:hover {
    text-decoration: none;
}

.model-info h1,
.model-info h2 {
    font-size: var(--font-size-viewer-controls);
    line-height: 16px;
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.8);
    margin: 0;
}

.model-info h2 {
    font-weight: 300;
}

.actions {
    padding: var(--s-spacing);
}

.actions .button.--icon {
    width: 30px;
    height: 30px;
    text-align: center;
}
svg.icon,
.button.--icon svg {
    fill: var(--text-color);
}

/**
 * GUI
 ******************************************************************************/
.gui {
    box-sizing: border-box;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    user-select: none;
    z-index: 1;
    pointer-events: none;
}

.gui__controls {
    display: flex;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: var(--s-spacing);
    pointer-events: auto;
}

.gui__watermark {
    flex: 0 0 30px;
}

.gui__watermark a,
.gui__watermark svg {
    display: block;
}

.gui__watermark:hover .watermark__bg {
    fill: #1687ac;
}

.gui__general-controls {
    flex: 1 1 auto;
    display: flex;
    justify-content: flex-end;
}

.controls {
    display: flex;
}

.control {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    margin: 0 5px;
    padding: 5px;
    color: var(--text-color);
    border: 0;
    background: transparent;
    transition: background 0.2s;
    cursor: pointer;
}

.control svg {
    display: block;
    fill: var(--text-color);
    margin: 0 auto;
}

.control.--active,
.control:hover {
    background: rgba(0, 0, 0, 0.75);
}

.control:last-child {
    margin-right: 0;
}

/**
 * Control Menu
 ******************************************************************************/

.control-menu {
    position: absolute;
    bottom: 42px;
    right: var(--s-spacing);
    width: 234px;
    background: rgba(0, 0, 0, 0.75);
    border-radius: 6px;
    padding: 8px 16px;

    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s;
}
.control-menu.--active {
    opacity: 1;
    pointer-events: all;
}

.control-menu__title {
    margin: 0;
    padding-bottom: 6px;

    color: var(--text-color);
    font-size: var(--font-size-viewer-controls);
    font-weight: bold;
    line-height: 24px;
    text-align: left;
}

/* Slider */

.slider {
    display: flex;
}

.slider__ui {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.slider__labels {
    display: flex;
    justify-content: space-between;
    margin-top: 4px;
}

.slider__label {
    color: var(--text-color);
    font-size: 10px;
    line-height: 14px;
    text-align: center;
}

.slider__range {
    -webkit-appearance: none;
    width: 100%;
    height: var(--track-height);
    border-radius: 5px;
    background: var(--track-background-color);
    outline: none;
    padding: 0;
    margin: calc((var(--thumb-size) - var(--track-height)) / 2) 0 0;

    pointer-events: all;
}

.slider__range::-webkit-slider-thumb {
    appearance: none;
    width: var(--thumb-size);
    height: var(--thumb-size);
    border-radius: 50%;
    background: white;
    cursor: pointer;
}

.slider__range::-moz-slider-thumb {
    width: var(--thumb-size);
    height: var(--thumb-size);
    border: 0;
    border-radius: 50%;
    background: white;
    cursor: pointer;
}

.slider__range::-moz-range-track {
    border: 0;
}

input::-moz-focus-inner,
input::-moz-focus-outer {
    border: 0;
}

.slider__value {
    font-size: 12px;
    font-weight: bold;
    line-height: 17px;
    text-align: center;

    padding: 0 4px;
    margin-left: 12px;
}

/* Overlay */

.overlay {
    box-sizing: border-box;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    user-select: none;
    z-index: 2;
    pointer-events: none;

    background: rgba(0, 0, 0, 0.8);
    transition: all 250ms ease-in-out;

    opacity: 0;

    transition: all 100ms ease-in-out;
    transform: translateZ(100px);
}

.overlay .a {
    outline: none;
}

.overlay .close {
    position: absolute;
    top: 15px;
    right: 25px;
    z-index: 2;
    font-size: 16px;
    color: #ffffff;
}

.overlay .inner {
    position: absolute;
    top: 0;
    left: 0;
    display: flex;
    width: 100%;
    height: 100%;
    color: #ffffff;
    flex-flow: column nowrap;
    justify-content: center;
}

.overlay .inner > * {
    display: flex;
    justify-content: center;
}

.overlay.help .tabs-container {
    display: flex;
    overflow: auto;
    flex-direction: column;
    flex: 1 1 0;
    justify-content: center;
}

.overlay.help .action {
    display: block;
    margin: 20px 0;
    text-align: center;
    flex: 0 0 auto;
}

.overlay.help .action button {
    background: var(--skfb-grey-3);
    /**/
    font-weight: 700;

    display: inline-flex;
    justify-content: center;
    align-items: center;
    border: 2px solid transparent;
    border-radius: 4px;
    padding: 0 13px;
    font-size: 0.9em;
    text-shadow: none;
    text-transform: uppercase;
    line-height: 1.2;
    cursor: pointer;
    outline: none;
}

.overlay.help .tab {
    width: 100%;
    display: flex;
}

.overlay.help .tab.--basic .tip {
    display: flex;
    font-size: 14px;
    color: var(--skfb-grey-3);
    text-align: center;
    flex-direction: column;
    flex: 1;
    justify-content: center;
}

.overlay.help .tab.--basic .tip > div {
    min-height: 0;
    max-height: none;
}

.overlay.help .tab.--basic i {
    margin: 0 0 30px;
    font-size: 28px;
    color: #ffffff;
}

.overlay.--active {
    opacity: 1;
}

.--active button,
.--active a {
    pointer-events: all;
}
