/* teacherShow.css - Tab header and mobile bottom navigation styles for teacher dashboard */

.nav-tabs .nav-link {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.1rem !important;
  padding: 0.5rem 0.8rem !important;
  min-width: 70px !important;
  font-size: 0.92rem !important;
  color: #2C3E50 !important;
}

/* Small tweak: reduce font/icon size for the Unscheduled Lessons toggle button
   This overrides the inline width/font where necessary and keeps spacing tidy. */
/* #toggleUnscheduledSidebarBtn {
  font-size: 0.85rem !important;
  line-height: 1 !important;
  padding: 0.15rem 0.35rem !important;
} */
/* Simplified styling for the Unscheduled Lessons toggle: bigger label font, no
   icon-specific columns (we don't render an icon). Keep the button centered. */
#toggleUnscheduledSidebarBtn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 0.75rem !important; /* larger label font */
  line-height: 1 !important;
  padding: 0.35rem !important;
}
#toggleUnscheduledSidebarBtn .toggle-label {
  display: inline-block !important;
  margin-left: 0 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  font-weight: 600 !important;
}

.nav-tabs .nav-link i {
  font-size: 2.1rem !important;
  margin-bottom: 0.1rem !important;
  display: block !important;
}
.nav-tabs .nav-link .tab-label {
  font-size: 1.1rem !important;
  line-height: 1.1 !important;
  margin-top: 0.1rem !important;
  display: block !important;
  text-align: center !important;
  letter-spacing: 0.01em !important;
}
.nav-tabs .nav-link.active,
.nav-tabs .nav-link:focus,
.nav-tabs .nav-link:hover {
  color: var(--bs-info) !important;
}

/* icons and labels inherit color */
.nav-tabs .nav-link i,
.nav-tabs .nav-link .tab-label {
  color: inherit !important;
}

/* Preserve newlines entered into biography textarea when displaying on profile */
.preserve-whitespace {
  white-space: pre-line; /* preserves newlines -> line breaks, but still wraps long lines */
}

@media (max-width: 576px) {
  .teacher-show-container,
  .container {
    padding-bottom: 35px !important; /* slightly more than nav bar height */
  }
  .nav-tabs {
    font-size: 0.95rem !important;
  }
  .nav-tabs .nav-link {
    padding: 0.35rem 0.6rem !important;
    font-size: 0.95rem !important;
    min-width: 60px !important;
    border-radius: 0.3rem !important;
  }
  /* Mobile Bottom Navigation Bar Customization */
  .teachershow-bottom-nav {
    height: 80px !important;
    box-shadow: 0 -2px 12px rgba(0,0,0,0.08);
  }
  .teachershow-bottom-nav .d-flex {
    height: 100% !important;
  }
  .teachershow-bottom-nav-link {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #2C3E50;
    font-size: 0.8rem;
    height: 100%;
    padding: 0;
    transition: color 0.2s;
  }
  .teachershow-bottom-nav-link i {
    font-size: 2.1rem !important;
    margin-bottom: 0.1rem;
    display: block;
  }
  .teachershow-bottom-nav-link span {
    font-size: 0.68rem !important;
    line-height: 1.1;
    margin-top: 0.1rem;
    display: block;
    text-align: center;
    letter-spacing: 0.01em;
  }
  .teachershow-bottom-nav-link.active,
  .teachershow-bottom-nav-link:focus,
  .teachershow-bottom-nav-link:hover {
    color: var(--bs-info) !important;
  }
  .fc .fc-header-toolbar .fc-toolbar-chunk:first-child {
    max-width: 100px;
    flex: 0 1 100px; /* don’t grow, allow shrink up to 100px basis */
    overflow: hidden; /* prevent spillover */
  }

  /* Make the alert under header full-width on small screens */
  .teacher-show-container .mobile-alert {
    width: 100% !important;
    min-width: auto !important;
    max-width: 100% !important;
    margin-top: 0.6rem;
  }

  /* Stack the header elements (profile + alert) only on small screens.
     We avoid using the global .flex-column utility because it may be overridden
     elsewhere; this class targets the header specifically. */
  .teacher-show-container .mobile-stack-header {
    flex-direction: column !important;
  }

  /* Make unscheduled sidebar narrower on mobile and ensure hidden position matches width.
     We use !important to override the inline width/right values set in the template. */
  .unscheduled-sidebar {
    width: 240px !important;
    right: -240px !important;
  }

  /* When sidebar is opened and calendar gets the 'shifted' class, reduce the shift amount. */
  .calendar-container.shifted {
    margin-right: 260px !important;
  }

  /* On small screens, make the sidebar overlay the calendar instead of pushing it.
     Sidebar stays off-screen by default (right:-width) and slides to right:0 when open.
     Also prevent the calendar from shifting on mobile by nullifying the shifted margin. */
  .unscheduled-sidebar.open {
    right: 0 !important;
    z-index: 1075 !important; /* ensure overlay above calendar */
    box-shadow: 0 6px 20px rgba(0,0,0,0.12);
  }

  /* Prevent calendar shift on mobile — keep its width, sidebar overlays it */
  .calendar-container.shifted {
    margin-right: 0 !important;
  }

  /* Align unscheduled sidebar header to the right on small screens so it sits
     next to the close button instead of centered. Overrides the .mx-auto. */
  .unscheduled-sidebar .unscheduled-message-header {
    margin-left: auto !important;
    margin-right: 0.8rem !important;
    text-align: right !important;
  }

  /* Unscheduled flex lessons' header message slightly smaller */
  .unscheduled-message-header {
    font-size: 0.8rem !important;
    line-height: 1.1 !important;
  }
}
