/* Adding missing classes resulting from bootstrap 5 update from bootstrap 3/4 */

/* replaces the sr-only class in table headers */
.visually-hidden {
    clip: rect(0,0,0,0);
    border: 0;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px
}

/* replaces the pull-left and pull-right class in table toolbars */
.float-start {
    float: left !important;
}

.float-end {
    float: right !important;
}


/* ensures correct theme on mobile profile menu */
@media (max-width: 767px) {

     .navbar-nav .dropdown-menu-end {
        background-color:transparent;
        border: 0;
        box-shadow: none;
        float: none;
        margin-top: 0;
        position: static;
        width: auto
    }

}

/* modal dialog has new class */
.fade.show {
    opacity: 1;
}

/* to correct positioning */
.modal-content{
   margin-top: 300px
}

/* bootstrap 5 uses flex for lookup controls to display properly */
.input-group {
    display: flex !important;
    align-items: stretch;
}

/* Make active tab visually distinct */
.nav-tabs .nav-link.active {
  color: #000; /* or keep your theme color */
  background-color: #fff; /* or a light gray for contrast */
  border-color: #dee2e6 #dee2e6 #fff; /* matches Bootstrap default */
  font-weight: 600; /* optional for emphasis */
}

/* Optional: stronger indicator */
.nav-tabs .nav-link.active {
  border-bottom: 3px solid #0d6efd; /* Bootstrap primary color */
}

/* In silly position of having to override previous override for date pickers and search controls */
.input-append.input-group.datetimepicker {
    display: table !important;
}

.input-group.float-start.view-search.entitylist-search {
    display: table !important;
}


/* Hide 3 unwanted lookup views inside the ctt_regardingid lookup modal */
#ctt_regardingid_lookupmodal .view-select .dropdown-menu a[aria-label="Case Lookup View"],
#ctt_regardingid_lookupmodal .view-select .dropdown-menu a[aria-label="Event lookup view"],
#ctt_regardingid_lookupmodal .view-select .dropdown-menu a[aria-label="Low Carbon Communities Lookup View"] {
  display: none !important;
}

/* (Optional) If your browser supports :has(), also hide the parent <li> to remove empty spacing */
#ctt_regardingid_lookupmodal .view-select .dropdown-menu li:has(> a[aria-label="Case Lookup View"]),
#ctt_regardingid_lookupmodal .view-select .dropdown-menu li:has(> a[aria-label="Event lookup view"]),
#ctt_regardingid_lookupmodal .view-select .dropdown-menu li:has(> a[aria-label="Low Carbon Communities Lookup View"]) {
  display: none !important;
}


/* 
  Power Pages calendar toolbar workaround
  Adds labels only when the backend fails to inject text.
  Automatically disables itself when Microsoft fixes the issue.
*/

/* Today button */
#NavigateToToday:empty::after {
  content: "Today";
}

/* View toggle buttons */
#YearViewToggleButton:empty::after {
  content: "Year";
}

#MonthViewToggleButton:empty::after {
  content: "Month";
}

#WeekViewToggleButton:empty::after {
  content: "Week";
}

/* 
  Power Pages calendar icon workaround
  Font Awesome calendar icon is coloured white, needs to be re-coloured to be visible
  Probably not the best colour scheme but will do for now!
*/
span.fa-calendar-days {
  background-color: #e9ecef;
  color: #343a40;
  padding: 4px 6px;
  border-radius: 4px;
}

span.label.label-default.event-info {
    background-color: #777;
}

/* Style the close button for error messages */
input#btnCloseMessage {
    position: relative;
    width: auto;
    height: auto;
    background: transparent;
    border: none;
    margin: 0;
    font-size: 22px;
    font-weight: 400;
    line-height: 1;
    color: #000;       /* adjust for dark/light themes */
    cursor: pointer;
    opacity: 0.8; /* ensure it stays clickable */
}

/* Improve visibility on hover/focus */
input#btnCloseMessage:hover,
input#btnCloseMessage:focus {
    opacity: 1;
}