/*
 * ============================================================================
 * ACFE ROW HEIGHT FRONTEND STYLES v1.1
 * ============================================================================
 *
 * Frontend CSS Grid utility classes for implementing row heights in themes.
 * Uses ACFE-specific class names to avoid conflicts with other grid systems.
 *
 * Container: .acfe-grid-container
 * Items: .acfe-grid-item + .col-span-X + .row-span-Y
 *
 * Last updated: October 13, 2025, by GitHub Copilot
 * ============================================================================
 // todo: human review needed for this.
 // todo: will need to add some responsive styles to this, using container queries?
/* ==========================================================================
   CSS Grid Container - ACFE Specific
   ========================================================================== */
/*
 * Main grid container class - use this for all ACFE grid layouts
 */
/*
 * Main grid container class - use this for all ACFE grid layouts
 * Default: Single column layout for mobile
 */
.acfe-grid-container {
  display: grid;
  grid-auto-rows: auto; /* Auto height rows */
  grid-template-columns: 1fr; /* Single column by default */
  gap: 1rem; /* Smaller gap for mobile */
  width: 100%;
}

@media (width >= 768px) {
  .acfe-grid-container {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 2rem;
    width: 100%;
  }
}
/*
 * Grid container variants with different gap sizes
 */
.acfe-grid-container--small {
  gap: 1rem;
}

.acfe-grid-container--large {
  gap: 3rem;
}

.acfe-grid-container--none {
  gap: 0;
}

/* ==========================================================================
   Grid Item Base Class
   ========================================================================== */
.acfe-grid-item {
  min-width: 0; /* Prevent overflow issues */
  /* Reset any default margins/padding that might interfere */
  margin: 0;
}

/* ==========================================================================
   Column Span Classes (1-12 columns)
   ========================================================================== */
@media (width >= 768px) {
  .col-span-1 {
    grid-column: span 1;
  }
  .col-span-2 {
    grid-column: span 2;
  }
  .col-span-3 {
    grid-column: span 3;
  }
  .col-span-4 {
    grid-column: span 4;
  }
  .col-span-5 {
    grid-column: span 5;
  }
  .col-span-6 {
    grid-column: span 6;
  }
  .col-span-7 {
    grid-column: span 7;
  }
  .col-span-8 {
    grid-column: span 8;
  }
  .col-span-9 {
    grid-column: span 9;
  }
  .col-span-10 {
    grid-column: span 10;
  }
  .col-span-11 {
    grid-column: span 11;
  }
  .col-span-12,
  .col-span-auto {
    grid-column: span 12;
  }
}
/* ==========================================================================
   Row Span Classes (1-12 columns)
   ========================================================================== */
.row-span-1 {
  grid-row: span 1;
}

.row-span-2 {
  grid-row: span 2;
}

.row-span-3 {
  grid-row: span 3;
}

.row-span-4 {
  grid-row: span 4;
}

.row-span-5 {
  grid-row: span 5;
}

.row-span-6 {
  grid-row: span 6;
}

.row-span-7 {
  grid-row: span 7;
}

.row-span-8 {
  grid-row: span 8;
}

.row-span-9 {
  grid-row: span 9;
}

.row-span-10 {
  grid-row: span 10;
}

.row-span-11 {
  grid-row: span 11;
}

.row-span-12,
.row-span-row {
  grid-row: span 12;
}

/* ==========================================================================
   Grid Item Alignment Utilities
   ========================================================================== */
/*
 * Vertical alignment for grid items
 */
.acfe-grid-item--top {
  align-self: start;
}

.acfe-grid-item--center {
  align-self: center;
}

.acfe-grid-item--bottom {
  align-self: end;
}

.acfe-grid-item--stretch {
  align-self: stretch;
}

/*
 * Horizontal alignment for grid containers
 */
.acfe-grid-container--left {
  justify-items: start;
}

.acfe-grid-container--center {
  justify-items: center;
}

.acfe-grid-container--right {
  justify-items: end;
}

/* ==========================================================================
   Utility Classes
   ========================================================================== */
/*
 * Debug utilities - add to containers to visualize grid
 */
.acfe-grid-debug {
  background-image: linear-gradient(to right, rgba(255, 0, 0, 0.1) 1px, transparent 1px), linear-gradient(to bottom, rgba(255, 0, 0, 0.1) 1px, transparent 1px);
  background-size: 8.3333333333% 1rem;
}

.acfe-grid-debug--rows {
  background-image: linear-gradient(to bottom, rgba(0, 255, 0, 0.1) 1px, transparent 1px);
  background-size: 1rem 1rem;
}

/*
 * Reset utilities for grid items
 */
.acfe-grid-item-reset {
  margin: 0;
  padding: 0;
}

/* ==========================================================================
   Print Styles
   ========================================================================== */
@media print {
  .acfe-grid-container {
    display: block !important;
  }
  .acfe-grid-container * {
    box-shadow: none !important;
  }
}
