/* ==========================================================================
   Gallery
   ========================================================================== */
.cf-media-gallery__list {
  display: flex;
  flex-wrap: wrap;
  max-height: 400px;
  padding: 4px;
  margin: 0;
  overflow-y: auto;
  list-style: none outside none; }
  .cf-media-gallery__list:empty {
    display: none; }

.cf-media-gallery__actions {
  padding: 8px;
  text-align: center; }
  .cf-media-gallery__list:empty ~ .cf-media-gallery__actions {
    border-top-width: 0;
    margin-top: 0; }

.cf-media-gallery__item {
  flex: 0 0 100%;
  min-width: 0;
  padding: 4px;
  margin: 0;
  box-sizing: border-box; }
  @media (min-width: 320px) {
    .cf-media-gallery__item {
      flex-basis: 50%; } }
  @media (min-width: 480px) {
    .cf-media-gallery__item {
      flex-basis: 33.3333%; } }
  @media (min-width: 640px) {
    .cf-media-gallery__item {
      flex-basis: 25%; } }
  @media (min-width: 768px) {
    .cf-media-gallery__item {
      flex-basis: 20%; } }
  @media (min-width: 1280px) {
    .cf-media-gallery__item {
      flex-basis: 16.66667%; } }
  @media (min-width: 1440px) {
    .cf-media-gallery__item {
      flex-basis: 12.5%; } }
  @media (min-width: 1680px) {
    .cf-media-gallery__item {
      flex-basis: 10%; } }

.cf-media-gallery__item-inner {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  cursor: move; }

.cf-media-gallery__item-preview {
  position: relative;
  overflow: hidden;
  padding-top: 100%;
  flex: 1; }

.cf-media-gallery__item-thumb {
  position: absolute;
  top: 50%;
  left: 50%;
  min-width: 100%;
  min-height: 100%;
  max-width: 150%;
  transform: translate(-50%, -50%);
  pointer-events: none; }

.cf-media-gallery__item-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  max-width: 100%;
  max-height: 50%;
  transform: translate(-50%, -50%); }

.cf-media-gallery__item-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  padding: 0;
  border: 0;
  outline: none;
  background-color: transparent;
  cursor: pointer; }
  .cf-media-gallery__item-remove::before {
    border-radius: 50%;
    background-color: #191e23;
    color: #fff;
    transition: all .1s linear; }
  .cf-media-gallery__item-remove:hover::before {
    color: #b5bcc2; }

.cf-media-gallery__item-edit {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  outline: 0;
  height: 30px;
  width: 30px;
  border-radius: 50%;
  text-align: center;
  background: #191e23;
  color: #fff;
  border: 0;
  padding: 0;
  opacity: 0;
  transition: all .1s linear;
  cursor: pointer;
  text-decoration: none;
  outline: 0; }
  .cf-media-gallery__item-edit:hover, .cf-media-gallery__item-edit:focus {
    color: #b5bcc2; }

.cf-media-gallery__item-inner:hover .cf-media-gallery__item-edit, .cf-media-gallery__item-inner:focus .cf-media-gallery__item-edit {
  opacity: 1; }

.cf-media-gallery__actions {
  display: flex;
  justify-content: center;
  align-items: center; }
  .cf-media-gallery__actions .cf-media-gallery__browse {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 40px; }
    .cf-media-gallery__actions .cf-media-gallery__browse > .dashicons {
      margin-right: 7px; }

.postbox .cf-container__fields .cf-media-gallery__actions {
  border-top: 0; }

.cf-media-gallery__list + .cf-media-gallery__actions {
  margin-top: 20px; }

.cf-media-gallery__inner {
  padding: 0 0 20px; }
  .cf-media-gallery__inner h3 {
    text-align: center;
    border-bottom: 1px solid #e2e4e7;
    padding-bottom: 1em; }

