/*
 Theme Name: My Blogstream Child Theme
 Theme URI: https://example.com/
 Author: Your Name
 Author URI: https://example.com/
 Description: A child theme for Blogstream
 Template: blogstream
 Version: 1.0.0
 License: GNU General Public License v2 or later
 License URI: http://www.gnu.org/licenses/gpl-2.0.html
 Text Domain: my-blogstream-child
*/

/* ───── Override Gutenberg gallery defaults for 80×80 thumbnails ───── */

/* Target any Gallery wrapper that has class="small-icon-gallery" */
ul.small-icon-gallery {
  display: grid !important;
  grid-template-columns: repeat(8, 80px) !important; /* eight 80px columns */
  grid-auto-rows: 80px !important;                   /* each row is 80px tall */
  gap: 8px !important;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
}

/* Collapse each <li> to 80×80 */
ul.small-icon-gallery li.blocks-gallery-item {
  width: 80px !important;
  height: 80px !important;
  margin: 0 auto !important;
  display: block !important;
}

/* Force every <img> inside that gallery down to 80×80 */
ul.small-icon-gallery li.blocks-gallery-item img {
  width: 80px !important;
  height: 80px !important;
  max-width: none !important;
  object-fit: contain !important;
  display: block !important;
  margin: 0 auto !important;
}

/* If your theme wraps the <img> in a <figure class="blocks-gallery-item__frame">, force that too */
ul.small-icon-gallery li.blocks-gallery-item .blocks-gallery-item__frame {
  width: 80px !important;
  height: 80px !important;
  margin: 0 auto !important;
  display: block !important;
}

/* ───── Responsive fallbacks: 6 → 4 → 2 columns ───── */
@media (max-width: 1200px) {
  ul.small-icon-gallery {
    grid-template-columns: repeat(6, 80px) !important;
  }
}
@media (max-width: 900px) {
  ul.small-icon-gallery {
    grid-template-columns: repeat(4, 80px) !important;
  }
}
@media (max-width: 600px) {
  ul.small-icon-gallery {
    grid-template-columns: repeat(2, 80px) !important;
  }
}

/* ───── “Used Most” Drop-Zone Gallery (if class="small-used-gallery") ───── */
ul.small-used-gallery {
  display: grid !important;
  grid-template-columns: repeat(6, 80px) !important; /* six 80px slots */
  grid-auto-rows: 80px !important;
  gap: 8px !important;
  min-height: 100px !important;
  border: 2px dashed #ccc !important;
  padding: 8px !important;
  margin: 0 !important;
  list-style: none !important;
}

ul.small-used-gallery li.blocks-gallery-item {
  width: 80px !important;
  height: 80px !important;
  margin: 0 auto !important;
  display: block !important;
}

ul.small-used-gallery li.blocks-gallery-item img {
  width: 80px !important;
  height: 80px !important;
  max-width: none !important;
  object-fit: contain !important;
  display: block !important;
  margin: 0 auto !important;
}

@media (max-width: 900px) {
  ul.small-used-gallery {
    grid-template-columns: repeat(4, 80px) !important;
  }
}
@media (max-width: 600px) {
  ul.small-used-gallery {
    grid-template-columns: repeat(2, 80px) !important;
  }
}
