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

iframe {
    display: block;
    border: 0;
    width: 100%;
    height: 100%;
}

.app {
    display: flex;
    width: 100%;
    height: 100%;
}

#api-frame {
    flex: 1 1 auto;
}

.options {
    box-sizing: border-box;
    flex: 0 0 300px;
    padding: 30px;
    overflow: auto;
}

.option {
    display: block;
    border-bottom: 1px solid #ccc;
}

.option:first-child {
    border-top: 1px solid #ccc;
}

.option__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    border: 0;
    background: transparent;
    padding: 16px 0;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.option__title {
    font-weight: 600;
}

.option__chevron {
    transition: transform 0.2s ease;
}

.option--collapsed .option__chevron {
    transform: rotate(-90deg);
}

.option__control {
    padding: 0 0 16px;
}

.option--collapsed .option__control {
    display: none;
}

.color {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr);
    column-gap: 8px;
    align-items: center;
    padding: 4px 0;
}

.color input[type='radio'] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.color__swatch {
    display: inline-block;
    width: 26px;
    height: 26px;
    border-radius: 3px;
    border: 1px solid rgba(0, 0, 0, 0.5);
}

.color__name {
    min-width: 0;
    line-height: 1.2;
}

.color input:checked + .color__swatch {
    box-shadow: 0 0 0 2px #000;
}

.color:hover .color__swatch {
    box-shadow: 0 0 0 2px #999;
}

.texture {
    display: block;
    position: relative;
    margin-bottom: 10px;
}

.texture input[type='radio'] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.texture__preview {
    display: block;
}

.texture__preview  img {
    display: block;
    max-width: 100%;
    height: auto;
}

.texture input:checked + .texture__preview > img {
    box-shadow: 0 0 0 2px #000;
}

.texture__name {
    display: block;
    margin-top: 4px;
}
