/**
 * @file Optional micro-utility stylesheet for Kite.
 * @description Provides cloaking protection to prevent uncompiled attribute flash
 * and configures transparent display for custom structural elements.
 */

/* Hides elements until Kite has initialized and removed the attribute */
[kite-cloak] {
  display: none !important;
}

/* Custom structural definitions remain hidden from document layout */
kite-component,
kite-model,
kite-controller,
kite-route,
kite-api,
kite-include,
kite-store,
kite-config,
kite-plugin {
  display: none !important;
}

/* Custom element hosts render transparently in layout flows */
kite-use,
kite-outlet,
kite-fragment {
  display: contents;
}

/* Subtle fade-in transition helper */
.kite-fade-in {
  animation: kiteFadeIn 0.15s ease-in;
}

@keyframes kiteFadeIn {
  from {
    opacity: 0;
    transform: translateY(2px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Dev-mode diagnostics overlay */
kite-dev-overlay {
  position: fixed;
  bottom: 16px;
  right: 16px;
  z-index: 999999;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, monospace;
  font-size: 13px;
  background: #18181b;
  color: #f4f4f5;
  border: 1px solid #ef4444;
  border-radius: 8px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.5);
  max-width: 440px;
  min-width: 320px;
  padding: 14px 16px;
  box-sizing: border-box;
  animation: kiteFadeIn 0.2s ease-out;
}
kite-dev-overlay .kite-overlay-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 600;
  color: #fca5a5;
  margin-bottom: 8px;
}
kite-dev-overlay .kite-overlay-content {
  font-size: 12px;
  line-height: 1.5;
  color: #d4d4d8;
  word-break: break-word;
}
kite-dev-overlay .kite-overlay-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}
kite-dev-overlay .kite-overlay-actions button,
kite-dev-overlay .kite-overlay-actions a {
  background: #27272a;
  color: #fafafa;
  border: 1px solid #3f3f46;
  border-radius: 4px;
  padding: 4px 10px;
  font-size: 11px;
  cursor: pointer;
  text-decoration: none;
}
kite-dev-overlay .kite-overlay-actions button:hover,
kite-dev-overlay .kite-overlay-actions a:hover {
  background: #3f3f46;
}
