/* ==========================================================================
   JLEVANO MOBILE - NATIVE PWA STYLES
   Design System & Modern Micro-interactions
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  --primary-blue: #002f87;
  --primary-blue-hover: #002366;
  --primary-blue-light: #e8f0fe;
  --text-main: #111827;
  --text-muted: #6b7280;
  --bg-app: #f9fafb;
  --border-subtle: #f3f4f6;
  --safe-bottom: env(safe-area-inset-bottom, 16px);
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: #f3f4f6;
  color: var(--text-main);
  margin: 0;
  padding: 0;
  overscroll-behavior-y: none;
  -webkit-font-smoothing: antialiased;
}

/* App Viewport Shell (Mobile Native Feel) */
#app-container {
  width: 100%;
  max-width: 440px;
  height: 100vh;
  height: 100dvh;
  margin: 0 auto;
  position: relative;
  background-color: #ffffff;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
}

/* Custom Safe Bottom Area for iOS */
.pb-safe {
  padding-bottom: calc(0.5rem + var(--safe-bottom));
}

/* Scrollbar Customization */
.custom-scroll::-webkit-scrollbar,
main::-webkit-scrollbar {
  width: 4px;
}

.custom-scroll::-webkit-scrollbar-track,
main::-webkit-scrollbar-track {
  background: transparent;
}

.custom-scroll::-webkit-scrollbar-thumb,
main::-webkit-scrollbar-thumb {
  background: #e5e7eb;
  border-radius: 4px;
}

.custom-scroll::-webkit-scrollbar-thumb:hover,
main::-webkit-scrollbar-thumb:hover {
  background: #d1d5db;
}

/* Hide scrollbars for slick mobile look */
.no-scrollbar::-webkit-scrollbar {
  display: none;
}
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* View Animations */
.view-enter {
  animation: viewFadeIn 0.22s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes viewFadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Active touch feedback */
.active-press {
  transition: transform 0.12s ease, opacity 0.12s ease;
}
.active-press:active {
  transform: scale(0.97);
  opacity: 0.9;
}

/* Toast Notifications */
#toast-container {
  position: fixed;
  top: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  width: 90%;
  max-width: 380px;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.toast {
  pointer-events: auto;
  padding: 0.75rem 1rem;
  border-radius: 0.875rem;
  background: rgba(17, 24, 39, 0.94);
  backdrop-filter: blur(8px);
  color: #ffffff;
  font-size: 0.8125rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.2);
  animation: toastIn 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.toast.toast-success {
  background: rgba(6, 78, 59, 0.96);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.toast.toast-error {
  background: rgba(127, 29, 29, 0.96);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(-10px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Modal backdrop animation */
.modal-backdrop {
  animation: backdropFade 0.2s ease forwards;
}

@keyframes backdropFade {
  from { opacity: 0; }
  to { opacity: 1; }
}
