html {
  height: 100%;
  overflow: hidden;
}

body {
  height: 100%;
  overflow: hidden;
}

/* Prevent page-level scrollbar */
.container-fluid {
  overflow: hidden;
  max-height: 100vh;
}

.logo {
  max-height: 6rem;
  max-width: 50vw;
}

#main-row {
  position: relative;
  flex-grow: 1;
  z-index: 0;
  overflow: hidden;
}

/* Main content area scrolling */
main {
  overflow-y: auto;
  min-height: 0;
}

/* Constrain left panel column to main-row height */
.col-auto.left-panel {
  max-height: 100%;
  overflow: hidden;
}

.left-panel-contents {
  padding: 0 16px 16px 16px;
}

/* Panel body scrolling */
#left-panel .offcanvas-body {
  padding-top: 0;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
}

/* Panel header with close button - consistent spacing */
#left-panel .offcanvas-header {
  padding: 8px 16px;
  min-height: auto;
  flex-shrink: 0;
}

/* Modern close button */
#left-panel .btn-close {
  width: 32px;
  height: 32px;
  padding: 0;
  background-color: rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  opacity: 1;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

#left-panel .btn-close:hover {
  background-color: rgba(255, 255, 255, 0.25);
  transform: scale(1.05);
}

#left-panel .btn-close:focus {
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.3);
}

/* Custom scrollbar for panel body (webkit) */
#left-panel .offcanvas-body::-webkit-scrollbar {
  width: 6px;
}

#left-panel .offcanvas-body::-webkit-scrollbar-track {
  background: transparent;
}

#left-panel .offcanvas-body::-webkit-scrollbar-thumb {
  background-color: rgba(255, 255, 255, 0.3);
  border-radius: 3px;
}

#left-panel .offcanvas-body::-webkit-scrollbar-thumb:hover {
  background-color: rgba(255, 255, 255, 0.5);
}

/* Filter category groups */
#filter-form form > div {
  margin-bottom: 20px;
  padding-bottom: 0;
}

/* Filter category header container */
#filter-form form > div > div:first-child {
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

/* Filter category title */
#filter-form form > div > div:first-child > span {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  opacity: 0.85;
}

/* Filter checkbox labels */
#filter-form form > div > label {
  display: flex;
  align-items: center;
  padding: 6px 8px;
  margin: 0 -8px;
  cursor: pointer;
  transition: background-color 0.15s ease;
  border-radius: 4px;
}

#filter-form form > div > label:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

@media only screen and (min-width: 992px) {
  #left-panel {
    position: relative;
    inline-size: 220px;
    max-width: 220px;
    width: 220px;
    display: flex;
    flex-direction: column;
    max-height: 100%;
  }

  /* Add some top padding on desktop to match mobile visual balance */
  #left-panel .offcanvas-body {
    padding-top: 8px;
  }
}

.language-indicator-text {
  color: white;
  font-weight: normal;
}

.offcanvas-lg.offcanvas-start {
  top: auto;
  width: auto;
}

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

.btn {
  padding: 0;
}

i.fi {
  margin: 0 0.5em;
}
