/* FileBird Enterprise: WPForms selection overlay for Gallery block
   Opt-in: add class 'fbv-wpforms-select' in the block's Additional CSS class.
*/

.filebird-block-filebird-gallery.fbv-wpforms-select li.blocks-gallery-item,
.filebird-block-filebird-gallery.fbv-wpforms-select .blocks-gallery-item,
.filebird-gallery.fbv-wpforms-select .filebird-gallery-item {
  position: relative;
}

.filebird-block-filebird-gallery.fbv-wpforms-select li.blocks-gallery-item::after,
.filebird-block-filebird-gallery.fbv-wpforms-select .blocks-gallery-item::after,
.filebird-gallery.fbv-wpforms-select .filebird-gallery-item::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.25);
  opacity: 0;
  transition: opacity .15s ease;
  pointer-events: none;
}

.filebird-block-filebird-gallery.fbv-wpforms-select li.blocks-gallery-item:hover::after,
.filebird-block-filebird-gallery.fbv-wpforms-select .blocks-gallery-item:hover::after,
.filebird-gallery.fbv-wpforms-select .filebird-gallery-item:hover::after {
  opacity: 1;
}

.filebird-block-filebird-gallery.fbv-wpforms-select .fb-select-btn,
.filebird-gallery.fbv-wpforms-select .fb-select-btn {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 0;
  cursor: pointer;
  font-weight: 700;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .15s ease, transform .15s ease;
  z-index: 50;
}

.filebird-block-filebird-gallery.fbv-wpforms-select li.blocks-gallery-item:hover .fb-select-btn,
.filebird-block-filebird-gallery.fbv-wpforms-select .blocks-gallery-item:hover .fb-select-btn,
.filebird-gallery.fbv-wpforms-select .filebird-gallery-item:hover .fb-select-btn {
  opacity: 1;
  transform: translateY(0);
}

.filebird-block-filebird-gallery.fbv-wpforms-select .is-selected .fb-select-btn,
.filebird-gallery.fbv-wpforms-select .is-selected .fb-select-btn {
  opacity: 1;
  transform: none;
}

/* Stronger selected state (thicker outline + desaturated image) */
.filebird-block-filebird-gallery.fbv-wpforms-select li.blocks-gallery-item.is-selected,
.filebird-block-filebird-gallery.fbv-wpforms-select .blocks-gallery-item.is-selected,
.filebird-gallery.fbv-wpforms-select .filebird-gallery-item.is-selected {
  outline: 4px solid rgba(255,255,255,.92);
  outline-offset: -4px;
  box-shadow: 0 0 0 2px rgba(0,0,0,.25) inset;
}

.filebird-block-filebird-gallery.fbv-wpforms-select li.blocks-gallery-item.is-selected img,
.filebird-block-filebird-gallery.fbv-wpforms-select .blocks-gallery-item.is-selected img,
.filebird-gallery.fbv-wpforms-select .filebird-gallery-item.is-selected img {
  filter: grayscale(100%);
  opacity: .78;
}

.filebird-block-filebird-gallery.fbv-wpforms-select .fb-select-badge,
.filebird-gallery.fbv-wpforms-select .fb-select-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  min-width: 28px;
  height: 28px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  z-index: 60;
  background: rgba(0,0,0,.7);
  color: #fff;
}

/* Simple toast */
#fbv-wpf-toast {
  position: fixed;
  left: 16px;
  bottom: 16px;
  z-index: 99999;
  padding: 12px 14px;
  border-radius: 12px;
  font-weight: 700;
  background: rgba(0,0,0,.85);
  color: #fff;
  max-width: 320px;
  display: none;
}
