/* MAR-598: Report selection page (product_data.twig) — hover, coming-soon,
   help-tooltip and focus states to match the Figma final engineering handoff.
   Scoped to #_report / .scope-* classes only — no cart/checkout changes. */

#_report .scope-type-btn {
    transition: border-color 150ms ease, box-shadow 150ms ease;
}

/* Fixed 5-column desktop grid per the handoff ("Stage 1 / Desktop").
   Mobile keeps the existing 2-per-row (col-6) behavior — not specified
   in this handoff, left untouched. */
/* Desktop: Fixed 5-column grid per the handoff ("Stage 1 / Desktop") for screens 992px and up */
@media (min-width: 992px) {
    #_report #scope_types.selectlist {
        max-width: 960px !important;
        margin-left: auto !important;
        margin-right: auto !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        display: flex !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        row-gap: 20px !important;
    }
    #scope_types .scope-card-col {
        flex: 0 0 20% !important;
        max-width: 20% !important;
        width: 20% !important;
        display: flex !important;
        justify-content: center !important;
        padding: 0 5px !important;
        margin-bottom: 0 !important;
    }
    .scope-card-shell {
        position: relative !important;
        display: block !important;
        width: 164px !important;
        max-width: 100% !important;
        height: 140px !important;
        margin: 0 auto !important;
    }
    #_report button.scope-type-btn {
        width: 164px !important;
        max-width: 100% !important;
        height: 140px !important;
        min-height: 140px !important;
        border-radius: 8px !important;
        margin: 0 !important;
        margin-bottom: 0 !important;
        padding: 0 !important;
    }
    #_report .scope-card-comingsoon {
        width: 164px !important;
        max-width: 100% !important;
        height: 140px !important;
        min-height: 140px !important;
        border-radius: 8px !important;
        margin: 0 !important;
        margin-bottom: 0 !important;
    }
    .scope-help-tip {
        position: absolute !important;
        top: 5px !important;
        right: 5px !important;
        width: 17px !important;
        height: 17px !important;
        margin: 0 !important;
        padding: 0 !important;
        z-index: 10 !important;
    }
    #_report .scope-help-tip-trigger {
        width: 17px !important;
        height: 17px !important;
        min-width: 17px !important;
        min-height: 17px !important;
        max-width: 17px !important;
        max-height: 17px !important;
        line-height: 17px !important;
        padding: 0 !important;
        margin: 0 !important;
        border: none !important;
        background: transparent !important;
        box-shadow: none !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        cursor: pointer !important;
    }
    #_report .scope-help-tip-icon {
        width: 17px !important;
        height: 17px !important;
        display: block !important;
    }
}

/* Tablet: 4-column grid for screens between 768px and 991.98px (prevents card overlapping) */
@media (min-width: 768px) and (max-width: 991.98px) {
    #carouselCaptions .container,
    #_report .container,
    .carousel-item .container.px-md-4 {
        max-width: 100% !important;
        padding-left: 10px !important;
        padding-right: 10px !important;
    }
    #_report #scope_types.selectlist {
        max-width: 760px !important;
        margin-left: auto !important;
        margin-right: auto !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        display: flex !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        row-gap: 20px !important;
        --bs-gutter-x: 0 !important;
        --bs-gutter-y: 0 !important;
    }
    #scope_types .scope-card-col {
        flex: 0 0 25% !important;
        max-width: 25% !important;
        width: 25% !important;
        display: flex !important;
        justify-content: center !important;
        padding: 0 5px !important;
        margin-bottom: 0 !important;
    }
    .scope-card-shell {
        position: relative !important;
        display: block !important;
        width: 164px !important;
        max-width: 100% !important;
        height: 140px !important;
        margin: 0 auto !important;
    }
    #_report button.scope-type-btn {
        width: 164px !important;
        max-width: 100% !important;
        height: 140px !important;
        min-height: 140px !important;
        border-radius: 8px !important;
        margin: 0 !important;
        margin-bottom: 0 !important;
        padding: 0 !important;
    }
    #_report .scope-card-comingsoon {
        width: 164px !important;
        max-width: 100% !important;
        height: 140px !important;
        min-height: 140px !important;
        border-radius: 8px !important;
        margin: 0 !important;
        margin-bottom: 0 !important;
    }
    .scope-help-tip {
        position: absolute !important;
        top: 5px !important;
        right: 5px !important;
        width: 17px !important;
        height: 17px !important;
        margin: 0 !important;
        padding: 0 !important;
        z-index: 10 !important;
    }
    #_report .scope-help-tip-trigger {
        width: 17px !important;
        height: 17px !important;
        min-width: 17px !important;
        min-height: 17px !important;
        max-width: 17px !important;
        max-height: 17px !important;
        line-height: 17px !important;
        padding: 0 !important;
        margin: 0 !important;
        border: none !important;
        background: transparent !important;
        box-shadow: none !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        cursor: pointer !important;
    }
    #_report .scope-help-tip-icon {
        width: 17px !important;
        height: 17px !important;
        display: block !important;
    }
}

/* Hover: product-color outline + stronger shadow. Not applied once a card
   is selected — selected+hover must look identical to selected alone. */
#_report .scope-type-btn:hover:not(.active) {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.22) !important;
}
#_report .RoofScope:hover:not(.active)        { border-color: #ED1C24 !important; border-width: 3px; }
#_report .RoofScopeX:hover:not(.active)       { border-color: #ED1C24 !important; border-width: 3px; }
#_report .RoofScopePlus:hover:not(.active)    { border-color: #212E33 !important; border-width: 3px; }
#_report .GutterScope:hover:not(.active)      { border-color: #439393 !important; border-width: 3px; }
#_report .SidingScope:hover:not(.active)      { border-color: #662D91 !important; border-width: 3px; }
#_report .PaintScope:hover:not(.active)       { border-color: #8DC63F !important; border-width: 3px; }
#_report .InsulationScope:hover:not(.active)  { border-color: #ED217C !important; border-width: 3px; }
#_report .ConcreteScope:hover:not(.active)    { border-color: #2195D3 !important; border-width: 3px; }

/* Real (selectable) product cards: position icon and text to match Figma handoff.
   In Figma (164x140px card):
   - All cards: 70x70px icon starting at top: 12px, centered horizontally.
   - Single-line cards (RoofScope, RoofScopeX, GutterScope, SidingScope, PaintScope,
     InsulationScope, ConcreteScope): label top: 99px, height: 20px (17px gap below icon).
   - RoofScope+: two-line label ("RoofScope+" / "(Roof + Gutters)"), both lines at 18px
     Rajdhani regular, line-height: 20px, total height: 40px, top: 90px (8px gap below icon).
   All 10 cards use 70x70 icons — RoofScope+ is no longer shrunk. */
#_report button.scope-type-btn {
    position: relative;
    width: 164px;
    height: 140px;
    padding: 0;
    margin-bottom: 0 !important;
}
#_report button.scope-type-btn .icon {
    position: absolute;
    top: 12px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: 70px !important;
    height: 70px !important;
}
#_report button.scope-type-btn .text {
    position: absolute;
    top: 99px !important;
    bottom: auto !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: 160px;
    font-family: 'Rajdhani', sans-serif;
    font-size: 18px !important;
    line-height: 20px !important;
    font-weight: 400;
    text-align: center;
}
#_report button.scope-type-btn.RoofScopePlus .icon {
    top: 12px !important;
    width: 70px !important;
    height: 70px !important;
}
#_report button.scope-type-btn.RoofScopePlus .text {
    top: 90px !important;
    font-size: 18px !important;
    line-height: 20px !important;
}
#_report button.scope-type-btn.RoofScopePlus .text small {
    display: block;
    font-size: 18px !important;
    line-height: 20px !important;
    font-family: 'Rajdhani', sans-serif;
    font-weight: 400;
    color: inherit;
    letter-spacing: normal;
}

/* Keyboard focus ring — distinct from the hover/selected product color,
   drawn with outline so it layers on top of (never replaces) the
   existing selected styling underneath. */
#_report .scope-type-btn:focus-visible {
    outline: 3px solid #2F6FED;
    outline-offset: 2px;
}

/* Coming soon cards: Exterior / ProData. Matched to Figma specifications:
   - Card dimensions: 164px x 140px, border: 1px solid #DADFE1, border-radius: 8px,
     box-shadow: 0px 0px 8px rgba(0, 0, 0, 0.2).
   - Icon: 70px x 70px starting at top: 11px (no opacity filter; the exported SVGs
     contain the full 70x70 circular container with #B4BEBF strokes).
   - Label: top: 86px (5px gap below 70px icon).
     Line 1 (Exterior / ProData): 18px font-size, 16px line-height, color: #212E33.
     Line 2 (subtitle in <small>): 14px font-size, 16px line-height, color: #212E33.
   - Status strip ("COMING SOON"): inset footer at top: 122px (bottom: 3px, left/right: 3px),
     height: 15px, background: rgba(87, 87, 87, 0.4), border-radius: 0 0 6px 6px.
     Text: 13px Rajdhani regular, line-height: 15px, color: #FFFFFF, all caps. */
#_report .scope-card-comingsoon {
    position: relative;
    height: 140px;
    width: 164px;
    border: 1px solid #DADFE1;
    border-radius: 8px;
    background-color: #fff;
    box-shadow: 0px 0px 8px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow: hidden;
    cursor: default;
}
#_report .scope-card-comingsoon .icon {
    width: 70px;
    height: 70px;
    margin-top: 11px;
}
#_report .scope-card-comingsoon .text {
    font-size: 18px;
    line-height: 16px;
    font-family: 'Rajdhani', sans-serif;
    font-weight: 400;
    color: #212E33;
    margin-top: 5px;
    text-align: center;
    width: 164px;
}
#_report .scope-card-comingsoon .text small {
    display: block;
    font-size: 14px;
    line-height: 16px;
    font-family: 'Rajdhani', sans-serif;
    font-weight: 400;
    color: #212E33;
    letter-spacing: normal;
}
#_report .scope-coming-soon-badge {
    position: absolute;
    left: 3px;
    right: 3px;
    bottom: 3px;
    height: 15px;
    background: rgba(87, 87, 87, 0.4);
    border-radius: 0 0 6px 6px;
    color: #ffffff;
    font-family: 'Rajdhani', sans-serif;
    font-weight: 400;
    font-size: 13px;
    line-height: 15px;
    letter-spacing: 0;
    text-transform: uppercase;
    text-align: center;
    padding: 0;
}

/* Help trigger ("?") — top-right corner of every card, available and
   coming-soon alike. Separate component from the page's existing
   .tooltipx pattern (shared with cart.twig) — intentionally not reused. */
.scope-help-tip {
    position: absolute !important;
    top: 5px !important;
    right: 5px !important;
    width: 17px !important;
    height: 17px !important;
    margin: 0 !important;
    padding: 0 !important;
    z-index: 10 !important;
}
.scope-card-shell {
    position: relative !important;
    display: block !important;
    width: 164px !important;
    max-width: 100% !important;
    height: 140px !important;
    margin: 0 auto !important;
}
#_report .scope-help-tip-trigger {
    position: relative !important;
    z-index: 2 !important;
    width: 17px !important;
    height: 17px !important;
    min-width: 17px !important;
    min-height: 17px !important;
    max-width: 17px !important;
    max-height: 17px !important;
    line-height: 17px !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
    cursor: pointer !important;
    color: #b4bebf !important;
}
.scope-help-tip-trigger:hover {
    color: #7d8788 !important;
}
.scope-help-tip-trigger:focus-visible {
    outline: 2px solid #2F6FED;
    outline-offset: 2px;
    border-radius: 50%;
}
/* Tooltip panel: displayed above the card with downward arrow pointing to info icon across all screens */
.scope-help-tip-panel,
.scope-help-tip-panel.scope-help-tip-panel--left {
    display: none;
    position: absolute !important;
    bottom: calc(100% + 12px) !important;
    top: auto !important;
    right: auto !important;
    width: 270px;
    max-width: calc(100vw - 24px);
    background-color: #242E38 !important;
    color: #fff !important;
    border-radius: 8px !important;
    padding: 14px 16px !important;
    font-family: 'Rajdhani-SemiBold', sans-serif !important;
    font-size: 14px !important;
    line-height: 20px !important;
    text-align: left !important;
    z-index: 1000 !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35) !important;
}
.scope-help-tip-panel.scope-help-tip-panel--open {
    display: block !important;
}
/* Downward-pointing arrow centered above the info icon */
.scope-help-tip-panel::after {
    content: '' !important;
    position: absolute !important;
    top: 100% !important;
    left: var(--arrow-left, calc(100% - 13.5px)) !important;
    transform: translateX(-50%) !important;
    width: 0 !important;
    height: 0 !important;
    border-left: 8px solid transparent !important;
    border-right: 8px solid transparent !important;
    border-top: 9px solid #242E38 !important;
    display: block !important;
}
.scope-help-tip-panel .scope-help-tip-title {
    display: block;
    font-weight: 700;
    font-size: 15px;
    margin-bottom: 6px;
    color: #fff;
}
.scope-help-tip-panel .scope-help-tip-body {
    display: block;
    font-weight: 400;
    color: #cfd6da;
}

/* Back / Next nav — keep existing behavior, add proper hover + focus-visible
   transitions (150ms) with no card/button movement. */
.slider-back-button,
.first-next,
.btn-red.next {
    transition: background-color 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
}
.slider-back-button:hover {
    background-color: #d3d4d5 !important;
}
#myButton:hover:not(:disabled),
.btn-red.next:hover {
    background-color: #c2171d !important;
    border-color: #c2171d !important;
}
.slider-back-button:focus-visible,
#myButton:focus-visible,
.btn-red.next:focus-visible {
    outline: 3px solid #2F6FED;
    outline-offset: 2px;
}

/* Ensure account and sidebar margins are reset on desktop */
#account-address, #account-download, #account-edit, #account-login, #account-order, #account-password, #account-payments, #account-register, #dashboard, #invoice-lisitng, .account_sidebar ul, .account_space_1, .sidebar-container .mydetails-top-margin, .sidebar-container .mypayments-top-margin, .sidebar-container .myscopes-top-margin {
    margin-top: 0 !important;
}

/* ==========================================================================
   Mobile Cart Update Handoff (Figma node 0:68)
   ========================================================================== */
@media (max-width: 767.98px) {
    /* 400px container, 2 columns with 20px column gap and 16px row gap */
    #_report #scope_types.selectlist {
        max-width: 420px !important;
        margin-left: auto !important;
        margin-right: auto !important;
        padding-left: 6px !important;
        padding-right: 6px !important;
        row-gap: 16px !important;
        display: flex !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
    }
    #scope_types .scope-card-col {
        flex: 0 0 50% !important;
        max-width: 50% !important;
        width: 50% !important;
        padding-left: 5px !important;
        padding-right: 5px !important;
        margin-bottom: 0 !important;
        display: flex !important;
        justify-content: center !important;
    }
    .scope-card-shell {
        position: relative !important;
        display: block !important;
        width: 190px !important;
        max-width: 100% !important;
        height: 150px !important;
        margin: 0 auto !important;
    }

    /* Product Cards: 190x150px, border-radius: 10px, border: 2px solid #C9CACA,
       box-shadow: 0px 1px 8px 0px rgba(0, 0, 0, 0.16) */
    #_report button.scope-type-btn {
        width: 190px !important;
        max-width: 100% !important;
        height: 150px !important;
        min-height: 150px !important;
        border-radius: 10px !important;
        border: 2px solid #C9CACA !important;
        box-shadow: 0px 1px 8px 0px rgba(0, 0, 0, 0.16) !important;
        background-color: #FFFFFF !important;
        margin: 0 !important;
        padding: 0 !important;
        position: relative !important;
    }
    #_report button.scope-type-btn.active {
        border-width: 2px !important;
    }

    /* Coming Soon cards (Exterior, ProData): 190x150px, #F6F6F6 background */
    #_report .scope-card-comingsoon {
        width: 190px !important;
        max-width: 100% !important;
        height: 150px !important;
        min-height: 150px !important;
        border-radius: 10px !important;
        border: 2px solid #C9CACA !important;
        box-shadow: 0px 1px 8px 0px rgba(0, 0, 0, 0.16) !important;
        background-color: #F6F6F6 !important;
        margin: 0 !important;
        padding: 0 !important;
        position: relative !important;
        overflow: hidden !important;
        cursor: default !important;
    }
    /* Coming soon strip: 15px height inset at bottom */
    #_report .scope-coming-soon-badge {
        position: absolute !important;
        left: 2px !important;
        right: 2px !important;
        bottom: 2px !important;
        height: 15px !important;
        background: rgba(87, 87, 87, 0.4) !important;
        border-radius: 0 0 8px 8px !important;
        color: #ffffff !important;
        font-family: 'Rajdhani', sans-serif !important;
        font-weight: 400 !important;
        font-size: 13px !important;
        line-height: 15px !important;
        text-transform: uppercase !important;
        text-align: center !important;
        padding: 0 !important;
    }

    /* Icons: 72x72 centered, top: 17px */
    #_report button.scope-type-btn .icon {
        position: absolute !important;
        top: 17px !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        width: 72px !important;
        height: 72px !important;
    }
    #_report .scope-card-comingsoon .icon {
        width: 70px !important;
        height: 70px !important;
        margin-top: 15px !important;
        margin-left: auto !important;
        margin-right: auto !important;
        display: block !important;
    }

    /* Card text labels */
    #_report button.scope-type-btn .text {
        position: absolute !important;
        top: 99px !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        width: 186px !important;
        max-width: 100% !important;
        font-family: 'Rajdhani', sans-serif !important;
        font-size: 20px !important;
        line-height: 34px !important;
        font-weight: 500 !important;
        text-align: center !important;
        color: #212E33 !important;
        text-transform: uppercase !important;
    }
    #_report button.scope-type-btn.RoofScopePlus .text {
        top: 95px !important;
        font-size: 20px !important;
        line-height: 20px !important;
        font-weight: 500 !important;
        text-transform: uppercase !important;
    }
    #_report button.scope-type-btn.RoofScopePlus .text small {
        display: block !important;
        font-size: 14px !important;
        line-height: 18px !important;
        font-weight: 500 !important;
        color: inherit !important;
        text-transform: uppercase !important;
    }
    #_report .scope-card-comingsoon .text {
        position: static !important;
        margin-top: 8px !important;
        width: 186px !important;
        max-width: 100% !important;
        font-family: 'Rajdhani', sans-serif !important;
        font-size: 18px !important;
        line-height: 18px !important;
        font-weight: 400 !important;
        color: #212E33 !important;
        text-align: center !important;
    }
    #_report .scope-card-comingsoon .text small {
        display: block !important;
        font-size: 14px !important;
        line-height: 18px !important;
        font-weight: 400 !important;
        color: #212E33 !important;
    }

    /* Help trigger: 44x44 touch tap target at top-right, with 17x17 icon pinned at top: 5px, right: 5px */
    .scope-help-tip {
        position: absolute !important;
        top: 0 !important;
        right: 0 !important;
        width: 44px !important;
        height: 44px !important;
        z-index: 10 !important;
    }
    #_report .scope-help-tip-trigger {
        width: 44px !important;
        height: 44px !important;
        min-width: 44px !important;
        min-height: 44px !important;
        max-width: 44px !important;
        max-height: 44px !important;
        display: flex !important;
        align-items: flex-start !important;
        justify-content: flex-end !important;
        padding-top: 5px !important;
        padding-right: 5px !important;
        padding-bottom: 0 !important;
        padding-left: 0 !important;
        margin: 0 !important;
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
        cursor: pointer !important;
    }
    #_report .scope-help-tip-icon {
        width: 17px !important;
        height: 17px !important;
        display: block !important;
    }
}

