/* LensNew & Optivio Branded Loading & Compact Workspace Styles */

/* Base Viewport & Reset */
html, body {
  width: 100%;
  min-height: 100vh;
  margin: 0;
  padding: 0;
  background-color: #fafafb;
}

/* 1. Full-Screen Prominent Centered Branded Loading Animation */
#initial-splash {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  z-index: 999999;
  margin: 0;
  padding: 24px;
  box-sizing: border-box;
  text-align: center;
  overflow: hidden;
  transition: opacity 0.35s ease-out;
}

#initial-splash.dismissing {
  opacity: 0 !important;
  pointer-events: none !important;
}

@keyframes brandBar {
  0% { left: -50%; width: 40%; }
  50% { left: 25%; width: 60%; }
  100% { left: 100%; width: 40%; }
}

@keyframes brandPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.03); opacity: 0.95; }
}

.lensnew-splash-gif {
  width: min(320px, 75vw) !important;
  height: auto !important;
  max-width: 320px !important;
  max-height: 320px !important;
  object-fit: contain !important;
  display: block !important;
  margin: 0 auto !important;
  image-rendering: auto !important;
}

/* 2. Desktop Compact View (80% Equivalent Workspace Default - Component Sizing, No Zoom) */
@media (min-width: 1024px) {
  html.compact-mode {
    --density: compact;
    font-size: 13.5px;
  }

  html.compact-mode .p-6,
  html.compact-mode .p-8,
  html.compact-mode .sm\:p-6,
  html.compact-mode .lg\:p-8,
  body.compact-mode .p-6,
  body.compact-mode .p-8,
  body.compact-mode .sm\:p-6,
  body.compact-mode .lg\:p-8 {
    padding: 0.75rem 1.25rem !important;
  }

  html.compact-mode .neu-card,
  body.compact-mode .neu-card {
    padding: 12px 14px !important;
    border-radius: 14px !important;
  }

  html.compact-mode .space-y-5 > :not([hidden]) ~ :not([hidden]),
  html.compact-mode .space-y-4 > :not([hidden]) ~ :not([hidden]),
  body.compact-mode .space-y-5 > :not([hidden]) ~ :not([hidden]),
  body.compact-mode .space-y-4 > :not([hidden]) ~ :not([hidden]) {
    margin-top: 0.55rem !important;
  }

  html.compact-mode .gap-4,
  body.compact-mode .gap-4 {
    gap: 0.55rem !important;
  }

  html.compact-mode .gap-3,
  body.compact-mode .gap-3 {
    gap: 0.45rem !important;
  }

  html.compact-mode input[type="text"],
  html.compact-mode input[type="number"],
  html.compact-mode input[type="date"],
  html.compact-mode select,
  html.compact-mode textarea,
  body.compact-mode input[type="text"],
  body.compact-mode input[type="number"],
  body.compact-mode input[type="date"],
  body.compact-mode select,
  body.compact-mode textarea {
    padding-top: 0.35rem !important;
    padding-bottom: 0.35rem !important;
    font-size: 0.75rem !important;
    border-radius: 0.5rem !important;
  }

  html.compact-mode table td,
  html.compact-mode table th,
  body.compact-mode table td,
  body.compact-mode table th {
    padding: 0.35rem 0.5rem !important;
    font-size: 0.75rem !important;
  }

  html.compact-mode h1.text-2xl,
  body.compact-mode h1.text-2xl {
    font-size: 1.25rem !important;
    line-height: 1.5rem !important;
  }

  html.compact-mode h2.text-xl,
  body.compact-mode h2.text-xl {
    font-size: 1.1rem !important;
    line-height: 1.35rem !important;
  }

  html.compact-mode button:not([class*="w-full"]):not([class*="rounded-full"]),
  body.compact-mode button:not([class*="w-full"]):not([class*="rounded-full"]) {
    padding-top: 0.35rem !important;
    padding-bottom: 0.35rem !important;
    font-size: 0.75rem !important;
  }

  /* Two-column billing workspace height optimization */
  html.compact-mode .min-h-screen,
  body.compact-mode .min-h-screen {
    min-height: calc(100vh - 48px) !important;
  }
}

/* 3. Mobile Product Search Dropdown Polish */
@media (max-width: 768px) {
  .search-dropdown-mobile {
    max-height: 55vh !important;
    z-index: 99999 !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25) !important;
  }
}
