/* Skeleton loading styles */

/* Base skeleton element */
.skeleton {
  background: linear-gradient(90deg, #f5f5f5 25%, #ececec 50%, #f5f5f5 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s ease-in-out infinite;
  border-radius: 4px;
}

@keyframes skeleton-loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* Skeleton container */
.skeleton-container {
  width: 100%;
  opacity: 1;
  transition: opacity 0.3s ease;
}

.skeleton-container.fade-out {
  opacity: 0;
}

/* Hide content when skeleton is active */
.skeleton-active #header-container,
.skeleton-active #chat-log,
.skeleton-active #sendForm,
.skeleton-active .empty-state,
.skeleton-active #nest-editor-container {
  display: none;
}

/* UI Block skeletons */
.skeleton-header {
  margin-bottom: 48px;
}

.skeleton-user-header {
  width: 150px;
  height: 24px;
  margin-bottom: 8px;
}

.skeleton-title {
  width: 300px;
  height: 48px;
}

.skeleton-chat-area {
  flex: 1;
  min-height: 200px;
  margin-bottom: 16px;
}

.skeleton-input-area {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.skeleton-input-field {
  flex: 1;
  height: 60px;
}

.skeleton-send-button {
  width: 120px;
  height: 60px;
}

/* Nest page skeleton (blog content blocks) */
.skeleton-content-block {
  margin-bottom: 32px;
  opacity: 1;
  transition: opacity 0.3s ease;
}

.skeleton-content-block.fade-out {
  opacity: 0;
}

.skeleton-heading {
  width: 60%;
  height: 32px;
  margin-bottom: 16px;
}

.skeleton-paragraph {
  height: 14px;
  margin-bottom: 8px;
}

.skeleton-paragraph:last-child {
  width: 70%;
}

/* Night shift support */
body.nightshift .skeleton {
  background: linear-gradient(90deg, #2a2a2a 25%, #333333 50%, #2a2a2a 75%);
  background-size: 200% 100%;
}
