#preview-container {
  -webkit-overflow-scrolling: touch;
  overflow-y: scroll;
  overflow-y: scroll;
  background-color: var(--light-bg-color); 
  width: 100%;
  height: calc(100vh - 96px);
  position: relative;
}
#previewIframe {
  margin: auto;
  position: absolute;
  top: 0; left: 0; bottom: 0; right: 0;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  opacity: 1;
  transition: width 280ms cubic-bezier(0.4, 0, 0.2, 1), height 280ms cubic-bezier(0.4, 0, 0.2, 1);
  overflow-x: hidden;
  background-color: #fff;
}
#preview-header {
  display: none;
}

#preview-custom-dimension {
  display: flex;
  justify-content: center;
  align-items: center;
}
#preview-custom-dimension input {
  width: 48px;
  margin: 0 8px;
  text-align: center; 
}
#preview-custom-dimension input.invalid {
  width: 48px;
  margin: 0 8px;
  text-align: center; 
  background: var(--error-bg-color);
}

@media (max-width: 767px) { 
  #preview-size {
    display: none;
  }
  #preview-container {
    position: relative;
    height: calc(100vh - 56px);
    top: 56px;
  }
  #preview .panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-left: 0;
    height: 54px;
    width: 100%;
    background-color: #fafafa;
    color: rgba(0,0,0,.87);
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    position: fixed;
    top: 0;
    z-index: 125;
    padding-left: 0;
    padding-right: 1rem;
  }
  #preview-header-close {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 8px;
    line-height: 54px;
    padding: 8px;
    width: 56px;
    height: 56px;
    font-size: 24px;
    user-select: none;
  }
  #preview-header-close:active {
    background-color: #ccc;
  }
  #preview-header-close:focus,
  #preview-header-close:active {
    outline: none;
  }
}
