/*
 * Caledros Basic Blocks - Easy to use Gutenberg blocks
 * Copyright (C) 2025  David Arnado
 * 
 * This file is part of Caledros Basic Blocks.
 * 
 * Caledros Basic Blocks is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.

 * Caledros Basic Blocks is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.

 * You should have received a copy of the GNU General Public License along
 * with Caledros Basic Blocks; if not, see <https://www.gnu.org/licenses/>.
 */

/* Initial styling for lazy-loaded images */
.lazy-image {
  display: block;
  background-color: var(--lazy-loading-overlay-color, #00000000);
  filter: blur(10px);
  opacity: 0;
  transition:
    opacity 0.5s ease,
    filter 0.5s ease;
}

/* Remove blur and set opacity to 1 when image is loaded */
.lazy-image:not([src=""]) {
  filter: blur(0);
  opacity: 1;
}

/* Max width for the image */
.cbb-resp-img img {
  max-width: 100%;
}

/*Remove default margins for the figure element*/
.cbb-resp-img {
  margin: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}

/*Inset shadow*/
.cbb-resp-img.inset-shadow {
  position: relative;
}
.cbb-resp-img.inset-shadow::after {
  box-shadow: var(--inset-box-shadow, 0px 0px 0px 0px #00000000);
  content: "";
  top: 0;
  right: 0;
  left: 0;
  bottom: 0;
  height: 100%;
  width: 100%;
  display: block;
  position: absolute;
  border-radius: var(--inset-border-radius, 0px);
}

/*Image link*/
.cbb-resp-img__link {
  display: block;
  width: 100%;
  height: 100%;
}
