/* Snap Configurator – slide-in options panel
   Scoped under .builder-type-17 to avoid affecting other products */

.builder-type-17 #otherOpts {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 26%;
    max-width: 500px;
    transform: translateX(-100%);
    transition: transform 300ms cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 4px 0 4px rgba(0, 0, 0, 0.04);
    z-index: 1050;
    background: #fff;
    overflow: visible;
    padding: 16px 8px 24px;
    display: flex !important;
    flex-direction: column;
}

/* Scrollable inner wrapper for step content */
.builder-type-17 #otherOpts .snap-panel-scroll {
    overflow-y: auto;
    flex: 1 1 0;
    min-height: 0;
    padding-left: 12px;
    padding-right: 10px;
    scrollbar-width: thin;
}

.builder-type-17 #otherOpts .snap-panel-scroll::-webkit-scrollbar {
    width: 5px;
}

.builder-type-17 #otherOpts .snap-panel-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.builder-type-17 #otherOpts .snap-panel-scroll::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.builder-type-17 #otherOpts .snap-panel-scroll::-webkit-scrollbar-thumb:hover {
    background: #999;
}

/* Section title at top of slide-in panel */
.builder-type-17 .snap-panel-title {
    margin: 0 0 12px;
    padding: 0 12px 8px;
    font-size: 20px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--default_color_var);
    border-bottom: 1px solid #dee2e6;
    flex-shrink: 0;
}
.builder-type-17 .snap-panel-size {
    font-size: 16px;
    font-weight: 600;
    color: #595959;
    text-transform: none;
}

.builder-type-17 #otherOpts.snap-panel-open {
    transform: translateX(0);
}

/* Close arrow on right edge – hidden until panel is open */
.snap-panel-close {
    display: none;
}

.snap-panel-open .snap-panel-close {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    right: -28px;
    width: 28px;
    height: 48px;
    border-radius: 0 6px 6px 0;
    border: 1px solid var(--default_color_var);
    border-left: none;
    background: var(--default_color_var);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 4px 0 4px rgba(0, 0, 0, 0.04);
    transition: background 150ms, filter 150ms;
    z-index: 2;
    padding: 0;
}

.snap-panel-close:hover {
    background: var(--default_color_var);
    filter: brightness(0.85);
}

.snap-panel-close svg {
    width: 16px;
    height: 16px;
    stroke: #fff;
}

/* Step dps: radio buttons in a row */
.builder-type-17 #step-dps .ul__option,
.builder-type-17 #step-io .ul__option,
.builder-type-17 #step-dsw .ul__option {
    display: flex;
    flex-wrap: nowrap;
    padding-left: 0;
    width: 90%;
    flex-direction: row;
}

/* Steps border: lighter color, hide on last visible step */
.builder-type-17 #config_wrap #configurator .steps {
    border-bottom-color: #cdcdcd;
}

.builder-type-17 #config_wrap #configurator .steps:last-child {
    border-bottom: none;
}

/* Disable page scrolling entirely for Snap */
body.builder-type-17 {
    overflow: hidden !important;
}

/* Keep Size step open by default */
.builder-type-17 .top-steps .option-trigger {
    pointer-events: none;
}
.builder-type-17 .top-steps .config-product-table-pn {
    display: flex !important;
}

/* Hide currentLinkParamWrap */
.builder-type-17 #currentLinkParamWrap {
    display: none !important;
}

/* Header height: actual visible header is 80px, not the default 113px.
   Set on body so all elements using --Header--height inherit the correct value. */
body.builder-type-17 {
    --Header--height: 80px;
}

body.builder-type-17 #h1_product_title2 {
    position: absolute;
    width: 100px;
}

/* Swap footer buttons and align vertically */
body.builder-type-17 .sub-config-footer .sub-left-side {
    align-items: center;
    gap: 10px;
}

body.builder-type-17 .sub-config-footer .total-block {
    order: 2;
}

body.builder-type-17 .sub-config-footer .specs-block-wrap {
    order: 1;
}

body.builder-type-17 .sub-config-footer .download-block-wrap {
    order: 3;
}

/* Elevate footer above specs panel while Product Resources menu is open */
body.builder-type-17 .sub-config-footer.download-menu-open {
    z-index: 1060;
}

body.builder-type-17 .snap-specs-btn.button-blue {
    background: #FBBF37;
    color: #fff;
    border-color: #FBBF37;
    width: 180px;
    box-sizing: border-box;
    text-align: center;
    font-family: 'Avenir85Heavy', Helvetica, Arial, sans-serif;
    letter-spacing: 0px;
    margin-right: 30px;
}

body.builder-type-17 .snap-specs-btn:hover {
    color: #fff;
    background: #929292;
    border-color: #929292;
}


/* ── Right-side Specs panel ── */
body.builder-type-17 .snap-specs-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 500px;
    max-width: 90vw;
    min-width: 250px;
    max-height: calc(100vh - 140px);
    transform: translateX(100%);
    transition: transform 300ms cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
    z-index: 1050;
    background: #fafafa;
    overflow: visible;
    padding: 0;
    display: flex;
    flex-direction: column;
}

/* Make table fill full panel width */
body.builder-type-17 .snap-specs-panel #options_table_wrap {
    width: 100%;
    margin: 0;
    padding: 15px;
    box-sizing: border-box;
    background: #fafafa;
}
body.builder-type-17 .snap-specs-panel #tableSummaryCnt {
    background: #fafafa;
}
body.builder-type-17 .snap-specs-panel .other_option {
    background-color: #fafafa;
}
body.builder-type-17 .snap-specs-panel .table-header {
    background-color: #fafafa;
}
body.builder-type-17 .snap-specs-panel .options_table-header {
    border-color: #fafafa;
}
body.builder-type-17 .snap-specs-panel .blue-row {
    background-color: #fafafa;
}
body.builder-type-17 .snap-specs-panel .fh,
body.builder-type-17 .snap-specs-panel .sh,
body.builder-type-17 .snap-specs-panel .gray {
    border-right-color: #fafafa;
}
body.builder-type-17 .snap-specs-panel .option-trigger.options_table {
    border-bottom-color: #fafafa;
}

body.builder-type-17 .snap-specs-panel.snap-specs-open {
    transform: translateX(0);
}

/* Titlebar icons – top-right, Windows-style */
.snap-specs-titlebar-icons {
    display: flex;
    align-items: center;
    gap: 2px;
    margin-left: auto;
}
.snap-specs-icon {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    cursor: pointer;
    border-radius: 4px;
    padding: 0;
    transition: background 150ms;
}
.snap-specs-icon svg { width: 16px; height: 16px; stroke: #555; }
.snap-specs-icon:hover { background: #e0e0e0; }
.snap-specs-close:hover { background: #e81123 !important; }
.snap-specs-close:hover svg { stroke: #fff; }
.snap-specs-icon-grip { cursor: grab; }
.snap-specs-icon-grip:active { cursor: grabbing; }
.snap-specs-icon-grip svg { stroke: #999; }

/* Drag handle – left edge */
.snap-specs-drag {
    position: absolute;
    top: 0; left: 0; bottom: 0;
    width: 5px;
    cursor: col-resize;
    background: transparent;
    z-index: 3;
}
.snap-specs-drag:hover { background: #dee2e6; }

/* Title bar */
.snap-specs-panel .snap-specs-titlebar {
    display: flex;
    align-items: center;
    padding: 8px 8px 8px 16px;
    background: #f5f5f5;
    border-bottom: 1px solid #e0e0e0;
    cursor: grab;
    user-select: none;
    flex-shrink: 0;
}
.snap-specs-panel .snap-specs-titlebar:active { cursor: grabbing; }
.snap-specs-panel .snap-specs-title {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: #333;
}
.snap-specs-panel.snap-specs-moved { bottom: auto; }

/* Scroll wrapper */
.snap-specs-panel .snap-specs-scroll {
    overflow-y: auto;
    overflow-x: hidden;
    flex: 0 1 auto;
    min-height: 0;
    padding: 0;
    scrollbar-width: thin;
}
.snap-specs-panel .snap-specs-scroll::-webkit-scrollbar { width: 5px; }
.snap-specs-panel .snap-specs-scroll::-webkit-scrollbar-track { background: transparent; }
.snap-specs-panel .snap-specs-scroll::-webkit-scrollbar-thumb { background: #c1c1c1; border-radius: 3px; }
.snap-specs-panel .snap-specs-scroll::-webkit-scrollbar-thumb:hover { background: #999; }

/* Inside specs panel: show the summary-bases wrapper, hide the accordion trigger, always show table */
body.builder-type-17 .snap-specs-panel .summary-bases { display: block !important; }
body.builder-type-17 .snap-specs-panel .option-trigger.options_table { display: none; }
body.builder-type-17 .snap-specs-panel .other_option[data-cs="IPN"] { display: none; }
body.builder-type-17 .snap-specs-panel #tableSummaryCnt { display: block !important; }

/* Hide Specs step from left sidebar nav for Snap */
body.builder-type-17 .summary-bases { display: none; }

/* Active state for footer Specs button */
body.builder-type-17 .snap-specs-btn.button-blue.active {
    color: #fff;
    background: #929292;
    border-color: #929292;
}

/* ── Mobile (≤768px) ── */
@media (max-width: 768px) {

    /* --- 3D viewer & layout --- */
    body.builder-type-17 .conf-block-wrap-legs .left_side_wrap {
        position: relative;
        top: auto;
        right: auto;
        bottom: auto;
        width: 100%;
        min-width: auto;
        height: auto;
    }

    body.builder-type-17 .conf-block-wrap-legs .left_side_wrap #image_layers {
        position: relative;
        top: auto;
        width: 100%;
        height: 55vw;
        min-height: 240px;
        max-height: 400px;
    }

    body.builder-type-17 .conf-block-wrap {
        flex-direction: column;
    }

    body.builder-type-17 #right.grid_10 {
        width: 100%;
    }

    /* --- Bottom footer bar --- */
    body.builder-type-17 .sub-config-footer {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        z-index: 1100;
        background: #fff;
        box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.1);
        box-sizing: border-box;
    }

    body.builder-type-17 .sub-config-footer .sub-left-side.c14 {
        display: flex;
        flex-wrap: wrap;
        width: 100%;
        padding: 8px 12px;
        box-sizing: border-box;
        gap: 6px;
        align-items: center;
        background: #fff;
    }

    /* Price block: full width row on top */
    body.builder-type-17 .sub-config-footer .price-block-container {
        position: static;
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0;
        margin: 0;
        border-top: none;
        background: transparent;
        flex-direction: row;
    }

    /* Quantity block: auto margin, no hardcoded right margin */
    body.builder-type-17 .sub-config-footer .quantity-block {
        margin: 0;
        display: flex;
        align-items: center;
    }

    /* Specs + Add to Quote row */
    body.builder-type-17 .sub-config-footer .specs-block-wrap {
        order: 1;
        flex-shrink: 0;
    }

    body.builder-type-17 .sub-config-footer .total-block {
        order: 2;
        flex: 1;
    }

    body.builder-type-17 .sub-config-footer .total-block #create_quote {
        width: 100%;
        right: auto;
        position: static;
        text-align: center;
        box-sizing: border-box;
    }

    body.builder-type-17 .sub-config-footer .download-block-wrap {
        display: none;
    }

    /* --- Slide-in panels full width --- */
    .builder-type-17 #otherOpts {
        width: 100vw;
    }

    body.builder-type-17 .snap-specs-panel {
        width: 100vw;
        max-width: 100vw;
    }

    /* --- Specs panel: disable drag/resize on mobile --- */
    body.builder-type-17 .snap-specs-panel .snap-specs-drag {
        display: none;
    }
    body.builder-type-17 .snap-specs-panel .snap-specs-titlebar {
        cursor: default;
    }
    body.builder-type-17 .snap-specs-panel .snap-specs-icon-grip {
        display: none;
    }

    /* --- Ensure body allows scroll for config content below 3D viewer --- */
    body.builder-type-17 {
        overflow-y: auto !important;
        overflow-x: hidden !important;
    }

    /* --- Add bottom padding to account for fixed footer --- */
    body.builder-type-17 .config_design_3 {
        padding-bottom: 100px;
    }

    /* --- Controls row below 3D viewer --- */
    body.builder-type-17 .controls-for-preview {
        position: static;
        display: flex;
        justify-content: center;
        flex-wrap: nowrap;
        width: 100%;
        pointer-events: auto;
        padding: 6px 0;
    }

    /* --- Snap actions toolbar (undo/redo/save) --- */
    body.builder-type-17 .snap-actions-bar {
        flex-wrap: nowrap;
        gap: 6px;
        padding: 4px 8px;
        min-height: 44px;
        box-sizing: border-box;
        width: 100%;
    }
    body.builder-type-17 .snap-actions-bar__undo .snap-actions-bar__btn-text,
    body.builder-type-17 .snap-actions-bar__redo .snap-actions-bar__btn-text {
        display: none;
    }
    body.builder-type-17 .snap-actions-bar__undo,
    body.builder-type-17 .snap-actions-bar__redo {
        padding: 8px 10px;
        flex-shrink: 0;
    }
    body.builder-type-17 .snap-actions-bar__status {
        flex-shrink: 0;
    }
    body.builder-type-17 .snap-actions-bar__status-text {
        display: none;
    }
    body.builder-type-17 .snap-actions-bar__save {
        flex: 1;
        justify-content: center;
        min-width: 0;
        padding: 8px 12px;
    }
    body.builder-type-17 .snap-actions-bar__save .snap-actions-bar__btn-text {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    body.builder-type-17 .snap-actions-bar__right {
        display: none;
    }
}

body.builder-type-17 .user_friendly_message p {
    font-size: 18px;
}
body.builder-type-17 .config_design_3 .breadcrumbs li a {
    font-size: 14px;
}
body.builder-type-17 .h1_product_title_span {
    margin-top: 0px;
}
.builder-type-17 .navigation__under-option {
    padding-left: 0;
}

/* Single Price column for Snap – hide net price (4th child) in rows */
body.builder-type-17 .show_options_prices .table-header .fth,
body.builder-type-17 .show_options_prices .other_option > div:nth-child(4) {
    display: none;
}

/* Snap grouped specs styling */
body.builder-type-17 .snap-spec-group-header {
    font-weight: 600;
    background-color: rgba(0, 0, 0, 0.03);
}
body.builder-type-17 .snap-spec-group-header .sh {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
body.builder-type-17 .snap-spec-group-header .sh .row1 {
    font-size: 13px;
    font-weight: 600;
    color: #333;
}
body.builder-type-17 .snap-spec-group-header .sh .row2 {
    font-size: 12px;
    font-weight: 400;
    color: #555;
}
body.builder-type-17 .snap-spec-group-header .sh .row2 b {
    font-weight: 600;
}
body.builder-type-17 .snap-spec-group-header .sh .list-pns {
    margin-top: 2px;
}
body.builder-type-17 .snap-spec-group-header .sh .list-pns .pn-item {
    font-size: 11px;
    font-weight: 400;
    color: #888;
    font-style: italic;
    line-height: 1.4;
}
body.builder-type-17 .snap-spec-total {
    font-weight: 700;
    border-top: 2px solid #333;
}
body.builder-type-17 .snap-spec-total .date_price {
    font-weight: 700;
}

/* Right-align price value within the price block */
body.builder-type-17 .price-block-wrapper .per-unit-block .price-amount {
    justify-content: space-between;
}

@media all and (max-width: 1420px) {
    body.builder-type-17 .price-block-wrapper .per-unit-block .price-amount > div {
        left: 0;
    }
}
