/*!
 * QuantumCSS Responsive Design System
 * Advanced responsive utilities with container queries and modern breakpoints
 */

/* Modern Responsive Breakpoints */
/* Using logical properties and container queries */

@custom-media --sm (min-width: 640px);
@custom-media --md (min-width: 768px);
@custom-media --lg (min-width: 1024px);
@custom-media --xl (min-width: 1280px);
@custom-media --2xl (min-width: 1536px);

/* Container Query Support */
@container (min-width: 320px) {
  .container\:flex { display: flex; }
  .container\:grid { display: grid; }
  .container\:hidden { display: none; }
}

@container (min-width: 640px) {
  .container\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .container\:text-lg { font-size: 1.125rem; line-height: 1.75rem; }
  .container\:p-6 { padding: var(--space-6); }
}

@container (min-width: 768px) {
  .container\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .container\:text-xl { font-size: 1.25rem; line-height: 1.75rem; }
  .container\:p-8 { padding: var(--space-8); }
}

@container (min-width: 1024px) {
  .container\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .container\:text-2xl { font-size: 1.5rem; line-height: 2rem; }
}

/* Standard Responsive Utilities */
@media (--sm) {
  .sm\:block { display: block; }
  .sm\:inline-block { display: inline-block; }
  .sm\:inline { display: inline; }
  .sm\:flex { display: flex; }
  .sm\:grid { display: grid; }
  .sm\:hidden { display: none; }

  .sm\:flex-row { flex-direction: row; }
  .sm\:flex-col { flex-direction: column; }

  .sm\:items-start { align-items: flex-start; }
  .sm\:items-center { align-items: center; }
  .sm\:items-end { align-items: flex-end; }

  .sm\:justify-start { justify-content: flex-start; }
  .sm\:justify-center { justify-content: center; }
  .sm\:justify-end { justify-content: flex-end; }
  .sm\:justify-between { justify-content: space-between; }

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

  .sm\:text-xs { font-size: 0.75rem; line-height: 1rem; }
  .sm\:text-sm { font-size: 0.875rem; line-height: 1.25rem; }
  .sm\:text-base { font-size: 1rem; line-height: 1.5rem; }
  .sm\:text-lg { font-size: 1.125rem; line-height: 1.75rem; }
  .sm\:text-xl { font-size: 1.25rem; line-height: 1.75rem; }
  .sm\:text-2xl { font-size: 1.5rem; line-height: 2rem; }

  .sm\:m-0 { margin: var(--space-0); }
  .sm\:m-1 { margin: var(--space-1); }
  .sm\:m-2 { margin: var(--space-2); }
  .sm\:m-3 { margin: var(--space-3); }
  .sm\:m-4 { margin: var(--space-4); }
  .sm\:m-6 { margin: var(--space-6); }
  .sm\:m-8 { margin: var(--space-8); }
  .sm\:mx-auto { margin-left: auto; margin-right: auto; }

  .sm\:p-0 { padding: var(--space-0); }
  .sm\:p-1 { padding: var(--space-1); }
  .sm\:p-2 { padding: var(--space-2); }
  .sm\:p-3 { padding: var(--space-3); }
  .sm\:p-4 { padding: var(--space-4); }
  .sm\:p-6 { padding: var(--space-6); }
  .sm\:p-8 { padding: var(--space-8); }

  .sm\:w-full { width: 100%; }
  .sm\:w-auto { width: auto; }
  .sm\:h-full { height: 100%; }
  .sm\:h-auto { height: auto; }
}

@media (--md) {
  .md\:block { display: block; }
  .md\:inline-block { display: inline-block; }
  .md\:inline { display: inline; }
  .md\:flex { display: flex; }
  .md\:grid { display: grid; }
  .md\:hidden { display: none; }

  .md\:flex-row { flex-direction: row; }
  .md\:flex-col { flex-direction: column; }

  .md\:items-start { align-items: flex-start; }
  .md\:items-center { align-items: center; }
  .md\:items-end { align-items: flex-end; }

  .md\:justify-start { justify-content: flex-start; }
  .md\:justify-center { justify-content: center; }
  .md\:justify-end { justify-content: flex-end; }
  .md\:justify-between { justify-content: space-between; }

  .md\:grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
  .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)); }

  .md\:text-xs { font-size: 0.75rem; line-height: 1rem; }
  .md\:text-sm { font-size: 0.875rem; line-height: 1.25rem; }
  .md\:text-base { font-size: 1rem; line-height: 1.5rem; }
  .md\:text-lg { font-size: 1.125rem; line-height: 1.75rem; }
  .md\:text-xl { font-size: 1.25rem; line-height: 1.75rem; }
  .md\:text-2xl { font-size: 1.5rem; line-height: 2rem; }
  .md\:text-3xl { font-size: 1.875rem; line-height: 2.25rem; }

  .md\:m-0 { margin: var(--space-0); }
  .md\:m-1 { margin: var(--space-1); }
  .md\:m-2 { margin: var(--space-2); }
  .md\:m-3 { margin: var(--space-3); }
  .md\:m-4 { margin: var(--space-4); }
  .md\:m-6 { margin: var(--space-6); }
  .md\:m-8 { margin: var(--space-8); }
  .md\:m-12 { margin: var(--space-12); }
  .md\:mx-auto { margin-left: auto; margin-right: auto; }

  .md\:p-0 { padding: var(--space-0); }
  .md\:p-1 { padding: var(--space-1); }
  .md\:p-2 { padding: var(--space-2); }
  .md\:p-3 { padding: var(--space-3); }
  .md\:p-4 { padding: var(--space-4); }
  .md\:p-6 { padding: var(--space-6); }
  .md\:p-8 { padding: var(--space-8); }
  .md\:p-12 { padding: var(--space-12); }

  .md\:w-full { width: 100%; }
  .md\:w-auto { width: auto; }
  .md\:w-1\/2 { width: 50%; }
  .md\:w-1\/3 { width: 33.333333%; }
  .md\:w-2\/3 { width: 66.666667%; }
  .md\:w-1\/4 { width: 25%; }
  .md\:w-3\/4 { width: 75%; }

  .md\:h-full { height: 100%; }
  .md\:h-auto { height: auto; }
  .md\:h-screen { height: 100vh; }
}

@media (--lg) {
  .lg\:block { display: block; }
  .lg\:inline-block { display: inline-block; }
  .lg\:inline { display: inline; }
  .lg\:flex { display: flex; }
  .lg\:grid { display: grid; }
  .lg\:hidden { display: none; }

  .lg\:flex-row { flex-direction: row; }
  .lg\:flex-col { flex-direction: column; }

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

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

  .lg\:grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
  .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)); }
  .lg\:grid-cols-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .lg\:grid-cols-12 { grid-template-columns: repeat(12, minmax(0, 1fr)); }

  .lg\:text-xs { font-size: 0.75rem; line-height: 1rem; }
  .lg\:text-sm { font-size: 0.875rem; line-height: 1.25rem; }
  .lg\:text-base { font-size: 1rem; line-height: 1.5rem; }
  .lg\:text-lg { font-size: 1.125rem; line-height: 1.75rem; }
  .lg\:text-xl { font-size: 1.25rem; line-height: 1.75rem; }
  .lg\:text-2xl { font-size: 1.5rem; line-height: 2rem; }
  .lg\:text-3xl { font-size: 1.875rem; line-height: 2.25rem; }
  .lg\:text-4xl { font-size: 2.25rem; line-height: 2.5rem; }

  .lg\:m-0 { margin: var(--space-0); }
  .lg\:m-1 { margin: var(--space-1); }
  .lg\:m-2 { margin: var(--space-2); }
  .lg\:m-3 { margin: var(--space-3); }
  .lg\:m-4 { margin: var(--space-4); }
  .lg\:m-6 { margin: var(--space-6); }
  .lg\:m-8 { margin: var(--space-8); }
  .lg\:m-12 { margin: var(--space-12); }
  .lg\:m-16 { margin: var(--space-16); }
  .lg\:mx-auto { margin-left: auto; margin-right: auto; }

  .lg\:p-0 { padding: var(--space-0); }
  .lg\:p-1 { padding: var(--space-1); }
  .lg\:p-2 { padding: var(--space-2); }
  .lg\:p-3 { padding: var(--space-3); }
  .lg\:p-4 { padding: var(--space-4); }
  .lg\:p-6 { padding: var(--space-6); }
  .lg\:p-8 { padding: var(--space-8); }
  .lg\:p-12 { padding: var(--space-12); }
  .lg\:p-16 { padding: var(--space-16); }

  .lg\:w-full { width: 100%; }
  .lg\:w-auto { width: auto; }
  .lg\:w-1\/2 { width: 50%; }
  .lg\:w-1\/3 { width: 33.333333%; }
  .lg\:w-2\/3 { width: 66.666667%; }
  .lg\:w-1\/4 { width: 25%; }
  .lg\:w-3\/4 { width: 75%; }
  .lg\:w-1\/5 { width: 20%; }
  .lg\:w-2\/5 { width: 40%; }
  .lg\:w-3\/5 { width: 60%; }
  .lg\:w-4\/5 { width: 80%; }

  .lg\:h-full { height: 100%; }
  .lg\:h-auto { height: auto; }
  .lg\:h-screen { height: 100vh; }
}

@media (--xl) {
  .xl\:block { display: block; }
  .xl\:inline-block { display: inline-block; }
  .xl\:inline { display: inline; }
  .xl\:flex { display: flex; }
  .xl\:grid { display: grid; }
  .xl\:hidden { display: none; }

  .xl\:flex-row { flex-direction: row; }
  .xl\:flex-col { flex-direction: column; }

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

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

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

  .xl\:text-xs { font-size: 0.75rem; line-height: 1rem; }
  .xl\:text-sm { font-size: 0.875rem; line-height: 1.25rem; }
  .xl\:text-base { font-size: 1rem; line-height: 1.5rem; }
  .xl\:text-lg { font-size: 1.125rem; line-height: 1.75rem; }
  .xl\:text-xl { font-size: 1.25rem; line-height: 1.75rem; }
  .xl\:text-2xl { font-size: 1.5rem; line-height: 2rem; }
  .xl\:text-3xl { font-size: 1.875rem; line-height: 2.25rem; }
  .xl\:text-4xl { font-size: 2.25rem; line-height: 2.5rem; }
  .xl\:text-5xl { font-size: 3rem; line-height: 1; }

  .xl\:m-0 { margin: var(--space-0); }
  .xl\:m-1 { margin: var(--space-1); }
  .xl\:m-2 { margin: var(--space-2); }
  .xl\:m-3 { margin: var(--space-3); }
  .xl\:m-4 { margin: var(--space-4); }
  .xl\:m-6 { margin: var(--space-6); }
  .xl\:m-8 { margin: var(--space-8); }
  .xl\:m-12 { margin: var(--space-12); }
  .xl\:m-16 { margin: var(--space-16); }
  .xl\:m-20 { margin: var(--space-20); }
  .xl\:mx-auto { margin-left: auto; margin-right: auto; }

  .xl\:p-0 { padding: var(--space-0); }
  .xl\:p-1 { padding: var(--space-1); }
  .xl\:p-2 { padding: var(--space-2); }
  .xl\:p-3 { padding: var(--space-3); }
  .xl\:p-4 { padding: var(--space-4); }
  .xl\:p-6 { padding: var(--space-6); }
  .xl\:p-8 { padding: var(--space-8); }
  .xl\:p-12 { padding: var(--space-12); }
  .xl\:p-16 { padding: var(--space-16); }
  .xl\:p-20 { padding: var(--space-20); }

  .xl\:w-full { width: 100%; }
  .xl\:w-auto { width: auto; }
  .xl\:w-1\/2 { width: 50%; }
  .xl\:w-1\/3 { width: 33.333333%; }
  .xl\:w-2\/3 { width: 66.666667%; }
  .xl\:w-1\/4 { width: 25%; }
  .xl\:w-3\/4 { width: 75%; }
  .xl\:w-1\/5 { width: 20%; }
  .xl\:w-2\/5 { width: 40%; }
  .xl\:w-3\/5 { width: 60%; }
  .xl\:w-4\/5 { width: 80%; }

  .xl\:h-full { height: 100%; }
  .xl\:h-auto { height: auto; }
  .xl\:h-screen { height: 100vh; }
}

/* Landscape/Portrait Orientation Utilities */
@media (orientation: landscape) {
  .landscape\:flex-row { flex-direction: row; }
  .landscape\:hidden { display: none; }
}

@media (orientation: portrait) {
  .portrait\:flex-col { flex-direction: column; }
  .portrait\:hidden { display: none; }
}

/* High DPI Display Utilities */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .retina\:text-sm { font-size: 0.875rem; line-height: 1.25rem; }
  .retina\:border { border-width: 0.5px; }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
  .motion-reduce\:transition-none {
    transition-property: none;
  }
}

/* Dark Mode Utilities */
@media (prefers-color-scheme: dark) {
  .dark\:text-white { color: #ffffff; }
  .dark\:text-gray-200 { color: #e5e7eb; }
  .dark\:text-gray-300 { color: #d1d5db; }
  .dark\:bg-gray-900 { background-color: #111827; }
  .dark\:bg-gray-800 { background-color: #1f2937; }
  .dark\:bg-gray-700 { background-color: #374151; }
  .dark\:border-gray-700 { border-color: #374151; }
  .dark\:border-gray-600 { border-color: #4b5563; }
}

/* Light Mode Utilities */
@media (prefers-color-scheme: light) {
  .light\:text-black { color: #000000; }
  .light\:text-gray-800 { color: #1f2937; }
  .light\:text-gray-700 { color: #374151; }
  .light\:bg-white { background-color: #ffffff; }
  .light\:bg-gray-50 { background-color: #f9fafb; }
  .light\:bg-gray-100 { background-color: #f3f4f6; }
  .light\:border-gray-300 { border-color: #d1d5db; }
  .light\:border-gray-200 { border-color: #e5e7eb; }
}