$footer-flag-up: $fc-angle-up !default;
$footer-flag-down: $fc-angle-down !default;
$footer-border: #313237 !default;
$footer-flags-color: $border-color !default;

.footer-flags {
   border-top: 1px solid $footer-border;
   color: $footer-flags-color;
   padding: 20px;

   ul {
      @include list-unstyled;

      display: flex;
      align-items: center;
      flex-wrap: wrap;
      margin: 0 -15px;
   }

   li {
      display: inline-block;
      padding: 10px 15px;
      width: 194px;
   }

   a {
      color: inherit;
      display: inline-flex;
      align-items: flex-end;
      line-height: 1.2;
   }

   img {
      display: inline-block;
      margin-right: 12px;
      width: auto;
      height: 20px;
   }


   @media screen and (max-width: 767px) {
      li {
         width: 33.333%;
      }
   }

   @media screen and (max-width: 543px) {
      li {
         width: 50%;
      }
   }

   @media screen and (max-width: 419px) {
      padding-right: 0;
      padding-left: 0;

      ul {
         border: 1px solid $footer-border;
         margin: auto;
         padding: 10px;
         width: 280px;
      }

      li {
         width: 100%;
         padding: 5px 10px;
      }

      a {
         padding: 5px;
      }

      .active {
         order: -1;
         display: flex;
         align-items: center;

         a {
            pointer-events: none;
            flex-grow: 1;
         }

         &::after {
            @include fonticon;

            content: $footer-flag-up;
            font-size: 12px;
         }
      }

      &.closed {
         li:not(.active) {
            display: none;
         }

         .active::after {
            content: $footer-flag-down;
         }
      }
   }
}
