/*
 * App styles. Theme colors come from
 * @enabel/enabel-bootstrap-theme/dist/css/variables.min.css
 */

:root {
  /* Top offset so the fixed Enabel:Ux navbar doesn't hide the content:
     navbar height (82px with the two-line brand) + breathing room. */
  --app-navbar-offset: 98px;
}

/* Sticky footer styles
-------------------------------------------------- */
html {
  min-height: 100%;
  position: relative;
  scroll-padding-top: var(--app-navbar-offset);
}

body {
  /* Margin bottom by footer height */
  margin-bottom: 60px;
  padding-top: var(--app-navbar-offset);
}

/* With the ImpersonateBanner (28px, it shifts the navbar down): banner +
   navbar + breathing room. The extra `html` beats the component's inline
   style, which assumes a 56px navbar and comes later in the cascade. */
html body:has(.impersonate-banner) {
  --app-navbar-offset: 126px;
}

/* Drop the navbar offset on pages without a fixed navbar (e.g. login). */
body:not(:has(.navbar.fixed-top)) {
  padding-top: 0;
}

/* Adds the vertical breathing room that makes the two-line brand and the
   menu items align nicely (same navbar height as Impala). */
.navbar.fixed-top {
  padding: 0.75rem 0;
}

/* Two-line brand in the navbar: "Enabel" / "<app short name>". */
.navbar .navbar-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: #fff;
  text-decoration: none;
  transition: opacity 0.15s ease-in-out;
}

.navbar .navbar-brand:hover {
  color: #fff;
  opacity: 0.9;
}

.navbar .brand-icon {
  width: 3rem;
  height: 3rem;
  flex-shrink: 0;
  object-fit: contain;
}

.navbar .brand-text {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.navbar .brand-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: #fff;
  line-height: 1;
}

.navbar .brand-subtitle {
  font-size: 0.75rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.8);
  letter-spacing: 0.05em;
}

@media (max-width: 768px) {
  .navbar .brand-icon { width: 2.5rem; height: 2.5rem; }
  .navbar .brand-title { font-size: 1.125rem; }
}

/* The Enabel Bootstrap theme adds padding-top: 4.5rem to main > .container*
   to compensate for a fixed navbar. The body is already padded via
   --app-navbar-offset, so neutralise the theme's padding to avoid stacking. */
main > .container,
main > .container-fluid,
main > .container-sm,
main > .container-md,
main > .container-lg,
main > .container-xl,
main > .container-xxl {
  padding-top: 0;
}

main > .container {
  padding-left: 15px;
  padding-right: 15px;
}

.footer {
  background-color: var(--light);
  bottom: 0;
  height: 60px; /* Set the fixed height of the footer here */
  line-height: 60px; /* Vertically center the text there */
  width: 100%;
}

.footer > .container {
  padding-left: 15px;
  padding-right: 15px;
}

label.form-label.required::after {
  content: " * ";
  color: var(--enabel-primary-red);
}

.main-header {
  margin-top: 0.5rem !important;
  margin-bottom: 0.5rem !important;
  border-bottom: 1px solid var(--enabel-underline-color) !important;
}

/* Custom styles
-------------------------------------------------- */
.nav-divider {
  /* nav-link styles */
  display: block;
  padding: 0.5rem 1rem;
  text-decoration: none;
  /* dropdown-divider styles */
  height: 0;
  margin: 0.5rem 0;
  overflow: hidden;
  border-top: 1px solid rgba(0, 0, 0, 0.15);
}

.reveal-if-active-country {
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transform: scale(0.8);
  transition: 0.5s;
}

#country-radio[type="checkbox"]:checked ~ .reveal-if-active-country {
  opacity: 1;
  max-height: 30rem;
  overflow: visible;
  transform: scale(1);
}

.reveal-if-active-sector {
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transform: scale(0.8);
  transition: 0.5s;
}

#sector-radio[type="checkbox"]:checked ~ .reveal-if-active-sector {
  opacity: 1;
  max-height: 30rem;
  overflow: visible;
  padding-top: 1rem;
  transform: scale(1);
}

.reveal-if-active-pp-dirgen {
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transform: scale(0.8);
  transition: 0.5s;
}

#mandate_submit_ppdirgen:checked ~ .reveal-if-active-pp-dirgen {
  opacity: 1;
  max-height: 30rem;
  overflow: visible;
  padding-top: 1rem;
  transform: scale(1);
}

.reveal-if-active-pp-dirops {
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transform: scale(0.8);
  transition: 0.5s;
}

#mandate_submit_ppdirops:checked ~ .reveal-if-active-pp-dirops {
  opacity: 1;
  max-height: 30rem;
  overflow: visible;
  padding-top: 1rem;
  transform: scale(1);
}

.dashboard-link {
  color: var(--dark);
}

.ais-SearchBox {
  margin: 1em 0;
}

.ais-Hits-item, .ais-InfiniteHits-item, .ais-InfiniteResults-item, .ais-Results-item {
  border-radius: 5px;
  width: calc(100% - 1rem) !important;
  border: 0 !important;
  box-shadow: none !important;
  margin-top: 0 !important;
}

.ais-RefinementList-labelText {
  padding-left: 0.6em;
  padding-right: 0.4em;
}

.step-warning .step-circle {
  color: #fff;
  background-color: var(--warning);
  border-color: var(--warning);
}

.step-warning .step-circle::before {
  color: var(--warning);
}

.step-warning .step-text {
  color: var(--warning);
}
