.kfc-carousel {
  width: 100%;
  overflow: hidden;
  position: relative;
  --kfc-duration: 28s;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  -webkit-transform: translate3d(0, 0, 0);
  transform: translate3d(0, 0, 0);
}

.kfc-viewport {
  width: 100%;
  overflow: hidden;
}

.kfc-track {
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  width: -webkit-max-content;
  width: max-content;
  -webkit-flex-wrap: nowrap;
  flex-wrap: nowrap;
  align-items: center;
  will-change: transform;
  -webkit-transform: translate3d(0, 0, 0);
  transform: translate3d(0, 0, 0);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;

  /* Explicit properties to avoid Safari shorthand CSS variable parsing bugs */
  -webkit-animation-name: kfc-left;
  animation-name: kfc-left;
  -webkit-animation-duration: var(--kfc-duration, 28s);
  animation-duration: var(--kfc-duration, 28s);
  -webkit-animation-timing-function: linear;
  animation-timing-function: linear;
  -webkit-animation-iteration-count: infinite;
  animation-iteration-count: infinite;
}

.kfc-direction-right .kfc-track {
  -webkit-animation-name: kfc-right;
  animation-name: kfc-right;
}

.kfc-flag-set {
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-flex: 0 0 auto;
  flex: 0 0 auto;
  align-items: center;
  -webkit-flex-wrap: nowrap;
  flex-wrap: nowrap;
}

.kfc-flag-item {
  -webkit-flex: 0 0 auto;
  flex: 0 0 auto;
  margin-right: 55px;
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -webkit-flex-direction: column;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.kfc-flag-item a {
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -webkit-flex-direction: column;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: inherit;
  gap: 8px;
}

.kfc-flag {
  font-size: 64px;
  line-height: 1;
  display: block;
  transition: -webkit-transform .2s ease, transform .2s ease, filter .2s ease;
}

.kfc-country-name {
  font-size: 14px;
  line-height: 1.2;
  white-space: nowrap;
  font-weight: 600;
  text-align: center;
}

/* Hover effects only applied to devices with a true pointer/mouse to prevent iOS touch lock */
@media (hover: hover) and (pointer: fine) {
  .kfc-flag-item:hover .kfc-flag {
    -webkit-transform: translateY(-3px) scale(1.04);
    transform: translateY(-3px) scale(1.04);
  }
  .kfc-pause-hover:hover .kfc-track {
    -webkit-animation-play-state: paused;
    animation-play-state: paused;
  }
  .kfc-grayscale .kfc-flag-item:hover .kfc-flag {
    filter: grayscale(0);
  }
}

.kfc-grayscale .kfc-flag {
  filter: grayscale(1);
}

@-webkit-keyframes kfc-left {
  0% {
    -webkit-transform: translate3d(0, 0, 0);
    transform: translate3d(0, 0, 0);
  }
  100% {
    -webkit-transform: translate3d(-50%, 0, 0);
    transform: translate3d(-50%, 0, 0);
  }
}

@keyframes kfc-left {
  0% {
    -webkit-transform: translate3d(0, 0, 0);
    transform: translate3d(0, 0, 0);
  }
  100% {
    -webkit-transform: translate3d(-50%, 0, 0);
    transform: translate3d(-50%, 0, 0);
  }
}

@-webkit-keyframes kfc-right {
  0% {
    -webkit-transform: translate3d(-50%, 0, 0);
    transform: translate3d(-50%, 0, 0);
  }
  100% {
    -webkit-transform: translate3d(0, 0, 0);
    transform: translate3d(0, 0, 0);
  }
}

@keyframes kfc-right {
  0% {
    -webkit-transform: translate3d(-50%, 0, 0);
    transform: translate3d(-50%, 0, 0);
  }
  100% {
    -webkit-transform: translate3d(0, 0, 0);
    transform: translate3d(0, 0, 0);
  }
}

@media (max-width: 767px) {
  .kfc-flag-item {
    margin-right: 35px;
  }
  .kfc-flag {
    font-size: 48px;
  }
  .kfc-country-name {
    font-size: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .kfc-track {
    -webkit-animation: none !important;
    animation: none !important;
    -webkit-transform: none !important;
    transform: none !important;
  }
}