/* 
 * BayFlow Plumbing Theme Main Stylesheet
 * 100% Self-Contained Pixel-Perfect Styling System matching Design Reference
 */

:root {
  --color-primary: #00081e;
  --color-primary-container: #0a1f44;
  --color-on-primary: #ffffff;
  --color-on-primary-container: #7687b2;
  --color-secondary: #006399;
  --color-secondary-container: #67bafd;
  --color-on-secondary: #ffffff;
  --color-on-secondary-container: #004972;
  --color-tertiary: #110700;
  --color-tertiary-fixed: #ffddb8;
  --color-tertiary-fixed-dim: #ffb95f;
  --color-on-tertiary-fixed: #2a1700;
  --color-background: #f7f9fb;
  --color-surface: #ffffff;
  --color-surface-bright: #f7f9fb;
  --color-surface-container-low: #f2f4f6;
  --color-surface-container: #eceef0;
  --color-surface-container-high: #e6e8ea;
  --color-surface-container-highest: #e0e3e5;
  --color-on-surface: #191c1e;
  --color-on-surface-variant: #44464e;
  --color-emergency-red: #DC2626;
  --color-amber-400: #fbbf24;
  --color-emerald-400: #34d399;
  --color-emerald-500: #10b981;
  --color-emerald-700: #047857;
  --color-sky-400: #38bdf8;
}

/* Global Reset */
html {
  scroll-behavior: smooth;
  box-sizing: border-box;
}

*, *:before, *:after {
  box-sizing: inherit;
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--color-background);
  color: var(--color-on-surface);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Roboto Flex', system-ui, -apple-system, sans-serif;
  margin-top: 0;
  margin-bottom: 0.5rem;
  color: var(--color-primary);
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

button, input, select, textarea {
  font-family: inherit;
}

/* Background Utilities */
.bg-primary { background-color: var(--color-primary) !important; }
.bg-primary-container { background-color: var(--color-primary-container) !important; }
.bg-secondary { background-color: var(--color-secondary) !important; }
.bg-secondary-container { background-color: var(--color-secondary-container) !important; }
.bg-tertiary-fixed { background-color: var(--color-tertiary-fixed) !important; }
.bg-tertiary-fixed-dim { background-color: var(--color-tertiary-fixed-dim) !important; }
.bg-surface { background-color: var(--color-surface) !important; }
.bg-surface-bright { background-color: var(--color-surface-bright) !important; }
.bg-surface-container-low { background-color: var(--color-surface-container-low) !important; }
.bg-surface-container { background-color: var(--color-surface-container) !important; }
.bg-surface-container-high { background-color: var(--color-surface-container-high) !important; }
.bg-surface-container-highest { background-color: var(--color-surface-container-highest) !important; }
.bg-background { background-color: var(--color-background) !important; }
.bg-white { background-color: #ffffff !important; }
.bg-white\/5 { background-color: rgba(255, 255, 255, 0.05) !important; }
.bg-white\/10 { background-color: rgba(255, 255, 255, 0.10) !important; }
.bg-white\/20 { background-color: rgba(255, 255, 255, 0.20) !important; }
.bg-white\/95 { background-color: rgba(255, 255, 255, 0.95) !important; }
.bg-black\/60 { background-color: rgba(0, 0, 0, 0.60) !important; }
.bg-secondary\/10 { background-color: rgba(0, 99, 153, 0.10) !important; }
.bg-emerald-50 { background-color: #ecfdf5 !important; }
.bg-emerald-400 { background-color: #34d399 !important; }
.bg-emerald-500 { background-color: #10b981 !important; }
.bg-red-50 { background-color: #fef2f2 !important; }
.bg-amber-50 { background-color: #fffbeb !important; }
.bg-blue-50 { background-color: #eff6ff !important; }
.bg-sky-50 { background-color: #f0f9ff !important; }

/* Text Utilities */
.text-primary { color: var(--color-primary) !important; }
.text-secondary { color: var(--color-secondary) !important; }
.text-secondary-container { color: var(--color-secondary-container) !important; }
.text-on-primary { color: var(--color-on-primary) !important; }
.text-on-primary-container { color: var(--color-on-primary-container) !important; }
.text-on-tertiary-fixed { color: var(--color-on-tertiary-fixed) !important; }
.text-on-surface { color: var(--color-on-surface) !important; }
.text-on-surface-variant { color: var(--color-on-surface-variant) !important; }
.text-emergency-red { color: var(--color-emergency-red) !important; }
.text-white { color: #ffffff !important; }
.text-amber-400 { color: var(--color-amber-400) !important; }
.text-amber-500 { color: #f59e0b !important; }
.text-amber-600 { color: #d97706 !important; }
.text-emerald-400 { color: var(--color-emerald-400) !important; }
.text-emerald-600 { color: #059669 !important; }
.text-emerald-700 { color: var(--color-emerald-700) !important; }
.text-sky-400 { color: var(--color-sky-400) !important; }
.text-sky-600 { color: #0284c7 !important; }
.text-red-500 { color: #ef4444 !important; }
.text-red-600 { color: #dc2626 !important; }
.text-indigo-600 { color: #4f46e5 !important; }

/* Flex & Grid Layout */
.flex { display: flex !important; }
.inline-flex { display: inline-flex !important; }
.hidden { display: none !important; }
.block { display: block !important; }
.inline-block { display: inline-block !important; }
.grid { display: grid !important; }

.flex-col { flex-direction: column !important; }
.flex-row { flex-direction: row !important; }
.flex-wrap { flex-wrap: wrap !important; }
.items-center { align-items: center !important; }
.items-start { align-items: flex-start !important; }
.items-end { align-items: flex-end !important; }
.justify-between { justify-content: space-between !important; }
.justify-center { justify-content: center !important; }
.justify-end { justify-content: flex-end !important; }

.gap-1 { gap: 0.25rem !important; }
.gap-2 { gap: 0.5rem !important; }
.gap-3 { gap: 0.75rem !important; }
.gap-4 { gap: 1rem !important; }
.gap-6 { gap: 1.5rem !important; }
.gap-8 { gap: 2rem !important; }
.gap-12 { gap: 3rem !important; }

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

@media (min-width: 640px) {
  .sm\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .sm\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
  .sm\:flex-row { flex-direction: row !important; }
  .sm\:hidden { display: none !important; }
  .sm\:flex { display: flex !important; }
  .sm\:text-lg { font-size: 1.125rem !important; }
  .sm\:text-3xl { font-size: 1.875rem !important; }
  .sm\:text-4xl { font-size: 2.25rem !important; }
  .sm\:h-\[450px\] { height: 450px !important; }
}
@media (min-width: 768px) {
  .md\:flex { display: flex !important; }
  .md\:hidden { display: none !important; }
  .md\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
  .md\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
  .md\:flex-row { flex-direction: row !important; }
  .md\:items-end { align-items: flex-end !important; }
  .md\:py-20 { padding-top: 5rem !important; padding-bottom: 5rem !important; }
  .md\:py-24 { padding-top: 6rem !important; padding-bottom: 6rem !important; }
  .md\:text-4xl { font-size: 2.25rem !important; }
  .md\:text-5xl { font-size: 3rem !important; }
}
@media (min-width: 1024px) {
  .lg\:grid-cols-6 { grid-template-columns: repeat(6, minmax(0, 1fr)) !important; }
  .lg\:grid-cols-12 { grid-template-columns: repeat(12, minmax(0, 1fr)) !important; }
  .lg\:col-span-7 { grid-column: span 7 / span 7 !important; }
  .lg\:col-span-5 { grid-column: span 5 / span 5 !important; }
  .lg\:col-span-8 { grid-column: span 8 / span 8 !important; }
  .lg\:col-span-6 { grid-column: span 6 / span 6 !important; }
  .lg\:col-span-4 { grid-column: span 4 / span 4 !important; }
  .lg\:text-6xl { font-size: 3.75rem !important; }
}

/* Container & Spacing */
.max-w-7xl { max-width: 80rem !important; }
.max-w-3xl { max-width: 48rem !important; }
.max-w-2xl { max-width: 42rem !important; }
.max-w-lg { max-width: 32rem !important; }
.mx-auto { margin-left: auto !important; margin-right: auto !important; }
.w-full { width: 100% !important; }
.h-full { height: 100% !important; }
.h-20 { height: 5rem !important; }
.h-16 { height: 4rem !important; }
.w-10 { width: 2.5rem !important; }
.h-10 { height: 2.5rem !important; }
.w-12 { width: 3rem !important; }
.h-12 { height: 3rem !important; }
.w-14 { width: 3.5rem !important; }
.h-14 { height: 3.5rem !important; }

.p-2 { padding: 0.5rem !important; }
.p-3 { padding: 0.75rem !important; }
.p-4 { padding: 1rem !important; }
.p-5 { padding: 1.25rem !important; }
.p-6 { padding: 1.5rem !important; }
.p-8 { padding: 2rem !important; }
.py-2 { padding-top: 0.5rem !important; padding-bottom: 0.5rem !important; }
.py-2\.5 { padding-top: 0.625rem !important; padding-bottom: 0.625rem !important; }
.py-3 { padding-top: 0.75rem !important; padding-bottom: 0.75rem !important; }
.py-4 { padding-top: 1rem !important; padding-bottom: 1rem !important; }
.py-12 { padding-top: 3rem !important; padding-bottom: 3rem !important; }
.py-16 { padding-top: 4rem !important; padding-bottom: 4rem !important; }
.py-28 { padding-top: 7rem !important; padding-bottom: 7rem !important; }
.px-3 { padding-left: 0.75rem !important; padding-right: 0.75rem !important; }
.px-4 { padding-left: 1rem !important; padding-right: 1rem !important; }
.px-5 { padding-left: 1.25rem !important; padding-right: 1.25rem !important; }
.px-6 { padding-left: 1.5rem !important; padding-right: 1.5rem !important; }
.px-8 { padding-left: 2rem !important; padding-right: 2rem !important; }

.mb-1 { margin-bottom: 0.25rem !important; }
.mb-2 { margin-bottom: 0.5rem !important; }
.mb-3 { margin-bottom: 0.75rem !important; }
.mb-4 { margin-bottom: 1rem !important; }
.mb-6 { margin-bottom: 1.5rem !important; }
.mb-8 { margin-bottom: 2rem !important; }
.mb-12 { margin-bottom: 3rem !important; }
.mt-1 { margin-top: 0.25rem !important; }
.mt-2 { margin-top: 0.5rem !important; }
.mt-3 { margin-top: 0.75rem !important; }
.mt-4 { margin-top: 1rem !important; }
.mt-6 { margin-top: 1.5rem !important; }

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

/* Borders & Radius */
.rounded-md { border-radius: 0.375rem !important; }
.rounded-lg { border-radius: 0.5rem !important; }
.rounded-xl { border-radius: 0.75rem !important; }
.rounded-2xl { border-radius: 1rem !important; }
.rounded-full { border-radius: 9999px !important; }

.border { border-width: 1px !important; border-style: solid !important; }
.border-b { border-bottom-width: 1px !important; border-bottom-style: solid !important; }
.border-t { border-top-width: 1px !important; border-top-style: solid !important; }
.border-b-2 { border-bottom-width: 2px !important; border-bottom-style: solid !important; }
.border-white\/10 { border-color: rgba(255, 255, 255, 0.10) !important; }
.border-white\/20 { border-color: rgba(255, 255, 255, 0.20) !important; }
.border-white\/50 { border-color: rgba(255, 255, 255, 0.50) !important; }
.border-surface-container-low { border-color: var(--color-surface-container-low) !important; }
.border-surface-container-high { border-color: var(--color-surface-container-high) !important; }
.border-surface-container-highest { border-color: var(--color-surface-container-highest) !important; }
.border-outline-variant\/40 { border-color: rgba(197, 198, 207, 0.40) !important; }
.border-secondary { border-color: var(--color-secondary) !important; }

/* Shadows and Positioning */
.sticky { position: sticky !important; }
.fixed { position: fixed !important; }
.relative { position: relative !important; }
.absolute { position: absolute !important; }
.top-0 { top: 0 !important; }
.bottom-0 { bottom: 0 !important; }
.left-0 { left: 0 !important; }
.right-0 { right: 0 !important; }
.top-4 { top: 1rem !important; }
.left-4 { left: 1rem !important; }
.right-4 { right: 1rem !important; }
.bottom-4 { bottom: 1rem !important; }
.bottom-6 { bottom: 1.5rem !important; }
.left-6 { left: 1.5rem !important; }
.right-6 { right: 1.5rem !important; }
.inset-0 { top: 0; right: 0; bottom: 0; left: 0; }
.z-10 { z-index: 10 !important; }
.z-30 { z-index: 30 !important; }
.z-40 { z-index: 40 !important; }
.z-50 { z-index: 50 !important; }

.shadow-sm { box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05) !important; }
.shadow { box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06) !important; }
.shadow-md { box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06) !important; }
.shadow-lg { box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05) !important; }
.shadow-xl { box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04) !important; }
.shadow-2xl { box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25) !important; }

.soft-depth {
  box-shadow: 0 10px 30px -5px rgba(0, 8, 30, 0.08), 0 4px 12px -2px rgba(0, 8, 30, 0.04) !important;
}

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

.font-bold { font-weight: 700 !important; }
.font-semibold { font-weight: 600 !important; }
.font-medium { font-weight: 500 !important; }
.font-black { font-weight: 900 !important; }
.font-extrabold { font-weight: 800 !important; }
.uppercase { text-transform: uppercase !important; }
.italic { font-style: italic !important; }
.tracking-wide { letter-spacing: 0.025em !important; }
.tracking-wider { letter-spacing: 0.05em !important; }
.tracking-widest { letter-spacing: 0.1em !important; }
.leading-relaxed { line-height: 1.625 !important; }
.leading-tight { line-height: 1.25 !important; }
.text-center { text-align: center !important; }
.text-right { text-align: right !important; }
.object-cover { object-fit: cover !important; }
.overflow-hidden { overflow: hidden !important; }
.backdrop-blur-md { backdrop-filter: blur(12px) !important; -webkit-backdrop-filter: blur(12px) !important; }

/* Interactive Hover Utilities */
.soft-depth-hover {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}
.soft-depth-hover:hover {
  transform: translateY(-4px) !important;
  box-shadow: 0 20px 35px -10px rgba(0, 8, 30, 0.15), 0 8px 16px -4px rgba(0, 8, 30, 0.08) !important;
}

.hover\:bg-secondary\/90:hover { background-color: rgba(0, 99, 153, 0.9) !important; }
.hover\:bg-primary:hover { background-color: var(--color-primary) !important; }
.hover\:bg-surface-bright:hover { background-color: var(--color-surface-bright) !important; }
.hover\:text-white:hover { color: #ffffff !important; }
.hover\:text-secondary:hover { color: var(--color-secondary) !important; }

/* Material Symbols Icon */
.material-symbols-outlined {
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
  display: inline-block;
  vertical-align: middle;
  line-height: 1;
}

@keyframes modalFadeIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}
.animate-modal {
  animation: modalFadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes ping {
  75%, 100% { transform: scale(2); opacity: 0; }
}
.animate-ping {
  animation: ping 1s cubic-bezier(0, 0, 0.2, 1) infinite;
}
