/* ── Loading Screen Overlay ── */
.loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #f8f9fc;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.4s ease;
}

.loading-overlay.visible {
  opacity: 1;
  visibility: visible;
}

.loading-overlay.fade-out {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.5s ease;
}

/* ── MorphingSquare — container animado ── */
.loading-morph {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.loading-morph-box {
  position: relative;
  width: 64px;
  height: 64px;
  background: oklch(0.24 0.09 275);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.25);
  animation: morphRotate 2.5s ease-in-out infinite;
}

@keyframes morphRotate {
  0%   { border-radius: 12%; transform: rotate(0deg); }
  50%  { border-radius: 50%; transform: rotate(180deg); }
  100% { border-radius: 12%; transform: rotate(360deg); }
}

/* ── ReceptaLogoSVG — petalas ── */
.loading-morph-svg {
  width: 100%;
  height: 100%;
}

/* ── Mensagem abaixo do logo ── */
.loading-morph-msg {
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: oklch(0.24 0.09 275);
  animation: msgPulse 1.8s ease-in-out infinite;
}

@keyframes msgPulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  .loading-morph-box {
    animation: none;
    border-radius: 12%;
    transform: none;
  }
  .loading-morph-msg {
    animation: none;
    opacity: 1;
  }
}
