
/* Кнопки назад и вперёд: */
 .previous, .next {
    /* Добавляет курсору иконку, когда тот оказывается над кнопкой: */
    cursor: pointer;
    /* Положение элемента задаётся относительно границ браузера: */
    position: absolute;
    top: 50%;
    width: auto;
    margin-top: -22px;
    padding: 16px;
    padding-bottom: 20px;
    /* Оформление самих кнопок: */
    color: white;
    background-color: rgba(0, 0, 0, 0.2);
    font-weight: bold;
    font-size: 2em;
    /* Плавное появление фона при наведении курсора: */
    transition: 0.6s ease;
    /* Скругление границ: */
    border-radius: 0 3px 3px 0;
     -webkit-touch-callout: none; /* iOS Safari */
  -webkit-user-select: none;   /* Chrome/Safari/Opera */
  -khtml-user-select: none;    /* Konqueror */
  -moz-user-select: none;      /* Firefox */
  -ms-user-select: none;       /* Internet Explorer/Edge */
  user-select: none;           /* Non-prefixed version, currently
                                  not supported by any browser */
}

#icoun {
    color: white;
    font-size: 1.5em;
}
.dcoun {
    text-align:center;
    }

 .previous {
    left: 0;
    border-radius: 0 16px 16px 0;
}

 .next {
    right: 0;
    border-radius: 16px 0 0 16px;
}

/* При наведении курсора на кнопки добавляем фон кнопок: */
.previous:hover,
.next:hover {
    background-color: rgba(0, 0, 0, 0.4);
}

/* картинка на странице */
.minimized {
  /*width: 300px;*/
  cursor: pointer;
  border: 4px solid transparent;
  border-radius: 4px;
  transition: 0.3s;
}

.minimized:hover {
  border: 4px solid #0071b8;
}

/* увеличенная картинка */
#magnify {
  display: none;
  margin:auto;
  height: auto;
  z-index: 999;
  position: relative;
       -webkit-touch-callout: none; /* iOS Safari */
  -webkit-user-select: none;   /* Chrome/Safari/Opera */
  -khtml-user-select: none;    /* Konqueror */
  -moz-user-select: none;      /* Firefox */
  -ms-user-select: none;       /* Internet Explorer/Edge */
  user-select: none;           /* Non-prefixed version, currently
                                  not supported by any browser */

}

#magnify img {
  width: 100%;
}

/* затемняющий фон */
#overlay {
  display:flex;
  background: #000000aa;
  position: fixed;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  z-index: 998;
}

/* кнопка закрытия */
#close-popup {
  width: 30px;
  height: 30px;

  background: #FFFFFF;
  border: 1px solid #AFAFAF;
  border-radius: 15px;
  cursor: pointer;
  position: absolute;
  top: 8px;
  right: 8px;
}

#close-popup i {

  width: 30px;
  height: 30px;
  background: url(https://codernote.ru/files/cross.png) no-repeat center center;
  background-size: 16px 16px;
  display: block;
}

@keyframes rota {
 25% { transform: rotate(360deg); }
}

#close-popup:hover {
  animation: rota 4s infinite normal;
  -webkit-animation-iteration-count: 1;
  animation-iteration-count: 1;
}
