/**
 * EntreAgri - Card Styles
 * Cards pour listings et catégories
 */

/* Base card styling */
.uk-card-default {
  border-radius: 16px !important;
  box-shadow: none !important;
  border: 1px solid var(--ea-color-brown) !important;
  display: flex;
  flex-direction: column;
}

/* Equal height cards in grid */
.listings-grid > div {
  display: flex;
}

.listings-grid .uk-card {
  width: 100%;
}

/* Category card for home page */
.card-cat-home {
  background-color: rgba(17, 89, 85, 1);
  border-radius: 16px;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
  display: block;
}

.card-cat-home:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.card-cat-home .thumbnail {
  aspect-ratio: 128/64;
}

.card-cat-home .thumbnail img {
  aspect-ratio: 128/64;
  object-fit: cover;
  opacity: 1;
  transition: opacity 0.2s ease-in;
}

.card-cat-home .thumbnail img[loading="lazy"] {
  background: #e0e0e0;
}

.card-cat-home .thumbnail img.loaded {
  opacity: 1;
}

.card-cat-home .bottom {
  padding: 0px 16px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
}

.card-cat-home .bottom h2 {
  margin: 0;
  font-size: 18px;
  color: white;
  font-weight: 600;
}

.card-cat-home .bottom img {
  max-width: 38px;
  transform: translateY(-16px);
}

/* Listing card component */
app-listing-card {
  display: block;
  height: 100%;
}

/* Blur effect for non-logged users */
.home-listing-blurred {
  filter: blur(4px);
  pointer-events: none;
  user-select: none;
  opacity: 0.85;
}

/* Home page listing cards */
.home-latest-listings > div {
  display: flex;
}

.home-latest-listings .uk-card {
  width: 100%;
  min-height: 280px;
}

/* Status badge */
.ea-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
}

.ea-status-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
}

.ea-status-badge.status-published::before {
  background-color: #22c55e;
}

.ea-status-badge.status-draft::before {
  background-color: #f59e0b;
}

.ea-status-badge.status-closed::before {
  background-color: #ef4444;
}
