/* images.css */

/* Ensure all preview containers are positioned for the × button */
.image-preview-wrapper,
.ll-gallery-item,
.ll-logo-thumb,
#ll_logo_preview_wrapper,
#ll_images_gallery {
  position: relative;
}

/* Gallery thumb layout */
.ll-gallery-item {
  display: inline-block;
}

.ll-gallery-item img {
  max-width: 100px;
  height: auto;
}

/* Unified remove "×" button for logo + gallery */
.ll-remove-image {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  line-height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  font-weight: 700;
  font-size: 16px;
  border: 1px solid #fff;
  cursor: pointer;
  padding: 0;
  z-index: 2;
}

.ll-remove-image:hover {
  background: rgba(0, 0, 0, 0.9);
}

/* Optional decorative gallery extras */
.image-gallery { text-align: center; margin-top: 20px; }
.image-gallery img {
  display: inline-block;
  border: 2px solid #ddd;
  border-radius: 5px;
  transition: transform .3s ease, border-color .3s ease;
}

.image-gallery img:hover { transform: scale(1.05); border-color: #aaa; }

.business-logo img { max-width: 250px; height: auto; }
.featured-image img { max-width: 500px; height: auto; }

.logo-container, .images-container { margin-bottom: 15px; }
.logo-controls, .images-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 5px;
}

.logo-preview, .images-gallery { margin-top: 5px; }
.logo-preview { display: inline-block; }

/* Safety: ensure the × can't be clipped by the thumb wrapper */
.ll-gallery-item { overflow: visible; }

/* Better keyboard accessibility */
.ll-remove-image:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 1px;
  box-shadow: 0 0 0 3px rgba(0,0,0,.35);
}

/* Touch comfort: bump target slightly on narrow screens */
@media (max-width: 640px) {
  .ll-remove-image {
    width: 24px;
    height: 24px;
    line-height: 22px;
    font-size: 18px;
  }
}

/* RTL support: move the × to the top-left when in RTL context */
[dir="rtl"] .ll-remove-image {
  right: auto;
  left: 4px;
}

/* If you ever toggle with [hidden], make sure it actually hides */
.ll-remove-image[hidden] { display: none !important; }
