﻿.dropdown-el {
  border: 0.06em solid #3694d7;
  background: #fff;
  border-radius: .25em;
  padding: 0;
  box-shadow: rgba(0, 0, 0, 0.1) 3px 3px 5px 0px;

  min-width: 100%;
  position: relative;
  display: inline-block;
  min-height: 37px;
  max-height: 2em;
  overflow: hidden;
  cursor: pointer;
  text-align: left;
  white-space: nowrap;
  color: #444;
  outline: none;
  transition: 0.3s all ease-in-out;
  margin-bottom: 1em;
}
.dropdown-el input {
  display: none;
}
label.for_dropdown {
  font-size: 1.2em;
  border-top: .06em solid #d9d9d9;
  display: block;
  height: 1.4em;
  line-height: 1.4em;
  padding-left: -3em;
  padding-right: 1em;
  cursor: pointer;
  position: relative;
  transition: 0.3s color ease-in-out;
  margin: 0px -10px 5px 0px;
  color: #000;
}

@media only screen and (max-width: 500px) {
    label.for_dropdown { 
        font-size: 1em;
        margin: 0px -10px 5px -10px;
    }
    .dropdown-el {
        width: 80%;
    }
}

.dropdown-el label:nth-child(2) {
  margin-top: 2em;
  border-top: .06em solid #d9d9d9;
}
.dropdown-el input:checked + label {
  display: block;
  border-top: none;
  position: absolute;
  top: 0;
}
.dropdown-el input:checked + label:nth-child(2) {
  margin-top: 0;
  position: relative;
}
.dropdown-el::after {
  content: "";
  position: absolute;
  right: 0.8em;
  top: 0.9em;
  border: 0.3em solid #3694d7;
  border-color: #3694d7 transparent transparent transparent;
  transition: .4s all ease-in-out;
}
.dropdown-el.expanded {
  border: 0.06em solid #3694d7;
  background: #fff;
  border-radius: .25em;
  padding: 0;
  box-shadow: rgba(0, 0, 0, 0.1) 3px 3px 5px 0px;
  max-height: 40em;
}
.dropdown-el.expanded label {
  border-top: .06em solid #d9d9d9;
}
.dropdown-el.expanded label:hover {
  color: #3694d7;
}
.dropdown-el.expanded input:checked + label {
  color: #3694d7;
}
.dropdown-el.expanded::after {
  transform: rotate(-180deg);
  top: .55em;
}