@use "../../../styles/abstracts/variables" as *;

/* ================= VARIABLES ================= */
$primary: #5e3817;
$primary-2: #7a4b20;

$text-dark: #1a1a1a;
$text-muted: #6b6b6b;

$bg-soft: #faf8f6;
$border: rgba(0, 0, 0, 0.06);

/* ================= CARD ================= */
.card {
  display: flex;
  gap: 1rem;

  background: #fff;
  border-radius: 20px;
  border: 1px solid $border;

  padding: 1.2rem;

  transition: all 0.25s ease;

  cursor: pointer;

  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);

  &:hover {
    transform: translateY(-5px);
    box-shadow:
      0 20px 50px rgba(0, 0, 0, 0.06),
      0 8px 20px rgba(122, 75, 32, 0.08);
  }
}

/* ================= THUMB ================= */
.thumb {
  width: 90px;
  height: 90px;
  min-width: 90px;

  border-radius: 16px;

  background: linear-gradient(
    135deg,
    rgba(122, 75, 32, 0.12),
    rgba(94, 56, 23, 0.08)
  );
}

/* ================= CONTENT ================= */
.content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

/* ================= HEADER ================= */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;

  h3 {
    font-size: 1rem;
    font-weight: 600;
    color: $text-dark;
  }
}

/* ================= BADGE ================= */
.badge {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  text-transform: capitalize;
}

/* blended status */
.ongoing {
  background: rgba(245, 158, 11, 0.12);
  color: #b45309;
}

.upcoming {
  background: rgba(99, 102, 241, 0.12);
  color: #4338ca;
}

.completed {
  background: rgba(16, 185, 129, 0.12);
  color: #059669;
}

.pending {
  background: rgba(239, 68, 68, 0.12);
  color: #dc2626;
}

/* ================= META ================= */
.meta {
  display: flex;
  gap: 1.2rem;

  font-size: 0.85rem;
  color: $text-muted;

  span {
    display: flex;
    align-items: center;
    gap: 5px;
  }

  svg {
    color: $primary;
  }
}

/* ================= DESCRIPTION ================= */
.description {
  font-size: 0.9rem;
  color: $text-muted;
  line-height: 1.6;

  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ================= ACTIONS ================= */
.actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.4rem;
}

/* ================= BUTTON ================= */
.actions button {
  display: flex;
  align-items: center;
  gap: 6px;

  padding: 6px 10px;

  border-radius: 10px;
  border: none;

  font-size: 0.8rem;
  font-weight: 600;

  cursor: pointer;
  transition: all 0.2s ease;
}

/* VIEW */
.view {
  background: rgba(94, 56, 23, 0.08);
  color: $primary;

  &:hover {
    background: rgba(94, 56, 23, 0.15);
  }
}

/* EDIT */
.edit {
  background: $bg-soft;
  color: $primary-2;

  &:hover {
    background: #f3ece5;
  }
}

/* DELETE */
.delete {
  background: #fff5f5;
  color: #dc2626;

  &:hover {
    background: #ffe5e5;
  }
}

/* ================= SKELETON ================= */
.skeleton {
  pointer-events: none;
}

@keyframes shimmer {
  100% {
    transform: translateX(100%);
  }
}

.thumb,
.skelHeader,
.skelMeta,
.skelDesc,
.skelActions {
  position: relative;
  overflow: hidden;
  background: #eee;
  border-radius: 8px;
}

.thumb::after,
.skelHeader::after,
.skelMeta::after,
.skelDesc::after,
.skelActions::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);

  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.6),
    transparent
  );

  animation: shimmer 1.2s infinite;
}

.skelHeader {
  height: 14px;
  width: 60%;
}

.skelMeta {
  height: 12px;
  width: 80%;
}

.skelDesc {
  height: 12px;
  width: 90%;
}

.skelActions {
  height: 30px;
  width: 50%;
}

/* ================= RESPONSIVE ================= */
@media (max-width: 600px) {
  .card {
    flex-direction: column;
  }

  .thumb {
    width: 100%;
    height: 180px;
  }
}