//
//  STACK OVERFLOW
//  CONSTANTS -- HELPERS
//
//  This CSS comes from Stacks, our CSS & Pattern library for rapidly building
//  Stack Overflow. For documentation of all these classes and how to contribute,
//  visit https://stackoverflow.design/
//
//  These are helper variables to quickly set values.
//  These SHOULD NOT be reset.
//
//  Table of Contents
//  • z-index (zi-)
//  • border-radius (br-)
//  • box-shadow (bs-)
//  • transition easings (te-)
//
body {
    // Z-Index
    --zi-hide:               -1;     //  Hide something all the elements
    --zi-base:               0;      //  Reset to 0
    --zi-selected:           25;     //  Pop above siblings
    --zi-active:             30;     //  Pop above selected siblings
    --zi-dropdown:           1000;   //  Dropdowns
    --zi-popovers:           2000;   //  Popovers, Popups, Autocompletes
    --zi-tooltips:           3000;   //  Tooltips
    --zi-banners:            4000;   //  Banners
    --zi-navigation:         5000;   //  Navigation Bars
    --zi-navigation-fixed:   5050;   //  Fixed navigation bars
    --zi-modals-background:  8050;   //  Modals background
    --zi-modals:             9000;   //  Modals

    // Border Radius
    --br-md:                 calc(var(--su4) + var(--su6)); // 10px
    --br-circle:             50%;
    --br-pill:               1000px;
    // TODO SHINE Retaining legacy border radius for backward compatibility
    --br-sm:                var(--br-md); // Retaining legacy border radius for backward compatibility
    --br-lg:                var(--br-md); // Retaining legacy border radius for backward compatibility

    // Transition easings
    --te-smooth-slow:        cubic-bezier(0.25, 0.46, 0.45, 0.94);       // easeOutQuad
    --te-smooth:             cubic-bezier(0.165, 0.84, 0.44, 1);         // easeOutQuart
    --te-smooth-quick:       cubic-bezier(0.19, 1, 0.22, 1);             // easeOutExpo
    --te-back-out:           cubic-bezier(0.175, 0.885, 0.32, 1.275);    // easeOutBack
    --te-back-in-out:        cubic-bezier(0.68, -0.55, 0.265, 1.55);     // easeInOutBack
    --te-ease-in:            cubic-bezier(0.47, 0, 0.745, 0.715);        // easeIn
    --te-ease-in-out:        cubic-bezier(0.445, 0.05, 0.55, 0.95);      // easeInOut
    --te-ease-out:           cubic-bezier(0.39, 0.575, 0.565, 1);        // easeOut

    --default-transition-duration:       0.1s;
    --transition-time:                   var(--default-transition-duration);
}

//  ============================================================================
//  $   RESPONSIVE BREAKPOINTS
//  ----------------------------------------------------------------------------
@breakpoint-lg: 92.25rem; // 1476px
@breakpoint-md: 71.875rem; // 1150px
@breakpoint-sm: 48.75rem; // 780px

//  ============================================================================
//  $   SCROLLBAR STYLING
//  ----------------------------------------------------------------------------
@scrollbar-styles: {
    &::-webkit-scrollbar {
        width: calc(var(--su12) - var(--su2));
        height: calc(var(--su12) - var(--su2));
        background-color: transparent;
    }

    &::-webkit-scrollbar-track {
        border-radius: calc(var(--su12) - var(--su2));
        background-color: transparent;
    }

    &::-webkit-scrollbar-thumb {
        border-radius: calc(var(--su12) - var(--su2));
        background-color: var(--scrollbar);
    }

    &::-webkit-scrollbar-corner {
        background-color: transparent;
        border-color: transparent;
    }

    scrollbar-color: var(--scrollbar) transparent;
}

//  ============================================================================
//  $   FOCUS STYLING
//  ----------------------------------------------------------------------------
@focus-styles: {
    // Hide focus styles if they're not needed, for example,
    // when an element receives focus via the mouse.
    &:focus:not(:focus-visible) {
        outline: none;
        box-shadow: none;
    }

    // Show focus styles on keyboard focus.
    &:focus-visible {
        outline: none;
        box-shadow: 0 0 0 var(--su4) var(--focus-ring-muted);
    }
}
