/* MAIN STYLESHEET */

:root {
  --disabled-bg-color: #eee;
  --disabled-border-color: #e9e8e8;
  --nav-bg-color: #f2f2f2;
  --modal-bg-color: #f2f2f2;
  --bg-color: #fff;
  --font-color: black;
  --breadcrumb-bg-color-rgba: 248, 249, 250;
  --bs-text-opacity: 1;
  --bs-input-font-color: #545454;
  --bs-scrollbar-color: #d3d3d3;
  --bs-success-alert-bg: #ecf4ec;
  --bs-error-font-color: #842029;
  --bs-error-alert-color: #842029;
  --bs-error-alert-bg: #f8d7da;
  --bs-error-alert-border-color: #842029;
  --bs-error-single-text: #d2042d;
  --bs-dropdown-input-border-color: #98a298;
  --bs-sidebar-heading-color: #545454;
  --bs-svg-color: black;
  --bs-breadcrumb-text-color: #545454;
  --bs-footer-a-text-color: #47773e;
  --bs-section-background-color: #f1f1f1;
  --bs-gradient: linear-gradient(180deg, rgba(0, 0, 0, 0.03), rgba(0, 0, 0, 0));
  --bs-placeholder-text: #545454;
  --gradient-color-top: #d4af37;
  --gradient-color-middle: #ffd700;
  --gradient-color-bottom: #ddd692;
  --tile-shadow: #686868;
  --custom-switch-background: #545454;
  --light-bulb-off: #ff2200;
  --light-bulb-unknown: rgba(97, 91, 91);
  --overlay-color: rgba(222, 218, 214, 0.5);
  --email-thread-meta-border: #545454;
  --task-unread-email-border-color: #4dabf7;
  --error-modal-bg: var(--bs-body-bg);
  --error-modal-text: var(--bs-body-color);
  --error-modal-border: #495057;
  --error-modal-header-bg: rgba(0, 0, 0, 0.04);
  --error-description-bg: rgba(220, 53, 69, 0.08);
  --error-description-border: #dc3545;
  --error-description-text: #842029;
  --error-modal-shadow: 0 14px 40px rgba(0, 0, 0, 0.32);
  --unread-email-alert-bg: #dc3545;
  --notification-high-border: rgba(220, 53, 69, 0.55);
  --notification-high-background: rgba(220, 53, 69, 0.12);
  --notification-high-text: #b02a37;

  #dark-logo {
    display: inline;
  }

  #light-logo {
    display: none;
  }
}


[data-theme="dark"] {
  --disabled-bg-color: #545454;
  --disabled-border-color: #656464;
  --nav-bg-color: #212529;
  --modal-bg-color: #1a1e21;
  --bg-color: #343a40;
  --font-color: white;
  --breadcrumb-bg-color-rgba: 33, 37, 41;
  --bs-text-opacity: 1;
  --bs-input-font-color: white;
  --bs-scrollbar-color: #484848;
  --bs-success-alert-bg: #cedbce;
  --bs-error-font-color: #842029;
  --bs-error-alert-color: white;
  --bs-error-alert-bg: #842029;
  --bs-error-single-text: #ff8488;
  --bs-error-alert-border-color: white;
  --bs-dropdown-input-border-color: #b8e0bb;
  --bs-sidebar-heading-color: #adb5bd;
  --bs-svg-color: #cedbce;
  --bs-breadcrumb-text-color: #cedbce;
  --bs-footer-a-text-color: #5cb24a;
  --bs-section-background-color: #2a2e33;
  --bs-gradient: linear-gradient(180deg,
      rgba(255, 255, 255, 0.11),
      rgba(255, 255, 255, 0));
  --bs-placeholder-text: #adb5bd;
  --gradient-color-top: #ffec3d;
  --gradient-color-middle: #ffff99;
  --gradient-color-bottom: #ffffe0;
  --tile-shadow: white;
  --custom-switch-background: #212529;
  --light-bulb-off: #ff2200;
  --light-bulb-unknown: rgba(147, 141, 141);
  --overlay-color: rgba(33, 37, 41, 0.5);
  --email-thread-meta-border: rgba(147, 141, 141);
  --error-modal-bg: #1f2329;
  --error-modal-text: #f1f3f5;
  --error-modal-border: #d7dde6;
  --error-modal-header-bg: rgba(255, 255, 255, 0.04);
  --error-description-bg: rgba(255, 107, 107, 0.14);
  --error-description-border: #ff8787;
  --error-description-text: #ffd6d6;
  --error-modal-shadow: 0 10px 28px rgba(255, 255, 255, 0.12);
  --unread-email-alert-bg: #dc3545;
  --notification-high-border: rgba(255, 103, 103, 0.55);
  --notification-high-background: rgba(180, 38, 38, 0.28);
  --notification-high-text: #ff9090;

  .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
  }

    /* Base page layout */
    html,
    body {
      height: 100%;
      overflow: hidden;
    }
  
    /* Global headings */
    h1 {
      font-size: small;
      line-height: inherit !important;
      margin-bottom: 0px !important;
      font-weight: 600 !important;
    }
  
    /* Shared button background */
    .btn:not(.btn-sm) {
      background-image: var(--bs-gradient);
    }
  
    /* a:hover {
    text-decoration: none;
  } */
  
    /* select {
    @extend .form-select;
  } */
  
    /* Footer links */
    footer a {
      color: var(--bs-footer-a-text-color) !important;
      text-decoration: none;
      font-weight: bold;
    }
  
    /* Shared fixed-position utility */
    .fixed-top {
      position: fixed;
      top: 0;
      right: 0;
      left: 0;
      z-index: 1030;
    }
  
    /* Main content alignment */
    #contentwhippy {
      text-align: center;
    }
  
    /* Shared dropdown text */
    .dropdown-toggle {
      color: var(--bs-table-th-color);
    }
  
    /* Global footer */
    .footer {
      background-color: var(--nav-bg-color);
      color: var(--nav-bg-color);
      /* margin-top: 10px !important; */
      /* margin-bottom: 0px; */
      position: fixed;
      /*left: 205;*/
      bottom: 0;
      width: 100%;
      /* background-color: red; */
      /* color: white; */
      text-align: center;
      z-index: 1039;
    }
  
    /* Main content spacing */
    #main {
      margin-bottom: 78px;
      margin-top: 18px;
    }
  
    /*#player {*/
    /*  margin-top: 10%;*/
    /*}*/
  
    /* .summary-content {
    margin-bottom: 50px;
  } */
  
    /* Shared card background */
    .card {
      background-color: var(--nav-bg-color);
    }
  
    /* Shared small-screen adjustments */
    @media (max-width: 767px) {
      .show-stats-button {
        display: none;
      }
  
      .company-logo {
        max-height: 18px !important;
      }
  
      .glyphicon-user {
        font-size: 9px;
      }
    }

  /* Focus state — keep the same bg/fg in both themes */
  /* input:focus,
  textarea:focus,
  select:focus,
  .form-control:focus,
  .form-select:focus {
    background-color: var(--modal-bg-color);
    color: var(--bs-input-font-color);
    border-color: var(--bs-dropdown-input-border-color);
    outline: 2px solid var(--bs-dropdown-input-border-color);
    outline-offset: 0;
    box-shadow: none;
  } */

  /* Placeholder */
  input::placeholder,
  textarea::placeholder {
    color: var(--bs-placeholder-text);
    opacity: 1;
  }

  /* Disabled / readonly */
  input[disabled],
  textarea[disabled],
  select[disabled],
  input[readonly],
  textarea[readonly] {
    background-color: var(--disabled-bg-color);
    color: var(--bs-placeholder-text);
    border-color: var(--disabled-border-color);
  }

  /* --- Autofill fixes (Chrome/Safari/Edge) --- */
  /* input:-webkit-autofill,
  input:-webkit-autofill:hover,
  input:-webkit-autofill:focus,
  textarea:-webkit-autofill,
  select:-webkit-autofill {
    -webkit-text-fill-color: var(--bs-input-font-color) !important;
    -webkit-box-shadow: 0 0 0 1000px var(--modal-bg-color) inset !important;
    box-shadow: 0 0 0 1000px var(--modal-bg-color) inset !important;
    transition: background-color 9999s ease-out 0s;
  } */

  /* Firefox autofill */
  input:autofill,
  textarea:autofill,
  select:autofill {
    background-color: var(--modal-bg-color) !important;
    color: var(--bs-input-font-color) !important;
  }

  .alert-warning .btn-close {
    filter: none !important;
  }

  #dark-logo {
    display: none;
  }

  #light-logo {
    display: inline;
  }
}

/* GLOBAL PAGE FOUNDATION — body, content container, icons and placeholders */
body {
  background: var(--bg-color);
  color: var(--font-color);
  overflow-x: hidden;
}

.main-container {
  padding-left: 1.2rem;
  padding-right: 1.2rem;
  min-height: calc(64vh + 200px);
}

.svg-colour {
  fill: var(--bs-svg-color) !important;
}

input::placeholder {
  color: var(--bs-placeholder-text) !important;
}

.bootstrap-select>.dropdown-toggle.bs-placeholder {
  color: var(--bs-placeholder-text) !important;
}

textarea::placeholder {
  color: var(--bs-placeholder-text) !important;
}

/* SHARED ACCORDIONS */
#accordionPanelsStayOpenExample {
  box-shadow: 0 1.5px 4px var(--bs-table-shadow1-color),
    0 1.5px 6px var(--bs-table-shadow2-color), 0 0 6px rgba(184, 224, 187, 0.5);
  border-radius: 8px;
}

.accordion-body {
  padding-left: 6px !important;
  padding-bottom: 2px !important;
}

/* SHARED SUMMARY AND TAB SPACING */
.summary-div {
  margin-top: 10px;
}

#summary_content .edit_button-div {
  margin-top: 20px !important;
  margin-bottom: 4px !important;
}

/* USAGE PANELS — feature-specific containers */
#total-usage-container,
#meter-usage-container,
#sub-meter-container {
  box-shadow: 0 1.5px 4px var(--bs-table-shadow1-color),
    0 1.5px 6px var(--bs-table-shadow2-color), 0 0 6px rgba(184, 224, 187, 0.5) !important;
  border-radius: 5px;
}

/* SHARED LAYOUT HELPERS AND DETAIL-PAGE EXCEPTIONS */
.flex-div {
  display: flex;
  clear: both;
}

.relative-div {
  position: relative;
}

.edit_button-div {
  margin-top: 22px;
  text-align: right;
}

.site-details-div {
  margin-top: -166px !important;
}

.detail-div-3 input {
  width: 100% !important;
}

.detail-div-3 input[type="radio"] {
  width: auto !important;
}

#portfolio-list-div {
  min-width: 75%;
  max-width: 75%;
}

#company-map-div {
  min-width: 25%;
  max-width: 25%;
}

.company-logo {
  max-height: 26px;
  margin-bottom: 4px;
}

/* SHARED LIGHT BUTTONS */
.btn-light {
  background-color: transparent !important;
  border: 0.25px solid var(--bs-dropdown-input-border-color) !important;
  line-height: 1.5rem !important;
  width: 100%;
  border-radius: 0.25rem;
  color: var(--bs-input-font-color) !important;
  background-color: transparent !important;
}

/* SHARED STATUS INDICATORS */
.lightbulb-on,
.lightbulb-off,
.lightbulb-unknown {
  max-width: 12px !important;
  margin-bottom: 2px;
  padding-right: 2px;
  margin-left: -2px;
}

.indicator-wrapper {
  margin-right: 0px !important;
}

.lightbulb-on {
  fill: url(#gradientOn);
}

.lightbulb-off {
  fill: var(--light-bulb-off);
  opacity: 40%;
}

.lightbulb-unknown {
  fill: var(--light-bulb-unknown);
  opacity: 20%;
}

/* FILTERS — hover states, contract dates and wide-screen spacing */

@media (max-width: 988px) {

  .detail-div-2 {
    width: 100% !important;
    min-width: 100% !important;
  }


}

/* GLOBAL LINKS — base states */
a,
a:hover,
a:focus,
a:active {
  text-decoration: none;
  color: inherit;
}

a:hover {
  text-decoration: underline;
}

a.btn:hover {
  text-decoration: none;
}

/* SHARED DETAIL COLUMN WIDTHS */
.detail-div-1 {
  min-width: 100%;
  max-width: 100%;
}

.detail-div-2 {
  min-width: 50%;
  max-width: 50%;
}

.detail-div-3 {
  min-width: 33%;
  max-width: 33%;
}

.detail-div-3_2 {
  min-width: 66%;
  max-width: 66%;
}

.detail-div-4 {
  min-width: 24.6%;
  max-width: 24.6%;
}

.detail-div-5 {
  min-width: 19.6%;
  max-width: 19.6%;
}

.detail-div-5_4 {
  min-width: 100%;
  max-width: 100%;
}

.detail-div-7 {
  min-width: 13.9%;
  max-width: 13.9%;
  /*height: 0%;*/
  /*padding-bottom: 20%;*/
}

.fit-content {
  max-width: fit-content !important;
}

/* SHARED NAVIGATION AND DROPDOWN BASE STYLES */

.dropdown-toggle:hover {
  --bs-btn-hover-bg: none !important;
  --bs-btn-hover-border-color: none !important;
  --bs-btn-hover-color: none !important;
}

.bootstrap-select .no-results {
  background: transparent !important;
}

.dropdown-menu {
  background-color: var(--bg-color);
  max-width: fit-content;
  min-width: fit-content !important;
  height: fit-content !important;
  max-height: 300px;
  font-size: var(--bs-table-font-size);
  --bs-dropdown-color: none !important;
  --bs-dropdown-link-hover-bg: var(--bs-scrollbar-color);
  box-shadow: 0 1.5px 4px var(--bs-dropdown-shadow1-color),
    0 1.5px 6px var(--bs-dropdown-shadow2-color);
}

.dropdown-item:not(.active) {
  color: var(--bs-input-font-color);
  --bs-dropdown-link-active-bg: var(--bs-table-th-bg-color);
  --bs-dropdown-link-active-color: black;
  border-radius: 5px;
}

.dropdown-item.active {
  --bs-dropdown-link-active-bg: var(--bs-table-th-bg-color);
  --bs-dropdown-link-active-color: black;
  border-radius: 5px;
}

.dropdown-item.active:hover {
  color: black !important;
}

/* SHARED DISABLED AND READ-ONLY FIELD STYLES */
.disabled-field {
  pointer-events: none;
}

.disabled-field input,
.disabled-field button {
  border: 0px;
  disabled: True;
  background: transparent !important;
  background-image: none !important;
}

.disabled-field select {
  border: 0px;
  -webkit-appearance: none;
  -moz-appearance: none;
}

.disabled-field .bootstrap-select .dropdown-toggle {
  pointer-events: none;
}

.disabled-field .filter-option-inner-inner {
  user-select: text;
  -webkit-user-select: text;
}

.disabled-field .bootstrap-select .dropdown-toggle .filter-option-inner-inner {
  pointer-events: none;
  user-select: text;
  -webkit-user-select: text;
}

.disabled-field input,
.disabled-field textarea {
  border: 0 !important;
  background: transparent !important;
  background-image: none !important;
  /*user-select: text;*/
  /*-webkit-user-select: text;*/
  /*pointer-events: auto;*/
}

.disabled-field .btn-light {
  border: 0px !important;
  -webkit-appearance: none;
  -moz-appearance: none;
}

.disabled-field .btn-light::after {
  display: none;
  -webkit-appearance: none;
  -moz-appearance: none;
}

.disabled-field-no-change {
  pointer-events: none;
}

.disabled-field-no-change input {
  border: 0px;
  disabled: True;
}

input,
select,
.form-control input,
.form-control select {
  border: 0.25px solid var(--bs-dropdown-input-border-color);
  line-height: 1.5rem;
  border-radius: 0.25rem;
  color: var(--bs-input-font-color);
  background-image: var(--bs-gradient);
  background: var(--bs-gradient);
}

input[type="text"] {
  padding-left: 4px;
}

#building-detail-main input {
  width: 100% !important;
}

#existing-contacts-detail-main input {
  width: 100% !important;
}

#future-contacts-detail-main input {
  width: 100% !important;
}

#additional_emails input {
  width: 100% !important;
}

input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  appearance: none;
}

input[type="number"] {
  -moz-appearance: textfield;
  /* Firefox */
}

.form-control::placeholder {
  color: var(--bs-placeholder-text);
  opacity: 80%;
}

/* SHARED ICONS, CHECKBOXES AND CONTROL UTILITIES */
.icon-svg {
  width: 16px;
  height: 16px;
}

input[type="checkbox"] {
  width: auto !important;
  text-align: left;
}

.btn:disabled {
  background-color: transparent;
  color: var(--bs-input-font-color);
  opacity: 1;
}

.critical_checkbox input {
  width: 0.1px;
  height: 0.1px;
  opacity: 0;
  overflow: hidden;
  position: absolute;
  z-index: -1;
}

.hidden {
  display: none;
}

.bootstrap-select:not([class*="col-"]):not([class*="form-control"]):not(.input-group-btn) {
  width: 200px;
  min-width: 200px;
  max-width: max-content !important;
}

.billing-input input[type="text"]:not([class*="col-"]):not([class*="form-control"]):not(.input-group-btn) {
  width: 100% !important;
}

.bootstrap-select>.dropdown-toggle.bs-placeholder:active,
.bootstrap-select>.dropdown-toggle.bs-placeholder:focus,
.bootstrap-select>.dropdown-toggle.bs-placeholder:hover {
  color: var(--bs-placeholder-text);
}

/* SHARED TOOLTIPS, POPOVERS AND LOADING STATE */
abbr:hover:after {
  content: attr(data);
  position: absolute;
  background: #fff;
  color: #545454;
  border: 2px solid #545454;
  padding: 5px 5px;
  font-size: var(--bs-table-font-size);
  text-align: left;
  margin: -35px 0 0 0;
  max-width: 250px;
  max-height: 150px;
  overflow: hidden;
  overflow-y: scroll;
  white-space: normal;
}

.popover {
  max-height: 300px;
  overflow: hidden;
  overflow-y: scroll;
  position: fixed;
  cursor: pointer;
}

.loading {
  margin-top: 10em;
  text-align: center;
  color: gray;
}

/* GLOBAL SCROLLBARS */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

/* Track */
::-webkit-scrollbar-track {
  box-shadow: inset 0 0 2px grey;
  background: var(--nav-bg-color);
}

/* Handle */
::-webkit-scrollbar-thumb {
  background: var(--bs-scrollbar-color);
  border-radius: 10px;
}

/* SHARED VALIDATION — Django error lists */
.errorlist {
  color: var(--bs-error-font-color);
  margin-left: -30px !important;
  list-style-type: none;
}

.errorlist li {
  position: relative;
  padding-top: 2px;
  padding-bottom: 2px;
  padding-left: 6px;
  padding-right: 6px;
  text-align: center;
  margin-top: 13px;
  border: 1px solid var(--bs-error-alert-border-color);
  border-radius: 5px;
  color: var(--bs-error-alert-color);
  background-color: var(--bs-error-alert-bg);
  max-width: max-content;
}

.errorlist li::after {
  content: "";
  position: absolute;
  top: -12px;
  left: 8px;
  width: 0;
  height: 0;
  border: 7px solid transparent;
  border-bottom-color: var(--bs-error-alert-border-color);
  border-top-width: 0;
  margin-left: -7px;
}

.errorlist ul {
  margin-bottom: 0px !important;
}

/* SHARED SELECT TEXT AND FEATURE-SPECIFIC FIELD WIDTHS */
.filter-option-inner-inner {
  font-size: var(--bs-table-font-size);
  line-height: 1rem;
  width: 100% !important;
}

.dropdown-menu {
  z-index: 10000;
}

#billing_company input {
  width: 50% !important;
}

.dynamic-energy-rating-formset .bootstrap-select:not([class*="col-"]):not([class*="form-control"]):not(.input-group-btn) {
  min-width: 140px !important;
}

/* SHARED ALERTS, BUTTON SIZING AND ERROR STATES */
.alert {
  display: flex;
  text-align: left;
  font-size: 13px;
  justify-content: center !important;
  align-items: center !important;
  padding: 6px;
}

.alert-dismissible .btn-close {
  font-size: 13px;
  padding: 0.6rem !important;
  margin-bottom: 4px;
}

.alert-success .btn-close {
  filter: none !important;
}

.alert .bi {
  margin-bottom: 2px;
}

.btn {
  background-image: var(--bs-gradient);
}

input {
  background-image: var(--bs-gradient);
}

.btn:not(.btn-sm) {
  background-image: var(--bs-gradient);
}

.alert-danger,
.alert-error {
  --bs-alert-color: var(--bs-error-alert-color);
  --bs-alert-bg: var(--bs-error-alert-bg);
  --bs-alert-border-color: var(--bs-error-alert-border-color);
  padding: 6px;
}

.error-tab {
  background-color: var(--bs-error-alert-bg) !important;
  color: var(--bs-error-alert-color) !important;
}

.alert-success {
  /*background: #ecf4ec;*/
  --bs-alert-bg: var(--bs-success-alert-bg);
  font-size: var(--bs-table-font-size);
  padding: 6px;
}

/* SHARED SIZING AND MAP LOGO EXCEPTIONS */
.standard-div {
  min-height: 450px;
}

#map-logo-container-div {
  padding: 0px;
}

#map-logo-container-div img {
  max-height: 107px;
  max-width: 80%;
}

/* SHARED DROPDOWN ALIGNMENT AND DETAIL ICONS */
.dropdown-menu[data-bs-popper] {
  left: auto !important;
}

.info-detail-svg {
  fill: #545454;
  height: 18px;
  width: 18px;
  margin-top: 0;
}

.detail-svg {
  fill: var(--navigation-card-font-color);
}

/* SHARED COLLAPSIBLE HEADINGS AND MODALS */
.collapsible-header {
  background-color: var(--navigation-card-hover-color);
  /*var(--bs-table-th-bg-color);*/
  color: var(--bs-table-th-color) !important;
  font-size: 15px;
  font-weight: bold;
  text-align: left;
  padding: 0.5em 0.5em;
}

.description-modal {
  height: 666px !important;
  overflow-y: scroll !important;
}

.description-title {
  padding-left: 14px;
}

.description-dialog {
  max-width: 1000px !important;
}

.modal-content {
  background-color: var(--nav-bg-color);
  color: var(--font-color);
  border: 1px solid #a4aea6;
  border-radius: 10px;
  box-shadow:
    0 24px 64px rgba(0, 0, 0, 0.35),
    0 8px 20px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .modal-content {
  border-color: #65746a;
  box-shadow:
    0 24px 64px rgba(0, 0, 0, 0.6),
    0 8px 20px rgba(0, 0, 0, 0.35);
}

.modal-content :where(.modal-title,
  .modal-body,
  .modal-footer,
  p,
  label,
  small,
  li) {
  color: inherit;
}

.modal-title {
  color: var(--bs-table-th-color);
}

.modal-header {
  border-bottom: var(--bs-modal-header-border-width) solid var(--bs-dropdown-input-border-color);
}

/* SHARED ALIGNMENT AND INPUT UNIT LABELS */
.float-right {
  float: right;
}

.glyphicon-exclamation-sign {
  color: red;
}

.input-text {
  display: inline-block;
}

.input-kwh:after {
  content: "kWh";
}

.input-kwh-water:after {
  content: "m3";
}

.input-pound:after {
  content: "£";
}

.input-percent:after {
  content: "%";
}

/* SHARED OVERLAY AND CONSUMPTION/INVOICE EXCEPTIONS */
.overlay {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  /*left: 0;*/
  /*right: 0;*/
  /*bottom: 0;*/
  background-color: var(--overlay-color);
  z-index: 2;
  cursor: pointer;
}

.highcharts-loading-inner {
  color: var(--bs-scrollbar-color);
}

.actions-btn {
  font-size: x-small !important;
}

.invoice-modal {
  min-width: 90%;
  max-width: 90%;
}

.modal-title {
  color: var(--navigation-font-color);
}

.datepicker {
  /* width: 200px !important; */
  font-size: x-small !important;
}

/* input[class='datepicker'],
input[class='timepicker'] {
    width: 160px;
} */

input[type="submit"],
input[type="button"] {
  background-color: var(--bs-btn-bg) !important;
}

/* SHARED LIST AND FLEX HELPERS */
.list-group-item {
  background-color: transparent;
  color: var(--bs-input-font-color);
}

.flex-container {
  display: flex;
  flex-wrap: wrap;
}

/* SHARED STATUS, SELECTS, DATE FIELDS AND LAYOUT HELPERS */
.flagged_alert {
  color: red;
}

.form-select {
  background-image: var(--bs-gradient);
  background: var(--bs-gradient);
  border: 1px solid var(--bs-dropdown-input-border-color) !important;
  color: var(--bs-input-font-color) !important;
}

.client-logo svg {
  height: 35px !important;
  width: auto !important;
  margin-left: 4px;
  padding-right: 22px;
}

#month-covered:hover,
#month-partial:hover {
  background-color: rgb(109, 158, 99);
}

.critical {
  color: red;
}

.datepicker {
  padding: 1px 2px;
  padding-left: 0.25rem;
  /*font-size: var(--bs-table-font-size);*/
}

.font_size_10 {
  font-size: 10px !important;
}

.div-break {
  border-top-color: #538a47;
  border-top-style: solid;
  border-top-width: 7px;
}

.heading-overflow {
  max-width: 80px !important;
  white-space: normal !important;
  word-wrap: break-word !important;
}

.heading-container {
  display: flex;
  width: 100%;
  justify-content: flex-start;
}

.flex-grid {
  display: flex;
  flex-wrap: wrap;
}

.flex-grid .tl,
.flex-grid .formfields {
  width: 100%;
  padding: 8px;
}

.checkbox-center {
  text-align: center;
}

/* PAGE-SPECIFIC LOA AND COMMENT LAYOUT */
.loa-container {
  display: flex;
  gap: 2px;
}

#comment-section textarea {
  height: 50px;
  padding: 8px;
}

/* SHARED FORM ACTIONS AND FILTER CONTAINERS */
#close_modal {
  font-size: small !important;
  padding: 4px 8px;
  margin: 0px !important;
}

.form_cancel {
  float: none !important;
}

.form_submit {
  margin-top: 12px;
}

.cot_buttons {
  text-align: right;
}

/* SHARED VALIDATION — inline field errors */
label.errors {
  display: flex;
}

label.errors:not(:empty):not(:has(ul.errorlist)) {
  color: var(--bs-error-alert-color);
  position: relative;
  padding: 2px 6px;
  text-align: center;
  margin-top: 13px;
  border: 1px solid var(--bs-error-alert-border-color);
  border-radius: 5px;
  background-color: var(--bs-error-alert-bg);
  max-width: max-content;
}

label.errors:not(:empty):not(:has(ul.errorlist))::after {
  content: "";
  position: absolute;
  top: -12px;
  left: 8px;
  width: 0;
  height: 0;
  border: 7px solid transparent;
  border-bottom-color: var(--bs-error-alert-border-color);
  border-top-width: 0;
  margin-left: -7px;
}

label.errors:has(ul.errorlist) {
  padding: 0 !important;
  margin-top: 0 !important;
  border: 0 !important;
  background: transparent !important;
  max-width: none !important;
}

label.errors:has(ul.errorlist)::after {
  content: none !important;
}

label.errors ul.errorlist {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* SHARED DETAIL LABELS AND COMPACT FILTERS */
.details-label {
  font-size: var(--bs-table-font-size);
}

.details-label-container {
  width: 10% !important;
}

/* RESPONSIVE SHARED STYLES — narrow-screen controls and footer */
@media (max-width: 767px) {

  .flex-grid .tl,
  .flex-grid .formfields {
    width: 100%;
  }

  #portfolio-list-div {
    min-width: 75%;
    max-width: 100%;
  }

  .company-logo {
    padding-left: 0px !important;
  }

  h6 {
    font-size: small;
  }

  .dropdown-item,
  .dropdown-menu {
    white-space: normal !important;
    word-wrap: break-word !important;
    max-width: 150px;
  }

  .checkbox-center {
    text-align: left;
  }

  .footer>.container-fluid {
    padding-left: 0 !important;
  }

  .footer>.container-fluid>.d-flex {
    flex-direction: column;
  }

  .footer>.container-fluid>.d-flex>div {
    margin-bottom: 0.2rem;
  }

  .footer>.container-fluid>.d-flex>div:last-child {
    margin-bottom: 0;
  }
}

/* GLOBAL FOOTER AND SHARED GRID HELPERS */
.footer-text {
  font-size: small !important;
  margin-bottom: 0;
  color: var(--bs-input-font-color);
}

.footer {
  display: block;
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.footer a {
  font-size: small !important;
}

.flex-grid {
  display: flex;
  flex-wrap: wrap;
}

.flex-grid .heading {
  font-weight: bold;
}

/* PAGE-SPECIFIC CHART AND COMPANY LAYOUT */
#data-points-pie-container {
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
}

/* #company_select_form {
    padding-left: 122px;
} */

.company-info-container {
  display: flex;
  padding-top: 42px;
  padding-left: 8px;
  align-items: center;
}

/* RESPONSIVE SHARED STYLES — detail layouts, navigation and controls */
@media (max-width: 1000px) {



  #company-map-div {
    display: none !important;
  }

  #portfolio-list-div {
    min-width: 75%;
    max-width: 100%;
  }

  .detail-div-7 {
    margin-bottom: 10px;
    max-width: 100% !important;
  }

  .detail-div-5 {
    max-width: 100% !important;
    margin-bottom: 10px;
  }

  .detail-div-5_4 {
    max-width: 100% !important;
  }

  .detail-div-4 {
    max-width: 100% !important;
  }

  .detail-div-2 {
    max-width: 100% !important;
  }

  .detail-div-3 {
    max-width: 100% !important;
    margin-bottom: 8px;
  }

  .company-edit-container {
    flex-direction: column !important;
  }

  .loa-container {
    flex-direction: column !important;
  }

  .detail-div-3_2 {
    max-width: 100% !important;
  }

  .flex-div {
    display: block;
  }

  .footer-container {
    max-width: 63%;
  }

  .small-button {
    margin-top: 0px !important;
  }

  .details-label-container {
    width: 100% !important;
    padding-bottom: 2px;
    margin-top: 22px !important;
  }

  .client-logo svg {
    padding-right: 1px !important;
    height: 22px !important;
  }

  .site-details-div {
    margin-top: 0px !important;
  }
}

@media (max-width: 1480px) {

  #data-row-1,
  #data-row-2,
  #data-row-3 {
    flex-direction: column;
  }
}

@media (min-width: 2800px) {


  h1 {
    font-size: medium;
  }











  .company-logo {
    max-height: 32px !important;
  }



  .filter-option-inner-inner {
    font-size: medium;
    line-height: 1.3rem;
  }

  .text {
    font-size: medium;
  }

  .form-control {
    font-size: medium;
    line-height: 1.2rem;
  }

  .datepicker {
    font-size: medium;
  }

  input[type="number"] {
    font-size: medium;
  }

  [type="button"]:not(:disabled),
  [type="reset"]:not(:disabled),
  [type="submit"]:not(:disabled),
  button:not(:disabled) {
    font-size: medium;
  }

  .fw-bold {
    font-size: medium;
  }

  .icon-svg,
  .bi-unlock-fill {
    width: 20px;
    height: 20px;
  }

  input[type="checkbox"] {
    width: 16px !important;
    height: 16px !important;
  }

  .small-button {
    font-size: medium !important;
  }

  .bi-exclamation-circle-fill {
    width: 20px;
    height: 20px;
  }

  .main-container {
    padding-left: 1.8rem !important;
    padding-right: 1.8rem !important;
  }

  .features-text {
    display: none;
  }



  input[class="datepicker"],
  input[class="timepicker"] {
    width: 200px;
  }

}

@media (max-width: 768px) {

  #company_select_form {
    padding-left: 0px !important;
  }

  .bootstrap-select:not([class*="col-"]):not([class*="form-control"]):not(.input-group-btn) {
    min-width: 140px;
    width: 140px;
  }
}

@media (max-width: 2800px) {
  .small-button {
    width: fit-content;
    font-size: var(--bs-table-font-size);
    margin-top: 12px;
  }
}

/* CHART SIZING AND SHARED DATE/TIME PICKERS */
#cost-column-graph-container {
  min-height: 348px !important;
}

.datepicker-switch:hover,
.prev:hover,
.next:hover {
  color: black !important;
  font-size: var(--bs-table-font-size);
  background-image: linear-gradient(to bottom, #b8e0bb, #d0d9cd) !important;
}

/*.datepicker table tr td:hover {*/
/*    background-image: linear-gradient(to bottom,#b8e0bb,#D0D9CD) !important;*/
/*    color: black !important;*/
/*}*/
.ui-timepicker-standard {
  border: none;
}

.ui-menu-item a:hover {
  background-color: var(--bs-scrollbar-color) !important;
  cursor: pointer !important;
  /*background-color: red !important;*/
}

.ui-timepicker-container {
  background-color: var(--bg-color);
  max-width: fit-content;
  min-width: fit-content !important;
  max-height: 300px !important;
  box-shadow: 0 1.5px 4px var(--bs-dropdown-shadow1-color),
    0 1.5px 6px var(--bs-dropdown-shadow2-color);
}

.ui-timepicker-standard a {
  border: none;
  color: var(--bs-table-font-color) !important;
  font-size: var(--bs-table-font-size);
}

.ui-timepicker-standard .ui-state-hover {
  border: none;
  text-decoration: none;
  background-color: var(--bs-dropdown-link-hover-bg);
  color: var(--bs-table-font-color) !important;
}

/* SHARED COMMENT, TOTAL AND RESPONSIVE GRID HELPERS */
.comment-input {
  width: 100%;
}

.totals-container {
  margin-bottom: 10px;
}

.responsive-grid {
  display: flex;
  flex-wrap: wrap;
  padding-top: 10px;
  padding-bottom: 10px;
  gap: 10px;
}

#site-details textarea {
  width: 100% !important;
}

/* SHARED FILTER CONTROLS — row layout, fields and toggles */

.toggle-handle .btn {
  --bs-btn-padding-x: 0.7rem !important;
}

.toggle-off.btn {
  display: none;
}

/* GLOBAL NAVIGATION — full, mini and burger menus; session timeout */

.modal-backdrop {
  background-color: #000;
  backdrop-filter: blur(4px);
}

/* SHARED INDICATORS, EMPHASIS AND NOTIFICATION UTILITIES */
.indicator {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  margin-right: 8px;
}

.bold-value {
  font-weight: bold;
  font-size: 16px;
}

.bold-link {
  font-weight: bold !important;
  text-decoration: underline;
}

.bold-link:hover {
  text-decoration: none !important;
}

.bold-link a:hover {
  padding: 2px;
  border-radius: 8px;
}

.notify {
  color: var(--font-color) !important;
  background: var(--bs-section-background-color) !important;
  border-radius: 4px;
}

/* SHARED RESULT AND YEAR DISPLAY HELPERS */
.result-container {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.year-div {
  font-weight: bold;
}

.content-span {
  font-size: 16px;
  font-weight: bold;
}

.year-divider {
  width: 100%;
  max-width: 100vw;
  height: 20px;
  margin: 0 auto;
}

/* DASHBOARD LOADING AND NUMERIC INPUT ALIGNMENT */
.dashboard-spinner {
  display: none;
  position: absolute;
  top: 40px;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
}

input[type="number"] {
  text-align: end;
}

/* SHARED ATTACHMENT BADGES AND FILE ICONS */
.attachment-badge {
  position: relative;
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.attachment-badge .filename {
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-56%);
  width: 27px;
  font-size: 9px;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: clip;
  background: rgba(184, 224, 187, 0.9);
  color: #000;
  padding: 1px 2px;
  border-radius: 2px;
  text-align: center;
  pointer-events: none;
}

.file-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--bs-input-font-color);
}

.paperclip-icon {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  color: var(--bs-input-font-color);
}

#building_dashboard_site_image_form .paperclip-icon {
  color: #545454 !important;
}

/* SHARED LARGE MODALS, UNIT TEXT AND BACK BUTTONS */
.modal-xxl {
  max-width: 88% !important;
  width: 88% !important;
}

.unit-text {
  font-size: 0.85em;
  font-weight: normal;
  color: inherit;
}

.btn-back:hover {
  color: var(--bs-input-font-color) !important;
  text-decoration: none !important;
}

.btn-back {
  border: none;
  background-color: transparent;
  margin-top: -14px;
  color: #8D8F90 !important;
  font-size: 22px !important;

}

/* SITE IMAGE CARD — theme fallbacks and image sizing */
.site-image-card .default-light {
  display: block !important;
}

.site-image-card .default-dark {
  display: none !important;
}

[data-theme="dark"] .site-image-card .default-light {
  display: none !important;
}

[data-theme="dark"] .site-image-card .default-dark {
  display: block !important;
}

.site-image-card.has-real .default-light,
.site-image-card.has-real .default-dark {
  display: none !important;
}

.site-image-card .card-img {
  display: block;
  object-fit: contain;
  height: 248px;
}

/* SHARED UNEDITABLE INPUTS AND RETAINED DISABLED CODE */
.uneditable-input {
  cursor: not-allowed;
  background: var(--disabled-bg-color);
  border-color: var(--disabled-border-color);
}

/*input:disabled, select:disabled {*/
/*  cursor: not-allowed;*/
/*  background: var(--disabled-bg-color);*/
/*  border-color: var(--disabled-border-color);*/
/*}*/

/* SHARED METADATA LABEL */
.meta-label {
  font-weight: 800;
}

/* ============================================================
   BREADCRUMBS
   ============================================================ */

/* SHARED COMPACT BUTTONS AND READ-ONLY LABELS */
.small-button {
  padding: 0.28rem 0.65rem;
  font-size: 0.8rem;
  line-height: 1.2;
  border-radius: 0.4rem;
}

.small-button svg {
  flex-shrink: 0;
}

.read-only-label {
  padding-top: 10px;
  padding-left: 46px;
}

/* PAGE-SPECIFIC COMPANY ALIAS AND EMAIL MAPPING FEEDBACK */
#show-company-alias-form-btn {
  cursor: pointer;
}

#email_mapping_success_message {
  color: var(--bs-table-font-color);
}

#mailbox-choice-error-msg-div {
  color: var(--font-color) !important;
}

#email_mapping_success_message {
  color: var(--font-color) !important;
}

/* .modal-backdrop.show {
  z-index: 1050 !important;
} */

/* SHARED MODAL STACKING AND FOCUS STYLES */
.modal-backdrop.show {
  opacity: 0.65;
}

.modal.show {
  z-index: 1055 !important;
}

.modal-header {
  justify-content: space-between;
}

/* Remove inline focus ring from links/buttons that are showing as little boxes */
a.stretched-link:focus,
a.stretched-link:focus-visible,
.btn:focus,
.btn:focus-visible,
.dropdown-toggle:focus,
.dropdown-toggle:focus-visible {
  outline: none !important;
  box-shadow: none !important;
}

/* GLOBAL LINKS — base states — later adjustments (order preserved) */
a,
a:focus,
a:focus-visible,
a:active,
a:hover {
  outline: none !important;
  box-shadow: none !important;
}

/* NOTIFICATION ACTIONS AND MODAL BACKDROP LAYER */
.bulk-notification-button {
  margin-top: 0px !important;
}

.bulk-notification-text {
  font-size: small !important;
  font-weight: 600 !important;
}

.modal-backdrop {
  --bs-backdrop-zindex: 999 !important;
}

/* SHARED CHART TITLES AND SITE DATE-PICKER EXCEPTIONS */
.highcharts-title {
  font-size: 14px !important;
}

#cell-site-detail-datepicker-page {
  padding-bottom: 220px !important;
}

body:has(#cell-site-detail-datepicker-page) .datepicker.datepicker-dropdown,
body:has(#cell-site-detail-datepicker-page) .datepicker.dropdown-menu {
  z-index: 9999 !important;
}

/* SHARED ERROR MODAL */
.error-modal-alert {
  background-color: var(--error-description-bg);
  color: var(--error-description-text);
  border: 1px solid var(--error-description-border);
  border-left: 5px solid var(--error-description-border);
  border-radius: 8px;
  padding: 12px 14px;
  margin: 0 0 14px 0;
  font-weight: 700;
}

#errorModal .modal-dialog,
.error-modal .modal-dialog,
.error-modal-dialog {
  max-width: 520px;
}

#errorModal .modal-content,
.error-modal .modal-content,
.error-modal-content {
  background-color: var(--error-modal-bg);
  color: var(--bs-dropdown-input-border-color);
  border: 2px solid var(--bs-dropdown-input-border-color);
  border-radius: 10px;
  box-shadow: var(--error-modal-shadow);
  overflow: hidden;
}

#errorModal .modal-header,
.error-modal .modal-header {
  background-color: var(--error-modal-header-bg);
  border-bottom: 1px solid var(--bs-dropdown-input-border-color);
}

#errorModal .modal-title,
.error-modal .modal-title {
  font-weight: 700;
}

#errorModal .modal-body,
.error-modal .modal-body {
  color: var(--error-modal-text);
}

#errorModal #error-description,
.error-modal-description {
  background-color: var(--error-description-bg);
  color: var(--error-description-text);
  border: 1px solid var(--error-description-border);
  border-left: 5px solid var(--error-description-border);
  border-radius: 8px;
  padding: 12px 14px;
  margin: 0 0 14px 0;
  font-weight: 700;
}

#errorModal {
  text-align: center;
}

#errorModal #error-reason,
.error-modal-reason {
  color: var(--error-modal-text);
  margin: 0;
  line-height: 1.5;
}

#errorModal .modal-body .container,
.error-modal .modal-body .container,
.error-modal-body-content {
  padding-left: 0;
  padding-right: 0;
}

/* SHARED BOOTSTRAP-SELECT — text overflow, arrow and open states */
.bootstrap-select>.dropdown-toggle {
  position: relative !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box;
  overflow: hidden;
  padding-right: 2rem !important;
}

.bootstrap-select>.dropdown-toggle .filter-option {
  right: 2rem !important;
  width: auto !important;
  max-width: calc(100% - 2rem) !important;
}

.bootstrap-select>.dropdown-toggle .filter-option-inner,
.bootstrap-select>.dropdown-toggle .filter-option-inner-inner {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bootstrap-select>.dropdown-toggle::after,
.bootstrap-select.dropup>.dropdown-toggle::after,
.bootstrap-select.dropend>.dropdown-toggle::after,
.bootstrap-select.dropstart>.dropdown-toggle::after {
  content: "" !important;
  position: absolute !important;
  top: 50% !important;
  right: 0.75rem !important;
  left: auto !important;
  margin: 0 !important;
  vertical-align: 0 !important;
  border-top: 0.35em solid currentColor !important;
  border-right: 0.35em solid transparent !important;
  border-bottom: 0 !important;
  border-left: 0.35em solid transparent !important;
  transform: translateY(-50%) rotate(0deg) !important;
  transform-origin: center !important;
  transition: transform 0.15s ease-in-out !important;
}

.bootstrap-select.dropstart>.dropdown-toggle::before {
  display: none !important;
}

.bootstrap-select.show>.dropdown-toggle::after,
.bootstrap-select>.dropdown-toggle.show::after,
.bootstrap-select>.dropdown-toggle[aria-expanded="true"]::after {
  transform: translateY(-50%) rotate(180deg) !important;
}

.bootstrap-select:not(.show)>.dropdown-toggle:not(.show)::after,
.bootstrap-select>.dropdown-toggle[aria-expanded="false"]::after {
  transform: translateY(-50%) rotate(0deg) !important;
}

/* SEARCH RESULTS CONTAINER AND CLICKABLE ICONS */
#search-modal {
  width: 100%;
  max-height: min(680px, calc(100vh - 260px));
  overflow-y: auto !important;
  overflow-x: auto;
}

.clickable-icon {
  cursor: pointer;
}

/* Allow the mailbox dropdown to extend beyond the modal */
#mailboxChoiceModal .modal-content,
#mailboxChoiceModal .modal-body {
  overflow: visible !important;
}

#mailboxChoiceModal .bootstrap-select,
#mailboxChoiceModal .bootstrap-select .dropdown-menu {
  z-index: 1070 !important;
}

/* SHARED SPIN ANIMATION */
.spin {
  display: inline-block;
  animation: spin 1s linear infinite;
  pointer-events: none;
  opacity: 0.6;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

/* DEMISE SUMMARY — meter text truncation */
.demise-summary-div .demise-meter-preview {
  display: block;
  width: 240px;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis;
  line-height: 18px;
}

/* SHARED SELECT LOADING INDICATOR */
.filter-option-inner-inner.loading-selectpicker {
  color: #FBBF24;
}

/* Global theme colours for editable form fields.
   Applies in both normal and focused states. */
:is(input.form-control,
  textarea,
  select,
  input:not([type]),
  input[type="text"],
  input[type="search"],
  input[type="email"],
  input[type="password"],
  input[type="number"],
  input[type="tel"],
  input[type="url"],
  input[type="date"],
  input[type="datetime-local"],
  input[type="month"],
  input[type="week"],
  input[type="time"]):not(:disabled):not([readonly]) {
  background-color: transparent !important;
  color: var(--bs-input-font-color) !important;
  border-color: var(--bs-dropdown-input-border-color) !important;
}

/* Theme gradient for text fields.
   Keep select arrows and other select background images intact. */
:is(input.form-control,
  input:not([type]),
  input[type="text"],
  input[type="search"],
  input[type="email"],
  input[type="password"],
  input[type="number"],
  input[type="tel"],
  input[type="url"],
  input[type="date"],
  input[type="datetime-local"],
  input[type="month"],
  input[type="week"],
  input[type="time"],
  textarea):not(:disabled):not([readonly]) {
  background-image: var(--bs-gradient);
}

#signin_form #email_input input,
#signin_form #password_input input {
  background: #fff !important;
  color: #545454 !important;
}

#signin_form #email_input input::placeholder,
#signin_form #password_input input::placeholder {
  color: #757575 !important;
  opacity: 1;
}