/* Mobile App Touch and Visual Enhancements */
html {
  -webkit-tap-highlight-color: transparent;
}

body {
  touch-action: manipulation;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.6);
}
::-webkit-scrollbar-thumb {
  background: rgba(71, 85, 105, 0.6);
  border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(100, 116, 139, 0.8);
}

/* iOS Safari Date Input Normalization & Sizing */
input[type="date"] {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  box-sizing: border-box !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  display: block;
  background-color: rgb(15 23 42);
  color: #ffffff;
  font-size: 1rem;
  line-height: 1.5;
  border-radius: 0.75rem;
  border: 1px solid rgb(51 65 85);
  padding: 0.75rem 1rem;
  margin: 0;
  text-align: left;
}

/* Fix iOS Safari centered text offset in date input */
input[type="date"]::-webkit-date-and-time-value {
  text-align: left !important;
  line-height: 1.5 !important;
  min-height: 1.5em !important;
  margin: 0 !important;
}

input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(1);
  opacity: 0.8;
  cursor: pointer;
  padding: 0.25rem;
}

/* Podium styling */
.podium-pillar {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  border-top-left-radius: 1rem;
  border-top-right-radius: 1rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Smooth Tab Fade Transitions */
.tab-view {
  animation: fadeIn 0.2s ease-in-out;
}

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

/* Safe Area Insets for Modern Mobile Devices (iOS notch/home bar) */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  body {
    padding-bottom: calc(5rem + env(safe-area-inset-bottom));
  }
  nav.fixed {
    padding-bottom: calc(0.5rem + env(safe-area-inset-bottom));
  }
}

/* ================================================================= */
/* STRICT NAVIGATION RULES: DESKTOP VS MOBILE MUTUALLY EXCLUSIVE     */
/* ================================================================= */

/* Desktop navigation bar: NEVER visible on screens < 768px (mobile) */
#desktop-nav {
  display: none !important;
}

@media (min-width: 768px) {
  body.is-authenticated #desktop-nav {
    display: flex !important;
  }
}

/* Mobile bottom navigation bar: ONLY visible on screens < 768px (mobile) */
#mobile-nav {
  display: none !important;
}

@media (max-width: 767px) {
  body.is-authenticated #mobile-nav {
    display: flex !important;
  }
}
