/*-----------------------------------------*/
/***** Main layout styling *****/
/*-----------------------------------------*/
/* #region */
html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

body {
  display: flex;
  flex-direction: column;
}

.main-content {
  flex: 1;
  min-height: 0;
  /* Critical for nested flex scroll */
  display: flex;
  flex-direction: column;
  padding: 1rem;
}
/* #endregion */

/*-----------------------------------------*/
/***** Main layout styling *****/
/*-----------------------------------------*/
/* #region */
.env-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  padding: 8px;
  text-align: center;
  font-weight: bold;
  font-size: 14px;
  color: white;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.development-env {
  background-color: #28a745;
  /* Green for normal development */
}

.env-banner.production-meevo {
  background-color: #fd7e14 !important;
  /* Orange */
}

.test-env {
  background-color: #6c757d;
  /* Gray */
}
/* #endregion */


/*-----------------------------------------*/
/***** Every Page styling *****/
/*-----------------------------------------*/
/* #region */
.page-title {
  margin-bottom: .75rem;
}

.form-container {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 1rem;
}

.form-content {
  max-width: 1200px;
  margin: 0 auto;
}

.show-page-container {
  height: calc(100vh - 170px);/* Adjust for navbar + footer height */
  overflow-y: auto;
}

.card-group {
  max-width: 1200px;
  margin: 0 auto;
  margin-bottom: 100px;
}
/* #endregion */

/*-----------------------------------------*/
/***** Navbar styling *****/
/*-----------------------------------------*/
/* #region */
.navbar {
  padding: 0.25rem; 
  position: relative;
  box-shadow: 0px 2px 10px rgba(0, 0, 0, 0.07);
  display: flex;
  align-items:centere;
  min-height: 60px;
}

.navbar-brand {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0;
  position: static;
  transform: none;
}

.navbar-brand img {
  max-width: 200px;
  height: auto;
}

.navbar-collapse {
  text-align: left;
  padding-left: 1rem;
}

.navbar-nav {
  margin-left: auto;
  margin-top: 0.5rem;
}

.navbar-large .nav-link {
  color: #6c757d; /* Ensure it takes on navbar link styling */
  font-size: 0.85rem; /* Make the nav links smaller */
  padding: 0.3rem; /* Adjust padding between links */
}

.navbar-profile-collapse {
  text-align: right;
  padding-right: 1rem; /* Add some padding for better appearance */
}

/* Profile Picture */
.profile-pic {
  border-radius: 50%;
  width: 40px;
  height: 40px;
  margin-right: 0.25rem;
  cursor: pointer;
}

.profile-toggle, .profile-placeholder {
  position: absolute;
  right: 1.5rem;
  top: 1rem;
  transform: translateY(-50%);
}

.profile-placeholder {
  width: 40px; /* Matches the profile picture size */
  height: 40px; /* Matches the profile picture size */
}

.navbar-name {
  font-size: 1rem;
  padding: 0.25rem;
}

.navbar-nav .nav-link {
  font-size: 1rem; 
  padding: 0.25rem; /* Reduce space between links */
}

.navbar-nav .nav-link.active {
  color: lightgray;
}

/* Adjust navbar and logo for the smallest screens */
@media (max-width: 767.99px) { /* Targets screens smaller than Bootstrap's "sm" breakpoint */
  .navbar {
    padding: 0.25rem; /* Reduce padding around the navbar */
  }

  .navbar-brand {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
  }

  .navbar-brand img { /* Target the logo inside the navbar */
    max-width: 150px; /* Shrink the logo size */
    height: auto;
  }

  .navbar-toggler {
    padding: 0.2rem 0.5rem; /* Adjust the padding for the hamburger menu */
  }

  .navbar-nav .nav-link {
    font-size: 0.85rem; /* Make the nav links smaller */
    padding: 0.25rem; /* Adjust padding between links */
  }
  
  .navbar-name {
    font-size: 0.85rem;
    padding: 0.25rem;
  }

  .container-fluid {
    min-height: 50px;
  }
}

/* Adjust navbar and logo for tablet and smaller screens */
@media (min-width: 768px) and (max-width: 1260.99px) { /* Targets screens smaller than Bootstrap's "md" breakpoint */
  .navbar {
    padding: 0.5rem; /* Minimize padding around the navbar for tablets */
  }

  .navbar-brand {
    position: absolute;
    left: 50%; /* Left-align logo */
    transform: translateX(-50%); /* Remove centering styles */
  }

  .navbar-brand img { /* Shrink logo size */
    max-width: 175px; /* Shrink logo size for tablets */
    height: auto; /* Maintain aspect ratio */
  }

  .navbar-toggler {
    padding: 0.4rem 0.8rem; /* Adjust padding for the hamburger menu */
  }

  .navbar-nav .nav-link {
    font-size: .9rem; /* Make nav links smaller */
    padding: 0.25rem; /* Reduce space between links */
  }

  .navbar-name {
    font-size: 0.9rem;
    padding: 0.25rem;
  }
}
/* #endregion */


/*-----------------------------------------*/
/***** Link styling *****/
/*-----------------------------------------*/
/* #region */
.active {
  color: black !important;
  text-decoration: none; /* Remove underline */
}

.link-hover {
  color: #6c757d; /* Initial link color */
  text-decoration: none;
}

.link-hover:hover {
  color: black; /* Hover color */
  text-decoration: underline; /* Optional: adds underline on hover */
}
/* #endregion */


/*-----------------------------------------*/
/***** Button styling *****/
/*-----------------------------------------*/
/* #region */
.btn:not(.fa-arrow-left):not(.md-btn):not(.date-nav-btn) {
  min-width: 100px;
}

.btn.disabled, .btn:disabled, fieldset:disabled .btn {
  color: #6c757d;
  background-color: #e9ecef;
  border-color: #ced4da;
  border-width: 1px;
}

input[type="submit"].btn,
button.btn,
a.btn {
  background-color: #ed1c24 !important;
  border-color: #ed1c24 !important;
  outline: none; /* Remove blue outline */
  text-decoration: none; /* Remove underline on link_to buttons */
}

input[type="submit"].btn:hover,
button.btn:hover,
a.btn:hover {
  background-color: #d0161b;
  border-color: #d0161b;
}

input[type="submit"].btn:active,
button.btn:active,
a.btn:active {
  background-color: #c01114; /* Darker color on click */
  border-color: #c01114;
}

input[type="submit"].btn:focus,
button.btn:focus,
a.btn:focus {
  outline: none; /* Remove blue outline */
  box-shadow: none; /* Remove shadow or blue glow */
  background-color: #ed1c24 !important;
  border-color: #ed1c24 !important;
}

input[type="submit"].btn-outline-danger,
button.btn-outline-danger,
a.btn-outline-danger { /* For .btn-outline-danger buttons, submit tags, and link_to buttons */
  color: #ed1c24;
  background-color: white !important;
  border-color: #ed1c24;
  outline: none;
}

input[type="submit"].btn-outline-danger:hover,
button.btn-outline-danger:hover,
a.btn-outline-danger:hover {
  color: #ffffff;
  background-color: #ed1c24 !important;
  border-color: #ed1c24;
}

input[type="submit"].btn-outline-danger:active,
button.btn-outline-danger:active,
a.btn-outline-danger:active {
  color: #ffffff;
  background-color: #d0161b;
  border-color: #d0161b;
}

input[type="submit"].btn-outline-danger:focus,
button.btn-outline-danger:focus,
a.btn-outline-danger:focus {
  outline: none;
  box-shadow: none;
}

.small-arrow {
  font-size: 0.95em; /* Adjust the size as needed */
  margin-left: 0;
}

.back-button {
  margin-bottom: .75rem;
}

.apply-btn:disabled {
  opacity: 0.65 !important;
  pointer-events: none !important;
  color: #6c757d !important;
  background-color: #e9ecef !important;
  border-color: #ced4da !important;
}

.apply-btn.needs-change {
  text-decoration: line-through;
  font-style: italic;
  font-size: small;
}
/* #endregion */


/*-----------------------------------------*/
/***** Form styling *****/
/*-----------------------------------------*/
/* #region */
.form-control {
  width: 150px;
  font-size: 1rem;
  line-height: 1.5;
}

/* Style the switch track */
.form-check-input {
  appearance: none;
  width: 60px;
  height: 20px;
  background-color: #fff; /* Default background */
  border: 1px solid ; /* Default border color */
  border-color: #ced4da;
  border-radius: 12px; /* Rounded switch */
  position: relative;
  cursor: pointer;
  transition: background-color 0.3s, border-color 0.3s;
}

/* Checked state for the track */
.form-check-input:checked {
  background-color: #ed1c24; /* Red for "on" state */
  border-color: #ed1c24;
}

/* Focused state (optional) */
.form-check-input:focus {
  border: 2px solid #c01114;
  box-shadow: 0 0 0 0.05rem rgba(237, 28, 36, 0.5);
}

.date-nav-form .form-control {
  /* Match button font-size and padding at each breakpoint */
  font-size: inherit;
  /* Will inherit from parent or use responsive defaults */
  padding: 0.375rem 0.75rem;
  /* Bootstrap default button padding */
  height: auto;
  /* Let height be calculated from font-size and padding */
  line-height: 1.5;
}

.date-nav-btn {
  /* Ensure arrow buttons use same sizing as regular buttons */
  padding: 0.375rem 0.75rem;
}
/* #endregion */


/*-----------------------------------------*/
/***** Select2, dropdown type-to-search styling *****/
/*-----------------------------------------*/
/* #region */
.select2-container--default .select2-selection--single {
  background-color: #fff;
  border: 1px solid #ced4da;
  border-radius: 0.25rem;
  height: calc(1.5em + 0.75rem + 2px);
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
  padding-left: 0.75rem;
  line-height: 1.5;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
  height: calc(1.5em + 0.75rem + 2px);
  top: 0.25rem;
  right: 0.5rem;
}

.select2-container .select2-selection--single {
  display: flex;
  align-items: center;
  border-radius: 0.25rem;
}
/* #endregion */


/*-----------------------------------------*/
/***** Alert Styling *****/
/*-----------------------------------------*/
/* #region */
.alerts-container {
  position: fixed; /* Fix to the viewport */
  top: 125px; /* Adjust based on the height of your navbar/header */
  left: 0;
  width: 100%; /* Full width */
  z-index: 1050; /* Ensure it appears above other content */
  pointer-events: none; /* Prevent clicks from affecting layout */
  padding: 0 15px; /* Optional: Add horizontal padding */
}

.alerts-container .alert {
  pointer-events: auto; /* Enable interaction with alerts */
  margin: 0 auto; /* Center the alerts horizontally */
  max-width: 600px; /* Limit the alert width */
  text-align: center; /* Center the text */
}

/* Adjust the font size of the badge if necessary */
.badge {
  font-size: 0.75rem;
}

/* Optional: Ensure the badge doesn't overflow on smaller screens */
.btn .badge {
  white-space: nowrap;
  background-color: #9ca8b3;
  color: white; /* Ensures text is readable */
  font-size: 0.75rem; /* Adjust font size for better fit */
  border-radius: 5px; /* Slight rounding for a modern look */
  white-space: nowrap; /* Prevents badge text from wrapping */
  position: absolute;
  top: 0;
  transform: translate(-50%, -50%);
}

/* #endregion */


/*-----------------------------------------*/
/***** Sort styling *****/
/*-----------------------------------------*/
/* #region */
.sort-icon {
  font-size: 0.75rem;
  margin-left: 0.5rem;
  display: inline-block;
  vertical-align: middle;
}

.sort-asc::before {
  content: "\2191"; /* Unicode for up arrow */
}

.sort-desc::before {
  content: "\2193"; /* Unicode for down arrow */
}
/* #endregion */


/*-----------------------------------------*/
/***** Table styling *****/
/*-----------------------------------------*/
/* #region */
/* Appointments page layout */
.appointments-page {
  flex: 1;
  min-height: 0; /* Critical for scroll containment */
  display: flex; 
  flex-direction: column;
  gap: .5rem;
}

.students-page {
  flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.students-table {
  flex: 1;
  min-height: 0;
  overflow: auto;
  border: 1px solid #dee2e6;
  display: flex;
  flex-direction: column;
}

/* Frame containment */
#appointments-frame {
  flex: 1;
  min-height: 0; /* Critical for scroll */
  display: flex;
  flex-direction: column;
}

/* Table container */
.appointments-table {
  flex: 1;
  min-height: 0; /* Enables proper scrolling */
  overflow: auto;
  border: 1px solid #dee2e6;
  display: flex;
  flex-direction: column;
}

.table-wrapper {
  flex: 1;
  overflow: auto;
}

.table-fixed {
  table-layout: fixed;
  width: 100%;
}
/* Fixed header */
.table-fixed thead th {
  position: sticky;
  top: 0;
  background-color: #f8f9fa;
  z-index: 1;
  white-space: nowrap;
}

.filter-section {
  margin-bottom: .5rem;
  margin-top: .5rem;
}

#filterMenu {
  margin-top: .5rem;
}
/* #endregion */


/*-----------------------------------------*/
/***** Accordion styling *****/
/*-----------------------------------------*/
/* #region */
.accordion-header button {
  font-weight: bold;
  background-color: #f8f9fa;
  color: #000;
}

.accordion-header button.collapsed {
  color: #6c757d;
}

.accordion-header button:hover,
.accordion-header button.collapsed:hover,
.accordion-button:hover {
  color: #fff; /* Ensure white text on hover */
}

.accordion-body {
  background-color: #ffffff;
  padding: 1rem;
}

/* Default state of accordion button */
.accordion-button {
  color: #000; /* Text color */
  transition: background-color 0.3s, border-color 0.3s, color 0.3s;
}

/* Active state of accordion button */
.accordion-button:not(.collapsed) {
  background-color: #ed1c24;
  color: #fff;
}

/* Hover on active state */
.accordion-button:not(.collapsed):hover {
  background-color: #ed1c24; /* Slightly darker red on hover */
  color: #fff; /* Maintain white text */
}

/* Focused state of accordion button */
.accordion-button:focus {
  box-shadow: 0 0 0 0.2rem rgba(237, 28, 36, 0.25);
    /* Subtle red glow matching your brand color */
    outline: none;
}

/* Optional: Hover state for better feedback */
.accordion-button:hover {
  background-color: #ed1c24; /* Slightly darker red */
  color: #fff; /* Maintain white text */
}

.accordion-button::after {
  background-image: none !important;
  background: none;
  /* Remove Bootstrap's default arrow */
  font-family: 'Font Awesome 5 Free';
  font-weight: 900;
  content: '\f078';
  /* fa-chevron-down */
  transform: rotate(0deg);
  transition: transform 0.2s ease-in-out;
}

.accordion-button:not(.collapsed)::after {
  transform: rotate(-180deg);
  /* Rotate to point up when expanded */
}
/* #endregion */


/*-----------------------------------------*/
/***** Progress Bar styling *****/
/*-----------------------------------------*/
/* #region */
.progress {
  height: 23px;
  border-radius: 10px;
}

.progress-bar {
  white-space: nowrap; /* Prevent text from wrapping */
  overflow: hidden; /* Hide any overflow */
  text-overflow: ellipsis; /* Add ellipsis when text overflows */
  display: flex; /* Use flexbox for centering */
  align-items: center; /* Center text vertically */
  justify-content: center; /* Center text horizontally */
  position: relative; /* Ensure proper alignment within the bar */
  padding: 0 4px; /* Add horizontal padding around the text */
  padding-bottom: 2px;
  height: 100%;
}

.progress-bar.bg-success {
  background-color: #ed1c24 !important; /* Red for Complete */
}

.progress-bar.bg-danger {
  background-color: hsla(208, 7%, 46%, 0.6) !important; /* Dark gray for Incomplete */
}

.progress-bar[data-bs-toggle="tooltip"]::after {
  content: attr(title); /* Add tooltip content */
  visibility: hidden; /* Hide the tooltip content by default */
}

.progress-bar:hover[data-bs-toggle="tooltip"]::after {
  visibility: visible; /* Show tooltip content on hover */
}

.progress-bar span {
  display: inline-block; /* Ensure text is treated as a single block */
  max-width: 100%; /* Restrict width to fit within the progress bar */
  overflow: hidden; /* Hide text overflow */
  text-overflow: ellipsis; /* Display ellipsis */
  white-space: nowrap; /* Prevent wrapping */
}
/* #endregion */


/*-----------------------------------------*/
/***** Generic styling *****/
/*-----------------------------------------*/
/* #region */
.bold {
  font-weight: bold;
}

.centered-content {
  display: flex;
  justify-content: center;
}
/* #endregion */


/*-----------------------------------------*/
/***** Specific styling *****/
/*-----------------------------------------*/
/* #region */
.apply-btn, .today-btn { /* Appointment Index buttons */
  width: auto;
}
/* #endregion */


/*-----------------------------------------*/
/***** Responsive Styling *****/
/*-----------------------------------------*/
/* #region */
/* Small screens (phones) */
@media (max-width: 767.99px) {
  body {
    font-size: 0.85rem;
  }

  .main-content {
    padding: .75rem;
  }

  h1 {
    font-size: 1.25rem;
  }

  h2 {
    font-size: 1rem;
  }

  .btn {
    font-size: 0.85rem;
    padding: 5px 10px;
    width: auto; /* Allows the buttons to fit side-by-side */
  }

  .btn:not(.fa-arrow-left):not(.md-btn):not(.date-nav-btn) {
    width: 100px;
  }

  .table {
    font-size: 0.85rem;
    margin-bottom: .5rem;
  }

  .table td, .table th {  /* Define a max-width for each cell */
    width: 100%;
    overflow: hidden;
  }

  .small-screen-form {
    gap: 5px; /* Controls space between elements */
    justify-content: flex-start;
  }

  .button-container .d-grid {
    display: flex !important;
    justify-content: flex-end !important;
  }

  .footer {
    background-color: #f8f9fa; 
    width: 100%;
    height: 30px;
    max-height: 30px;
    display: flex;
    align-items: center;
    text-align: center;
  }

  .footer-logo {
    max-width: 80px; 
    height: auto;
  }

  .date-nav {
    margin-right: 10px;
  }

  .date-nav-form .form-control {
    font-size: 0.85rem;
    padding: 5px 10px;
  }

  .date-nav-btn {
    font-size: 0.85rem;
    padding: 5px 10px;
  }
}

/* Medium screens (tablets) */
@media (min-width: 768px) and (max-width: 1260.98px) {
  body {
    font-size: 0.85rem;
  }

  h1 {
    font-size: 1.2rem;
  }

  h2 {
    font-size: 1rem;
  }

  .btn {
    font-size: 0.85rem;
  }

  .date-nav-form .form-control {
    font-size: 0.85rem;
    max-width: 160px;
  }

  .date-nav-btn {
    font-size: 0.85rem;
  }

  .table {
    font-size: 0.85rem;
  }

  .footer {
    background-color: #f8f9fa; 
    width: 100%;
    height: 50px;
    max-height: 50px;
    display: flex;
    align-items: center;
    text-align: center;
  }
    
  .footer-logo {
    max-width: 120px; 
    height: auto;
  }
}

/* Large screens (desktops) */
@media (min-width: 1261px) {
  body {
    font-size: 1rem;
  }

  h1 {
    font-size: 1.5rem;
  }

  h2 {
    font-size: 1rem;
  }

  .btn {
    font-size: 1rem;
  }

  .date-nav-form .form-control {
    font-size: 1rem;
  }

  .date-nav-btn {
    font-size: 1rem;
  }

  .table {
    font-size: 1rem;
  }

  .footer {
    background-color: #f8f9fa;
    width: 100%;
    height: 55px;
    max-height: 55px;
    display: flex;
    align-items: center;
    text-align: center;
  }

  .footer-logo {
    max-width: 135px;
    height: auto;
  }
}
/* #endregion */


/*-----------------------------------------*/
/***** Dark Dev Mode styling *****/
/*-----------------------------------------*/
/* #region */
/* General background */
body.development-mode {
  background-color: #3a3a3a; /* Dark gray background */
  color: #9f9d9d; /* Light text color */
}

/* Header */
body.development-mode header {
  background-color: #353535; /* Even darker background for header */
  color: #9f9d9d; /* White text for header */
  border-bottom: 1px solid #444444; /* Subtle border */
}
/* Navbar */
body.development-mode .navbar-light {
  background-color: #353535 !important; /* Dark background for navbar */
  color: #879098 !important; /* Light text color */
  border-bottom: 1px solid #444444; /* Optional subtle border */
}

body.development-mode .navbar-light .navbar-nav .nav-link {
  color: #879098 !important; /* Light blue for links */
}

body.development-mode .navbar-light .navbar-nav .nav-link:hover {
  color: #334556 !important; /* Slightly brighter blue on hover */
}

body.development-mode .navbar-light .navbar-brand {
  color: #ffffff !important; /* White for brand text */
}

body.development-mode .navbar-light .navbar-toggler {
  border-color: #444444 !important; /* Subtle border for toggler */
}

/* Footer */
body.development-mode footer {
  background-color: #353535; /* Dark background for footer */
  color: #9f9d9d; /* White text for footer */
  border-top: 1px solid #444444; /* Subtle border */
}

/* Scrollable Table Container */
body.development-mode .scrollable-table {
  background-color: #292929; /* Dark background for the scrollable container */
  border: 1px solid #444444; /* Border around the scrollable table */
  color: #9f9d9d; /* Light text for the container */
}

/* Table within Scrollable Table */
body.development-mode .scrollable-table table {
  background-color: #292929; /* Match the container's background */
  color: #9f9d9d; /* Light text for the table */
  border-collapse: collapse;
}

/* Table Headings */
body.development-mode .scrollable-table table thead th {
  background-color: #333333; /* Slightly darker background for headers */
  color: #ffffff; /* White text for table headers */
  border-bottom: 1px solid #444444; /* Border below the headers */
  text-align: left;
  padding: 8px;
}

/* Table Rows */
body.development-mode .scrollable-table table tbody tr {
  background-color: #292929; /* Default row background */
}

body.development-mode .scrollable-table table tbody tr:nth-child(even) {
  background-color: #1f1f1f; /* Alternate row background */
}

body.development-mode .scrollable-table table tbody tr:hover {
  background-color: #444444; /* Highlight row on hover */
  color: #ffffff; /* White text on hover */
}

/* Table Cells */
body.development-mode .scrollable-table table th,
body.development-mode .scrollable-table table td {
  border: 1px solid #444444; /* Borders for table cells */
  padding: 8px; /* Padding for readability */
}

/* Links within Table */
body.development-mode .scrollable-table a {
  color: #879098; /* Light blue links */
}

body.development-mode .scrollable-table a:hover {
  color: #334556; /* Slightly brighter blue on hover */
}

/* Scrollbar Styling */
body.development-mode .scrollable-table::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

body.development-mode .scrollable-table::-webkit-scrollbar-thumb {
  background-color: #444444; /* Darker scrollbar thumb */
  border-radius: 4px;
}

body.development-mode .scrollable-table::-webkit-scrollbar-track {
  background-color: #292929; /* Match scrollbar track to the container */
}
/* Links */
body.development-mode a {
  color: #879098; /* Light blue links */
}

body.development-mode a:hover {
  color: #334556; /* Slightly brighter blue on hover */
}
/* #endregion */
/*
 * This is a manifest file that'll be compiled into application.css, which will include all the files
 * listed below.
 *
 * Any CSS (and SCSS, if configured) file within this directory, lib/assets/stylesheets, or any plugin's
 * vendor/assets/stylesheets directory can be referenced here using a relative path.
 *
 * You're free to add application-wide styles to this file and they'll appear at the bottom of the
 * compiled file so the styles you add here take precedence over styles defined in any other CSS
 * files in this directory. Styles in this file should be added after the last require_* statement.
 * It is generally better to create a new file per style scope.
 *



 */
