.hideshow-container {
  position: relative;
  width: 100%;
  min-width: 100%;
}
.insert-page .panel-layout {
	max-width:100px;
	padding:20px;
}

.hideshow-content {
  position: relative;
  width: 100%;
  overflow: visible;
  cursor: grab;
}


/* 
 * Query Loop grid fallback
 * Gutenberg does not emit layout support (grid) styles
 * for Query Loop blocks rendered via AJAX.
 * This scoped fallback restores core WP grid behavior.
 */
/* Base grid fallback */
.hideshow-content
.wp-block-post-template.is-layout-grid {
  display: grid;
  gap: var(--wp--style--block-gap, 1.5rem);
}

/* Column counts */
.hideshow-content .columns-1 { grid-template-columns: 1fr; }
.hideshow-content .columns-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.hideshow-content .columns-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.hideshow-content .columns-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* Mobile collapse - adjust to your breakpoints if you need to*/
@media (max-width: 1024px) {
  .hideshow-content
  .wp-block-post-template.is-layout-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
/* end gutenberg grid hack */


.hideshow-controls {
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  transform: translateY(-50%);
  pointer-events: none;
  z-index: 10;
}
.hideshow-controls button {
  display: block;
  position: absolute;
  pointer-events: auto;
  cursor: pointer;
}
.hideshow-controls .prev-btn {
  left: 10px;
  right: auto;
}
.hideshow-controls .next-btn,
.hideshow-controls .second-last-btn {
  right: 10px;
  left: auto;
}

.hideshow-controls button:hover {
  opacity: .8;
}

.hideshow-container .spinner {
  border: 4px solid #f3f3f3;
  border-top: 4px solid #3498db;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 2s linear infinite;
  margin: 20px auto;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
