// Inactive Dropdown
%inactive-dropdown {
	position: absolute;
	top: auto;
	left: auto;
	opacity: 0;
    visibility: hidden;
    overflow: hidden;
}

// Inactive Dropdown
%active-dropdown {
	opacity: 1;
	visibility: visible;
	overflow: visible;
}

// Dropdown Top Offset
@mixin dropdown-offset-y($offset: 5px) {
	.g-main-nav {
		.g-standard, .g-fullwidth {
			> .g-dropdown {
				margin-top: $offset;
				&:before {
					content: "";
				    position: absolute;
				    display: block;
				    top: -$offset;
				    left: 0;
				    right: 0;
				    bottom: 0;
				    border-top: $offset solid transparent;
				    z-index: -1;
				}
			}
		}
	}
}

// Dropdown Side Offset
@mixin dropdown-offset-x($offset: 5px, $direction: left, $first_level: true) {
    .g-main-nav {
        .g-standard {
            .g-dropdown {
                margin-#{$direction}: $offset;
                &:after {
                    content: "";
                    position: absolute;
                    display: block;
                    top: 0;
                    left: -$offset;
                    right: -$offset;
                    bottom: 0;
                    border-left: $offset solid transparent;
                    border-right: $offset solid transparent;
                    z-index: -1;
                }
            }

            @if ($first_level == true or type-of($first_level) == number) {
                > .g-dropdown {
                    margin-#{$direction}: if(type-of($first_level) == bool, 0, $first_level);
                }
            }
        }
    }
}

// Dropdown expansion direction

@mixin dropdown-left {
    left: auto;
    right: 100%;
}

@mixin dropdown-center {
    left: 50%;
    @include transform(translateX(-50%));
}

@mixin dropdown-right {
    left: 100%;
    right: auto;
}

