/* ============================================================
   App loading screen — V7Like / Ecodrop
   Colors: Bootswatch Minty palette
   ============================================================ */

@keyframes spin-minute {
  to {
    transform: translateX(-50%) rotate(360deg);
  }
}

@keyframes spin-hour {
  to {
    transform: translateX(-50%) rotate(360deg);
  }
}

@keyframes ring-pulse {
  0%,
  100% {
    opacity: 0.25;
    transform: scale(1);
  }
  50% {
    opacity: 0.6;
    transform: scale(1.06);
  }
}

@keyframes fade-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Page */
.app-loading {
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #e8f5f2;
  gap: 1.5rem;
  z-index: 9999;
}

/* Logo */
.app-loading .loading-logo {
  width: 48px;
  height: 48px;
  background: url('/content/images/logo-ecodrop.png') no-repeat center center;
  background-size: contain;
  animation: fade-in 0.4s ease both;
}

/* Clock container */
.app-loading .lds-clock {
  position: relative;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 2.5px solid #78c2ad;
  background: #fff;
  box-shadow: 0 0 0 6px rgba(120, 194, 173, 0.12);
  animation: fade-in 0.4s ease 0.1s both;
}

/* Pulse ring */
.app-loading .lds-clock::before {
  content: '';
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 1.5px solid rgba(120, 194, 173, 0.35);
  animation: ring-pulse 2s ease-in-out infinite;
}

/* Center dot */
.app-loading .lds-clock::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 5px;
  height: 5px;
  background: #5aaa96;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
}

/* Hands shared */
.app-loading .lds-clock div {
  position: absolute;
  left: 50%;
  border-radius: 2px;
  transform-origin: 50% 100%;
  transform: translateX(-50%);
}

/* Minute hand */
.app-loading .lds-clock div:nth-child(1) {
  width: 2px;
  height: 30%;
  top: 20%;
  background: #78c2ad;
  animation: spin-minute 2s linear infinite;
}

/* Hour hand */
.app-loading .lds-clock div:nth-child(2) {
  width: 3px;
  height: 22%;
  top: 28%;
  background: #5aaa96;
  animation: spin-hour 24s linear infinite;
}

/* Brand text */
.app-loading .loading-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  animation: fade-in 0.4s ease 0.2s both;
}

.app-loading .loading-brand-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: #5aaa96;
  letter-spacing: 0.06em;
}

.app-loading .loading-brand-sub {
  font-size: 0.72rem;
  color: #aaa;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
