/**
 * Theme Utility Classes — Pure CSS replacements for common Tailwind patterns
 * These provide backward compatibility for template parts not yet converted to BEM.
 * Scoped to theme context — does not leak to WP admin.
 */

/* ── Layout ── */
.container { max-width: 1200px; margin-left: auto; margin-right: auto; }
.mx-auto { margin-left: auto; margin-right: auto; }
.relative { position: relative; }
.absolute { position: absolute; }
.fixed { position: fixed; }
.inset-0 { inset: 0; }
.z-0 { z-index: 0; }
.z-10 { z-index: 10; }
.z-20 { z-index: 20; }
.overflow-hidden { overflow: hidden; }

/* ── Flexbox ── */
.flex { display: flex; }
.inline-flex { display: inline-flex; }
.flex-col { flex-direction: column; }
.flex-row { flex-direction: row; }
.flex-wrap { flex-wrap: wrap; }
.flex-1 { flex: 1 1 0%; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.shrink-0 { flex-shrink: 0; }

/* ── Grid ── */
.grid { display: grid; }
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
@media (min-width: 640px) { .sm\:grid-cols-2 { grid-template-columns: repeat(2, 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)); } }
@media (min-width: 1024px) { .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\:w-5\/12 { width: 41.666667%; } .lg\:w-7\/12 { width: 58.333333%; } .lg\:flex-row { flex-direction: row; } }

/* ── Spacing ── */
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.py-8 { padding-top: 2rem; padding-bottom: 2rem; }
.py-10 { padding-top: 2.5rem; padding-bottom: 2.5rem; }
.py-20 { padding-top: 5rem; padding-bottom: 5rem; }
.py-24 { padding-top: 6rem; padding-bottom: 6rem; }
.p-4 { padding: 1rem; }
.p-6 { padding: 1.5rem; }
.p-8 { padding: 2rem; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
.gap-8 { gap: 2rem; }
.space-y-3 > * + * { margin-top: 0.75rem; }
.space-y-4 > * + * { margin-top: 1rem; }

/* ── Sizing ── */
.w-full { width: 100%; }
.h-full { height: 100%; }
.max-w-5xl { max-width: 64rem; }
.max-w-7xl { max-width: 80rem; }

/* ── Typography ── */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.text-xs { font-size: 0.75rem; line-height: 1rem; }
.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.text-base { font-size: 1rem; line-height: 1.5rem; }
.text-lg { font-size: 1.125rem; line-height: 1.75rem; }
.text-xl { font-size: 1.25rem; line-height: 1.75rem; }
.text-2xl { font-size: 1.5rem; line-height: 2rem; }
.text-3xl { font-size: 1.875rem; line-height: 2.25rem; }
.text-4xl { font-size: 2.25rem; line-height: 2.5rem; }
.font-bold { font-weight: 700; }
.font-extrabold { font-weight: 800; }
.font-black { font-weight: 900; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.uppercase { text-transform: uppercase; }
.tracking-widest { letter-spacing: 0.1em; }
.tracking-wider { letter-spacing: 0.05em; }
.tracking-tighter { letter-spacing: -0.05em; }
.leading-tight { line-height: 1.25; }
.leading-relaxed { line-height: 1.625; }
.italic { font-style: italic; }
.font-mono { font-family: ui-monospace, monospace; }

/* ── Colors ── */
.text-white { color: #fff; }
.text-primary { color: var(--pi-primary, #007d3d); }
.text-secondary { color: var(--pi-secondary, #ffb703); }
.text-gray-900 { color: var(--pi-text, #1e293b); }
.text-gray-800 { color: var(--pi-text, #1e293b); }
.text-gray-700 { color: var(--pi-text-2, #475569); }
.text-gray-600 { color: var(--pi-text-2, #475569); }
.text-gray-500 { color: var(--pi-text-3, #94a3b8); }
.text-gray-400 { color: var(--pi-text-muted, #64748b); }
.text-gray-300 { color: var(--pi-text-muted, #d1d5db); }
.bg-white { background-color: var(--pi-bg-card, #ffffff); }
.bg-primary { background-color: var(--pi-primary, #007d3d); }
.bg-gray-50 { background-color: var(--pi-bg-alt, #f3f4f6); }
.bg-gray-900 { background-color: var(--pi-text, #111827); }

/* ── Borders ── */
.border { border-width: 1px; border-style: solid; }
.border-gray-100 { border-color: var(--pi-border-light, #f1f5f9); }
.border-gray-200 { border-color: var(--pi-border, #e2e8f0); }
.border-gray-300 { border-color: #d1d5db; }
.rounded { border-radius: 0.25rem; }
.rounded-lg { border-radius: 0.5rem; }
.rounded-xl { border-radius: 0.75rem; }
.rounded-2xl { border-radius: 1rem; }
.rounded-full { border-radius: 9999px; }

/* ── Effects ── */
.shadow-sm { box-shadow: 0 1px 2px rgba(0,0,0,0.05); }
.shadow-lg { box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1); }
.shadow-xl { box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1); }
.shadow-2xl { box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25); }
.transition-all { transition-property: all; transition-timing-function: cubic-bezier(0.4,0,0.2,1); transition-duration: 0.15s; }
.transition-colors { transition-property: color, background-color, border-color; transition-timing-function: cubic-bezier(0.4,0,0.2,1); transition-duration: 0.15s; }
.hover\:shadow-xl:hover { box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1); }
.hover\:shadow-2xl:hover { box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25); }

/* ── Visibility ── */
.hidden { display: none; }
.block { display: block; }
.inline-block { display: inline-block; }
@media (min-width: 768px) { .md\:block { display: block; } .md\:flex { display: flex; } .md\:hidden { display: none; } .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .md\:text-4xl { font-size: 2.25rem; } .md\:text-5xl { font-size: 3rem; } .md\:py-20 { padding-top: 5rem; padding-bottom: 5rem; } .md\:p-8 { padding: 2rem; } .md\:mb-12 { margin-bottom: 3rem; } .md\:mb-24 { margin-bottom: 6rem; } }
@media (min-width: 1024px) { .lg\:block { display: block; } .lg\:flex { display: flex; } .lg\:hidden { display: none; } .lg\:p-10 { padding: 2.5rem; } .lg\:p-8 { padding: 2rem; } .lg\:text-3xl { font-size: 1.875rem; } }

/* ── Misc ── */
.pointer-events-none { pointer-events: none; }
.select-none { user-select: none; }
.object-cover { object-fit: cover; }
.animate-pulse { animation: pulse 2s cubic-bezier(0.4,0,0.6,1) infinite; }
.group:hover .group-hover\:text-primary { color: var(--pi-primary, #007d3d); }
.group:hover .group-hover\:text-secondary { color: var(--pi-secondary, #ffb703); }
.outline-none { outline: none; }
.resize-none { resize: none; }

/* ── Tab Buttons ── */
.sh-tab-btn { padding: 0.5rem 1rem; border-radius: 0.5rem; font-weight: 600; font-size: 0.875rem; background: var(--pi-bg-alt, #f1f5f9); color: var(--pi-text-2, #334155); border: none; cursor: pointer; transition: all 0.2s; }
.sh-tab-btn.active { background: var(--pi-primary, #007d3d); color: #fff; }
.sh-tab-btn:hover:not(.active) { background: var(--pi-bg-elevated, #e2e8f0); }
.dark .sh-tab-btn { background: var(--pi-bg-elevated, #334155); color: var(--pi-text-2, #e2e8f0); }
.dark .sh-tab-btn.active { background: var(--pi-primary, #007d3d); color: #fff; }

/* ── Submenu toggle active ── */
.sh-mob-item__toggle.is-active { color: var(--pi-primary, #007d3d); }

/* ── Dark Mode (basic) ── */
.dark .bg-white { background-color: var(--pi-bg-card, #1e293b); }
.dark .bg-gray-50 { background-color: var(--pi-bg-alt, #1e293b); }
.dark .text-gray-900, .dark .text-gray-800 { color: var(--pi-text, #f1f5f9); }
.dark .text-gray-700, .dark .text-gray-600 { color: var(--pi-text-2, #e2e8f0); }
.dark .text-gray-500 { color: var(--pi-text-3, #94a3b8); }
.dark .border-gray-100 { border-color: var(--pi-border, #334155); }
.dark .border-gray-200 { border-color: var(--pi-border, #334155); }
