/* Custom styles for KopFit Proefsite & Prototype */
@layer utilities {
  /* Hide scrollbar for Chrome, Safari and Opera */
  .no-scrollbar::-webkit-scrollbar {
    display: none;
  }
  /* Hide scrollbar for IE, Edge and Firefox */
  .no-scrollbar {
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
  }
}

/* Custom smooth animations */
@keyframes pulseSlow {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.03); opacity: 0.9; }
}

.glow-green {
  box-shadow: 0 0 30px -5px rgba(16, 185, 129, 0.45);
}

.glow-yellow {
  box-shadow: 0 0 30px -5px rgba(245, 158, 11, 0.45);
}

.glow-red {
  box-shadow: 0 0 30px -5px rgba(239, 68, 68, 0.45);
}

/* Mobile-First App Layout & Fixed Bottom Bar */
#mobileAppBody {
  flex: 1 1 0%;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 6rem; /* Ensures content is never obscured by fixed bottom bar */
}

.mobile-bottom-nav {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 40;
  background: rgba(2, 6, 23, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid rgba(51, 65, 85, 0.85);
  box-shadow: 0 -4px 25px rgba(0, 0, 0, 0.6);
}

/* Desktop Smartphone Mockup View */
@media (min-width: 640px) {
  .phone-container {
    max-width: 412px;
    height: 840px;
    max-height: calc(100vh - 75px);
    margin: 0 auto;
    border-radius: 46px;
    border: 10px solid #1e293b;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.75), 0 0 0 2px #334155;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
  }
  
  .phone-speaker {
    width: 90px;
    height: 5px;
    background-color: #334155;
    border-radius: 10px;
    margin: 8px auto 4px auto;
    flex-shrink: 0;
  }
}

/* Real Mobile Screen View (iPhone / Android) */
@media (max-width: 639px) {
  html, body {
    min-height: 100%;
    touch-action: manipulation;
    -webkit-overflow-scrolling: touch;
  }

  #wrapperMobile {
    min-height: 100vh;
    min-height: 100dvh;
    padding: 0;
    display: flex;
    flex-direction: column;
  }

  .phone-container {
    width: 100%;
    max-width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    border: none;
    border-radius: 0;
    box-shadow: none;
    position: relative;
    display: flex;
    flex-direction: column;
  }
  
  .phone-speaker {
    display: none;
  }

  /* Always locked fixed to bottom of phone viewport */
  .mobile-bottom-nav {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 50 !important;
    padding-bottom: max(0.6rem, env(safe-area-inset-bottom, 0.6rem)) !important;
  }

  #mobileAppBody {
    padding-bottom: calc(5.5rem + env(safe-area-inset-bottom, 0px)) !important;
    touch-action: pan-y;
  }
}

/* Touch active / press animation & Instant click responsiveness */
.touch-press, .mobile-nav-btn, button, [role="button"] {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
}
.touch-press {
  transition: transform 0.15s ease, opacity 0.15s ease;
}
.touch-press:active {
  transform: scale(0.95);
  opacity: 0.85;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: #090d16;
}

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

::-webkit-scrollbar-thumb:hover {
  background: #334155;
}
