/* ============================================================================
 * Nguyano Escrow Manager frontend layout primitives.
 *
 * Shared grid, spacing, and card helpers for public-facing plugin screens.
 *
 * @package Nguyano_Escrow_Manager
 * ============================================================================ */

/* ---------------------------------------------------------
   GRID SYSTEM
   --------------------------------------------------------- */

/* Grid Base */
.ngesc-grid {
    display: grid;
}

/* Grid Columns - Desktop */
@media (min-width: 1024px) {
	.ngesc-grid-1 { grid-template-columns: repeat(1, minmax(0, 1fr)) !important; }
    .ngesc-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
    .ngesc-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
    .ngesc-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
	.ngesc-form-grid {grid-template-columns: repeat(12, 1fr);}
}

/* Grid Columns - Tablet & Mobile */
@media (max-width: 1023px) {
    .ngesc-grid {
        grid-template-columns: 1fr;
    }
}

/* columns*/
.ngesc-col-12 { grid-column: span 12; }
.ngesc-col-8  { grid-column: span 8; }
.ngesc-col-6  { grid-column: span 6; }
.ngesc-col-4  { grid-column: span 4; }
.ngesc-col-3  { grid-column: span 3; }
.ngesc-col-2  { grid-column: span 2; }

.ngesc-form-grid {
	display: grid;
	grid-template-columns: repeat(12, 1fr);
	gap: 16px;
}



/* ---------------------------------------------------------
   LAYOUT UTILITIES
   --------------------------------------------------------- */
*, ::after, ::before {
  box-sizing: border-box;
}

/* Vertical Stack */
.ngesc-stack {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

/* Gap Utilities */
.ngesc-gap-xs { gap: 6px; }
.ngesc-gap-sm { gap: 10px; }
.ngesc-gap-md { gap: 16px; }
.ngesc-gap-lg { gap: 24px; }
.ngesc-gap-xl { gap: 32px; }

/* ===============================
 * Nguyano Escrow Manager Layout Primitives
 * =============================== */

.ngesc-container {
	max-width: 1200px;
	margin-inline: auto;
	padding-inline: 16px;
}

.ngesc-row {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
}

.ngesc-col {
	flex: 1 1 0;
	min-width: 0;
}

.ngesc-card {
	background: #fff;
	border-radius: 8px;
	padding: 20px;
	border: 1px solid #e5e7eb;
	box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

/* =========================================================
   Nguyano Escrow Manager PUBLIC CARD (BASE)
   ========================================================= */

.ngesc-pub-card {
	width: 100%;
	box-sizing: border-box;

	/* Typography baseline */
	color: #1f2937;

	/* Layout friendliness */
	display: block;
}

/* Card padding variants */
.ngesc-pub-card--sm {
	padding: 20px;
	border-radius: 8px;
}

.ngesc-pub-card--lg {
	padding: 32px;
	border-radius: 8px;
}



@media (max-width: 768px) {
  .ngesc-table-wrapper {
    overflow-x: auto;
	-webkit-overflow-scrolling: touch;
  }
}

@media (max-width: 900px) {
    .ngesc-grid-2,
    .ngesc-grid-3,
    .ngesc-grid-4 {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
  .ngesc-col-12,
  .ngesc-col-10,
  .ngesc-col-8,
  .ngesc-col-6,
  .ngesc-col-4,
  .ngesc-col-3,
  .ngesc-col-2 {
    grid-column: span 12;
  }

}
