/* ============================================
   YALLA MOBILE - UTILITY CLASSES
   ============================================ */

/* ═══════════════════════════════════════════
   LAYOUT
   ═══════════════════════════════════════════ */

/* Container */
.container {
  width: 100%;
  max-width: var(--container-max, 1280px);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--container-padding, 1rem);
  padding-right: var(--container-padding, 1rem);
}

/* Section */
.section {
  padding-top: var(--section-padding, 4rem);
  padding-bottom: var(--section-padding, 4rem);
}

.section-sm {
  padding-top: var(--space-12, 3rem);
  padding-bottom: var(--space-12, 3rem);
}

.section-header {
  text-align: center;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: var(--space-12, 3rem);
}

/* ═══════════════════════════════════════════
   DISPLAY
   ═══════════════════════════════════════════ */

.block { display: block; }
.inline-block { display: inline-block; }
.inline { display: inline; }
.hidden { display: none; }

/* ═══════════════════════════════════════════
   FLEXBOX
   ═══════════════════════════════════════════ */

.flex { display: flex; }
.inline-flex { display: inline-flex; }

.flex-row { flex-direction: row; }
.flex-col { flex-direction: column; }
.flex-row-reverse { flex-direction: row-reverse; }
.flex-col-reverse { flex-direction: column-reverse; }

.flex-wrap { flex-wrap: wrap; }
.flex-nowrap { flex-wrap: nowrap; }

.justify-start { justify-content: flex-start; }
.justify-center { justify-content: center; }
.justify-end { justify-content: flex-end; }
.justify-between { justify-content: space-between; }
.justify-around { justify-content: space-around; }
.justify-evenly { justify-content: space-evenly; }

.items-start { align-items: flex-start; }
.items-center { align-items: center; }
.items-end { align-items: flex-end; }
.items-baseline { align-items: baseline; }
.items-stretch { align-items: stretch; }

.self-start { align-self: flex-start; }
.self-center { align-self: center; }
.self-end { align-self: flex-end; }

.flex-1 { flex: 1 1 0%; }
.flex-auto { flex: 1 1 auto; }
.flex-none { flex: none; }
.grow { flex-grow: 1; }
.shrink-0 { flex-shrink: 0; }

/* ═══════════════════════════════════════════
   GRID
   ═══════════════════════════════════════════ */

.grid { display: grid; }

.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

@media (min-width: 640px) {
  .sm\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sm\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 768px) {
  .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .md\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .md\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (min-width: 1024px) {
  .lg\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lg\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .lg\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.col-span-full { grid-column: 1 / -1; }

.grid-auto-fit {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

/* ═══════════════════════════════════════════
   GAP
   ═══════════════════════════════════════════ */

.gap-1 { gap: var(--space-1, 0.25rem); }
.gap-2 { gap: var(--space-2, 0.5rem); }
.gap-3 { gap: var(--space-3, 0.75rem); }
.gap-4 { gap: var(--space-4, 1rem); }
.gap-5 { gap: var(--space-5, 1.25rem); }
.gap-6 { gap: var(--space-6, 1.5rem); }
.gap-8 { gap: var(--space-8, 2rem); }

/* ═══════════════════════════════════════════
   SPACING
   ═══════════════════════════════════════════ */

/* Margin */
.m-0 { margin: 0; }
.m-auto { margin: auto; }
.mx-auto { margin-left: auto; margin-right: auto; }
.my-auto { margin-top: auto; margin-bottom: auto; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: var(--space-1, 0.25rem); }
.mt-2 { margin-top: var(--space-2, 0.5rem); }
.mt-3 { margin-top: var(--space-3, 0.75rem); }
.mt-4 { margin-top: var(--space-4, 1rem); }
.mt-6 { margin-top: var(--space-6, 1.5rem); }
.mt-8 { margin-top: var(--space-8, 2rem); }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: var(--space-1, 0.25rem); }
.mb-2 { margin-bottom: var(--space-2, 0.5rem); }
.mb-3 { margin-bottom: var(--space-3, 0.75rem); }
.mb-4 { margin-bottom: var(--space-4, 1rem); }
.mb-6 { margin-bottom: var(--space-6, 1.5rem); }
.mb-8 { margin-bottom: var(--space-8, 2rem); }

/* Padding */
.p-0 { padding: 0; }
.p-1 { padding: var(--space-1, 0.25rem); }
.p-2 { padding: var(--space-2, 0.5rem); }
.p-3 { padding: var(--space-3, 0.75rem); }
.p-4 { padding: var(--space-4, 1rem); }
.p-6 { padding: var(--space-6, 1.5rem); }
.p-8 { padding: var(--space-8, 2rem); }

.px-4 { padding-left: var(--space-4, 1rem); padding-right: var(--space-4, 1rem); }
.py-4 { padding-top: var(--space-4, 1rem); padding-bottom: var(--space-4, 1rem); }

/* ═══════════════════════════════════════════
   SIZING
   ═══════════════════════════════════════════ */

.w-full { width: 100%; }
.w-auto { width: auto; }
.max-w-full { max-width: 100%; }
.min-w-0 { min-width: 0; }

.h-full { height: 100%; }
.h-screen { height: 100vh; }
.min-h-screen { min-height: 100vh; }

/* ═══════════════════════════════════════════
   POSITIONING
   ═══════════════════════════════════════════ */

.relative { position: relative; }
.absolute { position: absolute; }
.fixed { position: fixed; }
.sticky { position: sticky; }

.inset-0 { inset: 0; }
.top-0 { top: 0; }
.right-0 { right: 0; }
.bottom-0 { bottom: 0; }
.left-0 { left: 0; }

/* ═══════════════════════════════════════════
   Z-INDEX
   ═══════════════════════════════════════════ */

.z-0 { z-index: 0; }
.z-10 { z-index: 10; }
.z-20 { z-index: 20; }
.z-50 { z-index: 50; }

/* ═══════════════════════════════════════════
   OVERFLOW
   ═══════════════════════════════════════════ */

.overflow-hidden { overflow: hidden; }
.overflow-auto { overflow: auto; }
.overflow-x-auto { overflow-x: auto; }
.overflow-y-auto { overflow-y: auto; }

/* ═══════════════════════════════════════════
   VISIBILITY
   ═══════════════════════════════════════════ */

.visible { visibility: visible; }
.invisible { visibility: hidden; }

.opacity-0 { opacity: 0; }
.opacity-50 { opacity: 0.5; }
.opacity-100 { opacity: 1; }

/* ═══════════════════════════════════════════
   BORDERS
   ═══════════════════════════════════════════ */

.rounded { border-radius: var(--radius-md, 0.5rem); }
.rounded-lg { border-radius: var(--radius-lg, 0.75rem); }
.rounded-xl { border-radius: var(--radius-xl, 1rem); }
.rounded-full { border-radius: var(--radius-full, 9999px); }
.rounded-none { border-radius: 0; }

.border { border: 1px solid var(--color-border-default, rgba(255, 255, 255, 0.08)); }
.border-0 { border: 0; }

/* ═══════════════════════════════════════════
   SHADOWS
   ═══════════════════════════════════════════ */

.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow-md { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }
.shadow-xl { box-shadow: var(--shadow-xl); }
.shadow-none { box-shadow: none; }

/* ═══════════════════════════════════════════
   TRANSITIONS
   ═══════════════════════════════════════════ */

.transition { transition: all var(--transition-base, 0.3s ease); }
.transition-fast { transition: all var(--transition-fast, 0.15s ease); }
.transition-slow { transition: all var(--transition-slow, 0.5s ease); }
.transition-none { transition: none; }

/* ═══════════════════════════════════════════
   CURSOR
   ═══════════════════════════════════════════ */

.cursor-pointer { cursor: pointer; }
.cursor-default { cursor: default; }
.cursor-not-allowed { cursor: not-allowed; }

/* ═══════════════════════════════════════════
   USER SELECT
   ═══════════════════════════════════════════ */

.select-none { user-select: none; }
.select-text { user-select: text; }
.select-all { user-select: all; }

/* ═══════════════════════════════════════════
   POINTER EVENTS
   ═══════════════════════════════════════════ */

.pointer-events-none { pointer-events: none; }
.pointer-events-auto { pointer-events: auto; }

/* ═══════════════════════════════════════════
   RESPONSIVE VISIBILITY
   ═══════════════════════════════════════════ */

@media (max-width: 639px) {
  .sm\:hidden { display: none; }
}

@media (min-width: 640px) {
  .sm\:block { display: block; }
  .sm\:flex { display: flex; }
}

@media (max-width: 767px) {
  .md\:hidden { display: none; }
}

@media (min-width: 768px) {
  .md\:block { display: block; }
  .md\:flex { display: flex; }
}

@media (max-width: 1023px) {
  .lg\:hidden { display: none; }
}

@media (min-width: 1024px) {
  .lg\:block { display: block; }
  .lg\:flex { display: flex; }
}