/* Prevent overscroll/bounce on mobile devices */
html, body {
  overscroll-behavior: none;
  overflow-x: hidden;
  position: relative;
  height: 100%;
  touch-action: manipulation;
  -webkit-overflow-scrolling: touch;
}

/* Fix header in place with higher priority */
header.main-header {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  z-index: 1000 !important;
  touch-action: none !important;
  -webkit-touch-callout: none !important;
  user-select: none !important;
  transform: translateZ(0);
  will-change: transform;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

/* Prevent touch selection on header elements */
header * {
  -webkit-touch-callout: none !important;
  user-select: none !important;
}

/* SIMPLIFIED MOBILE CALENDAR FIXES */
@media (max-width: 767px) {
  /* CRITICAL FIX: Make calendar containers taller */
  .fc-view-harness,
  .fc-view-harness-active {
    min-height: 1200px !important;
    height: auto !important;
    overflow: visible !important;
    position: relative !important;
  }
  
  /* CRITICAL FIX: Make table rows expand properly */
  .fc-scrollgrid-section,
  .fc-scrollgrid-section-body {
    height: auto !important;
    min-height: 600px !important;
    overflow: visible !important;
  }
  
  /* CRITICAL FIX: Container shouldn't have height restrictions */
  .calendar-v2-container {
    height: auto !important;
    min-height: auto !important;
    padding-bottom: 200px !important;
    overflow-x: hidden !important;
    overflow-y: visible !important;
  }
  
  /* CRITICAL FIX: Scrollers should not hide overflow content */
  .fc-scroller,
  .fc-scroller-liquid,
  .fc-scroller-liquid-absolute {
    height: auto !important;
    overflow: visible !important;
  }
  
  /* CRITICAL FIX: Make the day cells taller */
  .fc-daygrid-day-frame {
    min-height: 120px !important;
    height: auto !important;
  }
  
  /* CRITICAL FIX: Main table shouldn't have height constraint */
  .fc-scrollgrid,
  .fc-scrollgrid-liquid {
    height: auto !important;
  }
  
  /* CRITICAL FIX: Make sure the calendar has enough space */
  .fc {
    min-height: 1200px !important;
    height: auto !important;
  }
  
  /* CRITICAL FIX: Fix main body of the calendar */
  .fc-daygrid-body {
    height: auto !important;
    min-height: 1000px !important;
  }
}

/* iOS-specific fixes */
@supports (-webkit-touch-callout: none) {
  /* CRITICAL FIX: iOS specific body fixes */
  body {
    height: auto !important;
    overflow-y: auto !important;
    position: static !important;
  }
  
  /* CRITICAL FIX: Fix iOS scrolling container */
  .main-content {
    height: auto !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }
  
  /* CRITICAL FIX: Very aggressive mobile calendar height override for iOS */
  @media (max-width: 767px) {
    .fc-view-harness,
    .fc-view-harness-active,
    .fc-dayGridMonth-view,
    .fc-scrollgrid,
    .fc-scrollgrid-liquid,
    .fc-daygrid-body,
    .fc,
    .fc-view {
      min-height: 1800px !important;
      height: auto !important;
      overflow: visible !important;
    }
    
    /* Extend the page to ensure full scrolling */
    .calendar-v2-container {
      padding-bottom: 1000px !important;
    }
  }
} 