.gallery-picker .card-body {
  padding-bottom: 0;
}
.gallery-picker .results {
  display: block;
  clear: both;
}
.gallery-picker .media-gallery {
  display: block;
  max-height: calc(100vh - 265px);
  overflow-y: auto;
  padding: 4px 4px 0;
}
.gallery-picker .items {
  display: grid;
  width: 100%;
  position: relative;
  grid-template-columns: repeat(5, 1fr);
  gap: 1rem;
  margin-bottom: 1rem;
}
.gallery-picker x-input-image {
  width: 8rem;
  height: 8rem;
  min-width: 8rem;
  min-height: 8rem;
  padding: 0;
  border-radius: 0.5rem;
  border: 1px dashed var(--color-border-tinted);
  background-color: var(--color-white);
  transition: 0.3s;
  color: var(--color-text);
  cursor: pointer;
  margin: 0 auto;
}
.gallery-picker x-input-image:after, .gallery-picker x-input-image:before {
  display: none;
}
.is-dark-mode .gallery-picker x-input-image {
  background-color: var(--color-dark);
  border: 1px dashed var(--color-border-shaded);
}
.gallery-picker x-input-image .upload-zone {
  width: 8rem;
  height: 8rem;
  top: 0;
  right: 0;
  left: 0;
  bottom: 0;
  padding: 0.5rem;
}
.gallery-picker x-input-image:hover {
  border-color: var(--color-primary);
  box-shadow: 0px 12px 10px -8px rgba(0, 0, 0, 0.1), 0px 0px 0px 3px rgba(var(--color-primary-rgb), 0.3), 0 8px 15px 0 rgba(var(--color-primary-rgb), 0.1);
  cursor: pointer;
}
.gallery-picker x-gallery-image {
  position: relative;
  display: inline-block;
  width: 8rem;
  height: 8rem;
  margin: 0 auto;
  border-radius: 0.5rem;
  background-position: center;
  background-size: cover;
  border: 1px solid var(--color-border-tinted, #d9d8db);
  background-color: var(--color-white, #FFFFFF);
  transition: 0.3s;
}
.is-dark-mode .gallery-picker x-gallery-image {
  background-color: var(--color-dark, #1F1F1F) !important;
  border: 1px solid var(--color-dark-tint, #414141);
  color: var(--color-light, #FEFEFE);
}
.is-mobile .gallery-picker x-gallery-image .actions a {
  display: none;
}
@media (hover: hover) and (pointer: fine) {
  .gallery-picker x-gallery-image:hover {
    border-color: var(--color-primary, #4275F2);
    box-shadow: 0px 12px 10px -8px rgba(0, 0, 0, 0.1), 0px 0px 0px 3px rgba(var(--color-primary-rgb, 66, 117, 242), 0.3), 0 8px 15px 0 rgba(var(--color-primary-rgb, 66, 117, 242), 0.1);
    cursor: pointer;
  }
  .gallery-picker x-gallery-image:hover.selected {
    box-shadow: 0px 12px 10px -8px rgba(0, 0, 0, 0.1), 0px 0px 0px 4px rgba(var(--color-primary-rgb, 66, 117, 242), 1), 0 8px 15px 0 rgba(var(--color-primary-rgb, 66, 117, 242), 0.25) !important;
  }
  .gallery-picker x-gallery-image:hover .actions {
    transform: translateX(0px);
    opacity: 1;
    visibility: visible;
    pointer-events: initial;
  }
}
@media (hover: none) and (pointer: coarse) {
  .gallery-picker x-gallery-image.selected .actions {
    transform: translateX(0px);
    opacity: 1;
    visibility: visible;
    pointer-events: initial;
  }
}
.gallery-picker x-gallery-image.selected {
  border-color: var(--color-primary, #4275F2);
  box-shadow: 0px 12px 10px -8px rgba(0, 0, 0, 0.1), 0px 0px 0px 3px rgba(var(--color-primary-rgb, 66, 117, 242), 1), 0 8px 15px 0 rgba(var(--color-primary-rgb, 66, 117, 242), 0.25);
}
.is-dark-mode .gallery-picker x-gallery-image.selected {
  box-shadow: 0px 12px 10px -8px rgba(0, 0, 0, 0.1), 0px 0px 0px 3px rgba(var(--color-primary-rgb, 66, 117, 242), 1), 0 8px 15px 0 rgba(var(--color-black-rgb, 0, 0, 0), 0.25);
}
.gallery-picker x-gallery-image.selected .checkmark {
  background-color: var(--color-primary, #4275F2);
  transform: translateY(0px);
  opacity: 1;
  box-shadow: 0 8px 15px 0 rgba(var(--color-primary-rgb, 66, 117, 242), 0.25);
}
.is-dark-mode .gallery-picker x-gallery-image.selected .checkmark {
  box-shadow: 0 8px 15px 0 rgba(var(--color-black-rgb, 0, 0, 0), 0.25) !important;
}
.gallery-picker x-gallery-image.selected .checkmark:after {
  display: block;
}
.gallery-picker x-gallery-image.loading {
  cursor: not-allowed;
  background-image: none !important;
  pointer-events: none;
}
.gallery-picker x-gallery-image.loading .actions {
  display: none !important;
}
.gallery-picker x-gallery-image .loading-indicator {
  width: 2em;
  height: 2em;
  position: absolute;
  color: inherit;
  display: inline-block;
  box-sizing: content-box;
  animation: cycle 0.8s infinite linear;
  padding: 0px;
  top: calc(50% - 1em);
  left: calc(50% - 1em);
}
.gallery-picker x-gallery-image .loading-indicator:after {
  content: " ";
  display: block;
  width: 4em;
  height: 4em;
  box-sizing: border-box;
  transform-origin: 0em 0em;
  transform: translateZ(0) scale(0.5);
  backface-visibility: hidden;
  border-radius: 50%;
  border: 0.3em solid currentColor;
  border-left-color: transparent;
}
.gallery-picker x-gallery-image .actions {
  display: block;
  position: absolute;
  bottom: 0.25rem;
  right: 0.25rem;
  transition: 0.3s;
  transform: translateX(-30px);
  opacity: 0;
  visibility: hidden;
}
.gallery-picker x-gallery-image .actions > button,
.gallery-picker x-gallery-image .actions > a {
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: rgba(0, 0, 0, 0.5);
  border: 1px solid transparent;
  width: 2rem;
  height: 2rem;
  border-radius: 5px;
  margin-top: 3px;
  transition: 0.3s;
}
.gallery-picker x-gallery-image .actions > button x-icon,
.gallery-picker x-gallery-image .actions > a x-icon {
  color: white;
  display: inline-block;
  transition: 0.3s;
}
.gallery-picker x-gallery-image .actions > button:hover,
.gallery-picker x-gallery-image .actions > a:hover {
  background-color: rgba(0, 0, 0, 0.7);
  box-shadow: 0px 0px 0px 3px rgba(var(--color-primary-rgb, 66, 117, 242), 0.3), 0 8px 15px 0 rgba(var(--color-primary-rgb, 66, 117, 242), 0.1), 0px 0px 0px 1px var(--color-primary, #4275F2);
}
.gallery-picker x-gallery-image .actions > button:hover x-icon,
.gallery-picker x-gallery-image .actions > a:hover x-icon {
  transform: scale(1.1);
}
.gallery-picker x-gallery-image .checkmark {
  position: absolute;
  bottom: -0.625rem;
  left: -0.625rem;
  height: 1.6rem;
  width: 1.6rem;
  border-radius: 50%;
  transition: 0.3s;
  transform: translateY(10px);
  opacity: 0;
  z-index: 5;
}
.gallery-picker x-gallery-image .checkmark:after {
  content: "";
  position: absolute;
  display: none;
  left: 8px;
  top: 4px;
  width: 5px;
  height: 10px;
  border: solid white;
  border-width: 0 3px 3px 0;
  -webkit-transform: rotate(45deg);
  -ms-transform: rotate(45deg);
  transform: rotate(45deg);
  box-sizing: content-box !important;
}

@keyframes onDrag {
  from {
    -webkit-transform: translateY(-3px);
    transform: translateY(-3px);
  }
  to {
    -webkit-transform: translateY(3px);
    transform: translateY(3px);
  }
}
@media screen and (max-width: 680px) {
  .gallery-picker .items {
    gap: 0.5rem;
  }
}
@media screen and (max-width: 650px) {
  .image-gallery-modal .modal-slot {
    max-width: 38rem !important;
  }
  .gallery-picker .items {
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
  }
}
@media screen and (max-width: 536px) {
  .gallery-picker .items {
    grid-template-columns: repeat(5, 1fr);
  }
  .gallery-picker .items x-input-image {
    width: 5rem;
    height: 5rem;
    min-width: 5rem;
    min-height: 5rem;
  }
  .gallery-picker .items x-input-image .upload-zone {
    width: 5rem;
    height: 5rem;
  }
  .gallery-picker .items x-input-image .upload-zone > p {
    display: none;
  }
  .gallery-picker .items x-gallery-image {
    width: 5rem;
    height: 5rem;
  }
}
@media screen and (max-width: 452px) {
  .gallery-picker .items {
    gap: 0.5rem;
  }
}
@media screen and (max-width: 422px) {
  .gallery-picker .items {
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
  }
}
@media screen and (max-width: 370px) {
  .gallery-picker .items {
    gap: 0.5rem;
  }
}
@media screen and (max-width: 346px) {
  .gallery-picker .items {
    grid-template-columns: repeat(4, 1fr);
  }
}
@media screen and (max-width: 336px) {
  .gallery-picker .items {
    grid-template-columns: repeat(3, 1fr);
  }
}