/* The 3D model blocks (decision 302 M1c): the viewer's turntable and the library's cards. A theme may restyle any class. */

.models-viewer {
    margin: 0;
}

.models-turntable {
    display: inline-block;
    max-width: 100%;
    border-radius: 0.5rem;
    outline-offset: 0.25rem;
}

.models-turntable img {
    display: block;
    max-width: 100%;
    height: auto;
    user-select: none;
}

/* Only once the script has started: a turntable that cannot turn does not look as if it could. */
.models-turntable-live {
    cursor: grab;
    touch-action: pan-y;   /* a sideways swipe turns the model; an up/down swipe still scrolls the page */
}

/* Rings to tilt through as well: an up/down drag tilts the model, so the page must not scroll under it. */
.models-turntable-rings {
    touch-action: none;
}

.models-turntable-dragging {
    cursor: grabbing;
}

.models-hint,
.models-pending,
.models-missing {
    font-size: 0.875rem;
    opacity: 0.75;
}

.models-facts {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 0.25rem 1rem;
}

.models-facts dt {
    font-weight: 600;
}

.models-facts dd {
    margin: 0;
}

.models-library {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr));
    gap: 1rem;
    list-style: none;
    padding: 0;
}

.models-card a {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    text-decoration: none;
}

.models-card img {
    width: 100%;
    height: auto;
    aspect-ratio: 1;
    object-fit: contain;
}

.models-card-name {
    font-weight: 600;
}

.models-card-size {
    font-size: 0.875rem;
    opacity: 0.75;
}

/* The admin model page's posters (M1b). */
.models-posters {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.models-posters img {
    max-width: 16rem;
    height: auto;
}
