/* Card component styles (shared) */
/* Defines: border radius, outlines, shadows, hover states, skeleton helpers */

.card,
.av-card-brutal {
  border-radius: var(--av-card-radius, var(--av-radius));
  border: 2px solid rgba(15, 23, 42, 0.32) !important;
  box-shadow: 3px 3px 0 rgba(15, 23, 42, 0.12);
  transition: transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease;
  overflow: hidden; /* keep child backgrounds from squaring off corners */
  background: var(--av-card);
}

.card.card-hover:hover,
.av-card-brutal.card-hover:hover {
  transform: scale(1.02);
  translate: 0 0;
  box-shadow: 6px 6px 0 rgba(15, 23, 42, 0.18);
}

.av-card-brutal.card-hover:hover {
  border-color: rgba(15, 23, 42, 0.55);
}

.card > .card-header:first-child {
  border-radius: 3.5px 3.5px 0 0;
  border-bottom: 1px solid var(--av-border);
}

/* Ensure all card headers hug the outline radius */
.card .card-header {
  border-radius: 3.5px 3.5px 0 0 !important;
}

.card > .card-body:first-child:last-child {
  border-radius: var(--av-radius);
}

.card > .card-footer:last-child,
.card > .list-group:last-child .list-group-item:last-child {
  border-radius: 0 0 var(--av-radius) var(--av-radius);
}

.card-body {
  background: rgba(255, 255, 255, 0.92);
}

.av-card-header-border-radius {
  border-radius: 3.5px 3.5px 0 0 !important;
}

.card.av-card {
  background: var(--av-card);
  border: 1px solid rgba(28, 34, 48, 0.18);
  border-radius: var(--av-card-radius, var(--av-radius));
  box-shadow: none; /* base (non-clickable) has no shadow */
  overflow: hidden;
}

.card.av-card.av-card-clickable {
  box-shadow: var(--av-shadow-soft);
  transition: transform 140ms ease, box-shadow 140ms ease;
}

.card.av-card.av-card-clickable:hover {
  transform: translate(-2px, -2px);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.14);
}

.av-card__header {
  border-bottom: 1px solid var(--av-border);
  border-radius: var(--av-card-radius, var(--av-radius)) var(--av-card-radius, var(--av-radius)) 0 0;
}

.av-card__body {
  background: rgba(255, 255, 255, 0.92);
}

.av-card__footer {
  border-top: 1px solid var(--av-border);
  background: #f7f8fb;
}

/* Skeleton placeholder */
.av-skeleton {
  position: relative;
  overflow: hidden;
  background: #e5e7eb;
}

.av-skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(255,255,255,0), rgba(255,255,255,0.55), rgba(255,255,255,0));
  transform: translateX(-100%);
  animation: av-skeleton-shimmer 1.2s infinite;
}

.av-skeleton-line {
  height: 10px;
  border-radius: 999px;
}

.av-skeleton-thumb {
  width: 46px;
  height: 46px;
  border-radius: var(--av-thumbnail-radius, 2px);
  flex-shrink: 0;
}

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