/**
 * @author: Yoann Le Crom <yoann.lecrom@abstractive.fr>
 */

.DropDown {
    position: relative;
    flex: 1;
    display: inline-block;
}

.DropDown-toggler {
    position: relative;
    display: block;
    text-decoration: none;
    text-align: left;
    line-height: 1.3;
    font-weight: 600;
    padding: 1rem 4rem 1rem 1.5rem;
    border-radius: .4rem;
    border: 1px solid transparent;
    color: #fff;
    background: var(--primary-color);
    transition: background .5s  ease, color .5s  ease, border-color .5s  ease;
}
.DropDown-toggler::after {
    position: absolute;
    right: 1rem;
    top: 50%;
    content: '';
    display: block;
    width: 1.2rem;
    height: 1.2rem;
    margin-top: -.5rem;
    border: 2px solid currentColor;
    border-bottom: none;
    border-left: none;
    transform-origin: 66% 33%;
    transform: translate(-.5rem, .1rem) rotate(135deg);
    transition: transform .5s ease, border-color .5s  ease;
}
.DropDown-toggler:hover {
    text-decoration: none;
    color: #fff;
    background: var(--secondary-color);
    cursor: pointer;
}

.DropDown-list {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    list-style: none;
    text-align: left;
    margin: -1px 0 0 0;
    padding: 1rem 0;
    border: 1px solid var(--primary-color);
    background: var(--primary-color);;
    visibility: hidden;
    opacity: 0;
    transition: visibility .5s ease, opacity .5s ease, top .5s ease, bottom .5s ease;
    z-index: 1;
}

.DropDown-list-item {
    color: #fff;
}

.DropDown-list-item-link {
    display: block;
    padding: 1rem 2rem;
    text-decoration: none;
    color: inherit;
    transition: color .5s ease, background-color .5s ease;
}
.DropDown-list-item-link:hover {
    color: #fff;
    background: var(--secondary-color);
    text-decoration: none;
}

.DropDown.open .DropDown-toggler::after {
    transform: translate(-.5rem, .1rem) rotate(-45deg);
}

.DropDown.open .DropDown-list {
    top: 100%;
    visibility: visible;
    opacity: 1;
}

.DropDown--dropUp .DropDown-list {
    top: unset;
    bottom: 0;
}
.DropDown--dropUp.open .DropDown-list {
    top: unset;
    bottom: 100%;
}
