/* ==========================================================================
   Avezz — Course Lesson Cards (1:1 UI/lesson-cards.html)
   Used inside Course Packs (Text/Course.php) alongside css/pages/pack.css.
   ========================================================================== */

:root {
  --lc-purple: #7c3aed;
  --lc-purple-bg: rgba(124, 58, 237, 0.1);
  --lc-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

[data-theme="dark"] {
  --lc-purple: #bf5af2;
  --lc-purple-bg: rgba(191, 90, 242, 0.15);
}

/* Status Filter Bar */
.lc-filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.lc-pill-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.lc-filter-pill {
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease, transform 0.14s var(--lc-ease);
}

.lc-filter-pill:hover {
  background: var(--surface-muted);
  color: var(--text);
}

.lc-filter-pill:active {
  transform: scale(0.96);
}

.lc-filter-pill.active {
  background: var(--pill-active-bg);
  color: var(--pill-active-text);
  border-color: transparent;
  font-weight: 600;
}

/* Strength Ring */
.lc-ring-wrap {
  position: relative;
  width: 46px;
  height: 46px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
}

.lc-ring-wrap.is-lg {
  width: 60px;
  height: 60px;
}

.lc-ring-wrap svg {
  transform: rotate(-90deg);
  width: 100%;
  height: 100%;
}

.lc-ring-bg {
  fill: none;
  stroke: var(--surface-muted);
  stroke-width: 4;
}

.lc-ring-fg {
  fill: none;
  stroke-width: 4;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.5s var(--lc-ease);
}

.lc-ring-label {
  position: absolute;
  font-size: 11px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}

.lc-ring-wrap.is-lg .lc-ring-label {
  font-size: 13.5px;
}

/* Lesson Card (Grid Mode) */
.lc-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 22px;
  box-shadow: var(--shadow-card);
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: transform 0.24s var(--lc-ease), box-shadow 0.24s var(--lc-ease), border-color 0.2s ease;
  height: 100%;
}

.lc-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04), 0 16px 34px rgba(0, 0, 0, 0.075);
  border-color: var(--border-strong);
}

.lc-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.lc-eyebrow-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.lc-lesson-num {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}

.lc-status-pill {
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
}

.lc-status-progress {
  background: var(--accent-soft);
  color: var(--accent);
}

.lc-status-mastered {
  background: var(--positive-bg);
  color: var(--positive);
}

.lc-status-review {
  background: var(--pending-bg);
  color: var(--pending);
}

.lc-status-new {
  background: var(--lc-purple-bg);
  color: var(--lc-purple);
}

.lc-card-title {
  font-size: 17px;
  font-weight: 650;
  letter-spacing: -0.015em;
  line-height: 1.28;
  margin-top: 5px;
  color: var(--text);
}

.lc-card-title a {
  color: inherit;
  text-decoration: none;
}

.lc-card-title a:hover {
  color: var(--accent);
}

.lc-card-desc {
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.lc-progress-block {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.lc-progress-labels {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-tertiary);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.lc-bar-track {
  height: 4px;
  border-radius: 999px;
  background: var(--surface-muted);
  overflow: hidden;
}

.lc-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--accent);
  transition: width 0.4s var(--lc-ease);
}

.lc-bar-fill.mastered {
  background: var(--positive);
}

.lc-meta-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 10px;
  font-size: 12.5px;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
}

.lc-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.lc-meta-dot {
  color: var(--text-tertiary);
}

.lc-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  margin-top: auto;
  flex-wrap: wrap;
}

.lc-card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.lc-cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 15px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  transition: background 0.16s ease, transform 0.14s var(--lc-ease);
}

.lc-cta-btn:hover {
  background: var(--accent-hover);
}

.lc-cta-btn:active {
  transform: scale(0.96);
}

.lc-edit-icon {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: var(--surface-muted);
  color: var(--text-secondary);
  text-decoration: none;
  transition: background 0.16s ease, color 0.16s ease;
}

.lc-edit-icon:hover {
  background: var(--surface-hover);
  color: var(--text);
}

/* Lesson Card (Structured List Mode) */
.lc-card-list {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 15px 18px;
  display: grid;
  grid-template-columns: auto minmax(0, 1.8fr) minmax(140px, 0.8fr) auto;
  align-items: center;
  gap: 16px;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.lc-card-list:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-card);
}

.lc-list-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.lc-list-main .lc-card-title {
  margin-top: 2px;
  font-size: 15.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lc-list-main .lc-card-desc {
  -webkit-line-clamp: 1;
  font-size: 13px;
}

@media (max-width: 820px) {
  .lc-card-list {
    grid-template-columns: auto minmax(0, 1fr);
  }
  .lc-card-list .lc-progress-block,
  .lc-card-list .lc-card-actions {
    grid-column: 1 / -1;
  }
  .lc-card-list .lc-card-actions {
    justify-content: flex-end;
  }
}
