/* Loader Styles */
.loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.9); /* Semi-transparent white background */
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loader-content {
  position: relative;
  text-align: center;
  display: inline-block;
}

/* Circular rotating line */
.loader-content::before {
  content: "";
  position: absolute;
  top: 40%;
  left: 50%;
  width: 150px;   /* slightly larger than logo */
  height: 150px;
  border: 4px solid rgba(172, 249, 255, 0.2); /* light shade of brand color */
  border-top-color: #35b2aa; /* bright brand color */
  border-radius: 50%;
  transform: translate(-50%, -50%);
  animation: spin 1.2s linear infinite;
  z-index: -1; /* keeps it behind the logo */
}

.loader-logo {
  width: 100px;
  height: auto;
  margin-bottom: 10px;
  position: relative;
  z-index: 1; /* sits above the spinner */
}

.loader-text {
  font-size: 1.5rem;
  font-weight: bold;
  color: #98e2dd;
  margin: 0;
}

/* Hide loader when not needed */
.loader.hidden {
  opacity: 0;
  visibility: hidden;
}

/* Spinner Animation */
@keyframes spin {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to   { transform: translate(-50%, -50%) rotate(360deg); }
}
