/* ==========================================================================
   Tailwind Layout Compatibility Layer
   Mobile-first utilities used by plugin templates.
   ========================================================================== */

/* Display */
.tw-inline { display: inline; }
.tw-block { display: block; }
.tw-hidden { display: none; }
.tw-inline-block { display: inline-block; }
.tw-inline-flex { display: inline-flex; }
.tw-flex { display: flex; }
.tw-grid { display: grid; }

/* Position */
.tw-relative { position: relative; }
.tw-absolute { position: absolute; }
.tw-fixed { position: fixed; }
.tw-sticky { position: sticky; }
.tw-inset-0 { inset: 0; }
.tw-inset-x-0 { inset-inline: 0; }
.tw-top-0 { top: 0; }
[class~="tw-top-1/2"] { top: 50%; }
.tw-top-3 { top: 0.75rem; }
.tw-top-4 { top: 1rem; }
[class~="tw-top-[-28px]"] { top: -28px; }
.tw-bottom-0 { bottom: 0; }
.tw-bottom-1 { bottom: 0.25rem; }
.tw-bottom-2 { bottom: 0.5rem; }
.tw-bottom-12 { bottom: 3rem; }
.tw-bottom-20 { bottom: 5rem; }
.tw-left-0 { left: 0; }
.tw-left-1 { left: 0.25rem; }
[class~="tw-left-1/2"] { left: 50%; }
.tw-left-3 { left: 0.75rem; }
.tw-left-4 { left: 1rem; }
.tw-right-0 { right: 0; }
.tw-right-2 { right: 0.5rem; }
.tw-right-3 { right: 0.75rem; }
.tw-z-0 { z-index: 0; }
.tw-z-10 { z-index: 10; }
.tw-z-50 { z-index: 50; }
[class~="tw-z-[999]"] { z-index: 999; }

/* Flex/Grid */
.tw-flex-row { flex-direction: row; }
.tw-flex-col { flex-direction: column; }
.tw-flex-wrap { flex-wrap: wrap; }
.tw-flex-1 { flex: 1 1 0%; min-inline-size: 0; }
.tw-flex-none { flex: none; }
.tw-items-center { align-items: center; }
.tw-justify-center { justify-content: center; }
.tw-justify-between { justify-content: space-between; }
.tw-justify-end { justify-content: flex-end; }
.tw-place-items-center { place-items: center; }
.tw-gap-0\.5 { gap: 0.125rem; }
.tw-gap-1 { gap: 0.25rem; }
.tw-gap-2 { gap: 0.5rem; }
.tw-gap-3 { gap: 0.75rem; }
.tw-gap-4 { gap: 1rem; }
.tw-grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.tw-grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tw-grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tw-grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* Sizing */
.tw-w-0 { width: 0; }
.tw-w-3 { width: 0.75rem; }
.tw-w-4 { width: 1rem; }
.tw-w-5 { width: 1.25rem; }
.tw-w-8 { width: 2rem; }
.tw-w-9 { width: 2.25rem; }
.tw-w-10 { width: 2.5rem; }
.tw-w-12 { width: 3rem; }
.tw-w-16 { width: 4rem; }
.tw-w-24 { width: 6rem; }
.tw-w-28 { width: 7rem; }
.tw-w-36 { width: 9rem; }
.tw-w-40 { width: 10rem; }
.tw-w-48 { width: 12rem; }
.tw-w-64 { width: 16rem; }
.tw-w-72 { width: 18rem; }
.tw-w-80 { width: 20rem; }
.tw-w-full { width: 100%; }
[class~="tw-w-[90vw]"] { width: 90vw; }
[class~="tw-w-[90%]"] { width: 90%; }
[class~="tw-w-[480px]"] { width: min(100%, 480px); }
[class~="tw-w-[520px]"] { width: min(100%, 520px); }

[class~="tw-h-1.5"] { height: 0.375rem; }
.tw-h-2 { height: 0.5rem; }
.tw-h-3 { height: 0.75rem; }
.tw-h-4 { height: 1rem; }
.tw-h-5 { height: 1.25rem; }
.tw-h-7 { height: 1.75rem; }
.tw-h-8 { height: 2rem; }
.tw-h-9 { height: 2.25rem; }
.tw-h-10 { height: 2.5rem; }
.tw-h-12 { height: 3rem; }
.tw-h-14 { height: 3.5rem; }
.tw-h-16 { height: 4rem; }
.tw-h-32 { height: 8rem; }
.tw-h-64 { height: 16rem; }
.tw-h-80 { height: 20rem; }
.tw-h-full { height: 100%; }

.tw-max-w-none { max-width: none; }
.tw-max-w-md { max-width: 28rem; }
.tw-max-w-4xl { max-width: 56rem; }
.tw-max-w-6xl { max-width: 72rem; }
.tw-max-w-7xl { max-width: 80rem; }
[class~="tw-max-w-[90vw]"] { max-width: 90vw; }
[class~="tw-max-w-[90%]"] { max-width: 90%; }
[class~="tw-max-w-[200px]"] { max-width: 200px; }
.tw-min-h-screen { min-height: 100vh; }
.tw-min-w-0 { min-width: 0; }

/* Spacing */
.tw-mx-auto { margin-inline: auto; }
.tw-mt-1 { margin-top: 0.25rem; }
.tw-mt-2 { margin-top: 0.5rem; }
.tw-mt-3 { margin-top: 0.75rem; }
.tw-mt-4 { margin-top: 1rem; }
.tw-mb-2 { margin-bottom: 0.5rem; }
.tw-mb-3 { margin-bottom: 0.75rem; }
.tw-mb-4 { margin-bottom: 1rem; }
.tw-ml-2 { margin-inline-start: 0.5rem; }

.tw-p-0\.5 { padding: 0.125rem; }
.tw-p-1 { padding: 0.25rem; }
.tw-p-2 { padding: 0.5rem; }
.tw-p-3 { padding: 0.75rem; }
.tw-p-4 { padding: 1rem; }
.tw-p-5 { padding: 1.25rem; }
.tw-p-6 { padding: 1.5rem; }
.tw-px-1\.5 { padding-inline: 0.375rem; }
.tw-px-2 { padding-inline: 0.5rem; }
.tw-px-3 { padding-inline: 0.75rem; }
.tw-px-4 { padding-inline: 1rem; }
.tw-py-0\.5 { padding-block: 0.125rem; }
.tw-py-1 { padding-block: 0.25rem; }
.tw-py-2 { padding-block: 0.5rem; }
.tw-py-3 { padding-block: 0.75rem; }
.tw-py-4 { padding-block: 1rem; }
.tw-py-6 { padding-block: 1.5rem; }
.tw-py-8 { padding-block: 2rem; }
.tw-py-10 { padding-block: 2.5rem; }
.tw-pb-2 { padding-bottom: 0.5rem; }
.tw-pb-4 { padding-bottom: 1rem; }
.tw-pb-24 { padding-bottom: 6rem; }

.tw-space-y-2 > * + * { margin-top: 0.5rem; }
.tw-space-y-3 > * + * { margin-top: 0.75rem; }
.tw-space-y-4 > * + * { margin-top: 1rem; }
.tw-space-y-6 > * + * { margin-top: 1.5rem; }
.tw-space-y-8 > * + * { margin-top: 2rem; }

/* Overflow/Object */
.tw-overflow-hidden { overflow: hidden; }
.tw-overflow-x-auto { overflow-x: auto; }
.tw-overflow-x-hidden { overflow-x: hidden; }
.tw-overflow-y-auto { overflow-y: auto; }
.tw-object-cover { object-fit: cover; }
.tw-pointer-events-none { pointer-events: none; }

/* Shape/Border/Shadow */
.tw-rounded { border-radius: 0.25rem; }
.tw-rounded-md { border-radius: 0.375rem; }
.tw-rounded-lg { border-radius: 0.5rem; }
.tw-rounded-xl { border-radius: 0.75rem; }
.tw-rounded-2xl { border-radius: 1rem; }
.tw-rounded-3xl { border-radius: 1.5rem; }
.tw-rounded-full { border-radius: 999px; }
.tw-border { border-width: 1px; border-style: solid; }
.tw-border-b { border-bottom-width: 1px; border-bottom-style: solid; }
.tw-shadow-sm { box-shadow: 0 1px 2px rgba(0, 0, 0, 0.16); }
.tw-shadow { box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2); }
.tw-shadow-md { box-shadow: 0 6px 14px rgba(0, 0, 0, 0.24); }
.tw-shadow-lg { box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28); }
.tw-shadow-xl { box-shadow: 0 16px 32px rgba(0, 0, 0, 0.32); }
.tw-shadow-2xl { box-shadow: 0 24px 48px rgba(0, 0, 0, 0.4); }

/* Typography */
.tw-text-center { text-align: center; }
.tw-text-xs { font-size: 0.75rem; }
.tw-text-sm { font-size: 0.875rem; }
.tw-text-base { font-size: 1rem; }
.tw-text-lg { font-size: 1.125rem; }
.tw-text-xl { font-size: 1.25rem; }
.tw-text-2xl { font-size: 1.5rem; }
.tw-text-3xl { font-size: 1.875rem; }
.tw-text-4xl { font-size: 2.25rem; }
.tw-leading-none { line-height: 1; }
.tw-leading-tight { line-height: 1.25; }
.tw-leading-relaxed { line-height: 1.625; }
.tw-font-medium { font-weight: 500; }
.tw-font-semibold { font-weight: 600; }
.tw-font-bold { font-weight: 700; }
.tw-font-sans {
    font-family: var(--mp-font-family, inherit);
}
.tw-tabular-nums { font-variant-numeric: tabular-nums; }
.tw-truncate { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tw-whitespace-nowrap { white-space: nowrap; }
.tw-no-underline { text-decoration: none; }
.tw-break-words { overflow-wrap: anywhere; }

.tw-line-clamp-1,
.tw-line-clamp-2,
.tw-line-clamp-3 {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.tw-line-clamp-1 { -webkit-line-clamp: 1; }
.tw-line-clamp-2 { -webkit-line-clamp: 2; }
.tw-line-clamp-3 { -webkit-line-clamp: 3; }

/* Opacity */
.tw-opacity-0 { opacity: 0; }
.tw-opacity-20 { opacity: 0.2; }
.tw-opacity-70 { opacity: 0.7; }
.tw-opacity-75 { opacity: 0.75; }
.tw-opacity-80 { opacity: 0.8; }
.tw-opacity-90 { opacity: 0.9; }
.tw-opacity-100 { opacity: 1; }

/* Effects / Background helpers */
.tw-bg-cover { background-size: cover; }
.tw-bg-center { background-position: center; }
.tw-blur-3xl { filter: blur(64px); }
.tw-backdrop-blur-sm {
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}
.tw-backdrop-blur-md {
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}
.tw-backdrop-blur-xl {
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
}

/* Transitions */
.tw-transition {
    transition-property: color, background-color, border-color, opacity, transform, box-shadow;
    transition-duration: 0.2s;
    transition-timing-function: ease;
}
.tw-transition-all {
    transition-property: all;
    transition-duration: 0.2s;
    transition-timing-function: ease;
}
.tw-transition-colors {
    transition-property: color, background-color, border-color;
    transition-duration: 0.2s;
    transition-timing-function: ease;
}
.tw-transition-opacity {
    transition-property: opacity;
    transition-duration: 0.2s;
    transition-timing-function: ease;
}
.tw-transition-transform {
    transition-property: transform;
    transition-duration: 0.2s;
    transition-timing-function: ease;
}
.tw-duration-200 { transition-duration: 0.2s; }
.tw-duration-300 { transition-duration: 0.3s; }
.tw-duration-500 { transition-duration: 0.5s; }
.tw-duration-700 { transition-duration: 0.7s; }

/* Transform / Aspect / Snap */
.tw-transform,
[class*="tw--translate"],
[class*="tw-translate"],
[class*="tw-scale"] {
    --mp-tw-translate-x: 0;
    --mp-tw-translate-y: 0;
    --mp-tw-scale-x: 1;
    --mp-tw-scale-y: 1;
    transform:
        translate(var(--mp-tw-translate-x), var(--mp-tw-translate-y))
        scaleX(var(--mp-tw-scale-x))
        scaleY(var(--mp-tw-scale-y));
}
[class~="tw--translate-x-1/2"] { --mp-tw-translate-x: -50%; }
[class~="tw--translate-y-1/2"] { --mp-tw-translate-y: -50%; }
[class~="tw-translate-x-full"] { --mp-tw-translate-x: 100%; }
.tw-translate-y-0 { --mp-tw-translate-y: 0; }
.tw-translate-y-2 { --mp-tw-translate-y: 0.5rem; }
.tw-scale-95 {
    --mp-tw-scale-x: 0.95;
    --mp-tw-scale-y: 0.95;
}
.tw-scale-105 {
    --mp-tw-scale-x: 1.05;
    --mp-tw-scale-y: 1.05;
}
.tw-scale-110 {
    --mp-tw-scale-x: 1.1;
    --mp-tw-scale-y: 1.1;
}
.tw-aspect-square { aspect-ratio: 1 / 1; }
.tw-aspect-video { aspect-ratio: 16 / 9; }
.tw-snap-x,
.tw-snap-mandatory { scroll-snap-type: x mandatory; }
.tw-snap-start { scroll-snap-align: start; }

/* Breakpoints */
@media (min-width: 640px) {
    .sm\:tw-w-72 { width: 18rem; }
}

@media (min-width: 768px) {
    .md\:tw-block { display: block; }
    .md\:tw-hidden { display: none; }
    .md\:tw-fixed { position: fixed; }
    .md\:tw-gap-2 { gap: 0.5rem; }
    .md\:tw-grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .md\:tw-grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .md\:tw-w-36 { width: 9rem; }
    .md\:tw-w-48 { width: 12rem; }
    .md\:tw-w-80 { width: 20rem; }
    .md\:tw-h-80 { height: 20rem; }
    .md\:tw-text-sm { font-size: 0.875rem; }
    .md\:tw-text-base { font-size: 1rem; }
    .md\:tw-text-3xl { font-size: 1.875rem; }
    .md\:tw-py-8 { padding-block: 2rem; }
    [class~="md:tw-w-[480px]"] { width: min(100%, 480px); }
    [class~="md:tw-w-[520px]"] { width: min(100%, 520px); }
}

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

@media (min-width: 1280px) {
    .xl\:tw-grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
