/* ─────────────────────────────────────────────────────────────────────── */
/* Card Component — Ticket Cards & Content Cards                            */
/* ─────────────────────────────────────────────────────────────────────── */

/* ─────────────────────────────────────────────────────────────────────── */
/* Base Card                                                                 */
/* ─────────────────────────────────────────────────────────────────────── */

.card {
  display: flex;
  flex-direction: column;
  background-color: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px 10px 14px;
  transition: var(--transition-colors), var(--transition-motion);
  cursor: pointer;
  position: relative;
  min-width: 0;
  overflow: hidden;
}

.card:hover {
  background-color: var(--card-hover-bg);
  border-color: var(--hover-bd);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px var(--card-glow);
}

/* ─────────────────────────────────────────────────────────────────────── */
/* Card Type Indicator (Left Colored Bar)                                   */
/* ─────────────────────────────────────────────────────────────────────── */

.card[data-type="bug"]::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background-color: var(--t-bug);
  border-radius: var(--radius) 0 0 var(--radius);
}

.card[data-type="feature"]::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background-color: var(--t-feature);
  border-radius: var(--radius) 0 0 var(--radius);
}

.card[data-type="support"]::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background-color: var(--t-support);
  border-radius: var(--radius) 0 0 var(--radius);
}

/* Add padding-left to account for bar */
.card::before {
  transition: var(--transition-colors);
}

/* ─────────────────────────────────────────────────────────────────────── */
/* Card Header (ID + Type Badge)                                            */
/* ─────────────────────────────────────────────────────────────────────── */

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.card-id {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-mute);
  flex-shrink: 0;
}

.card-type-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 6px;
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  flex-shrink: 0;
}

.card-type-badge[data-type="bug"] {
  background-color: var(--t-bug-bg);
  color: var(--t-bug);
  border: 1px solid var(--t-bug-bd);
}

.card-type-badge[data-type="feature"] {
  background-color: var(--t-feature-bg);
  color: var(--t-feature);
  border: 1px solid var(--t-feature-bd);
}

.card-type-badge[data-type="support"] {
  background-color: var(--t-support-bg);
  color: var(--t-support);
  border: 1px solid var(--t-support-bd);
}

/* ─────────────────────────────────────────────────────────────────────── */
/* Card Title                                                                */
/* ─────────────────────────────────────────────────────────────────────── */

.card-title {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--text);
  margin: 0 0 6px 0;
  line-height: 1.35;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* ─────────────────────────────────────────────────────────────────────── */
/* Card Meta (Tags, Status)                                                  */
/* ─────────────────────────────────────────────────────────────────────── */

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 4px;
}

.card-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 6px;
  background-color: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 11px;
  color: var(--text-dim);
  white-space: nowrap;
}

.card-tag-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
  background-color: currentColor;
}

/* ─────────────────────────────────────────────────────────────────────── */
/* Card Footer (Votes, Comments, Visibility)                               */
/* ─────────────────────────────────────────────────────────────────────── */

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
  padding-top: 6px;
  border-top: 1px solid var(--line);
  font-size: 11px;
  color: var(--text-mute);
}

.card-votes {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--text-mute);
  font-weight: 500;
}

.card-votes.active {
  color: var(--accent);
  font-weight: 600;
}

.card-comments {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--text-mute);
}

.card-visibility {
  display: inline-flex;
  align-items: center;
  padding: 2px 6px;
  background-color: var(--bg-2);
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  flex-shrink: 0;
}

/* ─────────────────────────────────────────────────────────────────────── */
/* Content Card (Panel Card, not draggable)                                 */
/* ─────────────────────────────────────────────────────────────────────── */

.card.panel {
  cursor: default;
}

.card.panel:hover {
  transform: none;
}

/* ─────────────────────────────────────────────────────────────────────── */
/* Draggable Card State                                                      */
/* ─────────────────────────────────────────────────────────────────────── */

.card.dragging {
  opacity: 0.5;
  border-color: var(--accent);
}

.card.drag-over {
  border: 2px dashed var(--accent);
  border-radius: var(--radius);
}

/* ─────────────────────────────────────────────────────────────────────── */
/* Empty Card (Placeholder for adding new ticket)                          */
/* ─────────────────────────────────────────────────────────────────────── */

.card.empty {
  border: 2px dashed var(--line);
  background-color: transparent;
  padding: 20px;
  text-align: center;
  cursor: pointer;
}

.card.empty:hover {
  border-color: var(--accent);
  background-color: var(--bg-2);
}

.card.empty-icon {
  font-size: 24px;
  margin-bottom: 8px;
}

.card.empty-text {
  font-size: 12px;
  color: var(--text-mute);
  margin: 0;
}
