/*
 * Copyright (c) 2017 kf (7kfpun@gmail.com)
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in all
 * copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
 * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
 * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
 * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE
 * OR OTHER DEALINGS IN THE SOFTWARE.
 */


.flag-background {
  background-size: contain;
  background-position: 50%;
  background-repeat: no-repeat;
}
.flag {
  background-size: contain;
  background-position: 50%;
  background-repeat: no-repeat;
  position: relative;
  display: inline-block;
  width: 1.33333333em;
  line-height: 1em;
}
.flag:before {
  content: "\00a0";
}
.flag-1x {
  width: 1.33333333em;
  line-height: 1em;
}
.flag-2x {
  width: 2.66666667em;
  line-height: 2em;
}
.flag-3x {
  width: 4em;
  line-height: 3em;
}
.flag-4x {
  width: 5.33333333em;
  line-height: 4em;
}
.flag-5x {
  width: 6.66666667em;
  line-height: 5em;
}
.flag-6x {
  width: 8em;
  line-height: 6em;
}
.flag-7x {
  width: 9.33333333em;
  line-height: 7em;
}
.flag-8x {
  width: 10.66666667em;
  line-height: 8em;
}
.flag-9x {
  width: 12em;
  line-height: 9em;
}
.flag-10x {
  width: 13.33333333em;
  line-height: 10em;
}
.flag-rotate-90 {
  filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=1);
  -webkit-transform: rotate(90deg);
  -ms-transform: rotate(90deg);
  transform: rotate(90deg);
}
.flag-rotate-180 {
  filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=2);
  -webkit-transform: rotate(180deg);
  -ms-transform: rotate(180deg);
  transform: rotate(180deg);
}
.flag-rotate-270 {
  filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=3);
  -webkit-transform: rotate(270deg);
  -ms-transform: rotate(270deg);
  transform: rotate(270deg);
}
.flag-flip-horizontal {
  filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1);
  -webkit-transform: scale(-1, 1);
  -ms-transform: scale(-1, 1);
  transform: scale(-1, 1);
}
.flag-flip-vertical {
  filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1);
  -webkit-transform: scale(1, -1);
  -ms-transform: scale(1, -1);
  transform: scale(1, -1);
}
:root .flag-rotate-90,
:root .flag-rotate-180,
:root .flag-rotate-270,
:root .flag-flip-horizontal,
:root .flag-flip-vertical {
  filter: none;
}

/* CSS adjusted for some style */
.flag-lang {
  margin-left:0.25rem;
  margin-right:0.25rem;
}
.flag-selected {
  background-color:var(--ucm-dark-red);
}

/* CSS adjusted for some languages */

.flag-cat,
.flag-ca
{
  background-image: url(cat.png);
  background-image: url(cat.svg);
}

.flag-deu,
.flag-de 
{
  background-image: url(deu.png);
  background-image: url(deu.svg);
}

.flag-esp,
.flag-es
{
  background-image: url(esp.png);
  background-image: url(esp.svg);
}

.flag-eng,
.flag-en
{
  background-image: url(eng.png);
  background-image: url(eng.svg);
}

.flag-fra,
.flag-fr
{
  background-image: url(fra.png);
  background-image: url(fra.svg);
}

.flag-gbr,
.flag-gb
{
  background-image: url(gbr.png);
  background-image: url(gbr.svg);
}

.flag-ita,
.flag-it
{
  background-image: url(ita.png);
  background-image: url(ita.svg);
}

.flag-prt,
.flag-pt
{
  background-image: url(prt.png);
  background-image: url(prt.svg);
}
