/*
 * Lighting controls on a viewer: a button at the bottom left, opening a panel above it. Both are
 * placed against the viewer's container (which each renderer positions), so the panel can take the
 * viewer's height and scroll within it.
 */

.threedviewer-lighting {
    font-size: 14px;
}

.threedviewer-lighting summary {
    position: absolute;
    left: 12px;
    bottom: 12px;
    z-index: 101;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    min-height: 36px;
    border: 1px solid #555;
    border-radius: 4px;
    background: #fff;
    color: #111;
    cursor: pointer;
    list-style: none;
}

.threedviewer-lighting summary::-webkit-details-marker {
    display: none;
}

/* After the fullscreen button, where the viewer has one */
.threedviewer-model-stage .threedviewer-lighting summary {
    left: 56px;
}

.threedviewer-lighting-panel {
    position: absolute;
    left: 12px;
    bottom: 56px;
    z-index: 101;
    box-sizing: border-box;
    width: 260px;
    max-width: calc(100% - 24px);
    max-height: calc(100% - 68px);
    overflow-y: auto;
    padding: 10px;
    border-radius: 4px;
    background: #fff;
    color: #111;
    box-shadow: 0 2px 10px #0006;
}

.threedviewer-lighting-panel fieldset {
    margin: 0 0 10px;
    padding: 6px 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.threedviewer-lighting-panel legend {
    padding: 0 4px;
    font-weight: bold;
}

.threedviewer-lighting-control {
    display: grid;
    grid-template-columns: 6em 1fr 3.2em;
    align-items: center;
    gap: 6px;
    margin: 4px 0;
}

.threedviewer-lighting-control input[type="range"] {
    width: 100%;
    min-width: 0;
}

.threedviewer-lighting-control input[type="color"] {
    width: 3em;
    height: 1.8em;
    padding: 0;
}

.threedviewer-lighting-control output {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.threedviewer-lighting-mode label {
    display: block;
    margin: 2px 0;
}

.threedviewer-lighting-reset {
    padding: 4px 12px;
    border: 1px solid #555;
    border-radius: 4px;
    background: #fff;
    color: #111;
    cursor: pointer;
}
