/**
 * LangCert Core — front-end app styles.
 * Extends theme tokens (--primary, --border, etc.).
 */

.lc-app {
  padding-top: 0.5rem;
  padding-bottom: 3rem;
}

.lc-app-breadcrumb {
  font-size: 0.875rem;
  margin-bottom: 1.25rem;
  color: var(--muted-fg);
}

.lc-app-breadcrumb a {
  color: var(--primary);
}

.lc-app-breadcrumb a:hover {
  text-decoration: underline;
}

.lc-app-header {
  margin-bottom: 2rem;
}

.lc-app-header h1 {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 800;
  margin-bottom: 0.35rem;
}

.lc-app-subtitle {
  font-size: 1.125rem;
  font-weight: 700;
  margin: 0 0 1rem;
}

/* Progress bars */
.lc-progress-bar {
  height: 0.5rem;
  border-radius: 9999px;
  background: var(--muted);
  overflow: hidden;
}

.lc-progress-bar-lg {
  height: 0.75rem;
  margin-top: 1rem;
}

.lc-progress-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--gradient-hero);
  transition: width 0.4s ease;
}

.lc-progress-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.5rem;
  font-size: 0.8125rem;
}

.lc-readiness-card {
  text-align: center;
}

.lc-readiness-value {
  display: block;
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1;
  color: var(--primary);
}

.lc-module-progress-grid {
  margin-top: 1rem;
}

.lc-module-progress h3 {
  font-size: 1rem;
  font-weight: 700;
}

.lc-recent-list {
  margin-top: 0.75rem;
  font-size: 0.75rem;
  color: var(--muted-fg);
}

.lc-recent-list li {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.25rem 0;
  border-top: 1px solid var(--border);
}

/* Tables */
.lc-table-wrap {
  overflow-x: auto;
}

.lc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.lc-table th,
.lc-table td {
  padding: 0.875rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.lc-table th {
  font-weight: 600;
  color: var(--muted-fg);
  background: var(--muted);
}

.lc-table tbody tr:last-child td {
  border-bottom: 0;
}

/* Badges & alerts */
.lc-badge {
  display: inline-block;
  padding: 0.125rem 0.5rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 700;
  background: var(--accent);
  color: var(--accent-fg);
}

.lc-badge-lg {
  color: var(--primary);
}

.lc-alert {
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  margin-bottom: 1.5rem;
}

.lc-alert-error {
  background: hsl(0 80% 55% / 0.08);
  border-color: hsl(0 80% 55% / 0.25);
  color: var(--foreground);
}

.lc-alert-success {
  background: hsl(142 70% 28% / 0.08);
  border-color: hsl(142 70% 28% / 0.25);
  color: var(--success);
}

/* Mock banner */
.lc-mock-banner-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Study plan */
.lc-study-plan-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.lc-study-focus {
  margin-bottom: 1rem;
  font-size: 0.9375rem;
}

.lc-study-week {
  list-style: none;
  padding: 0;
  margin: 0;
}

.lc-study-week li {
  display: grid;
  grid-template-columns: 3rem 1fr;
  gap: 0.75rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}

.lc-study-week li:last-child {
  border-bottom: 0;
}

.lc-study-day {
  font-weight: 700;
  color: var(--primary);
}

/* Checkout return */
.lc-checkout-icon {
  width: 3rem;
  height: 3rem;
  margin: 0 auto 1rem;
  border-radius: 9999px;
  display: grid;
  place-items: center;
  background: hsl(142 70% 28% / 0.12);
  color: var(--success);
  font-size: 1.5rem;
  font-weight: 700;
}

.lc-checkout-grid {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 768px) {
  .lc-checkout-grid {
    grid-template-columns: 1fr 1.1fr;
    align-items: start;
  }
}

.lc-pay-form .form-row {
  display: grid;
  gap: 1rem;
}

@media (min-width: 480px) {
  .lc-pay-form .form-row {
    grid-template-columns: 1fr 1fr;
  }
}

/* Practice session */
.lc-practice-session {
  max-width: 42rem;
}

.lc-question {
  border: 0;
  margin-inline: 0;
}

.lc-question-prompt {
  font-weight: 600;
  font-size: 0.9375rem;
  line-height: 1.5;
  margin-bottom: 1rem;
  padding: 0;
}

.lc-question-num {
  color: var(--primary);
  margin-right: 0.35rem;
}

.lc-options {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.lc-option {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
}

.lc-option:hover {
  border-color: var(--primary);
  background: var(--accent);
}

.lc-option input {
  margin-top: 0.2rem;
  accent-color: var(--primary);
}

.lc-practice-actions {
  margin-top: 1.5rem;
  padding-bottom: 2rem;
}

.lc-practice-timer {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.lc-timer-display {
  font-variant-numeric: tabular-nums;
  font-size: 1.125rem;
}

/* Results */
.lc-results {
  max-width: 48rem;
}

.lc-results-summary .lc-card {
  min-height: 6rem;
}

.lc-review-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.lc-review-num {
  font-weight: 700;
  color: var(--muted-fg);
}

.lc-review-status {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

.lc-review-item.is-correct {
  border-color: hsl(142 70% 28% / 0.35);
}

.lc-review-item.is-wrong {
  border-color: hsl(14 100% 40% / 0.35);
}

.lc-review-meta {
  display: grid;
  gap: 0.5rem;
  font-size: 0.875rem;
  margin: 0.75rem 0;
}

.lc-review-meta dt {
  font-weight: 600;
  font-size: 0.75rem;
  color: var(--muted-fg);
}

.lc-review-explain {
  font-size: 0.875rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border);
}

/* Partner dl */
.lc-dl {
  display: grid;
  gap: 0.75rem;
}

.lc-dl dt {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted-fg);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.lc-dl dd {
  margin: 0.15rem 0 0;
}

@media (max-width: 640px) {
  .lc-table th:nth-child(3),
  .lc-table td:nth-child(3) {
    display: none;
  }
}
