/* (c) Александр Мальцев
 *
 * Описание: https://itchief.ru/javascript/modal-window
 * Исходники: https://github.com/itchief/ui-components/tree/master/modal
 */

.modal__backdrop {
  position: fixed;
  /* float: center; */
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  z-index: -1;
  pointer-events: none;
  transition: opacity0 .2s ease-in;
}

.modal__content {
  position: relative;
  /* float: center; */
  max-width: 95%;
  max-height: 95%;
  width: 95%;
  height: 95%;
  /* align-self: center; */
  /* text-align: center; */
  margin: auto;
  transition: opacity 0.3s ease-in;
  display: flex;
  flex-direction: column;
  background-color: #DDD;
  background-clip: padding-box;
  border: 1px solid #333;
  border-radius: 0.3rem;
  box-shadow: 0 0 7px 0 rgba(0, 0, 0, 0.3);
}

@media (min-width: 576px) {
  .modal__content {
    max-width: 980px;
    margin: auto;
  }
}

.modal__show .modal__backdrop,
.modal__show .modal__content {
  opacity: 1;
  z-index: 1050;
  pointer-events: auto;
  overflow-y: auto;
}

.modal__header {
  display: flex;
  justify-content: space-between;
  padding: 5px;
  border-bottom: 1px solid #eceeef;
}

.modal__title {
  /* text-align: center; */
  /* align-items: center; */
  width: 90%;
  margin-top: 0;
  margin-bottom: 0;
  line-height: 1.5;
  font-size: 1.0rem;
  font-weight: 500;
}

.modal__btn-close {
  float: right;
  font-family: sans-serif;
  font-size: 24px;
  font-weight: 700;
  line-height: 1;
  color: #000;
  text-shadow: 0 1px 0 #fff;
  opacity: 0.5;
  text-decoration: none;
}

.modal__btn-close:focus,
.modal__btn-close:hover {
  color: #000;
  text-decoration: none;
  cursor: pointer;
  opacity: 0.75;
}

.modal__body {
  position: relative;
  flex: 1 1 auto;
  /* align-content: center; */
  /* align-items: center; */
  /* justify-content: center; */
  width:100%;
  margin: auto;
  padding: 2px;
  overflow: auto;
}

.modal__footer {
  display: flex;
  /* align-items: center; */
  justify-content: flex-end;
  padding: 1rem;
  border-top: 1px solid #e9ecef;
  border-bottom-right-radius: 0.3rem;
  border-bottom-left-radius: 0.3rem;
}

img.image-viewer {
  max-width:950px;
  max-height:800px;
}

.image-viewer {
  position: absolute;
  left: 0;
  right: 0;
  margin-left: 10px;
  margin-top: 10px;
}