/* 3D Model page — viewer + six-column tools under the INFO-style header.
   Option list scrolls inside its column. Page scrolls down to the legal footer. */
:root {
    --mgp-3d-header-h: 214px;
}

html.mgp-3d-model-html {
    overflow-x: auto;
    overflow-y: scroll;
    scrollbar-gutter: stable;
}

body.mgp-3d-model-page {
    margin: 0;
    height: auto;
    min-height: 100%;
    overflow: visible;
    background: #000000;
}

body.mgp-3d-model-page #mgp-cookie-banner {
    z-index: 20000;
}

body.mgp-3d-model-page #mgpAduSiteFooter {
    display: block;
    width: 1683px;
    max-width: 100%;
    box-sizing: border-box;
    margin: 18px auto 28px;
    padding-bottom: 20px;
}

body.mgp-3d-model-page .mgp-adu-logo-img {
    width: 176px;
    height: 214px;
}

body.mgp-3d-model-page .mgp-adu-header {
    width: 1683px !important;
    min-width: 1683px !important;
    max-width: 1683px !important;
    margin-left: auto;
    margin-right: auto;
    overflow: hidden;
}

body.mgp-3d-model-page .mgp-adu-header > table {
    width: 1683px !important;
    min-width: 1683px !important;
    max-width: 1683px !important;
    height: 214px;
    table-layout: fixed !important;
}

/* Hover billboard, centered in the black band under the green bar. */
body.mgp-3d-model-page .mgp-adu-intro-band {
    height: 131px !important;
    vertical-align: middle !important;
    padding: 0 20px !important;
    box-sizing: border-box;
    text-align: center;
}

body.mgp-3d-model-page .mgp-adu-intro-band .mgp-adu-hint-bar {
    height: 54px;
    align-items: center;
    justify-content: center;
}

body.mgp-3d-model-page .mgp-adu-intro-band .mgp-adu-hint-billboard {
    position: relative;
    height: 54px;
    align-items: center;
    justify-content: center;
}

body.mgp-3d-model-page .mgp-adu-intro-band .hint-billboard-default,
body.mgp-3d-model-page .mgp-adu-intro-band .hint-billboard-active {
    display: grid;
    place-items: center;
    text-align: center;
    position: absolute;
    inset: 0;
    width: 100%;
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-size: 20px !important;
    line-height: 1.35 !important;
}

body.mgp-3d-model-page .mgp-adu-intro-band .hint-billboard-default {
    color: #c8eef5 !important;
}

body.mgp-3d-model-page .mgp-adu-intro-band .hint-billboard-active {
    display: none;
    color: #ffcc80 !important;
}

body.mgp-3d-model-page .mgp-adu-intro-band .mgp-adu-hint-billboard.is-live .hint-billboard-active {
    display: grid;
    place-items: center;
}

.mgp-3d-stage {
    box-sizing: border-box;
    width: 1683px;
    max-width: 100%;
    min-height: calc(100vh - var(--mgp-3d-header-h));
    margin: 0 auto;
    padding: 6px 8px 8px;
    display: grid;
    grid-template-columns: 176px minmax(0, 1fr);
    grid-template-rows: minmax(360px, 1fr) auto;
    gap: 8px 10px;
}

.mgp-3d-options {
    grid-column: 1;
    grid-row: 1 / 3;
    min-height: 0;
    max-height: calc(100vh - var(--mgp-3d-header-h) - 20px);
    display: flex;
    flex-direction: column;
    border: 1px solid #c45c26;
    background: #141414;
    padding: 8px 8px 6px;
    overflow: hidden;
}

.mgp-3d-viewer-col {
    grid-column: 2;
    grid-row: 1;
    position: relative;
    min-height: 360px;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.mgp-3d-view-bar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    flex: 0 0 auto;
    padding: 0 0 6px;
}

.mgp-3d-view-bar label {
    font-size: 11px;
    color: #eeeeee;
    background: #1a1a1a;
    border: 1px solid #444444;
    border-radius: 6px;
    padding: 4px 7px;
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
}

.mgp-3d-viewport {
    position: relative;
    flex: 1 1 auto;
    min-height: 360px;
    min-width: 0;
}

#threeHost {
    position: relative;
    z-index: 0;
    width: 100%;
    height: 100%;
    background-color: #121212;
    border: 1px solid #333333;
    cursor: grab;
}

#threeHost.measure {
    cursor: crosshair;
}

#threeHost canvas {
    display: block;
    width: 100%;
    height: 100%;
}

.mgp-3d-empty {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    padding: 24px;
    text-align: center;
    color: #bbbbbb;
    font-family: "Tekton Pro", Arial, sans-serif;
    font-size: 22px;
    line-height: 1.35;
}

body.mgp-3d-has-model .mgp-3d-empty {
    display: none;
}

.mgp-3d-status {
    position: absolute;
    left: 10px;
    top: 10px;
    z-index: 3;
    max-width: 46%;
    margin: 0;
    padding: 4px 8px;
    font-size: 12px;
    line-height: 1.3;
    color: #cccccc;
    background: rgba(10, 10, 10, 0.72);
    border: 1px solid #333333;
    pointer-events: none;
}

.mgp-3d-status.ok {
    color: #7cfc9a;
}

.mgp-3d-status.err {
    color: #ff6666;
}

.mgp-3d-tools {
    grid-column: 2;
    grid-row: 2;
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 6px;
    border: 1px solid #333333;
    background: #141414;
    padding: 6px 8px 7px;
    min-width: 0;
}

.mgp-3d-tools h3 {
    font-size: 11px;
    color: #ffcc66;
    margin: 0 0 3px;
    letter-spacing: 0.03em;
    font-family: "Tekton Pro", Arial, sans-serif;
}

.mgp-3d-tools .row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 2px 0;
    flex-wrap: wrap;
}

.mgp-3d-tools label {
    font-size: 11px;
    color: #cccccc;
    display: flex;
    align-items: center;
    gap: 6px;
}

.mgp-3d-tools .val {
    color: #aaaaaa;
    min-width: 0;
    font-size: 10px;
}

.mgp-3d-tools input[type="range"] {
    width: 92px;
    padding: 0;
    accent-color: #c45c26;
    background: #1a1a1a;
}

.mgp-3d-tools button,
.mgp-3d-view-bar button,
.mgp-3d-opt-btn {
    background: #1a1a1a;
    color: #ffffff;
    border: 1px solid #444444;
    border-radius: 5px;
    padding: 3px 7px;
    font-size: 11px;
    cursor: pointer;
}

.mgp-3d-tools button.active,
#btnMeasure.active {
    border-color: #c45c26;
    background: #2a1810;
    color: #ffcc66;
}

#btnMeasure {
    border: 2px solid #ffcc66;
    color: #ffcc66;
    background: #1c1810;
}

.mgp-3d-measure-out {
    color: #7cfc9a;
    font-size: 11px;
    margin-top: 2px;
    line-height: 1.3;
}

.mgp-3d-color-col {
    display: flex;
    flex-direction: column;
    gap: 3px;
    border: 1px solid #333333;
    background: #101010;
    padding: 5px 8px 6px;
    border-radius: 5px;
    min-width: 0;
}

.mgp-3d-color-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
}

.mgp-3d-color-col label {
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
    font-size: 11px;
}

.mgp-3d-color-col input[type="range"] {
    flex: 1;
    width: auto;
    min-width: 0;
}

.mgp-3d-color-col .val {
    min-width: 0;
    font-variant-numeric: tabular-nums;
    font-size: 10px;
}

.mgp-3d-tools input[type="color"] {
    width: 28px;
    height: 18px;
    padding: 0;
    border: 1px solid #444444;
    background: #1a1a1a;
    cursor: pointer;
}

.mgp-3d-options-title {
    margin: 0 0 6px;
    color: #ffcc66;
    font-family: "Tekton Pro", Arial, sans-serif;
    font-size: 18px;
    font-weight: bold;
    letter-spacing: 0.08em;
    text-align: center;
    line-height: 1.1;
}

.mgp-3d-opt-btns {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 8px;
    flex: 0 0 auto;
}

.mgp-3d-opt-btn {
    width: 100%;
    padding: 7px 8px;
    font-family: "Tekton Pro", Arial, sans-serif;
    font-size: 14px;
    font-weight: bold;
    color: #ffcc66;
    border: 1px solid #c45c26;
    background: #1c1810;
}

.mgp-3d-opt-btn.is-on {
    background: #c45c26;
    color: #1a0c04;
    border-color: #ffcc66;
}

.mgp-3d-options-scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #555555 #1a1a1a;
}

.mgp-3d-opt-group {
    margin: 0 0 10px;
}

.mgp-3d-opt-group h3 {
    margin: 0 0 4px;
    font-size: 13px;
    color: #19edfe;
    font-family: "Tekton Pro", Arial, sans-serif;
    letter-spacing: 0.03em;
}

.mgp-3d-opt-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin: 3px 0;
    color: #f2f2f2;
    font-size: 13px;
    font-family: "Tekton Pro", Arial, sans-serif;
    cursor: pointer;
}

.mgp-3d-opt-row input {
    accent-color: #c45c26;
}

.mgp-3d-opt-hint {
    color: #888888;
    font-size: 11px;
    line-height: 1.35;
    margin: 0 0 6px;
}

.mgp-3d-opt-off,
.opt-off {
    opacity: 0.4;
    pointer-events: none;
}

.hidden {
    display: none !important;
}
