/* ============================================================
   Materiais (LG-49)
   ============================================================
   Reusa .tsk-modal / .tsk-modal-card do módulo de tarefas.
   ============================================================ */

/* ─── Toolbar ─────────────────────────────────────────────── */
.mat-toolbar {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}
.mat-busca { max-width: 420px; }

.mat-chips {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}
.mat-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-2);
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 20px;
  cursor: pointer;
  transition: border-color 0.12s, color 0.12s, background 0.12s;
}
.mat-chip:hover:not(.active) { color: var(--text); border-color: var(--line-3); }
.mat-chip.active { color: var(--text); border-color: var(--gold); background: var(--gold-soft); }
.mat-chip-n {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--mute);
  background: var(--bg-4);
  border-radius: 9px;
  padding: 0 6px;
  min-width: 18px;
  text-align: center;
}
.mat-chip.active .mat-chip-n { color: var(--text); background: rgba(0,0,0,0.22); }

/* ─── Pasta ───────────────────────────────────────────────── */
.mat-pasta {
  margin-bottom: 14px;
  border-left: 3px solid var(--pasta-cor, var(--gold));
}
.mat-pasta-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding-bottom: 11px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--line);
}
.mat-pasta-id { display: flex; align-items: flex-start; gap: 11px; }
.mat-pasta-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: var(--radius);
  background: var(--bg-3);
  border: 1px solid var(--line);
  color: var(--pasta-cor, var(--gold));
  flex-shrink: 0;
}
.mat-pasta-nome {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}
.mat-pasta-sub {
  font-size: 11.5px;
  color: var(--mute);
  margin-top: 2px;
}
.mat-pasta-acoes { display: flex; gap: 7px; }

/* ─── Link ────────────────────────────────────────────────── */
.mat-links { display: flex; flex-direction: column; }
.mat-link {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 8px;
  border-radius: var(--radius);
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  transition: background 0.12s;
}
.mat-link:last-child { border-bottom: none; }
.mat-link:hover { background: var(--surface-hover); }
.mat-link-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: var(--bg-3);
  color: var(--gold-light);
  flex-shrink: 0;
}
.mat-link-body { flex: 1; min-width: 0; }
.mat-link-titulo {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mat-link-meta {
  display: block;
  font-size: 11px;
  color: var(--mute);
  margin-top: 1px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mat-link-acoes {
  display: flex;
  gap: 5px;
  flex-shrink: 0;
  opacity: 0;
  transition: opacity 0.12s;
}
.mat-link:hover .mat-link-acoes { opacity: 1; }
.mat-icon-btn {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: var(--bg-3);
  border: 1px solid var(--line);
  color: var(--text-2);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color 0.12s, border-color 0.12s, background 0.12s;
}
.mat-icon-btn:hover { color: var(--text); border-color: var(--line-3); }
.mat-icon-btn.copiado { color: var(--ok); border-color: var(--ok); }

.mat-vazio {
  padding: 18px 8px;
  font-size: 12px;
  color: var(--mute);
  text-align: center;
}

/* touch não tem hover: os botões ficam sempre visíveis */
@media (hover: none) {
  .mat-link-acoes { opacity: 1; }
}

/* ─── Modal ───────────────────────────────────────────────── */
.mat-modal-head {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  padding-bottom: 12px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.mat-modal-body { display: flex; flex-direction: column; gap: 12px; }
.mat-modal-foot {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  align-items: center;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
