/* flags.css */
.flag {
    position: relative;
    background-size: cover;
    background-position: center;
    border-radius: 2px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

.flag.small {
    width: 24px;
    height: 18px;
}

/* США — fallback стилизация */
.flag.us-flag {
    background-color: #b22234; /* Красный фон */
    background-image: none;
}

.flag.us-flag:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        to bottom,
        #b22234 0px, #b22234 10%,
        #ffffff 10%, #ffffff 20%
    );
    z-index: 1;
}

.flag.us-flag:after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 40%;
    height: 45%;
    background-color: #3c3b6e; /* Синий кантон */
    background-image: radial-gradient(white 1px, transparent 1px);
    background-size: 6px 6px;
    background-repeat: repeat;
    z-index: 2;
}

/* Россия — fallback стилизация */
.flag.ru-flag {
    background-color: #0039a6;
    background-image: none;
}

.flag.ru-flag:before {
    content: '';
    display: block;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        #ffffff 0%, #ffffff 33%,
        #0039a6 33%, #0039a6 66%,
        #d52b1e 66%, #d52b1e 100%
    );
}
