/* Apple-like Clean Light Theme & iOS Native Mobile Styles for StockSage AI */

:root {
  --app-bg: #f8fafc;
  --card-bg: #ffffff;
  --border-color: #e2e8f0;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --brand-primary: #059669;
  --brand-primary-light: #ecfdf5;
}

body {
  background-color: #f8fafc;
  color: #1e293b;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Safe area insets for iPhone notch / home indicator */
.pb-safe {
  padding-bottom: max(1rem, env(safe-area-inset-bottom));
}

.pb-safe-nav {
  padding-bottom: calc(4.5rem + env(safe-area-inset-bottom, 16px));
}

/* Custom Sleek Scrollbars */
::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}

::-webkit-scrollbar-track {
  background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 9999px;
}

::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

.no-scrollbar::-webkit-scrollbar {
  display: none;
}
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* Prevent iPhone Safari auto-zoom on input focus */
@media screen and (max-width: 768px) {
  input, select, textarea {
    font-size: 16px !important;
  }
}

/* Touch friendly minimum tap target */
button, a {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

/* Mobile active tap spring effect */
.mobile-card-tap {
  transition: transform 0.15s ease, background-color 0.15s ease;
}
.mobile-card-tap:active {
  transform: scale(0.985);
}

/* Desktop Modal & Mobile Bottom Sheet Animation */
@media screen and (min-width: 768px) {
  .modal-enter {
    animation: modalPopIn 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  }
  @keyframes modalPopIn {
    from {
      opacity: 0;
      transform: scale(0.96) translateY(8px);
    }
    to {
      opacity: 1;
      transform: scale(1) translateY(0);
    }
  }
}

@media screen and (max-width: 767px) {
  .modal-enter {
    animation: sheetSlideUp 0.28s cubic-bezier(0.32, 0.72, 0, 1) forwards;
  }
  @keyframes sheetSlideUp {
    from {
      opacity: 0.5;
      transform: translateY(100%);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}
