/* Kismatify animated logo loader — used by MFEs + page loaders */

.mfe-loader-container,
.kf-page-loader {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 180px;
  width: 100%;
  padding: 32px 16px;
  box-sizing: border-box;
}

.mfe-loader-container.kf-loader-fullscreen,
.kf-page-loader.kf-loader-fullscreen {
  position: fixed;
  inset: 0;
  z-index: 9999;
  min-height: 100vh;
  background: rgba(8, 20, 44, 0.42);
  backdrop-filter: blur(2px);
}

.mfe-loader-content,
.kf-loader-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 22px 28px;
  border-radius: 20px;
  background: #08142c;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 10px 28px rgba(8, 20, 44, 0.35);
  min-width: 120px;
}

/* Animated ring + logo */
.kf-logo-spinner {
  position: relative;
  width: 88px;
  height: 88px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.kf-logo-spinner.kf-sm {
  width: 52px;
  height: 52px;
}

.kf-logo-spinner.kf-lg {
  width: 104px;
  height: 104px;
}

.kf-logo-spinner__ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid transparent;
  border-top-color: rgba(255, 255, 255, 0.85);
  border-right-color: rgba(255, 255, 255, 0.25);
  animation: kf-spin 0.9s linear infinite;
}

.kf-logo-spinner__glow {
  position: absolute;
  inset: 6px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(99, 140, 255, 0.18) 0%, transparent 70%);
  animation: kf-pulse 1.4s ease-in-out infinite;
}

.kf-logo-spinner__img {
  width: 68%;
  height: 68%;
  border-radius: 50%;
  object-fit: cover;
  position: relative;
  z-index: 1;
  animation: kf-logo-pulse 1.4s ease-in-out infinite;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12);
}

/* CSS-only fallback star ring if image fails */
.kf-logo-spinner__fallback {
  width: 68%;
  height: 68%;
  border-radius: 50%;
  background: #08142c;
  border: 1px solid rgba(255, 255, 255, 0.2);
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  animation: kf-logo-pulse 1.4s ease-in-out infinite;
}

.mfe-loader-text,
.kf-loader-text {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.88);
  text-align: center;
  letter-spacing: 0.2px;
}

/* Inline variant (buttons / list rows) */
.kf-logo-spinner.kf-inline {
  width: 28px;
  height: 28px;
  display: inline-flex;
}

.kf-logo-spinner.kf-inline .kf-logo-spinner__img,
.kf-logo-spinner.kf-inline .kf-logo-spinner__fallback {
  width: 72%;
  height: 72%;
  font-size: 12px;
}

.kf-logo-spinner.kf-inline .kf-logo-spinner__ring {
  border-width: 1.5px;
}

@keyframes kf-spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes kf-logo-pulse {
  0%,
  100% {
    transform: scale(0.94);
  }
  50% {
    transform: scale(1.04);
  }
}

@keyframes kf-pulse {
  0%,
  100% {
    opacity: 0.45;
  }
  50% {
    opacity: 1;
  }
}

/* Light surface variant (cards on grey pages) */
.kf-loader-badge.kf-light {
  background: #ffffff;
  border-color: #e5e7eb;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.kf-loader-badge.kf-light .kf-loader-text {
  color: #374151;
}

.kf-loader-badge.kf-light .kf-logo-spinner__ring {
  border-top-color: #08142c;
  border-right-color: rgba(8, 20, 44, 0.2);
}
