/* IDCraft "view more" — static/idcraft/js/idcraft-more.js. Colours come from
   the page (currentColor + inherit), so it fits the landing page, the public
   pages and the workspace alike. */

.idc-more-hidden { display: none !important; }

.idc-more-in { animation: idcMoreIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) both; animation-delay: var(--idc-more-delay, 0ms); }

@keyframes idcMoreIn {
  from { opacity: 0; transform: translateY(18px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

.idc-more-bar { display: flex; justify-content: center; margin-top: 22px; }

.idc-more-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: 999px;
  border: 1px solid currentColor;
  border-color: color-mix(in srgb, currentColor 22%, transparent);
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.idc-more-btn:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, currentColor 45%, transparent);
  background: color-mix(in srgb, currentColor 6%, transparent);
  box-shadow: 0 12px 26px -16px rgba(5, 28, 18, 0.5);
}

.idc-more-btn i, .idc-clamp-btn i { font-size: 0.75em; transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1); }
.idc-more-btn[aria-expanded="true"] i, .idc-clamp-btn[aria-expanded="true"] i { transform: rotate(180deg); }

/* Clamped text */
.idc-clamp:not(.is-open):not(.idc-clamp--fits) {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: var(--idc-clamp, 4);
  overflow: hidden;
}

.idc-clamp-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 4px;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  opacity: 0.8;
  cursor: pointer;
}

.idc-clamp-btn:hover { opacity: 1; text-decoration: underline; text-underline-offset: 3px; }

/* Collapsed tall block */
.idc-collapse {
  position: relative;
  max-height: var(--idc-collapse-h, 420px);
  overflow: hidden;
  transition: max-height 0.55s cubic-bezier(0.16, 1, 0.3, 1);
}

.idc-collapse:not(.is-open)::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 120px;
  pointer-events: none;
  background: linear-gradient(to bottom, transparent, var(--idc-collapse-fade, var(--lp-bg, var(--bg, #fff))));
}

@media (prefers-reduced-motion: reduce) {
  .idc-more-in { animation: none; }
  .idc-collapse { transition: none; }
}
