/**
 * frame.scss - Theme Base Frame Styles
 *
 * This source-code is part of Windows XP stuff for XFCE:
 * <<https://www.oddmatics.uk>>
 *
 * Author(s): Rory Fewell <roryf@oddmatics.uk>
 */

frame > border,
.frame
{
    border:        1px solid $borders_color;
    border-radius: 0;
    box-shadow:    none;
    margin:        0;
    padding:       0;

    &.flat
    {
        border-style: none;
    }
}

frame
{
    > label
    {
        @include __wintc_apply_props($frame_label_styles);
    }
}

actionbar > revealer > box
{
    border-top: 1px solid $borders_color;
    padding:    6px;

    &:backdrop
    {
        border-color: $backdrop_borders_color;
    }
}

scrolledwindow
{
    // Avoid double borders when viewport inside scrolled window
    viewport.frame
    { 
        border-style: none;
    }
    
    // This is used when content is touch-dragged past boundaries.
    //
    // Draws a box on top of the content, the size changes programmatically.
    //
    overshoot
    {
        &.top
        {
            @include overshoot(top);

            &:backdrop
            {
                @include overshoot(top, backdrop);
            }
        }
        
        &.bottom
        {
            @include overshoot(bottom);

            &:backdrop
            {
                @include overshoot(bottom, backdrop);
            }
        }
        
        &.left
        {
            @include overshoot(left);

            &:backdrop
            {
                @include overshoot(left, backdrop);
            }
        }
        
        &.right
        {
            @include overshoot(right);

            &:backdrop
            {
                @include overshoot(right, backdrop);
            }
        }
    }
    
    // The small square between two scrollbars
    //
    junction
    {
        // The border image is used to add the missing dot between the borders
        //
        background-color: $scrollbar_bg_color;
        border-color:     transparent;
        border-image:     linear-gradient(to bottom, $borders_color 1px, transparent 1px) 0 0 0 1 / 0 1px stretch;
        
        &:dir(rtl)
        {
            border-image-slice: 0 1 0 0;
        }
        
        &:backdrop
        {
            background-color:    $backdrop_scrollbar_bg_color;
            border-image-source: linear-gradient(to bottom, $backdrop_borders_color 1px, transparent 1px);
            transition:          $backdrop_transition;
        }
    }
}

// vbox and hbox separators
// RORY: Default to horizontal styles, and only override for vertical - the
//       common use-case is horizontal (eg. menus)
//
separator
{
    @include __wintc_apply_props($separator_styles);
    @include __wintc_apply_props($separator_horz_styles);

    min-height: $separator_thickness;
    min-width:  $separator_thickness;
}

// Direct descendant selector so we don't screw up menus from like horizontal
// menu bar that pops out a menu (which always has vertical orientation)
//
.horizontal > separator
{
    @include __wintc_apply_props($separator_vert_styles);
}
