/**
 * modules.css — patterns reused across multiple modules (not shell-level
 * enough for components.css, but common enough to not repeat per-module).
 */

/* ---------------------------- Grade / data table (calculators) ---------------------------- */

.data-table { width: 100%; border-collapse: collapse; margin-bottom: var(--space-4); }
.data-table th {
  text-align: left;
  font-size: var(--fs-2xs);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-faint);
  padding: var(--space-2) var(--space-2);
  border-bottom: 1px solid var(--color-border);
}
.data-table td { padding: var(--space-2); border-bottom: 1px solid var(--color-border); vertical-align: middle; }
.data-table input, .data-table select { width: 100%; }
.data-table tr:last-child td { border-bottom: none; }
.data-table .row-remove { color: var(--color-text-faint); }
.data-table .row-remove:hover { color: var(--color-danger); }

.result-strip {
  display: flex;
  align-items: center;
  gap: var(--space-6);
  flex-wrap: wrap;
  background: linear-gradient(135deg, rgba(79,70,229,0.08), rgba(124,58,237,0.08));
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  margin: var(--space-4) 0;
}
.result-strip__stat .value { font-family: var(--font-display); font-size: var(--fs-2xl); font-weight: 650; color: var(--color-primary); line-height: 1; }
.result-strip__stat .label { font-size: var(--fs-xs); color: var(--color-text-muted); margin-top: 4px; }

/* ---------------------------- Board (weekly / kanban style planners) ---------------------------- */

.board { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: var(--space-3); align-items: start; }
.board-col { background: var(--color-bg-sunken); border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: var(--space-3); min-height: 120px; transition: background var(--duration-fast) var(--ease-out); }
.board-col__list { min-height: 48px; }
.board-col.drag-list__ghost-target { background: var(--color-surface-active); }
.board-col__title { font-size: var(--fs-xs); font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--color-text-muted); margin-bottom: var(--space-2); display: flex; justify-content: space-between; }
.board-card {
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-2) var(--space-3);
  margin-bottom: var(--space-2);
  font-size: var(--fs-sm);
  box-shadow: var(--shadow-xs);
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
}
.board-card__remove { margin-left: auto; color: var(--color-text-faint); flex-shrink: 0; }
.board-card__remove:hover { color: var(--color-danger); }

/* ---------------------------- List rows (todo / notes / semester / revision) ---------------------------- */

.list-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-3);
  margin-bottom: var(--space-2);
}
.list-row.is-done { opacity: 0.55; }
.list-row.is-done .list-row__title { text-decoration: line-through; }
.list-row__title { font-weight: 600; flex: 1; }
.list-row__meta { font-size: var(--fs-xs); color: var(--color-text-muted); display: flex; gap: var(--space-3); }
.list-row__check {
  width: 20px; height: 20px;
  border-radius: 50%;
  border: 2px solid var(--color-border-strong);
  flex-shrink: 0;
  display: grid; place-items: center;
  background: transparent;
}
.list-row__check.is-checked { background: var(--brand-gradient); border-color: transparent; color: #fff; }

/* ---------------------------- Pomodoro dial ---------------------------- */

.pomodoro-wrap { display: flex; flex-direction: column; align-items: center; gap: var(--space-5); padding: var(--space-6) 0; }
.pomodoro-wrap .progress-ring__label { font-family: var(--font-mono); font-size: var(--fs-2xl); font-weight: 650; }
.pomodoro-modes { display: flex; gap: var(--space-2); }
.pomodoro-modes .btn.is-active { background: var(--brand-gradient); color: #fff; }
.pomodoro-controls { display: flex; gap: var(--space-3); }

/* ---------------------------- Flashcards ---------------------------- */

.flashcard {
  perspective: 1200px;
  width: 100%;
  max-width: 480px;
  height: 260px;
  margin: 0 auto;
}
.flashcard__inner {
  position: relative;
  width: 100%; height: 100%;
  transition: transform var(--duration-slow) var(--ease-out);
  transform-style: preserve-3d;
  cursor: pointer;
}
.flashcard.is-flipped .flashcard__inner { transform: rotateY(180deg); }
.flashcard__face {
  position: absolute; inset: 0;
  backface-visibility: hidden;
  border-radius: var(--radius-xl);
  border: 1px solid var(--color-border);
  background: var(--color-bg-elevated);
  box-shadow: var(--shadow-md);
  display: flex; align-items: center; justify-content: center;
  text-align: center;
  padding: var(--space-6);
  font-size: var(--fs-lg);
  font-weight: 600;
}
.flashcard__face--back { transform: rotateY(180deg); background: linear-gradient(135deg, rgba(79,70,229,0.06), rgba(124,58,237,0.06)); }
.deck-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--space-4); }

/* ---------------------------- Notes ---------------------------- */

.notes-layout { display: grid; grid-template-columns: 240px 1fr; gap: var(--space-4); min-height: 420px; }
.notes-list { border-right: 1px solid var(--color-border); padding-right: var(--space-3); }
.notes-list-item { padding: var(--space-2) var(--space-3); border-radius: var(--radius-md); cursor: pointer; margin-bottom: 2px; }
.notes-list-item:hover { background: var(--color-surface-hover); }
.notes-list-item.is-active { background: var(--color-surface-active); }
.notes-list-item__title { font-weight: 600; font-size: var(--fs-sm); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.notes-list-item__date { font-size: var(--fs-2xs); color: var(--color-text-faint); }
.notes-editor textarea { width: 100%; min-height: 320px; border: none; resize: vertical; font-family: var(--font-mono); font-size: var(--fs-sm); background: transparent; }
.notes-editor textarea:focus { outline: none; box-shadow: none; }

@media (max-width: 720px) {
  .notes-layout { grid-template-columns: 1fr; }
  .notes-list { border-right: none; border-bottom: 1px solid var(--color-border); padding-right: 0; padding-bottom: var(--space-3); max-height: 200px; overflow-y: auto; }
}
