@font-face {
  font-family: "Roboto Flex";
  src: url("https://cdndc.img.ria.ru/dc/fonts/RobotoFlex-Variable.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

.ny-widget {
  position: relative;
  display: block;
  margin: 0 auto;
  max-width: 650px;
  min-width: 350px;
  font-family: "Roboto Flex", sans-serif;
  font-weight: 400;
  font-size: 34px;
  line-height: 34px;
  box-sizing: border-box;
}

.ny-card {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  height: 166px;
  background-image: url("https://cdndc.img.ria.ru/dc/static/bg.png");
  background-size: cover;
  background-position: center;
  color: #ffffff;
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.25);
}

.ny-layout,
.ny-greeting {
  position: relative;
  padding: 20px 20px 12px 20px;
  z-index: 1;
  box-sizing: border-box;
}

.ny-layout {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  text-align: center;
}

.ny-title {
  width: 100%;
  font-family: "Roboto Flex", sans-serif;
  font-weight: 400;
  font-size: 24px;
  line-height: 28px;
  text-align: left;
}

.ny-subtitle {
  font-family: "Roboto Flex", sans-serif;
  font-weight: 400;
  font-size: 10px;
  line-height: 12px;
  color: #f0f0f0;
}

.ny-right {
  width: 100%;
}

.ny-timer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 16px;
}

.ny-unit {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  height: 68px;
  padding: 9px 5px;
  border-radius: 6px;
  min-width: 50px;
  background: linear-gradient(90deg,
      rgba(204, 204, 204, 0.02) 0%,
      rgba(242, 242, 242, 0.11) 67%,
      rgba(204, 204, 204, 0.02) 100%);
  backdrop-filter: blur(90px);
}

.ny-value {
  font-family: "Roboto Flex", sans-serif;
  font-weight: 400;
  font-size: 40px;
}

.ny-label {
  font-family: "Roboto Flex", sans-serif;
  font-weight: 400;
  font-size: 11px;
  text-align: center;
  width: 100%;
}

.ny-separator {
  flex: 0 0 12px;
  width: 12px;
  text-align: center;
  font-family: "Roboto Flex", sans-serif;
  font-weight: 400;
  font-size: 26px;
  color: #f0f0f0;
}

.sec-digit {
  display: inline-block;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.sec-digit.fade-out {
  opacity: 0;
  transform: scale(0.9);
}

.sec-digit.fade-in {
  opacity: 1;
  transform: scale(1);
}

.ny-unit--seconds .ny-value {
  display: flex;
  justify-content: center;
  align-items: center;
}

.ny-unit--seconds .sec-digit {
  display: block;
  margin: 0;
  padding: 0;
}

.ny-greeting {
  position: absolute;
  display: none;
  padding: 24px;
  text-align: center;
  font-family: "Roboto Flex", sans-serif;
  font-weight: 400;
  font-size: 24px;
  min-height: 90px;
}

@media (min-width: 480px) {
  .ny-title {
    font-family: "Roboto Flex", sans-serif;
    font-weight: 400;
    font-size: 28px;
  }

  .ny-card {
    height: 196px;
  }

  .ny-unit {
    min-width: 66px;
    height: 90px;
  }

  .ny-value {
    font-family: "Roboto Flex", sans-serif;
    font-weight: 400;
    font-size: 54px;
    line-height: 46px;
  }

  .ny-label {
    margin-top: 4px;
    font-family: "Roboto Flex", sans-serif;
    font-weight: 400;
    font-size: 12px;
  }

  .ny-separator {
    top: -6px;
    font-family: "Roboto Flex", sans-serif;
    font-weight: 400;
    font-size: 50px;
    line-height: 40px;
  }

  .ny-greeting {
    font-family: "Roboto Flex", sans-serif;
    font-weight: 400;
    font-size: 24px;
  }
}

@media (max-width: 651px) {
  .ny-left {
    display: contents;
  }

  .ny-title {
    order: 1;
  }

  .ny-right {
    order: 2;
  }

  .ny-subtitle {
    order: 3;
    margin-top: 8px;
  }

  .ny-greeting {
    display: block;
    width: 100%;
    text-align: center;
    color: #fff;
    font-family: "Roboto Flex", sans-serif;
    font-weight: 400;
    font-size: 24px;
    line-height: 36px;
  }
}

@media (min-width: 640px) and (max-width: 767px) {
  .ny-card {
    display: flex;
    height: 166px;
    align-items: center;
  }

  .ny-layout {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    height: 138px;
  }

  .ny-left {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-start;
    height: 90px;
  }

  .ny-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
  }

  .ny-title {
    font-family: "Roboto Flex", sans-serif;
    font-weight: 400;
    font-size: 29px;
  }

  .ny-timer {
    margin-top: 0;
    column-gap: 6px;
  }

  .ny-greeting {
    font-family: "Roboto Flex", sans-serif;
    font-weight: 400;
    font-size: 28px;
  }
}

@media (min-width: 768px) {
  .ny-card {
    position: relative;
    display: flex;
    height: 166px;
    align-items: center;
  }

  .ny-layout {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    height: 138px;
  }

  .ny-left {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-start;
    height: 90px;
  }

  .ny-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
  }

  .ny-title {
    font-family: "Roboto Flex", sans-serif;
    font-weight: 400;
    font-size: 34px;
  }

  .ny-subtitle {
    text-align: left;
  }

  .ny-timer {
    margin-top: 0;
    column-gap: 10px;
  }

  .ny-greeting {
    display: block;
    width: 100%;
    text-align: center;
    color: #fff;
    font-family: "Roboto Flex", sans-serif;
    font-weight: 400;
    font-size: 36px;
    line-height: 36px;
  }
}
