/* Crop photo cards (crop-photo.js): photoreal pictures of each field's crop on the farm office pages. */
.crop-photo {
  margin: 0 0 16px;
  border-radius: 14px;
  overflow: hidden;
  background: var(--fh-surface, #1d2a20);
  border: 1px solid var(--fh-line, rgba(255, 255, 255, 0.12));
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.18);
}
.crop-photo.compact {
  max-width: 620px;
}
.crop-gallery .crop-photo.compact {
  max-width: none;
  margin-bottom: 6px;
}
.crop-photo-media {
  position: relative;
  aspect-ratio: 16 / 9;
  max-height: 420px;
  width: 100%;
  overflow: hidden;
  background: linear-gradient(180deg, #a9c7d8 0%, #d9e4c8 55%, #6b5a3e 56%, #4a3d2a 100%);
}
.crop-photo-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.crop-photo-new {
  opacity: 0;
  transition: opacity 0.6s ease;
}
.crop-photo-new.shown {
  opacity: 1;
}
.crop-photo-old {
  filter: saturate(0.6) brightness(0.85);
}
.crop-photo-art {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: end center;
  padding-bottom: 6%;
}
.crop-photo-art svg {
  height: 70%;
  width: auto;
}
.crop-photo-wait {
  position: absolute;
  left: 50%;
  top: 12px;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(10, 20, 12, 0.72);
  color: #f4f1e6;
  font-size: 0.82rem;
  white-space: nowrap;
}
.crop-photo-wait i {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #f2c14e;
  animation: crop-photo-spin 0.9s linear infinite;
}
.crop-photo-wait.failed {
  background: rgba(40, 30, 10, 0.72);
}
@keyframes crop-photo-spin {
  to {
    transform: rotate(360deg);
  }
}
.crop-photo-tag {
  position: absolute;
  left: 10px;
  bottom: 10px;
  padding: 4px 10px;
  border-radius: 8px;
  background: rgba(10, 20, 12, 0.7);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 600;
  max-width: calc(100% - 20px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.crop-photo figcaption {
  color: var(--fh-ink, inherit);
  padding: 10px 14px 12px;
  display: grid;
  gap: 4px;
}
.crop-photo figcaption b {
  font-size: 0.95rem;
}
.crop-photo figcaption small {
  opacity: 0.75;
  font-size: 0.78rem;
  line-height: 1.4;
}
.crop-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}
.crop-gallery-item {
  display: grid;
  align-content: start;
}
html[data-motion='calm'] .crop-photo-wait i {
  animation: none;
}
html[data-motion='calm'] .crop-photo-new {
  transition: none;
}
@media (prefers-reduced-motion: reduce) {
  .crop-photo-wait i {
    animation: none;
  }
  .crop-photo-new {
    transition: none;
  }
}
