:root {
  --apphabitat-primary: #0c2b4e;
  --apphabitat-accent: #1d546c;
  --apphabitat-white: #ffffff;
}

.loader-active {
  overflow: hidden;
  height: 100%;
}

.apphabitat-loader {
  position: fixed;
  inset: 0;
  background: var(--apphabitat-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.35s ease, visibility 0.35s ease;
  padding: 0;
  width: 100vw;
  height: 100dvh;
  box-sizing: border-box;
  touch-action: none;
  overscroll-behavior: none;
}

.apphabitat-loader.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-page {
  margin: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--apphabitat-primary);
  color: var(--apphabitat-white);
  font-family: 'Montserrat', 'Inter', sans-serif;
}

.loader-wrap {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px;
  color: var(--apphabitat-white);
  font-family: 'Montserrat', 'Inter', sans-serif;
  width: min(420px, 90vw);
  box-sizing: border-box;
}

.loader-logo {
  width: min(550px, 90vw);
  height: auto;
  margin-bottom: 16px;
}

.loader-text {
  font-size: 1.05rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 12px;
  color: rgba(255, 255, 255, 0.72);
}

.loader-dots {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
}

.loader-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--apphabitat-white);
  opacity: 0.35;
  animation: loader-bounce 1.2s infinite ease-in-out;
}

.loader-dots span:nth-child(2) {
  animation-delay: 0.2s;
}

.loader-dots span:nth-child(3) {
  animation-delay: 0.4s;
}

.loader-dots span:nth-child(4) {
  animation-delay: 0.6s;
}

.loader-dots span:nth-child(5) {
  animation-delay: 0.8s;
}

.loader-dots span:nth-child(1) {
  background: #ffffff;
}

.loader-dots span:nth-child(2) {
  background: #b9d7ea;
}

.loader-dots span:nth-child(3) {
  background: #7fb3d5;
}

.loader-dots span:nth-child(4) {
  background: #5a9cc4;
}

.loader-dots span:nth-child(5) {
  background: #3f7ea6;
}

@keyframes loader-bounce {
  0%,
  80%,
  100% {
    transform: translateY(0);
    opacity: 0.35;
  }
  40% {
    transform: translateY(-8px);
    opacity: 1;
  }
}

@media (max-width: 991.98px) {
  .loader-wrap {
    position: fixed;
    width: min(320px, 90vw);
  }

  .loader-logo {
    width: min(200px, 60vw);
    margin-bottom: 12px;
  }

  .loader-text {
    font-size: 0.92rem;
    letter-spacing: 0.05em;
    margin-bottom: 10px;
  }

  .loader-dots {
    gap: 6px;
  }

  .loader-dots span {
    width: 8px;
    height: 8px;
  }
}

@media (max-width: 600px) {
  .loader-wrap {
    width: min(480px, 90vw);
  }

  .loader-logo {
    width: min(440px, 80vw);
  }

  .loader-text {
    font-size: 0.85rem;
  }
}

