/* Tailwind to M3 Compatibility Classes */
/* This provides bridge classes to maintain Tailwind-like behavior with M3 colors/tokens */

/* Layout Utilities - Keep as-is for flexbox/grid functionality */
.flex { display: flex; }
.flex-1 { flex: 1; }
.flex-wrap { flex-wrap: wrap; }
.inline-flex { display: inline-flex; }
.grid { display: grid; }
.block { display: block; }
.inline { display: inline; }
.hidden { display: none; }

/* Flexbox Alignment */
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.justify-start { justify-content: flex-start; }
.justify-end { justify-content: flex-end; }

/* Gap utilities */
.gap-1 { gap: 4px; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.gap-6 { gap: 24px; }
.gap-8 { gap: 32px; }

/* Padding utilities */
.p-1 { padding: 4px; }
.p-2 { padding: 8px; }
.p-3 { padding: 12px; }
.p-4 { padding: 16px; }
.p-6 { padding: 24px; }
.p-8 { padding: 32px; }

.px-2 { padding-left: 8px; padding-right: 8px; }
.px-3 { padding-left: 12px; padding-right: 12px; }
.px-4 { padding-left: 16px; padding-right: 16px; }
.px-6 { padding-left: 24px; padding-right: 24px; }

.py-1 { padding-top: 4px; padding-bottom: 4px; }
.py-2 { padding-top: 8px; padding-bottom: 8px; }
.py-3 { padding-top: 12px; padding-bottom: 12px; }
.py-4 { padding-top: 16px; padding-bottom: 16px; }
.py-6 { padding-top: 24px; padding-bottom: 24px; }

.pt-2 { padding-top: 8px; }
.pb-2 { padding-bottom: 8px; }
.pl-2 { padding-left: 8px; }
.pr-2 { padding-right: 8px; }

/* Margin utilities */
.m-1 { margin: 4px; }
.m-2 { margin: 8px; }
.m-3 { margin: 12px; }
.m-4 { margin: 16px; }

.mb-1 { margin-bottom: 4px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }
.mb-8 { margin-bottom: 32px; }

.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }

.mr-1 { margin-right: 4px; }
.mr-2 { margin-right: 8px; }
.mr-3 { margin-right: 12px; }
.mr-4 { margin-right: 16px; }

.ml-1 { margin-left: 4px; }
.ml-2 { margin-left: 8px; }
.ml-3 { margin-left: 12px; }
.ml-4 { margin-left: 16px; }

.mx-auto { margin-left: auto; margin-right: auto; }

/* Space utilities */
.space-y-1 > * + * { margin-top: 4px; }
.space-y-2 > * + * { margin-top: 8px; }
.space-y-3 > * + * { margin-top: 12px; }
.space-y-4 > * + * { margin-top: 16px; }
.space-y-6 > * + * { margin-top: 24px; }
.space-y-8 > * + * { margin-top: 32px; }

.space-x-1 > * + * { margin-left: 4px; }
.space-x-2 > * + * { margin-left: 8px; }
.space-x-3 > * + * { margin-left: 12px; }
.space-x-4 > * + * { margin-left: 16px; }
.space-x-6 > * + * { margin-left: 24px; }

/* Width utilities */
.w-full { width: 100%; }
.w-screen { width: 100vw; }
.w-auto { width: auto; }
.w-1 { width: 4px; }
.w-2 { width: 8px; }
.w-4 { width: 16px; }
.w-5 { width: 20px; }
.w-8 { width: 32px; }
.w-10 { width: 40px; }
.w-12 { width: 48px; }
.w-64 { width: 256px; }

.min-w-0 { min-width: 0; }
.min-w-full { min-width: 100%; }
.max-w-sm { max-width: 384px; }
.max-w-md { max-width: 448px; }
.max-w-lg { max-width: 512px; }
.max-w-2xl { max-width: 672px; }
.max-w-3xl { max-width: 768px; }

/* Height utilities */
.h-full { height: 100%; }
.h-screen { height: 100vh; }
.h-auto { height: auto; }
.h-1 { height: 4px; }
.h-2 { height: 8px; }
.h-4 { height: 16px; }
.h-5 { height: 20px; }
.h-7 { height: 28px; }
.h-8 { height: 32px; }
.h-10 { height: 40px; }
.h-12 { height: 48px; }

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

/* Border radius utilities - using M3 tokens */
.rounded-none { border-radius: 0; }
.rounded-sm { border-radius: var(--mat-sys-corner-extra-small, 4px); }
.rounded { border-radius: var(--mat-sys-corner-small, 8px); }
.rounded-md { border-radius: var(--mat-sys-corner-medium, 12px); }
.rounded-lg { border-radius: var(--mat-sys-corner-large, 16px); }
.rounded-xl { border-radius: 20px; }
.rounded-full { border-radius: 9999px; }

/* Border utilities */
.border { border: 1px solid var(--mat-sys-outline-variant, #cac7d0); }
.border-t { border-top: 1px solid var(--mat-sys-outline-variant, #cac7d0); }
.border-b { border-bottom: 1px solid var(--mat-sys-outline-variant, #cac7d0); }
.border-l { border-left: 1px solid var(--mat-sys-outline-variant, #cac7d0); }
.border-r { border-right: 1px solid var(--mat-sys-outline-variant, #cac7d0); }

/* Text utilities */
.text-xs { font-size: 12px; line-height: 16px; }
.text-sm { font-size: 14px; line-height: 20px; }
.text-base { font-size: 16px; line-height: 24px; }
.text-lg { font-size: 18px; line-height: 28px; }
.text-xl { font-size: 20px; line-height: 28px; }
.text-2xl { font-size: 24px; line-height: 32px; }
.text-3xl { font-size: 30px; line-height: 36px; }
.text-4xl { font-size: 36px; line-height: 40px; }

/* Font weight */
.font-thin { font-weight: 100; }
.font-extralight { font-weight: 200; }
.font-light { font-weight: 300; }
.font-normal { font-weight: 400; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.font-extrabold { font-weight: 800; }

/* Text alignment */
.text-left { text-align: left; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-justify { text-align: justify; }

/* Text utilities - Colors using M3 variables */
.text-primary { color: var(--mat-sys-primary, #6750a4); }
.text-secondary { color: var(--mat-sys-secondary, #625b71); }
.text-accent { color: var(--mat-sys-accent, #6750a4); }
.text-muted-foreground { color: var(--mat-sys-on-surface-variant, #49454e); }
.text-foreground { color: var(--mat-sys-on-background, #1c1b1f); }
.text-destructive { color: var(--mat-sys-error, #b3261e); }

/* Background utilities - using M3 variables */
.bg-background { background-color: var(--mat-sys-background, #fffbfe); }
.bg-surface { background-color: var(--mat-sys-surface, #fffbfe); }
.bg-card { background-color: var(--mat-sys-surface, #fffbfe); }
.bg-primary { background-color: var(--mat-sys-primary, #6750a4); }
.bg-secondary { background-color: var(--mat-sys-secondary, #625b71); }
.bg-accent { background-color: var(--mat-sys-accent, #6750a4); }
.bg-accent\/50 { background-color: rgba(103, 80, 164, 0.5); }
.bg-accent\/10 { background-color: rgba(103, 80, 164, 0.1); }
.bg-destructive { background-color: var(--mat-sys-error, #b3261e); }
.bg-muted { background-color: var(--mat-sys-surface-variant, #e7e0ec); }
.bg-muted\/50 { background-color: rgba(231, 224, 236, 0.5); }

/* Opacity */
.opacity-0 { opacity: 0; }
.opacity-50 { opacity: 0.5; }
.opacity-75 { opacity: 0.75; }
.opacity-80 { opacity: 0.8; }
.opacity-90 { opacity: 0.9; }
.opacity-100 { opacity: 1; }

/* Positioning */
.relative { position: relative; }
.absolute { position: absolute; }
.fixed { position: fixed; }
.sticky { position: sticky; }
.top-0 { top: 0; }
.top-1 { top: 4px; }
.top-2 { top: 8px; }
.top-3 { top: 12px; }
.top-4 { top: 16px; }
.right-0 { right: 0; }
.right-1 { right: 4px; }
.right-2 { right: 8px; }
.right-3 { right: 12px; }
.right-4 { right: 16px; }
.left-0 { left: 0; }
.bottom-0 { bottom: 0; }
.inset-0 { top: 0; right: 0; bottom: 0; left: 0; }

/* Overflow */
.overflow-hidden { overflow: hidden; }
.overflow-auto { overflow: auto; }
.overflow-x-auto { overflow-x: auto; }
.overflow-y-auto { overflow-y: auto; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Z-index */
.z-0 { z-index: 0; }
.z-10 { z-index: 10; }
.z-20 { z-index: 20; }
.z-40 { z-index: 40; }
.z-50 { z-index: 50; }

/* Display utilities */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border-width: 0; }

/* Transitions */
.transition { transition-property: color, background-color, border-color, text-decoration-color, fill, stroke; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms; }
.transition-colors { transition-property: color, background-color, border-color, text-decoration-color, fill, stroke; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms; }
.transition-all { transition-property: all; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms; }

/* Hover states */
.hover\:bg-accent:hover { background-color: var(--mat-sys-accent, #6750a4); }
.hover\:text-accent:hover { color: var(--mat-sys-accent, #6750a4); }
.hover\:opacity-90:hover { opacity: 0.9; }
.hover\:opacity-80:hover { opacity: 0.8; }

/* Focus states */
.focus-visible:focus-visible { outline: 2px solid var(--mat-sys-primary, #6750a4); outline-offset: 2px; }
.focus\:outline-none:focus { outline: none; }

/* Aspect ratio */
.aspect-square { aspect-ratio: 1 / 1; }
.aspect-video { aspect-ratio: 16 / 9; }

/* Lists */
.list-disc { list-style-type: disc; }
.list-inside { list-style-position: inside; }
