/* ========================================================================== 
   Westinghouse Generator Demo
   Scoped interface styles for Verge3D + Bootstrap
   ========================================================================== */

@font-face {
    font-family: "WHSans";
    src: url("../WHSans.otf") format("opentype");
    font-display: swap;
}

/* Verge3D viewport --------------------------------------------------------- */

html,
body {
    width: 100%;
    height: 100%;
    margin: 0;
    overflow: hidden;
}

#v3d-container {
    position: relative;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    color: #161b22;
    font-family: "WH Field Gothic", "Arial Narrow", Arial, sans-serif;
    -webkit-tap-highlight-color: transparent;
}

#v3d-container *,
#v3d-container *::before,
#v3d-container *::after {
    box-sizing: border-box;
}

/* Fullscreen control ------------------------------------------------------- */

#v3d-container .fullscreen-button {
    position: absolute;
    top: 5px;
    right: 5px;
    z-index: 30;
    display: none;
    width: 50px;
    height: 50px;
    padding: 0;
    border: 0;
    background-position: center;
    background-repeat: no-repeat;
    background-size: 100% 100%;
    cursor: pointer;
}

#v3d-container .fullscreen-open {
    background-image: url("../media/fullscreen_open.svg");
}

#v3d-container .fullscreen-close {
    background-image: url("../media/fullscreen_close.svg");
}

/* Callout panel ------------------------------------------------------------ */

#v3d-container #callouts {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 20;
    width: 100%;
    pointer-events: none;
}

/* Only target direct callout panels. This avoids styling .number as a panel. */
#v3d-container #callouts > div {
    position: relative;
    width: 100%;
    margin: 0;
    color: #161b22;
    background: #d4d4d4;
    pointer-events: auto;
    animation: generator-callout-enter 260ms ease-out both;
}

#v3d-container #callouts > div > h1,
#v3d-container #callouts > div > h2,
#v3d-container #callouts > div > h3,
#v3d-container #callouts > div > h4 {
    margin: 0;
    padding: 0;
    color: #161b22;
    font-family: "WH Field Gothic", "Arial Narrow", Arial, sans-serif;
    font-size: clamp(25px, 1.55vw, 30px);
    font-style: normal;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.05;
}

#v3d-container #callouts > div > p {
    max-width: 1120px;
    margin: 8px 0 0;
    padding: 0;
    color: #111820;
    font-family: "WH Field Gothic", "Arial Narrow", Arial, sans-serif;
    font-size: clamp(16px, 1.05vw, 20px);
    font-style: normal;
    font-weight: 400;
    line-height: 1.38;
}

/* Step and fuel badges ----------------------------------------------------- */

#v3d-container #callouts > div > .number {
    position: absolute;
    z-index: 2;
    width: 90px;
    height: 90px;
    margin: 0;
    padding: 0;
    border-radius: 50%;
    color: #161b22;
    background-color: #ffffff;
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
    font-family: "WH Field Gothic", "Arial Narrow", Arial, sans-serif;
    font-size: 52px;
    font-weight: 700;
    line-height: 90px;
    text-align: center;
}

#v3d-container #callouts .number.ng {
    background-image: url("../images/gas.png");
}

#v3d-container #callouts .number.gas {
    background-image: url("../images/gasoline.png");
}

#v3d-container #callouts .number.prop {
    background-image: url("../images/propane.png");
}

/* Previous, next, and replay controls ------------------------------------- */

#v3d-container .ui-interface {
    position: absolute;
    z-index: 25;
    margin: 0;
    padding: 0;
    line-height: 0;
    pointer-events: auto;
}

#v3d-container .ui-interface a {
    display: inline-block;
    width: 50px;
    height: 50px;
    margin: 4px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    color: #ffffff;
    background: #295bdd;
    box-shadow: none;
    line-height: 0;
    text-align: center;
    text-decoration: none;
    vertical-align: middle;
    transition: background-color 140ms ease, transform 140ms ease;
}

#v3d-container .ui-interface a:hover {
    color: #ffffff;
    background: #194bcf;
    text-decoration: none;
    transform: translateY(-1px);
}

#v3d-container .ui-interface a:focus-visible {
    outline: 3px solid #ffffff;
    outline-offset: 2px;
}

#v3d-container .ui-interface img {
    display: block;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    object-fit: contain;
}

/* Introductory sentence shown before the numbered callouts. Inline display
   changes made by Verge3D remain untouched. The !important declarations only
   replace the old inline positioning from the original HTML. */
#v3d-container p.begin {
    position: absolute !important;
    right: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    z-index: 20;
    width: 100% !important;
    min-height: 115px;
    margin: 0 !important;
    padding: 35px 230px 24px !important;
    color: #111820;
    background: #d4d4d4;
    font-family: "WH Field Gothic", "Arial Narrow", Arial, sans-serif;
    font-size: clamp(16px, 1vw, 19px);
    font-weight: 400;
    line-height: 1.35;
    text-align: center !important;
}

@keyframes generator-callout-enter {
    from {
        opacity: 0;
        transform: translateY(32px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Phones: controls centered below the copy ------------------------------- */

@media (max-width: 600px) {
    #v3d-container #callouts > div {
        padding: 20px 35px 104px;
    }

    #v3d-container #callouts > div > h1,
    #v3d-container #callouts > div > h2,
    #v3d-container #callouts > div > h3,
    #v3d-container #callouts > div > h4 {
        font-size: clamp(24px, 6.5vw, 28px);
        line-height: 1.08;
    }

    #v3d-container #callouts > div > p {
        max-width: none;
        margin-top: 8px;
        font-size: clamp(16px, 4.4vw, 18px);
        line-height: 1.45;
    }

    #v3d-container #callouts > div > .number {
        top: -86px;
        left: 35px;
        width: 64px;
        height: 64px;
        font-size: 38px;
        line-height: 64px;
    }

    #v3d-container .ui-interface {
        right: 0;
        bottom: 22px;
        left: 0;
        width: 100%;
        text-align: center;
    }

    #v3d-container .ui-interface a {
        width: 46px;
        height: 46px;
        margin: 4px;
    }

    #v3d-container p.begin {
        min-height: 152px;
        padding: 28px 35px 82px !important;
        font-size: 17px;
        text-align: left !important;
    }
}

/* Large phones and small tablets: controls form a vertical rail ---------- */

@media (min-width: 601px) and (max-width: 767px) {
    #v3d-container #callouts > div {
        min-height: 168px;
        padding: 28px 105px 70px 42px;
    }

    #v3d-container #callouts > div > h1,
    #v3d-container #callouts > div > h2,
    #v3d-container #callouts > div > h3,
    #v3d-container #callouts > div > h4 {
        font-size: 28px;
    }

    #v3d-container #callouts > div > p {
        max-width: none;
        font-size: 18px;
        line-height: 1.5;
    }

    #v3d-container #callouts > div > .number {
        top: -78px;
        left: 35px;
        width: 64px;
        height: 64px;
        font-size: 38px;
        line-height: 64px;
    }

    #v3d-container .ui-interface {
        right: 28px;
        bottom: 18px;
        width: 58px;
        text-align: center;
    }

    #v3d-container .ui-interface a {
        width: 46px;
        height: 46px;
        margin: 4px 0;
    }

    #v3d-container p.begin {
        min-height: 132px;
        padding: 32px 110px 28px 42px !important;
        font-size: 18px;
        text-align: left !important;
    }
}

/* Tablets and desktop: badge, copy, and controls share one footer row ----- */

@media (min-width: 768px) {
    #v3d-container #callouts > div {
        min-height: 114px;
        padding:
            clamp(20px, 2.7vh, 30px)
            calc(clamp(44px, 13.5vw, 260px) + 180px)
            clamp(20px, 2.7vh, 30px)
            clamp(150px, 16vw, 307px);
    }

    #v3d-container #callouts > div > p {
        max-width: min(70vw, 1120px);
    }

    #v3d-container #callouts > div > .number {
        top: clamp(18px, 2.2vh, 28px);
        left: max(28px, calc(clamp(150px, 16vw, 307px) - 125px));
        width: clamp(72px, 5vw, 90px);
        height: clamp(72px, 5vw, 90px);
        font-size: clamp(42px, 3vw, 52px);
        line-height: clamp(72px, 5vw, 90px);
    }

    #v3d-container .ui-interface {
        right: clamp(44px, 13.5vw, 260px);
        bottom: clamp(25px, 4vh, 38px);
        white-space: nowrap;
        text-align: right;
    }

    #v3d-container .ui-interface a {
        width: clamp(46px, 2.7vw, 52px);
        height: clamp(46px, 2.7vw, 52px);
    }
}

/* Short screens keep the interface compact and preserve more 3D viewport. */

@media (min-width: 768px) and (max-height: 640px) {
    #v3d-container #callouts > div {
        min-height: 96px;
        padding-top: 15px;
        padding-bottom: 15px;
    }

    #v3d-container #callouts > div > .number {
        top: 12px;
        width: 70px;
        height: 70px;
        font-size: 40px;
        line-height: 70px;
    }

    #v3d-container .ui-interface {
        bottom: 20px;
    }

    #v3d-container p.begin {
        min-height: 88px;
        padding-top: 29px !important;
        padding-bottom: 18px !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    #v3d-container #callouts > div {
        animation: none;
    }

    #v3d-container .ui-interface a {
        transition: none;
    }
}



