// Please try to maintain the same code style as outlined here:
// https://github.com/lintelio/lintel/blob/master/CONTRIBUTING.md

@import 'dropdowns-vars';
@import 'dropdowns-functions';
@import 'dropdowns-mixins';


// Base
// ----
.dropdown {
  @if $dropdown-bg-fallback != $dropdown-bg {
    background-color: $dropdown-bg-fallback;
  }
  background: $dropdown-bg;
  background-clip: padding-box;
  border: 1px solid $dropdown-border;
  border-radius: $dropdown-border-radius;
  box-shadow: $dropdown-box-shadow;
  display: none;
  font-size: $dropdown-font-size;
  float: left;
  left: 0;
  list-style: none;
  min-width: $dropdown-min-width;
  margin: $dropdown-margin-top $dropdown-margin-x $dropdown-margin-bottom;
  padding: $dropdown-padding-y $dropdown-padding-x;
  position: absolute;
  text-align: $dropdown-text-align;
  top: 100%;
  z-index: $dropdown-z-index;

  > li > a {
    color: $dropdown-item-text;
    @if $dropdown-item-border {
      border-bottom: $dropdown-item-border;
    }
    clear: both;
    display: block;
    font-weight: $dropdown-font-weight;
    margin: $dropdown-item-margin-y $dropdown-item-margin-x;
    padding: $dropdown-item-padding-y $dropdown-item-padding-x;
    text-decoration: none;

    &:hover,
    &:focus {
      background: $dropdown-item-hover-bg;
      border-bottom-color: $dropdown-item-hover-border;
      color: $dropdown-item-hover-text;
    }
  }

  > li:last-child > a,
  > .last > a {
    border-bottom: 0;
  }

  .open > & {
    display: block;
  }
}

// Divider
// -------
.dropdown-divider {
  border-top: 1px solid $dropdown-divider-border;
  margin: $dropdown-divider-margin-top $dropdown-divider-margin-x $dropdown-divider-margin-bottom;
}
