/* restyle radio items */
.radio-group .form-check {
    padding-left: 0;
  }

  .radio-group .btn-group > .form-check:not(:last-child) > .btn {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
  }

  .radio-group .btn-group > .form-check:not(:first-child) > .btn {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    margin-left: -1px;
  }

/* DataTables column resizing */
table.dataTable th {
  position: relative;
  user-select: none;
}

table.dataTable th > div[style*="cursor: col-resize"] {
  background: transparent;
  transition: background-color 0.2s;
}

table.dataTable th > div[style*="cursor: col-resize"]:hover {
  background-color: rgba(60, 16, 83, 0.2);
}

table.dataTable th:hover {
  border-right: 2px solid rgba(60, 16, 83, 0.3);
}

  #app-name {
    font-size: 1.5rem; /* Adjust font size */
    font-weight: bold; /* Make the text bold */
    color: #3C1053;       /* Set text color */
    font-family: 'Montserrat', sans-serif;
}
.navbar {
  border-bottom: #3C1053 3px solid;
  background-color: white;
}
.offcanvas-body {
  padding-left: 16px; /* Add space to the left of all items */
}
#menu .nav-link,
#menu .nav-link:hover,
#menu .nav-link:active {
   color: #3C1053;
}
.radio-group .btn {
  margin: 0 !important; /* Remove margin between buttons */
  border-radius: 0 !important;
}

.radio-group .btn:first-child {
  border-top-left-radius: 5px !important;
  border-bottom-left-radius: 5px !important;
}

.radio-group .btn:last-child {
  border-top-right-radius: 5px !important;
  border-bottom-right-radius: 5px !important;
}
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  height: 100%;
  scroll-behavior: smooth;
}

body {
  color: #000000;
  font-size: 16px;
  font-weight: 400;
  line-height: 24px;
  background-color: #ffffff;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  min-height: 100%;
  display: flex;
  flex-direction: column;
}
}

/* Notifications */
.notifications {
  pointer-events: auto;
}

.notification-list {
  display: flex;
  bottom: 0;
  flex-direction: column;
  max-height: 1628px;
  max-width: 420px;
  padding: 16px;
  pointer-events: auto;
  position: fixed;
  right: 0;
  width: 100%;
  z-index: 100;
}

/* Page Container */
.page-container {
  background-image: linear-gradient(to right bottom, rgb(248, 250, 252), rgb(241, 245, 249));
  min-height: 100vh;
  flex: 1; /* Allow it to grow and push footer down */
  display: flex;
  flex-direction: column;
  position: relative;
  /* z-index removed to allow modals to appear above header */
}

/* Remove default Bootstrap container padding-top for Dash apps */
.dash-container.container,
.dash-container.container-fluid {
  padding-top: 1rem !important;
}

/* Main Content - REMOVE THE DUPLICATE AND KEEP ONLY THIS ONE */
.main-content {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 16px;
  background: transparent;
  position: relative;
  z-index: 1;
  flex: 1; /* This makes the main content grow to push footer down */
}
/* Ensure cards don't override the page background */
.card-grid {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
  /* Ensure no background interference */
  background: transparent;
}

/* Header */
.main-header {
  background-color: rgb(255, 255, 255);
  box-shadow: rgba(0, 0, 0, 0.05) 0px 1px 2px 0px;
  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100%;
}

.header-content {
  margin: 0 auto;
  padding: 16px;
  width: 100%;
}

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-right: -1px;
}

.header-left {
  display: flex;
  align-items: center;
}

.menu-button-container {
  margin-left: -12px;
}

.menu-button {
  display: inline-flex;
  align-items: center;
  border-radius: 6px;
  color: #ff1e64;
  font-size: 14px;
  font-weight: 500;
  gap: 6px;
  height: 80px;
  justify-content: center;
  line-height: 20px;
  text-wrap: nowrap;
  transition-duration: 0.15s;
  transition-property: color, background-color, border-color, text-decoration-color, fill, stroke;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
  width: 80px;
  background-color: transparent;
  border: none;
  cursor: pointer;
}

.menu-icon {
  display: block;
  fill: none;
  flex-shrink: 0;
  height: 40px;
  width: 40px;
  stroke: rgb(131, 0, 81);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.5px;
}

.sr-only {
  clip: rect(0, 0, 0, 0);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  position: absolute;
  width: 1px;
}

.branding {
  margin-left: 8px;
}

.site-title {
  color: #4c2c92;
  font-size: 48px;
  font-weight: 700;
  letter-spacing: -0.5px;
  line-height: 56px;
}

.brand-name {
  color: #830051;
}

.site-description {
  color: #666666;
  font-size: 14px;
  line-height: 20px;
  margin-top: 4px;
}

.portal-badge {
  display: flex;
  align-items: center;
  border: 1px solid rgb(226, 232, 240);
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  gap: 4px;
  line-height: 16px;
  padding: 4px 12px;
  transition-duration: 0.15s;
  transition-property: color, background-color, border-color, text-decoration-color, fill, stroke;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

.badge-icon {
  display: block;
  color: rgb(131, 0, 81);
  fill: none;
  height: 14px;
  stroke: rgb(131, 0, 81);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2px;
  width: 14px;
}

/* Divider */
.divider {
  background-color: rgba(131, 0, 81, 1);
  height: 4px;
  width: 100%;
}

/* Data Groups Section */
.data-groups-section {
  margin-bottom: 48px;
  width: 100%;
  background: transparent; /* Ensure no white background */
}

.section-header {
  margin-bottom: 24px;
}

.section-title {
  color: rgb(131, 0, 81);
  font-size: 24px;
  font-weight: 600;
  line-height: 32px;
}

.section-description {
  color: rgb(100, 116, 139);
}

.card-grid {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
  background: transparent;
}

.card.full-width {
  grid-column: span 3;
}

/* Cards */
.card {
  background-color: rgb(255, 255, 255);
  border: 1px solid rgb(226, 232, 240);
  border-radius: 8px;
  box-shadow: rgba(0, 0, 0, 0.05) 0px 2px 3px 0px;
  height: 100%;
  overflow: hidden;
  transition-duration: 0.15s;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
}

.card-hh {
  background-color: var(--bs-card-cap-bg);
  border: 1px solid rgb(226, 232, 240);
  border-radius: 8px;
  box-shadow: rgba(0, 0, 0, 0.05) 0px 2px 3px 0px;
  height: 60%;
  overflow: hidden;
  transition-duration: 0.15s;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}


.card-header {
  display: flex;
  flex-direction: column;
  padding: 24px 24px 12px 24px;
  min-height: 150px;
  flex-shrink: 0;
}

.card-header-table {
  display: flex;
  flex-direction: column;
  padding: 8px 8px 4px 4px;
  min-height: 150px;
  flex-shrink: 0;
}

.card-title {
  color: rgb(131, 0, 81);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.5px;
  line-height: 28px;
}

.card-description {
  color: rgb(100, 116, 139);
  font-size: 14px;
  line-height: 20px;
  margin-top: 6px;
  flex: 1;
}

.card-content {
  padding: 0 24px 24px 24px;
  flex: 1;
}

/* Data List */
.data-list {
  list-style: none;
}

.data-item {
  display: flex;
  align-items: center;
  border-bottom: 1px solid rgb(241, 245, 249);
  justify-content: space-between;
  padding-bottom: 8px;
  margin-top: 8px;
}

.data-item:first-child {
  margin-top: 0;
}

.data-item:last-child {
  border-bottom: none;
}

.data-name-hh {
  font-size: 20px;
  font-weight: bold;
  line-height: 20px;
}

.data-name {
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
}

.view-button {
  display: flex;
  align-items: center;
  border-radius: 6px;
  color: rgb(131, 0, 81);
  font-size: 14px;
  font-weight: 500;
  gap: 4px;
  height: 36px;
  justify-content: center;
  line-height: 20px;
  padding: 0 12px;
  text-wrap: nowrap;
  transition-duration: 0.15s;
  transition-property: color, background-color, border-color, text-decoration-color, fill, stroke;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
  background-color: transparent;
  border: none;
  cursor: pointer;
}

.view-button:hover {
  background-color: rgba(131, 0, 81, 0.05);
}

.external-link-icon {
  display: block;
  fill: none;
  flex-shrink: 0;
  height: 16px;
  stroke: rgb(131, 0, 81);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2px;
  width: 16px;
}

/* Explore Section */
.explore-section {
  background-color: rgba(131, 0, 81, 0.1);
  border-radius: 8px;
  margin-top: 24px;
  padding: 16px;
  position: relative;
  z-index: 100;
  overflow: visible;
}

.explore-title {
  color: rgb(131, 0, 81);
  font-size: 24px;
  font-weight: 600;
  line-height: 32px;
  margin-bottom: 16px;
}

.explore-description {
  color: rgb(71, 85, 105);
  margin-bottom: 24px;
}

.dashboard-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.dashboard-card {
  background-color: rgb(255, 255, 255);
  border: 1px solid rgb(226, 232, 240);
  border-radius: 8px;
  box-shadow: rgba(0, 0, 0, 0.05) 0px 1px 2px 0px;
  padding: 16px;
}

.dashboard-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.dashboard-icon {
  display: block;
  color: rgb(131, 0, 81);
  fill: none;
  height: 20px;
  stroke: rgb(131, 0, 81);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2px;
  width: 20px;
}

.dashboard-title {
  color: rgb(131, 0, 81);
  font-weight: 600;
  font-size: 24px;
  line-height: 32px;
  margin-bottom: 16px;
  margin-top: 16px;
  margin-left: 2%;
}

.dashboard-description {
  color: rgb(100, 116, 139);
  font-size: 14px;
  line-height: 20px;
}

/* Footer */
.site-footer {
  background: transparent; /* Match page background */
  padding: 24px 0;
  text-align: center;
  margin-top: auto; /* Push to bottom */
  width: 100%;
  flex-shrink: 0; /* Prevent footer from shrinking */
}

.footer-content {
  margin: 0 auto;
  padding: 0 16px;
  width: 100%;
}

.copyright {
  color: rgb(100, 116, 139);
  font-size: 14px;
  line-height: 20px;
}

/* Responsive Styles */
@media (max-width: 991px) {
  .card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .main-content {
    padding: 24px 12px;
  }

  .card-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .dashboard-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .explore-section {
    padding: 24px 16px;
  }

  .site-title {
    font-size: 36px;
    line-height: 40px;
  }
}
.table-container {
  max-height: 400px; /* Set the maximum height of the table container */
  overflow-y: auto;  /* Enable vertical scrolling if content exceeds the height */
  overflow-x: auto;  /* Enable horizontal scrolling if content exceeds the width */
  border: 1px solid #ddd; /* Optional: Add a border around the container */
  padding: 10px; /* Optional: Add padding inside the container */
  background-color: #fff; /* Optional: Set a background color */
}
.dt-button {
  position: relative; /* Make the element positioned */
  z-index: 1; /* Stack order */
}

.dt-button-collection .dt-button {
  background-color: #D6DEDC; /* column is off */
  color: #fff; /* Bootstrap button text color */
  border: none; /* Remove default border */
  border-radius: .25rem; /* Bootstrap border radius */
  margin: .5rem; /* Add some margin */
  padding: .375rem .75rem; /* Bootstrap padding */
  /* opacity: 0.4;  Transparency */
}

.dt-button-collection .dt-button.active {
  background-color: rgb(71, 85, 105); /* Darken background for active button */
}

.dt-button-collection {
  position: relative; /* Make the element positioned */
  background-color: #fff; /* Background color */
  border: 1px solid #ccc; /* Border */
  border-radius: .25rem; /* Border radius */
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15); /* Box shadow */
  padding: 1rem; /* Padding */
  z-index: 2; /* Stack order */
}

.dataTables_wrapper table.dataTable tbody td:nth-child(2) {
  min-width: 95px;
}
.btn-danger, .btn-primary, .btn-secondary, .btn-info, .btn-warning {
  border-color: currentColor;
}


.btn-primary {
  background-color: rgb(71, 85, 105);
}

.btn-secondary {
  background-color: #690041;
}
#pagination-container {
  text-align: right;
  position: sticky;
  bottom: 0;
  right: 0;
  background: white;
  z-index: 1000;
  padding: 5px;
  margin-top: 10px;
}
.page-link {
  color: black;
}

.page-link:hover {
  color: black;
}
.dataTables_paginate {
  position: relative;
  z-index: 1; /* Ensure it is above the table */
  margin-top: 10px;
}
li.paginate_button.page-item.active .page-link {
  background-color:  #690041;
  color: white;
}
.dataTables_wrapper .paginate_button {
  color: #690041;
}
.dataTables_wrapper .paginate_button.current {
  color: white;
  background-color: #690041;
}

.dataTables_wrapper .paginate_button:hover {
  color: #ffffff;
  background-color: #690041;
}

/* Ensure modal is above header and all other elements */
.modal {
  z-index: 9999 !important;
  position: fixed !important;
}

.modal-backdrop {
  z-index: 9998 !important;
}

.modal-dialog {
  z-index: 10000 !important;
  position: relative !important;
}

/* Ensure DataTables controls are clickable in modals */
.modal .dataTables_wrapper {
  position: relative;
  z-index: 1050;
}

.modal .dataTables_wrapper .dt-buttons,
.modal .dataTables_wrapper .dataTables_filter,
.modal .dataTables_wrapper .dataTables_length,
.modal .dataTables_wrapper .dataTables_info,
.modal .dataTables_wrapper .dataTables_paginate {
  position: relative;
  z-index: 1051;
}

#dataModal .modal-content {
  height: 100vh;
}

#dataModal .modal-body {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  padding-bottom: 0.25rem;
}

#table-preview-container {
  flex: 1 1 auto;
  min-height: 0;
  height: auto;
  padding-bottom: 0;
}

#dataModal .dataTables_wrapper {
  height: 100%;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

#dataModal .dataTables_wrapper > .top,
#dataModal .dataTables_wrapper > .bottom {
  flex: 0 0 auto;
  background: #fff;
}

#dataModal .dataTables_wrapper > .top {
  padding-bottom: 0.75rem;
}

#dataModal .dataTables_wrapper > .bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: auto;
  padding-top: 0.35rem;
  padding-bottom: 0;
  margin-bottom: 0;
  border-top: 1px solid #dee2e6;
}

#dataModal .dataTables_scroll {
  flex: 1 1 auto;
  min-height: 0;
}

#dataModal .dataTables_scrollHead {
  overflow: hidden !important;
}

#dataModal .dataTables_scrollBody {
  border-top: none !important;
  padding-bottom: 0;
}

#dataModal .dataTables_wrapper .dataTables_info,
#dataModal .dataTables_wrapper .dataTables_paginate {
  margin: 0;
}

.modal .dt-button-collection {
  z-index: 1052 !important;
}

.container-fluid {
  width: 98%;
  padding: 0;
  margin: 0 auto; /* Center the container horizontally */
}
#offcanvasExample {
  background-color: white;
  color: white;
  max-width: 275px;
}

.offcanvas-backdrop {
  background-color: rgba(255, 255, 255, 0.01) !important;
}
.row-spacing {
    margin-bottom: 16px;
     margin-top: 32px;
}

#data-preview {

  max-height: 60vh;
  overflow-y: auto;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
  overflow-x: auto;
  /* display: block; */
}
.select2-container {
    width: 100% !important;  /* Ensure the dropdown takes full width */
}

.subgroup-title {
  color: rgb(131, 0, 81);
  font-size: 14px;
  font-weight: 700;
  line-height: 20px;
  margin-top: 1.5em;
  margin-bottom: 0.5em;
  border-bottom: 1px solid #eee;
  padding-bottom: 2px;
  font-family: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  user-select: none;
}

.subgroup-title:hover {
  color: rgb(100, 0, 62);
}

.subgroup-title::after {
  content: '▼';
  font-size: 10px;
  transition: transform 0.2s;
}

.subgroup-title.collapsed::after {
  transform: rotate(-90deg);
}

.dashboard-columns {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.dashboard-column {
  display: flex;
  flex-direction: column;
}

.dashboard-column .data-list {
  list-style: none;
}
.date-range-container {
  display: flex;
  gap: 2px;
}
.date-filter {
  width: 50%;
  font-size: 12px;
  padding: 2px 4px;
}

.column-title {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    height: 20px; /* Adjust as needed */
    margin-bottom: 5px;
    font-weight: bold;
  }

  .date-range-container {
    display: flex;
    gap: 4px;
  }

  .date-filter {
    padding: 2px 4px;
    font-size: 12px;
    height: 30px; /* Match the height of regular inputs */
  }

  /* Make sure regular inputs have consistent height too */
  #data-preview th input.form-control {
    height: 30px;
    padding: 2px 4px;
    font-size: 12px;
  }
.btn-primary {
  background: linear-gradient(135deg, #6c757d 0%, #868e96 100%);
  color: white;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #5a6268 0%, #6c757d 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(108, 117, 125, 0.3);
  color: white;
}

/* Modern Offcanvas Sidebar Styling */
/* #offcanvasExample {
  background: linear-gradient(145deg, #f0f4f8 0%, #e6eef5 100%);
  /* border-right: 1px solid rgba(131, 0, 81, 0.1);
  box-shadow: 5px 0 15px rgba(0, 0, 0, 0.05);
  max-width: 300px;
  transition: transform 0.3s ease-in-out; */


.offcanvas-header {
  border-bottom: 1px solid rgba(131, 0, 81, 0.1);
  padding: 1.5rem 1rem;
}

.offcanvas-title {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.btn-close {
  background-color: rgba(131, 0, 81, 0.1);
  border-radius: 50%;
  padding: 0.75rem;
  opacity: 0.7;
  transition: all 0.2s ease;
}

.btn-close:hover {
  background-color: rgba(131, 0, 81, 0.2);
  opacity: 1;

}

/* Navigation Menu Items */
#menu {
  margin-top: 1rem;
  width: 100%;
}

#menu .nav-item {
  width: 100%;
  margin-bottom: 0.5rem;
  border-radius: 8px;
  transition: all 0.2s ease;
  overflow: hidden;
}

#menu .nav-item:not([hidden]) {
  animation: fadeIn 0.5s ease forwards;
}

#menu .nav-link {
  display: flex;
  align-items: center;
  padding: 0.75rem 1rem;
  color: #4a4a4a;
  border-radius: 8px;
  transition: all 0.3s ease;
  font-weight: 500;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

#menu .nav-link:before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 4px;
  height: 100%;
  background-color: #830051;
  transform: scaleY(0);
  transition: transform 0.3s ease;
  z-index: -1;
}

#menu .nav-link:hover {
  color: #830051;
  background-color: rgba(131, 0, 81, 0.05);
  padding-left: 1.25rem;
}

#menu .nav-link:hover:before {
  transform: scaleY(1);
}

#menu .nav-link.active {
  background-color: rgba(131, 0, 81, 0.1);
  color: #830051;
  font-weight: 600;
  box-shadow: 0 4px 8px rgba(131, 0, 81, 0.1);
}

#menu .nav-link.active:before {
  transform: scaleY(1);
}

#menu .nav-link i {
  font-size: 1.25rem;
  margin-right: 0.75rem;
  transition: transform 0.3s ease;
}

#menu .nav-link:hover i {
  transform: translateX(2px);
}

#menu .ms-1 {
  font-size: 0.95rem;
  letter-spacing: 0.02rem;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Mobile Optimization */
@media (max-width: 576px) {
  #offcanvasExample {
    max-width: 280px;
  }

  #menu .nav-link {
    padding: 0.6rem 0.75rem;
  }

  .offcanvas-header {
    padding: 1rem;
  }
}


.jumbotron {
  background: white;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(139, 0, 81, 0.15), 0 8px 32px rgba(0, 0, 0, 0.1);
  padding: 48px;
  margin-bottom: 2rem;
  border: 1px solid rgba(139, 0, 81, 0.1);
  opacity: 1;
  position: relative;
  z-index: 1;
}

._dash-container {
        height: 100vh !important;
        width: 100% !important;
    }

  /* Remove any padding/margin from parent containers */
  .plotly-graph-div {
      height: 100vh !important;
  }

  /* Ensure the iframe itself takes full height */
  iframe[src*="django_plotly_dash"] {
      height: 100vh !important;
      width: 100% !important;
      border: none;
  }

  .Select--multi .Select-value {
    background-color: #ebf5ff;
    background-color: rgba(131, 0, 81, .2);
    border-radius: 2px;
    border: 1px solid rgba(131, 0, 81, .2);
    border: 1px solid #830051;
    color: #830051;
    display: inline-block;
    font-size: .9em;
    line-height: 1.4;
    margin-left: 5px;
    margin-top: 5px;
    vertical-align: top;
}

.django-plotly-dash-iframe {
    height: 100vh !important;
    min-height: 100vh !important;
}

.django-plotly-dash-iframe > div {
    position: relative !important;
    height: 100vh !important;            /* Full viewport height */
    width: 100vw !important;             /* Full viewport width */
    padding-bottom: 0 !important;        /* Remove aspect ratio */
    overflow: hidden;
}

.django-plotly-dash-iframe iframe {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    border: none !important;
}

/* Remove any extra spacing from the page container when viewing iframe */
.page-container {
    padding: 0 !important;
    margin: 0 !important;
    height: 100vh !important;
}

/* Adjust the card container for full height */
.django-plotly-dash-app-bmsreadings {
    height: 100vh !important;
    width: 100vw !important;
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 0 !important;
    border: none !important;
}

#menu .nav-link[data-bs-toggle="collapse"] {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

#menu .nav-link[data-bs-toggle="collapse"] .bi-chevron-down {
  transition: transform 0.3s ease;
  font-size: 12px;
}

#menu .nav-link[data-bs-toggle="collapse"][aria-expanded="true"] .bi-chevron-down {
  transform: rotate(180deg);
}

/* Submenu items */
#menu .collapse .nav-pills {
  border-left: 2px solid rgba(131, 0, 81, 0.1);
  padding-left: 8px;
  margin-left: 16px;
}

#menu .collapse .nav-link {
  font-size: 14px;
  padding: 6px 0;
  color: #666;
}

#menu .collapse .nav-link:hover {
  color: #3C1053;
  background-color: rgba(131, 0, 81, 0.05);
}

#menu .collapse .nav-link i {
  font-size: 14px;
}

/* Smooth collapse transition */
.collapse {
    transition: all 0.3s ease;
    overflow: hidden;
    max-height: 0;
}

.collapse.show {
    max-height: 500px; /* Adjust as needed */
}

#test_env_banner {
  background: red;
  color: white;
  padding: 12px;
  border-radius: 8px;
  margin-bottom: 16px;
  width: 100%;
  text-align: center;
}


#filters-wrapper {
    transition: all 0.3s ease;
    border-radius: 0.375rem;
}

#filters-wrapper.pinned {
    position: fixed !important;
    /* top is set dynamically by JavaScript */
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1001; /* Higher than header to stay visible */
    background-color: #fce4f0; /* Solid light purple matching the original color */
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    margin: 0;
    padding: 20px 30px;
    border-radius: 0;
    animation: slideDown 0.3s ease;
}

/* Pin button states */
#pin-filters-btn {
    transition: all 0.3s ease;
}

#pin-filters-btn .bi-pin-angle {
    transition: transform 0.3s ease;
}

#pin-filters-btn.active {
    background-color: #830051;
    color: white;
    border-color: #830051;
}

#pin-filters-btn.active .bi-pin-angle {
    transform: rotate(45deg);
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}
