/* Even home Blog cards (Happy Addons Post Tab) */
.ha-post-tab .ha-post-tab-content {
  position: relative;
  min-height: 280px;
}

.ha-post-tab .ha-post-tab-content.is-loading {
  pointer-events: none;
}

/* Built-in HA spinner — make it a real overlay, not a collapsed blip */
.ha-post-tab span.ha-post-tab-loading {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: flex !important;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 280px;
  height: 100%;
  margin: 0;
  background: rgba(255, 255, 255, 0.72);
  color: #f04f25;
  font-size: 0;
  opacity: 1;
}

/* Prefer our CSS spinner — Elementor icon font is often missing here */
.ha-post-tab span.ha-post-tab-loading .eicon-spinner,
.ha-post-tab span.ha-post-tab-loading i {
  display: none !important;
}

.ha-post-tab span.ha-post-tab-loading::after {
  content: "";
  width: 40px;
  height: 40px;
  border: 3px solid #ffd4c4;
  border-top-color: #f04f25;
  border-radius: 50%;
  animation: asuka-post-tab-spin 0.7s linear infinite;
}

@keyframes asuka-post-tab-spin {
  to {
    transform: rotate(360deg);
  }
}

/* Skeleton cards while waiting for AJAX */
.asuka-post-tab-skel {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  box-sizing: border-box;
  padding: 0;
  background: #fff;
}

.asuka-post-tab-skel-card {
  box-sizing: border-box;
  width: 33.333%;
  padding: 20px 15px;
}

.asuka-post-tab-skel-thumb {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  margin-bottom: 14px;
  border-radius: 4px;
  background: linear-gradient(90deg, #f1f1f1 25%, #f8f8f8 50%, #f1f1f1 75%);
  background-size: 200% 100%;
  animation: asuka-post-tab-shimmer 1.1s ease-in-out infinite;
}

.asuka-post-tab-skel-line {
  display: block;
  height: 12px;
  margin-top: 10px;
  border-radius: 4px;
  background: linear-gradient(90deg, #f1f1f1 25%, #f8f8f8 50%, #f1f1f1 75%);
  background-size: 200% 100%;
  animation: asuka-post-tab-shimmer 1.1s ease-in-out infinite;
}

.asuka-post-tab-skel-line.short {
  width: 62%;
}

@keyframes asuka-post-tab-shimmer {
  0% {
    background-position: 100% 0;
  }
  100% {
    background-position: -100% 0;
  }
}

@media (max-width: 1024px) {
  .asuka-post-tab-skel-card {
    width: 33.333%;
  }
}

@media (max-width: 767px) {
  .asuka-post-tab-skel-card {
    width: 100%;
  }

  .asuka-post-tab-skel-card:nth-child(n + 2) {
    display: none;
  }
}

.ha-post-tab .ha-post-tab-item-wrapper.active {
  align-items: stretch;
}

.ha-post-tab .ha-post-tab-item {
  display: flex;
}

.ha-post-tab .ha-post-tab-item-inner {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
}

.ha-post-tab .ha-post-tab-item-inner .ha-post-tab-thumb {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  margin-bottom: 14px;
  overflow: hidden;
  border-radius: 4px;
  background: #f3f3f3;
}

.ha-post-tab .ha-post-tab-item-inner .ha-post-tab-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center;
}

.ha-post-tab .ha-post-tab-item-inner .ha-post-tab-title {
  flex: 1 1 auto;
  margin: 0;
  min-height: 2.75em;
  font-size: 15px;
  line-height: 1.35;
}

.ha-post-tab .ha-post-tab-item-inner .ha-post-tab-title a {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}
