/* Equipment Builder examples (/equipmentbuilder #eb-examples): cutsheet -> 3D model cards, the model a
   small interactive viewer (a canvas drawn by static/js/eb-examples.js). Built in
   templates/equipmentbuilder.html. Light only, like the rest of the page. */

.eb-ex {
    --ex-ink: #2a3d51;
    --ex-muted: #5f6b78;
    --ex-line: #e5e7eb;
    --ex-blue: var(--thermist-blue, #0a87ed);
    --ex-model-bg: linear-gradient(#f4f8fc, #e9eef3);   /* the tool's own 3D view background */
    max-width: 1180px;
    margin: 44px auto 0;
    color: var(--ex-ink);
}

.eb-ex > h2 {
    margin: 0 0 6px;
    font-weight: 500;
    font-size: 1.6rem;
    text-align: center;
    letter-spacing: -0.01em;
}

.eb-ex-lead {
    margin: 0 auto 22px;
    max-width: 44rem;
    text-align: center;
    color: var(--ex-muted);
    line-height: 1.5;
}

.eb-ex-more {
    margin: 18px 0 0;
    text-align: center;
}

.eb-ex-more a {
    color: var(--ex-blue);
    text-decoration: none;
}

.eb-ex-more a:hover { text-decoration: underline; }

.eb-ex-grid {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.eb-ex-card { min-width: 0; }

/* the card: two panes with an arrow between, the caption under them */
.eb-ex-fig {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    grid-template-rows: auto auto;
    align-items: center;
    margin: 0;
    padding: 10px 10px 0;
    background: #fff;
    border: 1px solid var(--ex-line);
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.eb-ex-pane {
    position: relative;
    display: block;
    aspect-ratio: 4 / 3;
    border-radius: 8px;
    overflow: hidden;
}

.eb-ex-pane img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.eb-ex-sheet { background: #fff; border: 1px solid var(--ex-line); }
.eb-ex-model { background: var(--ex-model-bg); }

/* the viewer: one finger scrolls the page up and down, a sideways drag turns the model,
   two fingers zoom and pan; the pointer orbits, pans and zooms with the wheel */
.eb-ex-gl {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    touch-action: pan-y;
    cursor: grab;
    outline: none;
}

.eb-ex-gl:active { cursor: grabbing; }

.eb-ex-state {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    text-align: center;
    font-size: 0.9rem;
    color: var(--ex-muted);
    pointer-events: none;
}

.eb-ex-state[hidden] { display: none; }

.eb-ex-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    color: #9aa7b4;
}

.eb-ex-cap {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 4px 12px;
    padding: 8px 4px 10px;
}

.eb-ex-label { font-weight: 500; font-size: 0.98rem; }

.eb-ex-reset {
    font: inherit;
    font-size: 0.82rem;
    color: var(--ex-muted);
    background: #fff;
    border: 1px solid #d5dce4;
    border-radius: 8px;
    padding: 4px 10px;
    min-height: 30px;
    cursor: pointer;
}

.eb-ex-reset:hover { background: #f1f4f7; color: var(--ex-ink); }
.eb-ex-reset:focus-visible { outline: 3px solid var(--ex-blue); outline-offset: 1px; }

/* tablets: one card a row, the panes still side by side */
@media (max-width: 900px) {
    .eb-ex { margin-top: 32px; }
    .eb-ex-grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
}

/* phones: panes stacked would be tall, so they stay side by side with a thinner arrow */
@media (max-width: 600px) {
    .eb-ex > h2 { font-size: 1.35rem; }
    .eb-ex-lead { font-size: 0.95rem; margin-bottom: 16px; }
    .eb-ex-fig { padding: 8px 8px 0; }
    .eb-ex-arrow { width: 18px; }
    .eb-ex-arrow svg { width: 14px; height: 14px; }
    .eb-ex-cap { padding: 8px 2px 10px; }
}
