/*------------------------------------*\
    $COMMON STYLES
\*------------------------------------*/

/* SelectBoxIt container */
.selectboxit-container {
    position: relative;
    display: inline-block;
    vertical-align: top;
}

/* Styles that apply to all SelectBoxIt elements */
.selectboxit-container * {
     @include type($base-font, 1.4, 1.9, #b2b9bf, $medium);
    /* Prevents text selection */
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: -moz-none;
    -ms-user-select: none;
    -o-user-select: none;
    user-select: none;
    outline: none;
    white-space: nowrap;
}

.selectboxit-container .selectboxit,
.selectboxit-text {
    height: 40px; /* Height of the drop down */
    line-height: 40px; /* Vertically positions the drop down text */
}

/* Height and Vertical Alignment of Text */
.selectboxit-container span, .selectboxit-container .selectboxit-options a {
    display: block;
}

/* Focus pseudo selector */
.selectboxit-container .selectboxit:focus {
outline: 0;
}

/* Disabled Mouse Interaction */
.selectboxit.selectboxit-disabled, .selectboxit-options .selectboxit-disabled {
    opacity: 0.65;
    filter: alpha(opacity=65);
    -webkit-box-shadow: none;
    -moz-box-shadow: none;
    box-shadow: none;
    cursor: default;
}

/* Button Text */
.selectboxit-text {
    text-indent: 5px;
    overflow: hidden;
    text-overflow: ellipsis;
    float: left;
}

.selectboxit .selectboxit-option-icon-container {
    display: none;
}

/* Individual Option Optgroup Header */
.selectboxit-option, .selectboxit-optgroup-header {
    text-indent: 5px; /* Horizontal Positioning of the select box option text */
    margin: 0;
    list-style-type: none;
}

/* Drop Down optgroup header hover psuedo class */
.selectboxit-optgroup-header:hover {
cursor: default;
}

/* Drop Down down arrow */
.selectboxit .selectboxit-arrow-container .selectboxit-arrow {
/* Horizontally centers the down arrow */
    margin: 0 auto;
    position: absolute;
    top: 50%;
    right: 0;
    left: 0;
}

/* Drop Down individual option icon positioning */
.selectboxit-option-icon-container {
float: left;
}

.selectboxit-container .selectboxit-option-icon {
    margin: 0;
    padding: 0;
    vertical-align: middle;
}

/* Drop Down individual option icon positioning */
.selectboxit-option-icon-url {
}

.selectboxit-rendering {
    display: inline-block !important;
    *display: inline !important;
    zoom: 1 !important;
    visibility: visible !important;
    position: absolute !important;
    top: -9999px !important;
    left: -9999px !important;
}

.selectboxit-options {
    min-width: 100%;  /* Minimum Width of the dropdown list box options */
    *width: 100%;
    margin: 0;
    padding: 0;
    background: white;
    border-left: 1px solid #d9dee0;
    border-right: 1px solid #d9dee0;
    border-bottom: 1px solid #d9dee0;
    border-bottom-left-radius: 5px;
    border-bottom-right-radius: 5px;
    list-style: none;
    position: absolute;
    overflow-x: hidden;
    overflow-y: auto;
    cursor: pointer;
    display: none;
    z-index: 9999999999999;
    text-align: left;
}

%selectboxit-container-defualts {
    overflow: hidden;
    display: block;
    position: relative;
    border-top: 1px solid #c9d0d2;
    border-left: 1px solid #d9dee0;
    border-right: 1px solid #d9dee0;
    border-bottom: 1px solid #d9dee0;
    box-shadow:inset 0 1px 0 0 #f7f8f8;
    background: white;
}

%selectboxit-container-open-defualts {
    border-bottom: none;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}
/*------------------------------------*\
    $STANDARD FORM STYLE
\*------------------------------------*/

//Full width
.formField #sectionsSelectSelectBoxItContainer .selectboxit {
    width: 410px;
}

//Half width
.formField_half #sectionsSelectSelectBoxItContainer .selectboxit,
.details_property_half #sectionsSelectSelectBoxItContainer {
    width: 150px;
}

#sectionsSelectSelectBoxItContainer,
#sectionsSelect {
    

    /* Button */
    .selectboxit {
        border-radius: 5px;
        @extend %selectboxit-container-defualts;

        &.selectboxit-open {
           @extend %selectboxit-container-open-defualts;
        }
    }

    /* Drop Down down arrow container */
    .selectboxit-arrow-container {
        @include sprite($drop-down-arrow-light);
        position: absolute;
        right: 13px;
        top: 17px
    }

    .selectboxit-text {
        max-width: 90% !important;
    }

    /* Options List */
    .selectboxit-options {

        /* Individual options */
        li {

            a {
                @include type($base-font, 1.3, 1.3, #575f66, $medium);
                padding: 10px 15px;
                height: 33px;
                display: block;
                text-decoration: none;

                &:hover {
                    background: #4a39b2;
                    @include icon($check-white, right, -3px, -3px);
                    color: white;
                }
            }

            &.selectboxit-selected {
                a {
                    @include icon($select-box-selected, right, -3px);

                    &:hover {
                        @include icon($select-box-selected-hover, right, -3px);
                    }
                }
            }
        }
    }
}


/*------------------------------------*\
    $PUBLISHED / UNPUBLISHED STATE STYLE
\*------------------------------------*/

#publishedStateSelectBoxItContainer {
    /* Button */
    .selectboxit {
        width: 230px;
        border-radius: 3px;
        background: white;
        @extend %selectboxit-container-defualts;

        &.selectboxit-open {
           @extend %selectboxit-container-open-defualts;
        }
    }

    /* Drop Down down arrow container */
    .selectboxit-arrow-container {
        @include sprite($drop-down-arrow-green);
        position: absolute;
        right: 13px;
        top: 17px
    }

    .selectboxit-text {
        @include type($base-font, 1.5, 4, #3ea227, $medium);
        @include icon($publish-dot);
        padding-left: 15px;
    }

    /* Options List */
    .selectboxit-options {
        width: 230px;

        /* Individual options */
        li {

            a {
                @include type($base-font, 1.5, 1.5, #cc0b1a, $medium);
                padding: 10px 15px;
                @include icon($unpublish-dot, left, -3px, 5px);
                padding-left: 15px;
                height: 33px;
                display: block;
                text-decoration: none;

                &:hover {
                    background: #f0f3f5;
                }
            }
        }
    }
}

#unpublishedStateSelectBoxItContainer {
    /* Button */
    .selectboxit {
        width: 230px;
        border-radius: 3px;
        background: white;
        @extend %selectboxit-container-defualts;

        &.selectboxit-open {
           @extend %selectboxit-container-open-defualts;
        }
    }

    /* Drop Down down arrow container */
    .selectboxit-arrow-container {
        @include sprite($drop-down-arrow-red);
        position: absolute;
        right: 13px;
        top: 17px
    }

    .selectboxit-text {
        @include type($base-font, 1.5, 4, #cc0b1a, $medium);
        @include icon($unpublish-dot);
        padding-left: 15px;
    }

    /* Options List */
    .selectboxit-options {
        width: 230px;

        /* Individual options */
        li {

            a {
                @include type($base-font, 1.5, 1.5, #3ea227, $medium);
                padding: 10px 15px;
                @include icon($publish-dot, left, -3px, 5px);
                padding-left: 15px;
                height: 33px;
                display: block;
                text-decoration: none;

                &:hover {
                    background: #f0f3f5;
                }
            }
        }
    }
}